diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-05-15 06:21:54 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-05-15 06:21:54 +0000 |
commit | c608c3c0781e15b74fbbda03f8708cc85a3dd488 (patch) | |
tree | 5c9bc96920ac80bd6c30cba0d959199d31da0b65 /test/SemaCXX/default1.cpp | |
parent | 6314db9d5918939ad8ec88cd9c3f42a33a67c2b6 (diff) |
Further improvement to wording of overload resolution diagnostics, and including
the sole parameter name in the diagnostic in more cases. Patch by Terry Long!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/default1.cpp')
-rw-r--r-- | test/SemaCXX/default1.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/SemaCXX/default1.cpp b/test/SemaCXX/default1.cpp index a911e20b12..c8c197e153 100644 --- a/test/SemaCXX/default1.cpp +++ b/test/SemaCXX/default1.cpp @@ -47,6 +47,13 @@ int i () { void j (int f = 4); { void j (int f); // expected-note{{'j' declared here}} - j(); // expected-error{{too few arguments to function call, argument 'f' was not specified}} + j(); // expected-error{{too few arguments to function call, single argument 'f' was not specified}} + } +} + +int i2() { + void j(int f = 4); // expected-note{{'j' declared here}} + { + j(2, 3); // expected-error{{too many arguments to function call, expected at most single argument 'f', have 2}} } } |