diff options
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 032326cea7..1c7c45e2bd 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -1150,11 +1150,12 @@ Parser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS, MaybeParseGNUAttributes(D); ParseDeclarator(D); - - Decl *ThisDecl = ParseDeclarationAfterDeclarator(D); - D.complete(ThisDecl); - if (ThisDecl) - DeclsInGroup.push_back(ThisDecl); + if (!D.isInvalidType()) { + Decl *ThisDecl = ParseDeclarationAfterDeclarator(D); + D.complete(ThisDecl); + if (ThisDecl) + DeclsInGroup.push_back(ThisDecl); + } } if (DeclEnd) |