Skip to content

Commit 3c8dfce

Browse files
authored
[clang][bytecode][NFC] Use RetPC in InterpFrame::getExpr() as well (llvm#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.
1 parent 77d3f8a commit 3c8dfce

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)