[llvm-branch-commits] [clang] a032a4e - [-Wcalled-once-parameter][NFC] Fix operator precedence warning

Yang Fan via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jan 5 20:22:04 PST 2021


Author: Yang Fan
Date: 2021-01-06T12:16:30+08:00
New Revision: a032a4e7998c9adc7faea9e7b8e36a9552d3503b

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

LOG: [-Wcalled-once-parameter][NFC] Fix operator precedence warning

Added: 
    

Modified: 
    clang/lib/Analysis/CalledOnceCheck.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Analysis/CalledOnceCheck.cpp b/clang/lib/Analysis/CalledOnceCheck.cpp
index 2eff97640dfa..6b7d3790e3e5 100644
--- a/clang/lib/Analysis/CalledOnceCheck.cpp
+++ b/clang/lib/Analysis/CalledOnceCheck.cpp
@@ -573,8 +573,8 @@ class CalledOnceChecker : public ConstStmtVisitor<CalledOnceChecker> {
         CheckConventionalParameters(CheckConventionalParameters),
         CurrentState(0) {
     initDataStructures();
-    assert(size() == 0 ||
-           !States.empty() && "Data structures are inconsistent");
+    assert((size() == 0 || !States.empty()) &&
+           "Data structures are inconsistent");
   }
 
   //===----------------------------------------------------------------------===//


        


More information about the llvm-branch-commits mailing list