[flang-commits] [flang] 20411c7 - [flang] Apply fixes from readability-string-compare (NFC)

Kazu Hirata via flang-commits flang-commits at lists.llvm.org
Sun Apr 16 08:31:30 PDT 2023


Author: Kazu Hirata
Date: 2023-04-16T08:31:23-07:00
New Revision: 20411c70298bad7101137ff309e180f7fdabea43

URL: https://github.com/llvm/llvm-project/commit/20411c70298bad7101137ff309e180f7fdabea43
DIFF: https://github.com/llvm/llvm-project/commit/20411c70298bad7101137ff309e180f7fdabea43.diff

LOG: [flang] Apply fixes from readability-string-compare (NFC)

Added: 
    

Modified: 
    flang/lib/Evaluate/intrinsics.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Evaluate/intrinsics.cpp b/flang/lib/Evaluate/intrinsics.cpp
index 7134c3b6858ea..649d46886e98d 100644
--- a/flang/lib/Evaluate/intrinsics.cpp
+++ b/flang/lib/Evaluate/intrinsics.cpp
@@ -1657,9 +1657,9 @@ std::optional<SpecificCall> IntrinsicInterface::Match(
           // max(a1=x) or max(a2=x)
           const auto kwA1{dummy[0].keyword};
           const auto kwA2{dummy[1].keyword};
-          if (maxMinKeywords.begin()->ToString().compare(kwA1) == 0) {
+          if (maxMinKeywords.begin()->ToString() == kwA1) {
             messages.Say("missing mandatory 'a2=' argument"_err_en_US);
-          } else if (maxMinKeywords.begin()->ToString().compare(kwA2) == 0) {
+          } else if (maxMinKeywords.begin()->ToString() == kwA2) {
             messages.Say("missing mandatory 'a1=' argument"_err_en_US);
           } else {
             messages.Say(


        


More information about the flang-commits mailing list