summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/nested-name-spec.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-10-15 00:00:26 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-10-15 00:00:26 +0000
commitfb8b7b9a1c524c420728d1814997d6e988f992de (patch)
tree020250997da147b7c85dad004ee0f34e06bfa89b /clang/test/SemaCXX/nested-name-spec.cpp
parentb0cba4ce7570727d30510946b38588265a14efb1 (diff)
downloadbcm5719-llvm-fb8b7b9a1c524c420728d1814997d6e988f992de.tar.gz
bcm5719-llvm-fb8b7b9a1c524c420728d1814997d6e988f992de.zip
PR17567: Improve diagnostic for a mistyped constructor name. If we see something
that looks like a function declaration, except that it's missing a return type, try typo-correcting it to the relevant constructor name. In passing, fix a bug where the missing-type-specifier recovery codepath would drop a preceding scope specifier on the floor, leading to follow-on diagnostics and incorrect recovery for the auto-in-c++98 hack. llvm-svn: 192644
Diffstat (limited to 'clang/test/SemaCXX/nested-name-spec.cpp')
-rw-r--r--clang/test/SemaCXX/nested-name-spec.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp
index 855af93c238..df4f1b269d7 100644
--- a/clang/test/SemaCXX/nested-name-spec.cpp
+++ b/clang/test/SemaCXX/nested-name-spec.cpp
@@ -167,9 +167,7 @@ void N::f() { } // okay
struct Y; // expected-note{{forward declaration of 'Y'}}
Y::foo y; // expected-error{{incomplete type 'Y' named in nested name specifier}}
-X::X() : a(5) { } // expected-error{{use of undeclared identifier 'X'}} \
- // expected-error{{C++ requires a type specifier for all declarations}} \
- // expected-error{{only constructors take base initializers}}
+X::X() : a(5) { } // expected-error{{use of undeclared identifier 'X'}}
struct foo_S {
static bool value;
OpenPOWER on IntegriCloud