diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Frontend/InitPreprocessor.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 7 | ||||
-rw-r--r-- | clang/lib/Sema/TreeTransform.h | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 1112b55d86b..ca51297bb28 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -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. diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index a377815ffaf..b99b639ac27 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -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) diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index ac5a678eeb1..272bf2deff0 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -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, |