summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionNode.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-05-17 18:21:42 (GMT)
committerBrad King <brad.king@kitware.com>2022-05-24 13:09:44 (GMT)
commitaa3649eb0488fe9ea82c330f2c0c606bbb9d32f4 (patch)
tree0709bde281596e328aa27adb41380bbd1cd046a9 /Source/cmGeneratorExpressionNode.cxx
parent6ff03d463f40176389943100690cf1ca8593d739 (diff)
downloadCMake-aa3649eb0488fe9ea82c330f2c0c606bbb9d32f4.zip
CMake-aa3649eb0488fe9ea82c330f2c0c606bbb9d32f4.tar.gz
CMake-aa3649eb0488fe9ea82c330f2c0c606bbb9d32f4.tar.bz2
clang-tidy: fix `performance-unnecessary-copy-initialization` lints
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r--Source/cmGeneratorExpressionNode.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 26ffd4b..beb623f 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -413,7 +413,7 @@ static const struct TargetExistsNode : public cmGeneratorExpressionNode
return std::string();
}
- std::string targetName = parameters.front();
+ std::string const& targetName = parameters.front();
if (targetName.empty() ||
!cmGeneratorExpression::IsValidTargetName(targetName)) {
reportError(context, content->GetOriginalExpression(),
@@ -445,7 +445,7 @@ static const struct TargetNameIfExistsNode : public cmGeneratorExpressionNode
return std::string();
}
- std::string targetName = parameters.front();
+ std::string const& targetName = parameters.front();
if (targetName.empty() ||
!cmGeneratorExpression::IsValidTargetName(targetName)) {
reportError(context, content->GetOriginalExpression(),
@@ -1759,7 +1759,7 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
const GeneratorExpressionContent* content,
cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override
{
- std::string tgtName = parameters.front();
+ std::string const& tgtName = parameters.front();
cmGeneratorTarget* gt = context->LG->FindGeneratorTargetToUse(tgtName);
if (!gt) {
std::ostringstream e;
@@ -1847,7 +1847,7 @@ static const struct TargetRuntimeDllsNode : public cmGeneratorExpressionNode
const GeneratorExpressionContent* content,
cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override
{
- std::string tgtName = parameters.front();
+ std::string const& tgtName = parameters.front();
cmGeneratorTarget* gt = context->LG->FindGeneratorTargetToUse(tgtName);
if (!gt) {
std::ostringstream e;
@@ -2396,7 +2396,7 @@ protected:
cmGeneratorExpressionDAGChecker* dagChecker) const
{
// Lookup the referenced target.
- std::string name = parameters.front();
+ std::string const& name = parameters.front();
if (!cmGeneratorExpression::IsValidTargetName(name)) {
::reportError(context, content->GetOriginalExpression(),