[PATCH] D156794: [clang][Interp] Lazily visit unknown global declarations

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 3 05:54:27 PDT 2023


cor3ntin added inline comments.


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:2172-2173
 
+  // Lazily visit global declarations we haven't seen yet.
+  // This happens in C.
+  if (const auto *VD = dyn_cast<VarDecl>(D);
----------------
tbaeder wrote:
> aaron.ballman wrote:
> > Do we want to assert/limit this functionality to C instead of doing it in both C and C++?
> I never know how to do something for just C. I know there's stuff in `LangOpts` for C++, but no `LangOpts::C`?
`!LangOpts.CPlusPlus` afaik


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

https://reviews.llvm.org/D156794



More information about the cfe-commits mailing list