]> granicus.if.org Git - clang/commit
PR17567: Improve diagnostic for a mistyped constructor name. If we see something
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 15 Oct 2013 00:00:26 +0000 (00:00 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 15 Oct 2013 00:00:26 +0000 (00:00 +0000)
commitb79b17b67f2c0de8fd343fdd070e5ccbfe20d602
treefb0a08c251e9b2e25a20724c7492562bdd4a00d9
parent89ca1fb13849f6e12dddc1ee562c5cd21ed9dd7a
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
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Sema/Sema.h
lib/Parse/ParseDecl.cpp
lib/Sema/SemaDeclCXX.cpp
test/CXX/drs/dr1xx.cpp
test/Parser/cxx-decl.cpp
test/Parser/cxx0x-in-cxx98.cpp
test/SemaCXX/nested-name-spec.cpp
test/SemaTemplate/alias-nested-nontag.cpp