diff options
author | Martin Braenne <mboehme@google.com> | 2023-07-28 07:42:20 +0000 |
---|---|---|
committer | Martin Braenne <mboehme@google.com> | 2023-07-28 07:57:50 +0000 |
commit | 8c0acbf8370f29943798cd434cd0b91bbd554cdf (patch) | |
tree | 3731149c833646f89d3ce31cf4706eded92c0c00 | |
parent | e56bf133170c9fd49c91fe943ded26a3f2b30a04 (diff) | |
download | llvm-8c0acbf8370f29943798cd434cd0b91bbd554cdf.zip llvm-8c0acbf8370f29943798cd434cd0b91bbd554cdf.tar.gz llvm-8c0acbf8370f29943798cd434cd0b91bbd554cdf.tar.bz2 |
[clang][dataflow] Avoid -Wunused-variable.
-rw-r--r-- | clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp index 903d9ec..214e0c0 100644 --- a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp +++ b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp @@ -686,9 +686,11 @@ void Environment::setValueStrict(const Expr &E, Value &Val) { assert(E.isPRValue()); if (auto *StructVal = dyn_cast<StructValue>(&Val)) { - if (auto *ExistingVal = cast_or_null<StructValue>(getValue(E))) + if ([[maybe_unused]] auto *ExistingVal = + cast_or_null<StructValue>(getValue(E))) assert(&ExistingVal->getAggregateLoc() == &StructVal->getAggregateLoc()); - if (StorageLocation *ExistingLoc = getStorageLocation(E, SkipPast::None)) + if ([[maybe_unused]] StorageLocation *ExistingLoc = + getStorageLocation(E, SkipPast::None)) assert(ExistingLoc == &StructVal->getAggregateLoc()); else setStorageLocation(E, StructVal->getAggregateLoc()); |