[PATCH] D70172: [CUDA][HIP][OpenMP] Emit deferred diagnostics by a post-parsing AST travese

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 3 20:48:54 PST 2020


rjmccall added inline comments.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:17254
+        SourceLocation(), Context.getTranslationUnitDecl());
+  }
 
----------------
Thanks, this looks a lot better.

Should this be moved to SemaOpenMP.cpp (and renamed to be OpenMP-specific), or do you think it's going to be useful in other modes?


================
Comment at: clang/lib/Sema/UsedDeclVisitor.h:1
+//===- CoroutineStmtBuilder.h - Implicit coroutine stmt builder -*- C++ -*-===//
+//
----------------
Please fix this line.


================
Comment at: clang/lib/Sema/UsedDeclVisitor.h:9
+//  This file defines UsedDeclVisitor, a template class for visiting used
+//  declarations.
+//
----------------
"a CRTP class which visits all the declarations that are ODR-used by an expression or statement."


================
Comment at: clang/lib/Sema/UsedDeclVisitor.h:65
+  void VisitCXXDefaultArgExpr(CXXDefaultArgExpr *E) {
+    this->Visit(E->getExpr());
+  }
----------------
It's generally best to `asImpl()` when restarting on a sub-expression like this, just in case the derived class wants to do something there.  Same thing in `VisitCXXBindTemporaryExpr`.


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

https://reviews.llvm.org/D70172





More information about the cfe-commits mailing list