[all-commits] [llvm/llvm-project] 409a80: [clang][Diagnostics] Provide parameter source rang...
Takuya Shimizu via All-commits
all-commits at lists.llvm.org
Sun Jun 25 08:27:57 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 409a8097c5c728607eb6b05efb1744bf5f9096e1
https://github.com/llvm/llvm-project/commit/409a8097c5c728607eb6b05efb1744bf5f9096e1
Author: Takuya Shimizu <shimizu2486 at gmail.com>
Date: 2023-06-26 (Mon, 26 Jun 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaExpr.cpp
M clang/lib/Sema/SemaOverload.cpp
A clang/test/Misc/diag-func-call-ranges.c
A clang/test/Misc/diag-func-call-ranges.cpp
Log Message:
-----------
[clang][Diagnostics] Provide parameter source range to arity-mismatch notes
Consider the following piece of code:
```
void func( int aa,
int bb,
int cc) {}
void arity_mismatch() {
func(2, 4);
}
```
BEFORE:
```
source.cpp:6:3: error: no matching function for call to 'func'
6 | func(2, 4);
| ^~~~
source.cpp:1:6: note: candidate function not viable: requires 3 arguments, but 2 were provided
1 | void func( int aa,
| ^
```
AFTER:
```
source.cpp:6:3: error: no matching function for call to 'func'
6 | func(2, 4);
| ^~~~
source.cpp:1:6: note: candidate function not viable: requires 3 arguments, but 2 were provided
1 | void func( int aa,
| ^ ~~~~~~~
2 | int bb,
| ~~~~~~~
3 | int cc) {}
| ~~~~~~
```
Reviewed By: cjdb, aaron.ballman
Differential Revision: https://reviews.llvm.org/D153267
More information about the All-commits
mailing list