aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorArthur Grillo <arthur.grillo@usp.br>2022-10-24 08:38:21 -0400
committerAaron Ballman <aaron@aaronballman.com>2022-10-24 08:38:21 -0400
commit1534b048d6fdd7cf5f7dd5d3b8c6876b7cdad184 (patch)
tree9831881f004ccb58d15bae72bb1ca8727ccc3ff2 /clang/lib/Sema/SemaChecking.cpp
parentc9b3638126e520917ad42d3ec38ad31fd389e4b5 (diff)
downloadllvm-1534b048d6fdd7cf5f7dd5d3b8c6876b7cdad184.zip
llvm-1534b048d6fdd7cf5f7dd5d3b8c6876b7cdad184.tar.gz
llvm-1534b048d6fdd7cf5f7dd5d3b8c6876b7cdad184.tar.bz2
Fix caret position to be on the non null parameter
When checking for non null arguments the wrong SourceLocation was given, this fix to pass the proper argument's location. Fixes #58273 Differential Revision: https://reviews.llvm.org/D136355
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 0727433..fe0d1af 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -5639,7 +5639,7 @@ static void CheckNonNullArguments(Sema &S,
for (unsigned ArgIndex = 0, ArgIndexEnd = NonNullArgs.size();
ArgIndex != ArgIndexEnd; ++ArgIndex) {
if (NonNullArgs[ArgIndex])
- CheckNonNullArgument(S, Args[ArgIndex], CallSiteLoc);
+ CheckNonNullArgument(S, Args[ArgIndex], Args[ArgIndex]->getExprLoc());
}
}