[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 26 10:00:33 PDT 2017


a.sidorin added inline comments.


================
Comment at: lib/AST/ASTContext.cpp:1481
+  assert(!FD->hasBody() && "FD has a definition in current translation unit!");
+  if (!FD->getType()->getAs<FunctionProtoType>())
+    return nullptr; // Cannot even mangle that.
----------------
xazax.hun wrote:
> a.sidorin wrote:
> > This needs a FIXME because currently many functions cannot be analyzed because of it.
> What do you mean here?
This comment was about  `if (!FD->getType()->getAs<FunctionProtoType>()) return nullptr`. While testing, we have found that many C and C-style functions are FunctionNoProtoTypes, so they cannot be mangled, but they still have a body in another TU. There definitely should be a way to fix this.


https://reviews.llvm.org/D30691





More information about the cfe-commits mailing list