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

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 19 08:51:38 PST 2020


erichkeane added inline comments.


================
Comment at: clang/lib/Sema/Sema.cpp:1514
+  void visitUsedDecl(SourceLocation Loc, Decl *D) {
+    if (auto *TD = dyn_cast<TranslationUnitDecl>(D)) {
+      for (auto *DD : TD->decls()) {
----------------
Note that when recommitting this (if you choose to), this needs to also handle NamespaceDecl.  We're a downstream and discovered that this doesn't properly handle functions or records handled in a namespace.

It can be implemented identically to TranslationUnitDecl.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70172





More information about the cfe-commits mailing list