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

Liu, Yaxun (Sam) via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 19 09:11:53 PST 2020


[AMD Official Use Only - Internal Distribution Only]

Will do. Thanks.

Sam

-----Original Message-----
From: Erich Keane via Phabricator <reviews at reviews.llvm.org> 
Sent: Wednesday, February 19, 2020 8:52 AM
To: Liu, Yaxun (Sam) <Yaxun.Liu at amd.com>; tra at google.com; rjmccall at gmail.com; richard at metafoo.co.uk; jdoerfert at anl.gov; a.bataev at hotmail.com
Cc: erich.keane at intel.com; echristo at gmail.com; jpienaar at google.com; maskray at google.com; michael.hliao at gmail.com; mariya.podchishchaeva at intel.com; alexey.bader at intel.com; zhang.guansong at gmail.com; herhut at google.com; rnk at google.com; cfe-commits at lists.llvm.org; mlekena at skidmore.edu; blitzrakete at gmail.com; shenhan at google.com
Subject: [PATCH] D70172: [CUDA][HIP][OpenMP] Emit deferred diagnostics by a post-parsing AST travese

[CAUTION: External Email]

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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Freviews.llvm.org%2FD70172%2Fnew%2F&data=02%7C01%7Cyaxun.liu%40amd.com%7C9e1ec947ff5e4e65a52408d7b55bfd7b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637177279020210466&sdata=KdCHlCMkdeIhQ8%2B11lXTxz8srsvmYKtk2UiIR5aYheo%3D&reserved=0

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Freviews.llvm.org%2FD70172&data=02%7C01%7Cyaxun.liu%40amd.com%7C9e1ec947ff5e4e65a52408d7b55bfd7b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637177279020210466&sdata=iZhUpTdtwu8kR%2FIRvhMVwMbig28F960X9LWzPTGO9WI%3D&reserved=0




More information about the cfe-commits mailing list