[clang] 8561e15 - [clang][dataflow] Fix unused-variable warning.
Yitzhak Mandelbaum via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 16 05:37:46 PST 2021
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");
More information about the cfe-commits
mailing list