Fix PR3031 by silencing follow-on errors in invalid declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59027 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index e3094ad..70d65f3 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -1494,6 +1494,7 @@
else
Diag(Tok, diag::err_expected_ident_lparen); // Expected identifier or '('.
D.SetIdentifier(0, Tok.getLocation());
+ D.setInvalidType(true);
}
assert(D.isPastIdentifier() &&