summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/function-redecl.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commit952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/SemaCXX/function-redecl.cpp
parentea266cad53e3d49771fa38103913d3ec7a166694 (diff)
downloadFreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip
FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/SemaCXX/function-redecl.cpp')
-rw-r--r--test/SemaCXX/function-redecl.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/test/SemaCXX/function-redecl.cpp b/test/SemaCXX/function-redecl.cpp
index b9d1f23..2bc0d90 100644
--- a/test/SemaCXX/function-redecl.cpp
+++ b/test/SemaCXX/function-redecl.cpp
@@ -4,22 +4,24 @@ int foo(int);
namespace N {
void f1() {
void foo(int); // okay
+ void bar(int); // expected-note 2{{previous declaration is here}}
}
- // FIXME: we shouldn't even need this declaration to detect errors
- // below.
- void foo(int); // expected-note{{previous declaration is here}}
+ void foo(int); // expected-note 2{{previous declaration is here}}
void f2() {
- int foo(int); // expected-error{{functions that differ only in their return type cannot be overloaded}}
+ int foo(int); // expected-error {{functions that differ only in their return type cannot be overloaded}}
+ int bar(int); // expected-error {{functions that differ only in their return type cannot be overloaded}}
+ int baz(int); // expected-note {{previous declaration is here}}
{
int foo;
+ int bar;
+ int baz;
{
- // FIXME: should diagnose this because it's incompatible with
- // N::foo. However, name lookup isn't properly "skipping" the
- // "int foo" above.
- float foo(int);
+ float foo(int); // expected-error {{functions that differ only in their return type cannot be overloaded}}
+ float bar(int); // expected-error {{functions that differ only in their return type cannot be overloaded}}
+ float baz(int); // expected-error {{functions that differ only in their return type cannot be overloaded}}
}
}
}
OpenPOWER on IntegriCloud