[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

mgabka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 2 09:19:06 PDT 2022

mgabka added a comment.

In D127803#3693700 <https://reviews.llvm.org/D127803#3693700>, @jyu2 wrote:

> In D127803#3693660 <https://reviews.llvm.org/D127803#3693660>, @ABataev wrote:
>> In D127803#3693655 <https://reviews.llvm.org/D127803#3693655>, @jyu2 wrote:
>>> In D127803#3693301 <https://reviews.llvm.org/D127803#3693301>, @mgabka wrote:
>>>> I noticed that this patch is causing now an assertion failure for cases like :
>>>> class A{
>>>>   void a() {
>>>>     #pragma omp parallel
>>>>     a(b);
>>>>   }
>>>> };
>>>> The failed assertion is: "const clang::ValueDecl* getCanonicalDecl(const clang::ValueDecl*): Assertion `FD' failed."
>>>> while before it clang was correctly  reporting error:
>>>> error: use of undeclared identifier 'b'
>>>> is it the same assertion you were trying to fix here?
>>> No, the assert I am fixing is when default(firstprivate) is used inside member function.
>> Could you please investigate and fix it?
> Yes, I will fix this.

Thanks a lot, I raised an upstream bug for it https://github.com/llvm/llvm-project/issues/56884

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list