[clang] cb6c110 - [analyzer] Silence a warning.

Artem Dergachev via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 10 13:25:59 PDT 2020


Author: Artem Dergachev
Date: 2020-07-10T13:25:46-07:00
New Revision: cb6c1106141efa721a3902a98c37a54d135464fd

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

LOG: [analyzer] Silence a warning.

An old clang warns that the const object has no default constructor so it may
remain uninitialized forever. That's a false alarm because all fields
have a default initializer. Apply the suggested fixit anyway.

Added: 
    

Modified: 
    clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp b/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
index 08413c080d41..cb6f61e86ae3 100644
--- a/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
+++ b/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
@@ -672,7 +672,7 @@ class SymbolicRangeInferrer
     if (!BinaryOperator::isComparisonOp(CurrentOP) || (CurrentOP == BO_Cmp))
       return EmptyRangeSet;
 
-    static const OperatorRelationsTable CmpOpTable;
+    static const OperatorRelationsTable CmpOpTable{};
 
     const SymExpr *LHS = SSE->getLHS();
     const SymExpr *RHS = SSE->getRHS();


        


More information about the cfe-commits mailing list