[clang] [Clang] Optimize some `getBeginLoc` implementations (PR #141058)
via cfe-commits
cfe-commits at lists.llvm.org
Thu May 22 08:01:26 PDT 2025
================
@@ -542,7 +542,8 @@ bool SemaOpenCL::checkBuiltinToAddr(unsigned BuiltinID, CallExpr *Call) {
auto RT = Call->getArg(0)->getType();
if (!RT->isPointerType() ||
RT->getPointeeType().getAddressSpace() == LangAS::opencl_constant) {
- Diag(Call->getBeginLoc(), diag::err_opencl_builtin_to_addr_invalid_arg)
+ Diag(Call->getArg(0)->getBeginLoc(),
----------------
cor3ntin wrote:
Except there are other places where this happens :(
https://github.com/llvm/llvm-project/pull/141058
More information about the cfe-commits
mailing list