Author: Yitzhak Mandelbaum
Date: 2021-12-16T13:37:17Z
New Revision: 8561e15c5befd84542637493a76c8f2de25d08b9

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

LOG: [clang][dataflow] Fix unused-variable warning.

Added: 
    

Modified: 
    clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp

Removed: 
    


################################################################################
diff  --git 
a/clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp 
b/clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp
index 60b345ef9fce..c2ba3b965004 100644
--- 
a/clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp
+++ 
b/clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp
@@ -165,7 +165,7 @@ class ConstantPropagationAnalysis
     // Any assignment involving the expression itself resets the variable to
     // "unknown". A more advanced analysis could try to evaluate the compound
     // assignment. For example, `x += 0` need not invalidate `x`.
-    if (const auto *E = Nodes.getNodeAs<clang::Expr>(kAssignment))
+    if (Nodes.getNodeAs<clang::Expr>(kAssignment))
       return ConstantPropagationLattice::top();
 
     llvm_unreachable("expected at least one bound identifier");


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to