r308629 - [OPENMP] Fix DSA processing for member declaration.

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 20 09:47:47 PDT 2017


Author: abataev
Date: Thu Jul 20 09:47:47 2017
New Revision: 308629

URL: http://llvm.org/viewvc/llvm-project?rev=308629&view=rev
Log:
[OPENMP] Fix DSA processing for member declaration.

If the member declaration is captured in the OMPCapturedExprDecl, we may
loose data-sharing attribute info for this declaration. Patch fixes this
bug.

Modified:
    cfe/trunk/lib/Sema/SemaExprMember.cpp
    cfe/trunk/lib/Sema/SemaOpenMP.cpp
    cfe/trunk/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/distribute_parallel_for_reduction_messages.cpp
    cfe/trunk/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp
    cfe/trunk/test/OpenMP/distribute_simd_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/distribute_simd_reduction_messages.cpp
    cfe/trunk/test/OpenMP/dump.cpp
    cfe/trunk/test/OpenMP/for_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/for_reduction_messages.cpp
    cfe/trunk/test/OpenMP/for_simd_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp
    cfe/trunk/test/OpenMP/parallel_for_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp
    cfe/trunk/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp
    cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp
    cfe/trunk/test/OpenMP/parallel_sections_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp
    cfe/trunk/test/OpenMP/sections_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/sections_reduction_messages.cpp
    cfe/trunk/test/OpenMP/simd_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/simd_reduction_messages.cpp
    cfe/trunk/test/OpenMP/target_parallel_for_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/target_parallel_for_reduction_messages.cpp
    cfe/trunk/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp
    cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp
    cfe/trunk/test/OpenMP/target_simd_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/target_simd_reduction_messages.cpp
    cfe/trunk/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp
    cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp
    cfe/trunk/test/OpenMP/target_teams_distribute_reduction_messages.cpp
    cfe/trunk/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp
    cfe/trunk/test/OpenMP/target_teams_reduction_messages.cpp
    cfe/trunk/test/OpenMP/taskgroup_task_reduction_messages.cpp
    cfe/trunk/test/OpenMP/taskloop_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/taskloop_reduction_messages.cpp
    cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/taskloop_simd_reduction_messages.cpp
    cfe/trunk/test/OpenMP/teams_distribute_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp
    cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp
    cfe/trunk/test/OpenMP/teams_distribute_reduction_messages.cpp
    cfe/trunk/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp
    cfe/trunk/test/OpenMP/teams_distribute_simd_reduction_messages.cpp
    cfe/trunk/test/OpenMP/teams_reduction_messages.cpp

Modified: cfe/trunk/lib/Sema/SemaExprMember.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprMember.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprMember.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprMember.cpp Thu Jul 20 09:47:47 2017
@@ -1848,8 +1848,10 @@ Sema::BuildFieldReferenceExpr(Expr *Base
   if (getLangOpts().OpenMP && IsArrow &&
       !CurContext->isDependentContext() &&
       isa<CXXThisExpr>(Base.get()->IgnoreParenImpCasts())) {
-    if (auto *PrivateCopy = IsOpenMPCapturedDecl(Field))
-      return getOpenMPCapturedExpr(PrivateCopy, VK, OK, OpLoc);
+    if (auto *PrivateCopy = IsOpenMPCapturedDecl(Field)) {
+      return getOpenMPCapturedExpr(PrivateCopy, VK, OK,
+                                   MemberNameInfo.getLoc());
+    }
   }
 
   return BuildMemberExpr(*this, Context, Base.get(), IsArrow, OpLoc, SS,

Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOpenMP.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOpenMP.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOpenMP.cpp Thu Jul 20 09:47:47 2017
@@ -55,7 +55,7 @@ public:
     Expr *RefExpr = nullptr;
     DeclRefExpr *PrivateCopy = nullptr;
     SourceLocation ImplicitDSALoc;
-    DSAVarData() {}
+    DSAVarData() = default;
   };
   typedef llvm::SmallVector<std::pair<Expr *, OverloadedOperatorKind>, 4>
       OperatorOffsetTy;
@@ -112,7 +112,7 @@ private:
                  Scope *CurScope, SourceLocation Loc)
         : Directive(DKind), DirectiveName(Name), CurScope(CurScope),
           ConstructLoc(Loc) {}
