Skip to content

Commit

Permalink
[clang][bytecode][NFC] Use RetPC in InterpFrame::getExpr() as well (l…
Browse files Browse the repository at this point in the history
…lvm#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.
  • Loading branch information
tbaederr authored Jan 31, 2025
1 parent 77d3f8a commit 3c8dfce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/AST/ByteCode/InterpFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ SourceInfo InterpFrame::getSource(CodePtr PC) const {

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

return S.getExpr(Func, PC);
}
Expand Down

0 comments on commit 3c8dfce

Please sign in to comment.