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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192644 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/cxx0x-in-cxx98.cpp b/test/Parser/cxx0x-in-cxx98.cpp
index b4bda89..7249938 100644
--- a/test/Parser/cxx0x-in-cxx98.cpp
+++ b/test/Parser/cxx0x-in-cxx98.cpp
@@ -21,3 +21,10 @@
   // A warning on this would be sufficient once we can handle it correctly.
   new int {}; // expected-error {{}}
 }
+
+struct Auto {
+  static int n;
+};
+auto Auto::n = 0; // expected-warning {{'auto' type specifier is a C++11 extension}}
+auto Auto::m = 0; // expected-error {{no member named 'm' in 'Auto'}}
+                  // expected-warning@-1 {{'auto' type specifier is a C++11 extension}}