diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-06-16 23:08:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-06-16 23:08:59 +0000 |
commit | f13ca06e57ac094ed05ea08c26a499af1ba0ce88 (patch) | |
tree | 9b9742c1a87b9510757609670b6e6642797bdb06 /lib | |
parent | d6ab232bb3ec9847de5af06249afb63078b5f2ee (diff) |
Make the "extra ';' inside a struct or union" diagnostic more
precise. Fixes PR7336.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106170 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 1 | ||||
-rw-r--r-- | lib/Parse/ParseDeclCXX.cpp | 1 | ||||
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 532aff797f..65c42193f6 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -1777,6 +1777,7 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc, // Check for extraneous top-level semicolon. if (Tok.is(tok::semi)) { Diag(Tok, diag::ext_extra_struct_semi) + << DeclSpec::getSpecifierName((DeclSpec::TST)TagType) << FixItHint::CreateRemoval(Tok.getLocation()); ConsumeToken(); continue; diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index 9cf025df5e..fe3122645b 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -1570,6 +1570,7 @@ void Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, // Check for extraneous top-level semicolon. if (Tok.is(tok::semi)) { Diag(Tok, diag::ext_extra_struct_semi) + << DeclSpec::getSpecifierName((DeclSpec::TST)TagType) << FixItHint::CreateRemoval(Tok.getLocation()); ConsumeToken(); continue; diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index 365733d8c4..8e32653126 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -1014,7 +1014,7 @@ void Parser::ParseObjCClassInstanceVariables(DeclPtrTy interfaceDecl, // Check for extraneous top-level semicolon. if (Tok.is(tok::semi)) { - Diag(Tok, diag::ext_extra_struct_semi) + Diag(Tok, diag::ext_extra_ivar_semi) << FixItHint::CreateRemoval(Tok.getLocation()); ConsumeToken(); continue; |