[cfe-commits] r61821 - in /cfe/trunk: lib/Parse/ParseDecl.cpp lib/Parse/ParseTentative.cpp test/Parser/MicrosoftExtensions.c

Steve Naroff snaroff at apple.com
Tue Jan 6 11:34:12 PST 2009


Author: snaroff
Date: Tue Jan  6 13:34:12 2009
New Revision: 61821

URL: http://llvm.org/viewvc/llvm-project?rev=61821&view=rev
Log:
Another tweak to handle the MS extensions (<rdar://problem/5956221>).


Modified:
    cfe/trunk/lib/Parse/ParseDecl.cpp
    cfe/trunk/lib/Parse/ParseTentative.cpp
    cfe/trunk/test/Parser/MicrosoftExtensions.c

Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=61821&r1=61820&r2=61821&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Tue Jan  6 13:34:12 2009
@@ -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:

Modified: cfe/trunk/lib/Parse/ParseTentative.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseTentative.cpp?rev=61821&r1=61820&r2=61821&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseTentative.cpp (original)
+++ cfe/trunk/lib/Parse/ParseTentative.cpp Tue Jan  6 13:34:12 2009
@@ -626,6 +626,7 @@
     return TPResult::True();
     
     // Microsoft
+  case tok::kw___declspec:
   case tok::kw___cdecl:
   case tok::kw___stdcall:
   case tok::kw___fastcall:

Modified: cfe/trunk/test/Parser/MicrosoftExtensions.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/MicrosoftExtensions.c?rev=61821&r1=61820&r2=61821&view=diff

==============================================================================
--- cfe/trunk/test/Parser/MicrosoftExtensions.c (original)
+++ cfe/trunk/test/Parser/MicrosoftExtensions.c Tue Jan  6 13:34:12 2009
@@ -21,3 +21,8 @@
     };
 }
 
+void *_alloca(int);
+
+void foo() {
+	__declspec(align(16)) int *buffer = (int *)_alloca(9);
+}





More information about the cfe-commits mailing list