summaryrefslogtreecommitdiffstats
path: root/Source/cmConditionEvaluator.cxx
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2021-07-26 01:13:13 (GMT)
committerBrad King <brad.king@kitware.com>2021-08-03 14:55:45 (GMT)
commit047f8321a0923d16b97f70e0b3dcfd1eadeddf6f (patch)
tree7e1079f5f57ecee81b24c5aa0848afaee35f1120 /Source/cmConditionEvaluator.cxx
parent4de2a4a46dcddd3e86c6da8be8a3fe2008b093cf (diff)
downloadCMake-047f8321a0923d16b97f70e0b3dcfd1eadeddf6f.zip
CMake-047f8321a0923d16b97f70e0b3dcfd1eadeddf6f.tar.gz
CMake-047f8321a0923d16b97f70e0b3dcfd1eadeddf6f.tar.bz2
Refactor: Avoid redundant `operator<<` on printing messages
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
Diffstat (limited to 'Source/cmConditionEvaluator.cxx')
-rw-r--r--Source/cmConditionEvaluator.cxx24
1 files changed, 15 insertions, 9 deletions
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index 5f66dbf..5d8dc70 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -193,11 +193,13 @@ cmProp cmConditionEvaluator::GetDefinitionIfUnquoted(
this->Policy54Status == cmPolicies::WARN) {
if (!this->Makefile.HasCMP0054AlreadyBeenReported(this->Backtrace.Top())) {
std::ostringstream e;
- e << (cmPolicies::GetPolicyWarning(cmPolicies::CMP0054)) << "\n";
- e << "Quoted variables like \"" << argument.GetValue()
- << "\" will no longer be dereferenced "
- "when the policy is set to NEW. "
+ // clang-format off
+ e << (cmPolicies::GetPolicyWarning(cmPolicies::CMP0054))
+ << "\n"
+ "Quoted variables like \"" << argument.GetValue() << "\" "
+ "will no longer be dereferenced when the policy is set to NEW. "
"Since the policy is not set the OLD behavior will be used.";
+ // clang-format on
this->Makefile.GetCMakeInstance()->IssueMessage(
MessageType::AUTHOR_WARNING, e.str(), this->Backtrace);
@@ -236,11 +238,14 @@ bool cmConditionEvaluator::IsKeyword(cm::static_string_view keyword,
this->Policy54Status == cmPolicies::WARN) {
if (!this->Makefile.HasCMP0054AlreadyBeenReported(this->Backtrace.Top())) {
std::ostringstream e;
- e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0054) << "\n";
- e << "Quoted keywords like \"" << argument.GetValue()
- << "\" will no longer be interpreted as keywords "
+ // clang-format off
+ e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0054)
+ << "\n"
+ "Quoted keywords like \"" << argument.GetValue() << "\" "
+ "will no longer be interpreted as keywords "
"when the policy is set to NEW. "
"Since the policy is not set the OLD behavior will be used.";
+ // clang-format on
this->Makefile.GetCMakeInstance()->IssueMessage(
MessageType::AUTHOR_WARNING, e.str(), this->Backtrace);
@@ -664,8 +669,9 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList& newArgs,
HandleBinaryOp(result, arg, newArgs, argP1, argP2);
} else if (this->Policy57Status == cmPolicies::WARN) {
std::ostringstream e;
- e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0057) << "\n";
- e << "IN_LIST will be interpreted as an operator "
+ e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0057)
+ << "\n"
+ "IN_LIST will be interpreted as an operator "
"when the policy is set to NEW. "
"Since the policy is not set the OLD behavior will be used.";