From 389e9c2d7cfd12156825b1cdd5b4549b48987bc6 Mon Sep 17 00:00:00 2001 From: Kaelyn Uhrain Date: Thu, 7 Jun 2012 23:57:08 +0000 Subject: Ignore corrections to functions with bodies when deciding which correction to use for an invalid function redeclaration. llvm-svn: 158177 --- clang/test/SemaCXX/nested-name-spec.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'clang/test/SemaCXX/nested-name-spec.cpp') diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp index d57a8523bbb..4e1abc5e5bc 100644 --- a/clang/test/SemaCXX/nested-name-spec.cpp +++ b/clang/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'}} -- cgit v1.2.3