[PATCH] D111814: Fix consteval crash when transforming 'this' expressions

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 14 09:04:03 PDT 2021


erichkeane added inline comments.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:14839
 
   if (!IsInstantiation)
     PopDeclContext();
----------------
so the only real change here is that `ExitFunctionBodyRAII` ends here, instead of the end of the function?  

I guess this SEEMS pretty innocuous, I don't know particularly what `PopFunctionScopeInfo` does well enough to know if this is going to cause problems, but I DO know at least the 14850+ doesn't need to have the function body in scope (and PopDeclContext seems like it doesn't do much?)...

I would think that anything after `PopDeclContext` would have a problem being in the function body anyway (that is, being in a 'function body' with a mismatched DeclContext seems wrong), so I'm reasonably convinced this is at least non-breaking.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111814



More information about the cfe-commits mailing list