[clang] b2a37cf - [Analyzer] Replace `assert` with `ASSERT_TRUE` in a unit test to silence warnings

Adam Balogh via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 12 08:08:40 PDT 2020


Author: Adam Balogh
Date: 2020-06-12T17:09:34+02:00
New Revision: b2a37cfe2bda0bc8c4d2e981922b5ac59c429bdc

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

LOG: [Analyzer] Replace `assert` with `ASSERT_TRUE` in a unit test to silence warnings

Added: 
    

Modified: 
    clang/unittests/StaticAnalyzer/ParamRegionTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/StaticAnalyzer/ParamRegionTest.cpp b/clang/unittests/StaticAnalyzer/ParamRegionTest.cpp
index 7ec032a7beae..3dbbc7ba1578 100644
--- a/clang/unittests/StaticAnalyzer/ParamRegionTest.cpp
+++ b/clang/unittests/StaticAnalyzer/ParamRegionTest.cpp
@@ -19,7 +19,7 @@ class ParamRegionTestConsumer : public ExprEngineConsumer {
   void checkForSameParamRegions(MemRegionManager &MRMgr,
                                 const StackFrameContext *SFC,
                                 const ParmVarDecl *PVD) {
-    assert(llvm::all_of(PVD->redecls(), [&](const clang::VarDecl *D2) {
+    ASSERT_TRUE(llvm::all_of(PVD->redecls(), [&](const clang::VarDecl *D2) {
       return MRMgr.getVarRegion(PVD, SFC) ==
              MRMgr.getVarRegion(cast<ParmVarDecl>(D2), SFC);
     }));


        


More information about the cfe-commits mailing list