[clang] [Clang] Fix wrong call location of `DefaultArgExpr`. (PR #119212)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 9 05:59:15 PST 2024
https://github.com/16bit-ykiko created https://github.com/llvm/llvm-project/pull/119212
Fix https://github.com/llvm/llvm-project/issues/119129.
>From 64dcfdfd0a87d6ca5bfcfe5f5a8e5204c24a26d2 Mon Sep 17 00:00:00 2001
From: ykiko <ykikoykikoykiko at gmail.com>
Date: Mon, 9 Dec 2024 21:56:58 +0800
Subject: [PATCH] Fix call location of `DefaultArgExpr`.
---
clang/lib/Sema/SemaExpr.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 14564b99de44c5..9b543d6484b85c 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -5948,7 +5948,7 @@ Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn,
SmallVector<Expr *, 8> AllArgs;
VariadicCallType CallType = getVariadicCallType(FDecl, Proto, Fn);
- Invalid = GatherArgumentsForCall(Call->getBeginLoc(), FDecl, Proto, 0, Args,
+ Invalid = GatherArgumentsForCall(Call->getExprLoc(), FDecl, Proto, 0, Args,
AllArgs, CallType);
if (Invalid)
return true;
More information about the cfe-commits
mailing list