Skip to content

Commit e4cf0a0

Browse files
authored
[clang][bytecode][NFC] Check for custom typechecking in call cleanup (#106826)
The comment already explains that this is only true for _some_ builtin functions. This also brings the time it takes me to run the builtin-functions.cpp test locally from 50s down to 47s.
1 parent fa93be4 commit e4cf0a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/AST/ByteCode/Interp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ void cleanupAfterFunctionCall(InterpState &S, CodePtr OpPC) {
226226

227227
// Some builtin functions require us to only look at the call site, since
228228
// the classified parameter types do not match.
229-
if (CurFunc->isBuiltin()) {
229+
if (unsigned BID = CurFunc->getBuiltinID();
230+
BID && S.getASTContext().BuiltinInfo.hasCustomTypechecking(BID)) {
230231
const auto *CE =
231232
cast<CallExpr>(S.Current->Caller->getExpr(S.Current->getRetPC()));
232233
for (int32_t I = CE->getNumArgs() - 1; I >= 0; --I) {

0 commit comments

Comments
 (0)