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

Steve Naroff snaroff at apple.com
Tue Jan 6 09:40:02 PST 2009


Author: snaroff
Date: Tue Jan  6 11:40:00 2009
New Revision: 61816

URL: http://llvm.org/viewvc/llvm-project?rev=61816&view=rev
Log:
Fix <rdar://problem/5956221> clang ObjC rewriter: Microsoft-specific __fastcall keyword unrecognized.

This fix is C++ specific.

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

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

==============================================================================
--- cfe/trunk/lib/Parse/ParseTentative.cpp (original)
+++ cfe/trunk/lib/Parse/ParseTentative.cpp Tue Jan  6 11:40:00 2009
@@ -624,6 +624,12 @@
   case tok::kw__Complex:
   case tok::kw___attribute:
     return TPResult::True();
+    
+    // Microsoft
+  case tok::kw___cdecl:
+  case tok::kw___stdcall:
+  case tok::kw___fastcall:
+    return PP.getLangOptions().Microsoft ? TPResult::True() : TPResult::False();
 
     // The ambiguity resides in a simple-type-specifier/typename-specifier
     // followed by a '('. The '(' could either be the start of:

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

==============================================================================
--- cfe/trunk/test/Parser/MicrosoftExtensions.c (original)
+++ cfe/trunk/test/Parser/MicrosoftExtensions.c Tue Jan  6 11:40:00 2009
@@ -1,4 +1,4 @@
-// RUN: clang -fsyntax-only -verify -fms-extensions %s
+// RUN: clang -fsyntax-only -verify -fms-extensions -x=objective-c++ %s
 __stdcall int func0();
 int __stdcall func();
 typedef int (__cdecl *tptr)();





More information about the cfe-commits mailing list