Files
clang-p2996/clang/test/SemaCXX/statements.cpp
Shafik Yaghmour c41be8fc74 [Clang] Fix ClassifyImplicitMemberAccess to handle cases where the access in an unevaluated context is not within a CXXRecordDecl or CXXMethodDecl
ClassifyImplicitMemberAccess assumes that if we are not in a static context then
the DeclContext must be a CXXRecordDecl or a CXXMethodDecl. In the case of the
unevaluated context this may not be true.

This will lead to a crash because contextClass will remain a nullptr.

Fixes: https://github.com/llvm/llvm-project/issues/37792
Fixes: https://github.com/llvm/llvm-project/issues/48405

Differential Revision: https://reviews.llvm.org/D142490
2023-03-14 16:37:58 -07:00

1.4 KiB