[PATCH] D142058: [llvm][DiagnosticInfo] handle function pointer casts
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 18 14:22:11 PST 2023
nickdesaulniers 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)
----------------
arsenm wrote:
> aeubanks wrote:
> > directly use `dyn_cast<Function>(CI.getCalledOperand()->stripPointerCasts())` here?
> StripPointerCastsAndAliases?
> Alias has the same problem and is more easily expressive from C
> StripPointerCastsAndAliases?
Right, but repeating https://reviews.llvm.org/D141451#4063151:
>> I actually disagree about aliases. I don't think aliases should implicitly inherit function attributes.
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