[PATCH] D142058: [llvm][DiagnosticInfo] handle function pointer casts
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 18 14:11:14 PST 2023
arsenm added a comment.
Alias has the same problem and is more easily expressive from C
================
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)
----------------
aeubanks wrote:
> directly use `dyn_cast<Function>(CI.getCalledOperand()->stripPointerCasts())` here?
StripPointerCastsAndAliases?
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