diff --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp index 5514d25df6cc6..3a91025df6e12 100644 --- a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp +++ b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp @@ -122,7 +122,7 @@ static Value *mergeDistinctValues(QualType Type, Value &Val1, Value *MergedVal = nullptr; if (auto *StructVal1 = dyn_cast(&Val1)) { - auto *StructVal2 = cast(&Val2); + [[maybe_unused]] auto *StructVal2 = cast(&Val2); // Values to be merged are always associated with the same location in // `LocToVal`. The location stored in `StructVal` should therefore also