[PATCH] D99679: [OPENMP51]Initial support for novariants clause

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 2 08:15:33 PDT 2021


ABataev added inline comments.


================
Comment at: clang/include/clang/AST/OpenMPClause.h:7659
+/// clause with condition 'a > 5'.
+class OMPNovariantsClause : public OMPClause, public OMPClauseWithPreInit {
+  friend class OMPClauseReader;
----------------
`final`


================
Comment at: clang/include/clang/AST/OpenMPClause.h:7696-7698
+  /// Sets the location of '('.
+  void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }
+
----------------
Can you make it private?


================
Comment at: clang/lib/AST/OpenMPClause.cpp:1830
+  OS << "novariants(";
+  Node->getCondition()->printPretty(OS, nullptr, Policy, 0);
+  OS << ")";
----------------
I would add a check for non-nullptr `Node->getCondition()`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99679



More information about the llvm-commits mailing list