]> granicus.if.org Git - clang/commitdiff
[OPENMP] Updated comments and _OPENMP macro value for OpenMP 4.0 (for 'omp simd'...
authorAlexey Bataev <a.bataev@hotmail.com>
Thu, 6 Mar 2014 12:27:56 +0000 (12:27 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Thu, 6 Mar 2014 12:27:56 +0000 (12:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203114 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/InitPreprocessor.cpp
lib/Sema/SemaOpenMP.cpp
lib/Sema/TreeTransform.h
test/OpenMP/predefined_macro.c

index 1112b55d86baa16a6d23b6927b58cb9ea6d26268..ca51297bb28f60091cf318c7d1aceecd874f3652 100644 (file)
@@ -720,12 +720,12 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
 
   // OpenMP definition
   if (LangOpts.OpenMP) {
-    // OpenMP 2.2: 
+    // OpenMP 2.2:
     //   In implementations that support a preprocessor, the _OPENMP
     //   macro name is defined to have the decimal value yyyymm where
     //   yyyy and mm are the year and the month designations of the
     //   version of the OpenMP API that the implementation support.
-    Builder.defineMacro("_OPENMP", "201107");
+    Builder.defineMacro("_OPENMP", "201307");
   }
 
   // Get other target #defines.
index a377815ffaf11196a671f90805af3bb6b3b8429c..b99b639ac27faa53c5bf47ba0e858824b3f439bf 100644 (file)
@@ -1286,9 +1286,10 @@ OMPClause *Sema::ActOnOpenMPSharedClause(ArrayRef<Expr *> VarList,
     SourceLocation ELoc = (*I)->getExprLoc();
     // OpenMP [2.1, C/C++]
     //  A list item is a variable name.
-    // OpenMP  [2.9.3.4, Restrictions, p.1]
-    //  A variable that is part of another variable (as an array or
-    //  structure element) cannot appear in a private clause.
+    // OpenMP  [2.14.3.2, Restrictions, p.1]
+    //  A variable that is part of another variable (as an array or structure
+    //  element) cannot appear in a shared unless it is a static data member
+    //  of a C++ class.
     DeclRefExpr *DE = dyn_cast<DeclRefExpr>(*I);
     if (!DE || !isa<VarDecl>(DE->getDecl())) {
       Diag(ELoc, diag::err_omp_expected_var_name)
index ac5a678eeb1e9f9518e75eb04d9126845818796c..272bf2deff0d91fa4d7863deaf58f7eb3125e577 100644 (file)
@@ -1361,6 +1361,10 @@ public:
                                                    EndLoc);
   }
 
+  /// \brief Build a new OpenMP 'shared' clause.
+  ///
+  /// By default, performs semantic analysis to build the new statement.
+  /// Subclasses may override this routine to provide different behavior.
   OMPClause *RebuildOMPSharedClause(ArrayRef<Expr *> VarList,
                                     SourceLocation StartLoc,
                                     SourceLocation LParenLoc,
index 06f98793fb91acc10b2dcd749f1f32af62454ba6..c9829ce4572adeef6d55174b6d26fcfce0bfb42c 100644 (file)
@@ -5,7 +5,7 @@
 // -fopenmp=libiomp5 option is specified
 #ifndef _OPENMP
 #error "No _OPENMP macro is defined with -fopenmp option"
-#elsif _OPENMP != 201107
+#elsif _OPENMP != 201307
 #error "_OPENMP has incorrect value"
 #endif //_OPENMP
 #else
@@ -22,7 +22,7 @@
 // -fopenmp=libiomp5 option is specified
 #ifndef _OPENMP
 #error "No _OPENMP macro is defined with -fopenmp option"
-#elsif _OPENMP != 201107
+#elsif _OPENMP != 201307
 #error "_OPENMP has incorrect value"
 #endif // _OPENMP
 #else