[all-commits] [llvm/llvm-project] def204: [llvm][DiagnosticInfo] handle function pointer casts
Nick Desaulniers via All-commits
all-commits at lists.llvm.org
Tue Jan 24 13:59:54 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: def20427b401a839210ff27b34dd31b929fa82ef
https://github.com/llvm/llvm-project/commit/def20427b401a839210ff27b34dd31b929fa82ef
Author: Nick Desaulniers <ndesaulniers at google.com>
Date: 2023-01-24 (Tue, 24 Jan 2023)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
M llvm/lib/IR/DiagnosticInfo.cpp
M llvm/test/CodeGen/X86/attr-dontcall.ll
Log Message:
-----------
[llvm][DiagnosticInfo] handle function pointer casts
As pointed out by @arsenm in https://reviews.llvm.org/D141451#4045099,
we don't handle ConstantExpressions for dontcall-{warn|error} IR Fn
Attrs.
Use CallBase::getCalledOperand() and Value::stripPointerCasts() should
the call to CallBase::getCalledFunction return nullptr.
I don't know how to express the IR test case in C, otherwise I'd add a
clang test, too.
Reviewed By: aeubanks
Differential Revision: https://reviews.llvm.org/D142058
More information about the All-commits
mailing list