diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-22 00:20:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-22 00:20:18 +0000 |
commit | a41a8c5972c2632247ae7913cf6ce65d45f7e702 (patch) | |
tree | 227fcd37c3bb59135e62dd3457712b93bb225cd4 /test/SemaCXX/elaborated-type-specifier.cpp | |
parent | 128317e6a0b020966f7392aa850b24cfe43bc163 (diff) |
Whenever we complain about a failed initialization of a function or
method parameter, provide a note pointing at the parameter itself so
the user does not have to manually look for the function/method being
called and match up parameters to arguments. For example, we now get:
t.c:4:5: warning: incompatible pointer types passing 'long *' to
parameter of
type 'int *' [-pedantic]
f(long_ptr);
^~~~~~~~
t.c:1:13: note: passing argument to parameter 'x' here
void f(int *x);
^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102038 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/elaborated-type-specifier.cpp')
-rw-r--r-- | test/SemaCXX/elaborated-type-specifier.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/SemaCXX/elaborated-type-specifier.cpp b/test/SemaCXX/elaborated-type-specifier.cpp index 3cd3a1bc22..2d0b571e02 100644 --- a/test/SemaCXX/elaborated-type-specifier.cpp +++ b/test/SemaCXX/elaborated-type-specifier.cpp @@ -22,7 +22,7 @@ namespace NS { void test_elab2(struct S4 *s4); }; - void X::test_elab2(S4 *s4) { } + void X::test_elab2(S4 *s4) { } // expected-note{{passing argument to parameter 's4' here}} } void test_X_elab(NS::X x) { |