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 > > http://reviews.llvm.org/D4752 _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
