Commit Graph

6 Commits

Author SHA1 Message Date
Richard Smith fb8b7b9a1c 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
2013-10-15 00:00:26 +00:00
Richard Smith e434590bd9 Change the diagnostics which said 'accepted as an extension' to instead say
'is an extension'. The former is inappropriate and confusing when building with
-Werror/-pedantic-errors.

llvm-svn: 147357
2011-12-29 21:57:33 +00:00
Richard Smith 6b46488ff2 Testcase for half of r142048.
llvm-svn: 142053
2011-10-15 04:11:50 +00:00
Richard Smith a34f9c7fd5 Use of override keywords in C++98 should produce a warning by default.
llvm-svn: 142050
2011-10-15 04:01:16 +00:00
Douglas Gregor 205d044552 Switch diagnostic text from "C++0x" over to "C++11".
We'd also like for "C++11" or "c++11" to be used for the warning
groups, but without removing the old warning flags. Patches welcome;
I've run out of time to work on this today.

llvm-svn: 141801
2011-10-12 19:26:40 +00:00
Douglas Gregor a52713096d Improve the extension warning for the use of ref-qualifiers, to
distinguish them from rvalue references. Using the rvalue-references
warning was weird when the ref-qualifier was '&'.

llvm-svn: 124316
2011-01-26 20:35:32 +00:00