Author: Timm Bäder Date: 2023-10-26T11:40:43+02:00 New Revision: f8b7506e2db2a162deec8343d6942258484be233
URL: https://github.com/llvm/llvm-project/commit/f8b7506e2db2a162deec8343d6942258484be233 DIFF: https://github.com/llvm/llvm-project/commit/f8b7506e2db2a162deec8343d6942258484be233.diff LOG: [clang][NFC] Move a variable into the closest scope AllocType is not used anywhere else. Added: Modified: clang/lib/AST/ExprConstant.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index eea0827d6f7a8a1..320e2ef12c38db3 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -6867,8 +6867,8 @@ static std::optional<DynAlloc *> CheckDeleteKind(EvalInfo &Info, const Expr *E, return std::nullopt; } - QualType AllocType = Pointer.Base.getDynamicAllocType(); if (DeallocKind != (*Alloc)->getKind()) { + QualType AllocType = Pointer.Base.getDynamicAllocType(); Info.FFDiag(E, diag::note_constexpr_new_delete_mismatch) << DeallocKind << (*Alloc)->getKind() << AllocType; NoteLValueLocation(Info, Pointer.Base); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits