ABataev added inline comments.

================
Comment at: include/clang/AST/OpenMPClause.h:2375-2377
@@ +2374,5 @@
+  /// \brief Return device number.
+  Expr *getDevice() { return dyn_cast_or_null<Expr>(Device); }
+  /// \brief Return device number.
+  Expr *getDevice() const { return dyn_cast_or_null<Expr>(Device); }
+
----------------
Must be cast<Expr>, because it is known that this is an expression and it 
cannot be nullptr

================
Comment at: include/clang/AST/OpenMPClause.h:2384
@@ +2383,3 @@
+  child_range children() {
+    return child_range(child_iterator(), child_iterator());
+  }
----------------
return child_range(&Device, &Device + 1);

================
Comment at: lib/AST/StmtProfile.cpp:432
@@ +431,3 @@
+void OMPClauseProfiler::VisitOMPDeviceClause(const OMPDeviceClause *C) {
+  if (C->getDevice())
+    Profiler->VisitStmt(C->getDevice());
----------------
I think device is always not nullptr

================
Comment at: tools/libclang/CIndex.cpp:2054
@@ -2053,1 +2053,3 @@
 
+void OMPClauseEnqueue::VisitOMPDeviceClause(const OMPDeviceClause *C) {}
+
----------------
Visitor->AddStmt(C->getDevice());


http://reviews.llvm.org/D11469




_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to