Another tweak to handle the MS extensions (<rdar://problem/5956221>).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61821 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 3b65ee0..c4126f3 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -1353,6 +1353,7 @@
   case tok::less:
     return getLang().ObjC1;
     
+  case tok::kw___declspec:
   case tok::kw___cdecl:
   case tok::kw___stdcall:
   case tok::kw___fastcall:
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp
index 11df2f4..a7c3e38 100644
--- a/lib/Parse/ParseTentative.cpp
+++ b/lib/Parse/ParseTentative.cpp
@@ -626,6 +626,7 @@
     return TPResult::True();
     
     // Microsoft
+  case tok::kw___declspec:
   case tok::kw___cdecl:
   case tok::kw___stdcall:
   case tok::kw___fastcall:
diff --git a/test/Parser/MicrosoftExtensions.c b/test/Parser/MicrosoftExtensions.c
index 6b097ab..beeef0a 100644
--- a/test/Parser/MicrosoftExtensions.c
+++ b/test/Parser/MicrosoftExtensions.c
@@ -21,3 +21,8 @@
     };
 }
 
+void *_alloca(int);
+
+void foo() {
+	__declspec(align(16)) int *buffer = (int *)_alloca(9);
+}