[clang] [Clang][Sema] Fix a crash in lambda instantiation (PR #85565)

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 18 06:22:07 PDT 2024


https://github.com/Sirraide requested changes to this pull request.

LGTM except that the comment could still be worded a bit better—especially since I had to take another look at how this here works exactly, but I believe that this is correct: `CXXThisScopeRAII` does nothing if the context that it is passed is null, and `getFunctionLevelDeclContext` stops if it finds a `CXXRecordDecl`, so this should be nonnull iff this lambda is in a class but outside a member function.

https://github.com/llvm/llvm-project/pull/85565


More information about the cfe-commits mailing list