From 514cbbc76ee56692af4d626e6268d24ea738369d Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 27 Oct 2025 16:21:54 -0400 Subject: [PATCH] ast-grep: combine string literal arguments in `cmStrCat` --- Source/cmBinUtilsLinker.cxx | 6 ++++-- Source/cmGeneratorExpressionNode.cxx | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/cmBinUtilsLinker.cxx b/Source/cmBinUtilsLinker.cxx index ae43557ec6..9766f8d175 100644 --- a/Source/cmBinUtilsLinker.cxx +++ b/Source/cmBinUtilsLinker.cxx @@ -36,8 +36,10 @@ void cmBinUtilsLinker::NormalizePath(std::string& path) const if (policy == cmPolicies::WARN) { this->Archive->GetMakefile()->IssueMessage( MessageType::AUTHOR_WARNING, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0207), '\n', - "Path\n \"", path, + cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0207), + "\n" + "Path\n \"", + path, "\"\n" "would be converted to\n \"", normalizedPath, "\"\n")); diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 599719561d..d6c1d88eb8 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -5053,7 +5053,8 @@ struct TargetOutputNameArtifactResultGetter postfix != Postfix::Unspecified) { eval->Context.LG->GetCMakeInstance()->IssueMessage( MessageType::AUTHOR_WARNING, - cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0202), '\n', + cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0202), + "\n" "\"POSTFIX\" option is recognized only when the policy is " "set to NEW. Since the policy is not set, the OLD behavior " "will be used."),