[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 4 08:59:10 PDT 2018


a.sidorin added a comment.

Hi Rafael! I like the change.



================
Comment at: lib/CrossTU/CrossTranslationUnit.cpp:276
+  ASTImporter &Importer = getOrCreateASTImporter(D->getASTContext());
+  auto *ToDecl = cast<T>(Importer.Import(const_cast<T *>(D)));
+  assert(HasDefinition(ToDecl));
----------------
Are we always sure that Import() returns non-null value of appropriate type? If no, we have to check the result after applying dyn_cast_or_null.


Repository:
  rC Clang

https://reviews.llvm.org/D46421





More information about the cfe-commits mailing list