[clang] 5f667a5 - [clang][dataflow] Fix -Wunused-const-variable in WatchedLiteralsSolver.cpp (NFC)
Jie Fu via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 5 00:03:46 PDT 2023
Author: Jie Fu
Date: 2023-09-05T15:03:07+08:00
New Revision: 5f667a57b5329f449d27f514d041d457b1ea9da6
URL: https://github.com/llvm/llvm-project/commit/5f667a57b5329f449d27f514d041d457b1ea9da6
DIFF: https://github.com/llvm/llvm-project/commit/5f667a57b5329f449d27f514d041d457b1ea9da6.diff
LOG: [clang][dataflow] Fix -Wunused-const-variable in WatchedLiteralsSolver.cpp (NFC)
/data/llvm-project/clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp:62:26: error: unused variable 'NullLit' [-Werror,-Wunused-const-variable]
static constexpr Literal NullLit = 0;
Added:
Modified:
clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp
Removed:
################################################################################
diff --git a/clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp b/clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp
index 05ae36ddbc898e..ab3a8104e31717 100644
--- a/clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp
+++ b/clang/lib/Analysis/FlowSensitive/WatchedLiteralsSolver.cpp
@@ -59,7 +59,7 @@ using Literal = uint32_t;
/// A null literal is used as a placeholder in various data structures and
/// algorithms.
-static constexpr Literal NullLit = 0;
+[[maybe_unused]] static constexpr Literal NullLit = 0;
/// Returns the positive literal `V`.
static constexpr Literal posLit(Variable V) { return 2 * V; }
More information about the cfe-commits
mailing list