[PATCH] [OPENMP] Codegen for 'private' clause in 'parallel' directive

Bataev, Alexey a.bataev at hotmail.com
Wed Aug 27 20:16:42 PDT 2014


Ajay, thanks for the review. There must be a check for VDPrivate after 
applying default initialization, not VD. I'll fix it.

Best regards,
Alexey Bataev
=============
Software Engineer
Intel Compiler Team

27.08.2014 22:46, Ajay Jayaraj пишет:
> Alexey,
>
> I have a question on the code sequence from SemaOpenMP.cpp, ActOnOpenMPPrivateClause:
>
> ` auto VDPrivate =
>   VarDecl::Create(Context, CurContext, DE->getLocStart(),
>   DE->getExprLoc(), VD->getIdentifier(), VD->getType(),
>   VD->getTypeSourceInfo(), /*S*/ SC_Auto);
>   ActOnUninitializedDecl(VDPrivate, /*TypeMayContainAuto*/ false);
>   if (VD->isInvalidDecl())
>   continue;
>
>   CurContext->addDecl(VDPrivate);`
>
> Should the VD->isInvalidDecl() check be moved before the VarDecl::Create(...)? It appears that there is no need to create VDPrivate if the declaration is invalid and we don't add it via addDecl.
>
> Ajay
>
> http://reviews.llvm.org/D4752
>
>





More information about the cfe-commits mailing list