[clang] [clang][bytecode][NFC] Use auto* if we can (PR #213209)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 30 22:56:59 PDT 2026
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/213209
Instad of just auto.
>From 90f8693d90144ebbbf1aeed7877772e5c255bfef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Fri, 31 Jul 2026 07:54:27 +0200
Subject: [PATCH] [clang][bytecode][NFC] Use auto* if we can
Instad of just auto.
---
clang/lib/AST/ByteCode/Interp.cpp | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp
index 23bdc5ea28c03..6927be380b28a 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -1889,8 +1889,8 @@ bool CallVar(InterpState &S, CodePtr OpPC, const Function *Func,
if (!CheckCallDepth(S, OpPC))
return false;
- auto Memory = new char[InterpFrame::allocSize(Func)];
- auto NewFrame = new (Memory) InterpFrame(S, Func, S.PC, VarArgSize);
+ auto *Memory = new char[InterpFrame::allocSize(Func)];
+ auto *NewFrame = new (Memory) InterpFrame(S, Func, S.PC, VarArgSize);
InterpFrame *FrameBefore = S.Current;
S.Current = NewFrame;
@@ -1982,8 +1982,8 @@ bool Call(InterpState &S, CodePtr OpPC, const Function *Func,
if (!CheckCallDepth(S, OpPC))
return cleanup();
- auto Memory = new char[InterpFrame::allocSize(Func)];
- auto NewFrame = new (Memory) InterpFrame(S, Func, S.PC, VarArgSize);
+ auto *Memory = new char[InterpFrame::allocSize(Func)];
+ auto *NewFrame = new (Memory) InterpFrame(S, Func, S.PC, VarArgSize);
InterpFrame *FrameBefore = S.Current;
S.Current = NewFrame;
@@ -3077,7 +3077,7 @@ static bool castBackMemberPointer(InterpState &S,
unsigned OldPathLength = MemberPtr.getPathLength();
unsigned NewPathLength = OldPathLength - 1;
bool IsDerivedMember = NewPathLength != 0;
- auto NewPath = S.allocMemberPointerPath(NewPathLength);
+ auto *NewPath = S.allocMemberPointerPath(NewPathLength);
std::copy_n(MemberPtr.path(), NewPathLength, NewPath);
S.Stk.push<MemberPointer>(MemberPtr.atInstanceBase(BaseOffset, NewPathLength,
@@ -3093,7 +3093,7 @@ static bool appendToMemberPointer(InterpState &S,
unsigned OldPathLength = MemberPtr.getPathLength();
unsigned NewPathLength = OldPathLength + 1;
- auto NewPath = S.allocMemberPointerPath(NewPathLength);
+ auto *NewPath = S.allocMemberPointerPath(NewPathLength);
std::copy_n(MemberPtr.path(), OldPathLength, NewPath);
NewPath[OldPathLength] = cast<CXXRecordDecl>(BaseDecl);
@@ -3177,7 +3177,7 @@ bool CopyMemberPtrPath(InterpState &S, const RecordDecl *Entry,
unsigned OldPathLength = MemberPtr.getPathLength();
unsigned NewPathLength = OldPathLength + 1;
- auto NewPath = S.allocMemberPointerPath(NewPathLength);
+ auto *NewPath = S.allocMemberPointerPath(NewPathLength);
std::copy_n(MemberPtr.path(), OldPathLength, NewPath);
NewPath[OldPathLength] = cast<CXXRecordDecl>(Entry);
More information about the cfe-commits
mailing list