-    SharingMapTy() {}
+    SharingMapTy() = default;
   };
 
   typedef SmallVector<SharingMapTy, 4> StackTy;
@@ -479,7 +479,25 @@ bool isParallelOrTaskRegion(OpenMPDirect
 }
 } // namespace
 
+static Expr *getExprAsWritten(Expr *E) {
+  if (auto *ExprTemp = dyn_cast<ExprWithCleanups>(E))
+    E = ExprTemp->getSubExpr();
+
+  if (auto *MTE = dyn_cast<MaterializeTemporaryExpr>(E))
+    E = MTE->GetTemporaryExpr();
+
+  while (auto *Binder = dyn_cast<CXXBindTemporaryExpr>(E))
+    E = Binder->getSubExpr();
+
+  if (auto *ICE = dyn_cast<ImplicitCastExpr>(E))
+    E = ICE->getSubExprAsWritten();
+  return E->IgnoreParens();
+}
+
 static ValueDecl *getCanonicalDecl(ValueDecl *D) {
+  if (auto *CED = dyn_cast<OMPCapturedExprDecl>(D))
+    if (auto *ME = dyn_cast<MemberExpr>(getExprAsWritten(CED->getInit())))
+      D = ME->getMemberDecl();
   auto *VD = dyn_cast<VarDecl>(D);
   auto *FD = dyn_cast<FieldDecl>(D);
   if (VD != nullptr) {
@@ -821,6 +839,7 @@ DSAStackTy::DSAVarData DSAStackTy::getTo
     DVar.PrivateCopy = I->SharingMap[D].PrivateCopy;
     DVar.CKind = I->SharingMap[D].Attributes;
     DVar.ImplicitDSALoc = I->DefaultAttrLoc;
+    DVar.DKind = I->Directive;
   }
 
   return DVar;
@@ -3053,21 +3072,6 @@ bool OpenMPIterationSpaceChecker::Depend
          (Step && Step->isValueDependent());
 }
 
-static Expr *getExprAsWritten(Expr *E) {
-  if (auto *ExprTemp = dyn_cast<ExprWithCleanups>(E))
-    E = ExprTemp->getSubExpr();
-
-  if (auto *MTE = dyn_cast<MaterializeTemporaryExpr>(E))
-    E = MTE->GetTemporaryExpr();
-
-  while (auto *Binder = dyn_cast<CXXBindTemporaryExpr>(E))
-    E = Binder->getSubExpr();
-
-  if (auto *ICE = dyn_cast<ImplicitCastExpr>(E))
-    E = ICE->getSubExprAsWritten();
-  return E->IgnoreParens();
-}
-
 bool OpenMPIterationSpaceChecker::SetLCDeclAndLB(ValueDecl *NewLCDecl,
                                                  Expr *NewLCRefExpr,
                                                  Expr *NewLB) {
@@ -3249,12 +3253,8 @@ static const ValueDecl *GetInitLCDecl(Ex
           CE->getNumArgs() > 0 && CE->getArg(0) != nullptr)
         E = CE->getArg(0)->IgnoreParenImpCasts();
   if (auto *DRE = dyn_cast_or_null<DeclRefExpr>(E)) {
-    if (auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) {
-      if (auto *CED = dyn_cast<OMPCapturedExprDecl>(VD))
-        if (auto *ME = dyn_cast<MemberExpr>(getExprAsWritten(CED->getInit())))
-          return getCanonicalDecl(ME->getMemberDecl());
+    if (auto *VD = dyn_cast<VarDecl>(DRE->getDecl()))
       return getCanonicalDecl(VD);
-    }
   }
   if (auto *ME = dyn_cast_or_null<MemberExpr>(E))
     if (ME->isArrow() && isa<CXXThisExpr>(ME->getBase()->IgnoreParenImpCasts()))
@@ -8097,7 +8097,8 @@ getPrivateItem(Sema &S, Expr *&RefExpr,
     }
     return std::make_pair(nullptr, false);
   }
