summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-04-04 17:22:27 +0000
committerTed Kremenek <kremenek@apple.com>2011-04-04 17:22:27 +0000
commit99a337eed06e86fc5f435b1245674552b4bd4494 (patch)
treeaf678b72b976733a78627976d120032281f30bd3 /clang/test
parentbda3632bcdd12566cff2d51c60c89ae6e315f240 (diff)
downloadbcm5719-llvm-99a337eed06e86fc5f435b1245674552b4bd4494.tar.gz
bcm5719-llvm-99a337eed06e86fc5f435b1245674552b4bd4494.zip
When emitting a "too many arguments to function call..." error, also include a note with a location for the function prototype.
llvm-svn: 128833
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp2
-rw-r--r--clang/test/Sema/exprs.c2
-rw-r--r--clang/test/Sema/function-redecl.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp b/clang/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp
index 0c905fbf325..cee7c024203 100644
--- a/clang/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp
+++ b/clang/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp
@@ -17,7 +17,7 @@ namespace M {
struct Y : N::X { };
}
-void f();
+void f(); // expected-note 2 {{'f' declared here}}
void test_operator_adl(N::X x, M::Y y) {
(void)(x + x);
diff --git a/clang/test/Sema/exprs.c b/clang/test/Sema/exprs.c
index 86cd52ec636..d7cbbad4aa1 100644
--- a/clang/test/Sema/exprs.c
+++ b/clang/test/Sema/exprs.c
@@ -163,7 +163,7 @@ void test17(int x) {
}
// PR6501
-void test18_a(int a);
+void test18_a(int a); // expected-note {{'test18_a' declared here}}
void test18(int b) {
test18_a(b, b); // expected-error {{too many arguments to function call, expected 1, have 2}}
test18_a(); // expected-error {{too few arguments to function call, expected 1, have 0}}
diff --git a/clang/test/Sema/function-redecl.c b/clang/test/Sema/function-redecl.c
index 27ec163ea9c..7076bdf3bd1 100644
--- a/clang/test/Sema/function-redecl.c
+++ b/clang/test/Sema/function-redecl.c
@@ -2,7 +2,7 @@
// PR3588
void g0(int, int);
-void g0(); // expected-note{{previous declaration is here}}
+void g0(); // expected-note{{previous declaration is here}} expected-note{{'g0' declared here}}
void f0() {
g0(1, 2, 3); // expected-error{{too many arguments to function call}}
OpenPOWER on IntegriCloud