[PATCH] OpenMP parallel directive
Alexey Bataev
a.bataev at hotmail.com
Mon Jun 24 03:47:22 PDT 2013
================
Comment at: include/clang/AST/StmtOpenMP.h:57
@@ +56,3 @@
+
+ bool isImplicit() { return StartLoc.isInvalid();}
+
----------------
Wei Pan wrote:
> add const?
Ok, thanks.
================
Comment at: include/clang/Sema/Sema.h:33
@@ -31,2 +32,3 @@
#include "clang/Basic/TypeTraits.h"
+#include "clang/Basic/OpenMPKinds.h"
#include "clang/Lex/ModuleLoader.h"
----------------
Wei Pan wrote:
> sort includes
Ok
================
Comment at: include/clang/AST/StmtOpenMP.h:18
@@ +17,3 @@
+
+#include "clang/Basic/SourceLocation.h"
+#include "clang/Basic/OpenMPKinds.h"
----------------
Wei Pan wrote:
> sort headers
Ok
================
Comment at: include/clang/AST/StmtOpenMP.h:138
@@ +137,3 @@
+ OpenMPDefaultClauseKind Kind;
+ /// \brief Start location of the kind in cource code.
+ SourceLocation KindKwLoc;
----------------
Wei Pan wrote:
> source
Thanks, fixed
================
Comment at: lib/Parse/ParseOpenMP.cpp:337
@@ +336,3 @@
+ bool IsComma = true;
+ while (IsComma || (Tok.isNot(tok::r_paren) &&
+ Tok.isNot(tok::annot_pragma_openmp_end))) {
----------------
Wei Pan wrote:
> This seems to accept
>
> #pragma omp parallel private(x y)
>
> Tests for this?
>
Fixed, test added
================
Comment at: lib/Sema/SemaOpenMP.cpp:19
@@ -17,1 +18,3 @@
#include "clang/AST/DeclOpenMP.h"
+#include "clang/AST/StmtOpenMP.h"
+#include "clang/AST/StmtCXX.h"
----------------
Wei Pan wrote:
> need to sort
Thanks
================
Comment at: lib/Sema/SemaOpenMP.cpp:406
@@ +405,3 @@
+
+ // OpenMP [2.9.3.3, Restrictions, C/C++, p.1]
+ // A variable of class type (or array thereof) that appears in a private
----------------
Wei Pan wrote:
> This is missing.
>
> A variable that appears in a private clause must not have a const-qualified type
> unless it is of class type with a mutable member.
>
>
Wei, nope. It will be handled later along with predetermined data-sharing attributes.
http://llvm-reviews.chandlerc.com/D572
More information about the cfe-commits
mailing list