r315621 - [SemaChecking] Suppress a GCC warning. NFCI.

Davide Italiano via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 12 14:08:29 PDT 2017


Author: davide
Date: Thu Oct 12 14:08:29 2017
New Revision: 315621

URL: http://llvm.org/viewvc/llvm-project?rev=315621&view=rev
Log:
[SemaChecking] Suppress a GCC warning. NFCI.

Modified:
    cfe/trunk/lib/Sema/SemaChecking.cpp

Modified: cfe/trunk/lib/Sema/SemaChecking.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=315621&r1=315620&r2=315621&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaChecking.cpp (original)
+++ cfe/trunk/lib/Sema/SemaChecking.cpp Thu Oct 12 14:08:29 2017
@@ -8652,7 +8652,8 @@ bool CheckTautologicalComparison(Sema &S
 
   bool ConstIsLowerBound = (Op == BO_LT || Op == BO_LE) ^ RhsConstant;
   bool ResultWhenConstEqualsOther = (Op == BO_LE || Op == BO_GE);
-  bool ResultWhenConstNeOther = ConstIsLowerBound ^ ValueType == LimitType::Max;
+  bool ResultWhenConstNeOther =
+      ConstIsLowerBound ^ (ValueType == LimitType::Max);
   if (ResultWhenConstEqualsOther != ResultWhenConstNeOther)
     return false; // The comparison is not tautological.
 




More information about the cfe-commits mailing list