Skip to content

Commit

Permalink
[clang][NFC] Move a variable into the closest scope
Browse files Browse the repository at this point in the history
AllocType is not used anywhere else.
  • Loading branch information
tbaederr committed Oct 26, 2023
1 parent 1217a54 commit f8b7506
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/AST/ExprConstant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f8b7506

Please sign in to comment.