-  return std::make_pair(DE ? DE->getDecl() : ME->getMemberDecl(), false);
+  return std::make_pair(
+      getCanonicalDecl(DE ? DE->getDecl() : ME->getMemberDecl()), false);
 }
 
 OMPClause *Sema::ActOnOpenMPPrivateClause(ArrayRef<Expr *> VarList,
@@ -8981,7 +8982,6 @@ static bool ActOnOMPReductionKindClause(
   // C++
   // reduction-identifier is either an id-expression or one of the following
   // operators: +, -, *, &, |, ^, && and ||
-  // FIXME: Only 'min' and 'max' identifiers are supported for now.
   switch (OOK) {
   case OO_Plus:
   case OO_Minus:
@@ -9044,7 +9044,7 @@ static bool ActOnOMPReductionKindClause(
   case NUM_OVERLOADED_OPERATORS:
     llvm_unreachable("Unexpected reduction identifier");
   case OO_None:
-    if (auto II = DN.getAsIdentifierInfo()) {
+    if (auto *II = DN.getAsIdentifierInfo()) {
       if (II->isStr("max"))
         BOK = BO_GT;
       else if (II->isStr("min"))
@@ -9055,6 +9055,8 @@ static bool ActOnOMPReductionKindClause(
   SourceRange ReductionIdRange;
   if (ReductionIdScopeSpec.isValid())
     ReductionIdRange.setBegin(ReductionIdScopeSpec.getBeginLoc());
+  else
+    ReductionIdRange.setBegin(ReductionId.getBeginLoc());
   ReductionIdRange.setEnd(ReductionId.getEndLoc());
 
   auto IR = UnresolvedReductions.begin(), ER = UnresolvedReductions.end();
@@ -9166,6 +9168,7 @@ static bool ActOnOMPReductionKindClause(
           << getOpenMPClauseName(ClauseKind);
       if (DVar.RefExpr)
         S.Diag(DVar.RefExpr->getExprLoc(), diag::note_omp_referenced);
+      continue;
     } else if (DVar.CKind != OMPC_unknown) {
       S.Diag(ELoc, diag::err_omp_wrong_dsa)
           << getOpenMPClauseName(DVar.CKind)
@@ -9453,9 +9456,10 @@ static bool ActOnOMPReductionKindClause(
               S.BuildBinOp(Stack->getCurScope(), ReductionId.getLocStart(),
                            BO_Assign, LHSDRE, ConditionalOp);
         }
-        ReductionOp = S.ActOnFinishFullExpr(ReductionOp.get());
+        if (ReductionOp.isUsable())
+          ReductionOp = S.ActOnFinishFullExpr(ReductionOp.get());
       }
-      if (ReductionOp.isInvalid())
+      if (!ReductionOp.isUsable())
         continue;
     }
 
@@ -9767,10 +9771,6 @@ static bool FinishOpenMPLinearClause(OMP
       HasErrors = true;
       continue;
     }
-    if (auto *CED = dyn_cast<OMPCapturedExprDecl>(D)) {
-      D = cast<MemberExpr>(CED->getInit()->IgnoreParenImpCasts())
-              ->getMemberDecl();
-    }
     auto &&Info = Stack->isLoopControlVariable(D);
     Expr *InitExpr = *CurInit;
 

Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -27,9 +27,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -27,9 +27,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/distribute_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/distribute_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -27,9 +27,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/dump.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/dump.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/dump.cpp (original)
+++ cfe/trunk/test/OpenMP/dump.cpp Thu Jul 20 09:47:47 2017
@@ -52,11 +52,11 @@ struct S {
 // CHECK-NEXT: |       |-OMPScheduleClause {{.+}} <col:61, col:79>
 // CHECK-NEXT: |       | `-ImplicitCastExpr {{.+}} <col:78> 'int' <LValueToRValue>
 // CHECK-NEXT: |       |   `-DeclRefExpr {{.+}} <col:78> 'int' lvalue OMPCapturedExpr {{.+}} '.capture_expr.' 'int'
-// CHECK-NEXT: |       |-CapturedStmt {{.+}} <line:40:5, <invalid sloc>>
+// CHECK-NEXT: |       |-CapturedStmt {{.+}} <line:40:5, line:41:9>
 // CHECK-NEXT: |       | |-CapturedDecl {{.+}} <<invalid sloc>> <invalid sloc>
-// CHECK-NEXT: |       | | |-ForStmt {{.+}} <col:5, <invalid sloc>>
-// CHECK:      |       | | | `-UnaryOperator {{.+}} <line:41:7, <invalid sloc>> 'int' lvalue prefix '++'
-// CHECK-NEXT: |       | | |   `-DeclRefExpr {{.+}} <<invalid sloc>> 'int' lvalue OMPCapturedExpr {{.+}} 'a' 'int &'
+// CHECK-NEXT: |       | | |-ForStmt {{.+}} <line:40:5, line:41:9>
+// CHECK:      |       | | | `-UnaryOperator {{.+}} <line:41:7, col:9> 'int' lvalue prefix '++'
+// CHECK-NEXT: |       | | |   `-DeclRefExpr {{.+}} <col:9> 'int' lvalue OMPCapturedExpr {{.+}} 'a' 'int &'
 
 #pragma omp declare simd
 #pragma omp declare simd inbranch

Modified: cfe/trunk/test/OpenMP/for_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/for_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -26,9 +26,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/for_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   S2 &operator =(const S2&);
   const S2 &operator =(const S2&) const;
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -26,9 +26,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/parallel_for_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   S2 &operator=(const S2 &);
   const S2 &operator=(const S2 &) const;
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -25,9 +25,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {
@@ -61,6 +61,12 @@ class S5 {
 
 public:
   S5(int v) : a(v) {}
+  void foo() {
+#pragma omp parallel private(a) // expected-note {{defined as private}}
+#pragma omp for reduction(+:a) // expected-error {{reduction variable must be shared}}
+  for (int i = 0; i < 10; ++i)
+    ::foo();
+  }
 };
 class S6 { // expected-note 3 {{candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const S6' for 1st argument}}
 #if __cplusplus >= 201103L // C++11 or later

Modified: cfe/trunk/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -17,9 +17,9 @@ public:
   S2(S2 &s2) : a(s2.a) {}
   const S2 &operator=(const S2 &) const;
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -25,9 +25,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -24,9 +24,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/parallel_sections_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -17,9 +17,9 @@ public:
   S2(S2 &s2) : a(s2.a) {}
   const S2 &operator=(const S2 &) const;
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_sections_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -26,9 +26,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/sections_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/sections_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/sections_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/sections_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -17,9 +17,9 @@ public:
   S2(S2 &s2) : a(s2.a) {}
   const S2 &operator=(const S2 &) const;
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/sections_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/sections_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/sections_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/sections_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -27,9 +27,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -17,9 +17,9 @@ public:
   S2(S2 &s2) : a(s2.a) {}
   const S2 &operator=(const S2 &) const;
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -25,9 +25,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_parallel_for_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   S2 &operator=(const S2 &);
   const S2 &operator=(const S2 &) const;
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_parallel_for_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -25,9 +25,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   S2 &operator=(const S2 &);
   const S2 &operator=(const S2 &) const;
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -25,9 +25,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -24,9 +24,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   S2 &operator=(const S2 &);
   const S2 &operator=(const S2 &) const;
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -25,9 +25,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -19,9 +19,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -19,9 +19,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_teams_distribute_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -24,9 +24,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -19,9 +19,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/target_teams_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -24,9 +24,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/taskgroup_task_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskgroup_task_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskgroup_task_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskgroup_task_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -24,9 +24,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/taskloop_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/taskloop_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -25,9 +25,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/taskloop_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -25,9 +25,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/teams_distribute_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -19,9 +19,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -19,9 +19,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/teams_distribute_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -25,9 +25,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp Thu Jul 20 09:47:47 2017
@@ -18,9 +18,9 @@ public:
   const S2 &operator =(const S2&) const;
   S2 &operator =(const S2&);
   static float S2s; // expected-note {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note {{static data member is predetermined as shared}}
 };
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
 const S2 b;
 const S2 ba[5];
 class S3 {

Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -19,9 +19,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {

Modified: cfe/trunk/test/OpenMP/teams_reduction_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_reduction_messages.cpp?rev=308629&r1=308628&r2=308629&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_reduction_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_reduction_messages.cpp Thu Jul 20 09:47:47 2017
@@ -25,9 +25,9 @@ public:
   S2() : a(0) {}
   S2(S2 &s2) : a(s2.a) {}
   static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
-  static const float S2sc;
+  static const float S2sc; // expected-note 2 {{'S2sc' declared here}}
 };
-const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+const float S2::S2sc = 0;
 S2 b;                     // expected-note 3 {{'b' defined here}}
 const S2 ba[5];           // expected-note 2 {{'ba' defined here}}
 class S3 {




More information about the cfe-commits mailing list