This is an archive of the discontinued LLVM Phabricator instance.

[clang][Interp] Don't call getSource() on functions without a body
ClosedPublic

Authored by tbaeder on May 4 2023, 1:26 AM.

Details

Summary
For builtin functions, we create a Function instance without a body or
code. When emitting diagnostics from them, we need a proper SourceInfo
to point to, but the only thing we can use is the call site of the
builtin function.

Diff Detail

Event Timeline

tbaeder created this revision.May 4 2023, 1:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2023, 1:26 AM
tbaeder requested review of this revision.May 4 2023, 1:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2023, 1:26 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman accepted this revision.May 4 2023, 10:29 AM

LGTM

clang/lib/AST/Interp/Function.cpp
35
This revision is now accepted and ready to land.May 4 2023, 10:29 AM
tbaeder marked an inline comment as done.May 5 2023, 12:44 AM
This revision was landed with ongoing or failed builds.May 5 2023, 3:02 AM
This revision was automatically updated to reflect the committed changes.