[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

Gui Andrade via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 29 11:18:58 PDT 2020


guiand marked 5 inline comments as done.
guiand added inline comments.


================
Comment at: clang/lib/CodeGen/CGCall.cpp:2148-2150
+    } else if (const VarDecl *VDecl = dyn_cast<VarDecl>(TargetDecl)) {
+      // Function pointer
+      HasStrictReturn &= !VDecl->isExternC();
----------------
rsmith wrote:
> `TargetDecl` (the callee of a function call) should never be a variable. You shouldn't need this check.
I tried replacing the body of this if statement with an assertion to make sure, and the assertion fires.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81678



More information about the llvm-commits mailing list