Author: Fangrui Song Date: 2023-06-26T14:00:59-07:00 New Revision: d54bd7aced8b75e04a2925ce99c816f55c350428
URL: https://github.com/llvm/llvm-project/commit/d54bd7aced8b75e04a2925ce99c816f55c350428 DIFF: https://github.com/llvm/llvm-project/commit/d54bd7aced8b75e04a2925ce99c816f55c350428.diff LOG: [dataflow] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after D153006 Added: Modified: clang/lib/Analysis/FlowSensitive/RecordOps.cpp Removed: ################################################################################ diff --git a/clang/lib/Analysis/FlowSensitive/RecordOps.cpp b/clang/lib/Analysis/FlowSensitive/RecordOps.cpp index b32bf35aa28fd..d7145b0e2b312 100644 --- a/clang/lib/Analysis/FlowSensitive/RecordOps.cpp +++ b/clang/lib/Analysis/FlowSensitive/RecordOps.cpp @@ -19,17 +19,15 @@ namespace dataflow { void copyRecord(AggregateStorageLocation &Src, AggregateStorageLocation &Dst, Environment &Env) { - QualType Type = Src.getType(); - LLVM_DEBUG({ if (Dst.getType().getCanonicalType().getUnqualifiedType() != - Type.getCanonicalType().getUnqualifiedType()) { - llvm::dbgs() << "Source type " << Type << "\n"; + Src.getType().getCanonicalType().getUnqualifiedType()) { + llvm::dbgs() << "Source type " << Src.getType() << "\n"; llvm::dbgs() << "Destination type " << Dst.getType() << "\n"; } }); assert(Dst.getType().getCanonicalType().getUnqualifiedType() == - Type.getCanonicalType().getUnqualifiedType()); + Src.getType().getCanonicalType().getUnqualifiedType()); for (auto [Field, SrcFieldLoc] : Src.children()) { assert(SrcFieldLoc != nullptr); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits