Skip to content

Commit f55bb9b

Browse files
tbaederrgithub-actions[bot]
authored andcommitted
Automerge: [clang][bytecode][NFC] Use RetPC in InterpFrame::getExpr() as well (#125200)
Both getLocation() and getRange() use the RetPC if the current function doesn't have a usable body. Using PC here was just a typo.
2 parents 652547f + 3c8dfce commit f55bb9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/ByteCode/InterpFrame.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ SourceInfo InterpFrame::getSource(CodePtr PC) const {
244244

245245
const Expr *InterpFrame::getExpr(CodePtr PC) const {
246246
if (Func && !funcHasUsableBody(Func) && Caller)
247-
return Caller->getExpr(PC);
247+
return Caller->getExpr(RetPC);
248248

249249
return S.getExpr(Func, PC);
250250
}

0 commit comments

Comments
 (0)