[PATCH] D142058: [llvm][DiagnosticInfo] handle function pointer casts

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 14:09:24 PST 2023


aeubanks added inline comments.


================
Comment at: llvm/lib/IR/DiagnosticInfo.cpp:419
 void llvm::diagnoseDontCall(const CallInst &CI) {
-  auto *F = CI.getCalledFunction();
+  const Function *F = CI.getCalledFunction();
+  if (!F)
----------------
directly use `dyn_cast<Function>(CI.getCalledOperand()->stripPointerCasts())` here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142058



More information about the llvm-commits mailing list