aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/nested-name-spec.cpp
diff options
context:
space:
mode:
authorKaelyn Uhrain <rikka@google.com>2012-06-07 23:57:08 +0000
committerKaelyn Uhrain <rikka@google.com>2012-06-07 23:57:08 +0000
commitef094a1ab79c57269b627cb19748384d9a26fb31 (patch)
tree1d5ba2af4ee543c793981f0777a07f8206cf1e9d /test/SemaCXX/nested-name-spec.cpp
parent3f1a5a255318b137323b403d2d17152e4bdcdc23 (diff)
Ignore corrections to functions with bodies when deciding which
correction to use for an invalid function redeclaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/nested-name-spec.cpp')
-rw-r--r--test/SemaCXX/nested-name-spec.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/SemaCXX/nested-name-spec.cpp b/test/SemaCXX/nested-name-spec.cpp
index d57a8523bb..4e1abc5e5b 100644
--- a/test/SemaCXX/nested-name-spec.cpp
+++ b/test/SemaCXX/nested-name-spec.cpp
@@ -113,8 +113,7 @@ namespace E {
X = 0
};
- void f() { // expected-note{{'E::Nested::f' declared here}} \
- // expected-note{{previous definition is here}}
+ void f() {
return E::X; // expected-error{{expected a class or namespace}}
}
}
@@ -144,10 +143,7 @@ namespace A {
void g(int&); // expected-note{{type of 1st parameter of member declaration does not match definition ('int &' vs 'const int &')}}
}
-// TODO: Suppress the typo correction for an invalid redeclaration if the chosen
-// correction is a function that already has a body.
-void A::f() {} // expected-error{{out-of-line definition of 'f' does not match any declaration in namespace 'A'; did you mean 'E::Nested::f'?}} \
- // expected-error{{redefinition of 'f'}}
+void A::f() {} // expected-error-re{{out-of-line definition of 'f' does not match any declaration in namespace 'A'$}}
void A::g(const int&) { } // expected-error{{out-of-line definition of 'g' does not match any declaration in namespace 'A'}}