r352761 - Accomodate gcc 7.3.0's -Wdangling-else

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 31 07:26:03 PST 2019


Author: nico
Date: Thu Jan 31 07:26:03 2019
New Revision: 352761

URL: http://llvm.org/viewvc/llvm-project?rev=352761&view=rev
Log:
Accomodate gcc 7.3.0's -Wdangling-else

Modified:
    cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp

Modified: cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp?rev=352761&r1=352760&r2=352761&view=diff
==============================================================================
--- cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp (original)
+++ cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp Thu Jan 31 07:26:03 2019
@@ -88,8 +88,9 @@ public:
   void checkLocation(SVal Loc, bool IsLoad, const Stmt *S,
                      CheckerContext &C) const {
     auto UnaryOp = dyn_cast<UnaryOperator>(S);
-    if (UnaryOp && !IsLoad)
+    if (UnaryOp && !IsLoad) {
       EXPECT_FALSE(UnaryOp->isIncrementOp());
+    }
   }
 };
 




More information about the cfe-commits mailing list