Compiler crash with LLVM15 when parsing some omp constructs
I noticed that LLVM15 based clang crashes when compiling a simple code:
class A {
void a() {
#pragma omp parallel
a(b);
}
};
When compiler with assertions is used, I am seeing an assertion failure from:
llvm-project/clang/lib/Sema/SemaOpenMP.cpp:1229: const clang::ValueDecl* getCanonicalDecl(const clang::ValueDecl*): Assertion `FD' failed.
a bit of bisecting pointed me to a commit https://reviews.llvm.org/D127803.
When I revert it, clang correctly reports error: error: use of undeclared identifier 'b'.
@llvm/issue-subscribers-clang-frontend
@llvm/issue-subscribers-openmp
Fix in https://reviews.llvm.org/D131024
/cherry-pick a7bca18
/branch llvm/llvm-project-release-prs/issue56884
/pull-request llvm/llvm-project-release-prs#68