diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-05 05:54:49 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-05 05:54:49 +0000 |
commit | 3d3208675f79d05fd0b026c735fbe83ecd20a98b (patch) | |
tree | 23fa5746965d88316325d7c23ef23e86aa23a656 /clang/test | |
parent | 0360eac4dfea834a954ba7e116de9f7743665499 (diff) | |
download | bcm5719-llvm-3d3208675f79d05fd0b026c735fbe83ecd20a98b.tar.gz bcm5719-llvm-3d3208675f79d05fd0b026c735fbe83ecd20a98b.zip |
When the out-of-line definition differs from the declaration in the return type,
say "out-of-line definition differ from the declaration in the return type" instead of
the silly "functions that differ only in their return type cannot be overloaded".
Addresses rdar://7980179.
llvm-svn: 124939
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/SemaCXX/nested-name-spec.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp index 8d33f819af0..1eb7014743c 100644 --- a/clang/test/SemaCXX/nested-name-spec.cpp +++ b/clang/test/SemaCXX/nested-name-spec.cpp @@ -258,3 +258,8 @@ namespace PR8159 { int ::c; // expected-error{{non-friend class member 'c' cannot have a qualified name}} }; } + +namespace rdar7980179 { + class A { void f0(); }; // expected-note {{previous}} + int A::f0() {} // expected-error {{out-of-line definition of 'rdar7980179::A::f0' differ from the declaration in the return type}} +} |