]> granicus.if.org Git - clang/commitdiff
[OPENMP] Allow to use the variable in the same 'threadprivate'
authorAlexey Bataev <a.bataev@hotmail.com>
Tue, 9 Feb 2016 09:41:42 +0000 (09:41 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Tue, 9 Feb 2016 09:41:42 +0000 (09:41 +0000)
directive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260215 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaOpenMP.cpp

index 480c2919d700fbd5f52cdc197b78bcefd1378557..3ba5daa03042f246562acf320e6335e99bef252c 100644 (file)
@@ -1289,9 +1289,6 @@ Sema::CheckOMPThreadPrivateDecl(SourceLocation Loc, ArrayRef<Expr *> VarList) {
         continue;
     }
 
-    // Variable is marked already - no need to check.
-    if (DSAStack->isThreadPrivate(VD))
-      continue;
     Vars.push_back(RefExpr);
     DSAStack->addDSA(VD, DE, OMPC_threadprivate);
     VD->addAttr(OMPThreadPrivateDeclAttr::CreateImplicit(