[PATCH] D57112: [ASTTypeTraits] OMPClause handling

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 25 06:33:04 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"
----------------
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.



================
Comment at: lib/AST/ASTTypeTraits.cpp:170
     return S->getSourceRange();
+  if (const OMPClause *C = get<OMPClause>())
+    return SourceRange(C->getBeginLoc(), C->getEndLoc());
----------------
`const auto *`


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