]> granicus.if.org Git - clang/commitdiff
Another tweak to handle the MS extensions (<rdar://problem/5956221>).
authorSteve Naroff <snaroff@apple.com>
Tue, 6 Jan 2009 19:34:12 +0000 (19:34 +0000)
committerSteve Naroff <snaroff@apple.com>
Tue, 6 Jan 2009 19:34:12 +0000 (19:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61821 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseDecl.cpp
lib/Parse/ParseTentative.cpp
test/Parser/MicrosoftExtensions.c

index 3b65ee0ba784105dd727580c9de86f04f876dc04..c4126f3bb46d4403317a9787e78551d451281e87 100644 (file)
@@ -1353,6 +1353,7 @@ bool Parser::isDeclarationSpecifier() {
   case tok::less:
     return getLang().ObjC1;
     
+  case tok::kw___declspec:
   case tok::kw___cdecl:
   case tok::kw___stdcall:
   case tok::kw___fastcall:
index 11df2f45cea3b8feabe3133a43ee9a6d0f21aeb4..a7c3e389319e667c3f5614bab5ad49b8d3fbd0ff 100644 (file)
@@ -626,6 +626,7 @@ Parser::TPResult Parser::isCXXDeclarationSpecifier() {
     return TPResult::True();
     
     // Microsoft
+  case tok::kw___declspec:
   case tok::kw___cdecl:
   case tok::kw___stdcall:
   case tok::kw___fastcall:
index 6b097ab7a8de075d13f264d611e4b8a928e31d32..beeef0a9f55eb447938180e30885bd6e334e936a 100644 (file)
@@ -21,3 +21,8 @@ __forceinline InterlockedBitTestAndSet (long *Base, long Bit)
     };
 }
 
+void *_alloca(int);
+
+void foo() {
+       __declspec(align(16)) int *buffer = (int *)_alloca(9);
+}