[PATCH] D57112: [ASTTypeTraits] OMPClause handling

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 25 06:57:34 PST 2019


ABataev added inline comments.


================
Comment at: lib/AST/ASTTypeTraits.cpp:114
+#define OPENMP_CLAUSE(Name, Class)                                             \
+    case OMPC_##Name: return ASTNodeKind(NKI_##Class);
+#include "clang/Basic/OpenMPKinds.def"
----------------
ABataev wrote:
> lebedev.ri wrote:
> > ABataev wrote:
> > > Well, I think it would be good to filter out `OMPC_flush` somehow because there is no such clause actually, it is a pseudo clause for better handling of the `flush` directive.
> > > 
> > Are `OMPC_threadprivate` and `OMPC_uniform` also in the same boat?
> > I don't see those clauses in spec.
> > 
> > Perhaps `OMPC_flush` should be made more like those other two?
> > (i.e. handled outside of `OPENMP_CLAUSE` macro)
> `OMPC_threadprivate` is also a special kind of pseudo-clause.
> `OMPC_flush` is in the enum, because it has the corresponding class. You can try to exclude it from the enum, but it may require some additional work.
> `OMPC_uniform` is a normal clause, but it has the corresponding class. This clause can be used on `declare simd` directive, which is represented as an attribute.
I mean, `OOMPC_uniform` has no(!) corresponding class. Mistyped


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57112/new/

https://reviews.llvm.org/D57112





More information about the cfe-commits mailing list