Add explicit "fuzzy" parse support for Microsoft declspec.
Remove previous __declspec macro that would effectively erase the construct prior to parsing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61422 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 1b0b811..1d3de90 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -220,6 +220,10 @@
if (Tok.is(tok::kw___attribute))
Attr = ParseAttributes();
+ // If declspecs exist after tag, parse them.
+ if (Tok.is(tok::kw___declspec) && PP.getLangOptions().Microsoft)
+ FuzzyParseMicrosoftDeclSpec();
+
// Parse the (optional) nested-name-specifier.
CXXScopeSpec SS;
if (getLang().CPlusPlus && MaybeParseCXXScopeSpecifier(SS)) {