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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 4 10:29:30 PDT 2023


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: clang/lib/AST/Interp/Function.cpp:35
   assert(PC <= getCodeEnd() && "PC Does not belong to this function");
+  assert(hasBody());
   unsigned Offset = PC - getCodeBegin();
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149824/new/

https://reviews.llvm.org/D149824



More information about the cfe-commits mailing list