]> granicus.if.org Git - clang/commitdiff
Allow multiple Microsoft calling-convention keywords. Fixes rdar://problem/6486133
authorDouglas Gregor <dgregor@apple.com>
Sat, 10 Jan 2009 00:48:18 +0000 (00:48 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sat, 10 Jan 2009 00:48:18 +0000 (00:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62018 91177308-0d34-0410-b5e6-96231b3b80d8

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

index ac1a4be84562c58dd0d30ca54251b9d5dfcaa62f..3ec1764612a70ba908a7e3b67da97b8aa9198a52 100644 (file)
@@ -1735,8 +1735,8 @@ void Parser::ParseParenDeclarator(Declarator &D) {
     RequiresArg = true;
   }
   // Eat any Microsoft extensions.
-  if ((Tok.is(tok::kw___cdecl) || Tok.is(tok::kw___stdcall) ||
-      (Tok.is(tok::kw___fastcall))) && PP.getLangOptions().Microsoft)
+  while ((Tok.is(tok::kw___cdecl) || Tok.is(tok::kw___stdcall) ||
+          (Tok.is(tok::kw___fastcall))) && PP.getLangOptions().Microsoft)
     ConsumeToken();
   
   // If we haven't past the identifier yet (or where the identifier would be
index beeef0a9f55eb447938180e30885bd6e334e936a..27283de79cc7064e6145ddd3989dbcdecf4a6529 100644 (file)
@@ -26,3 +26,5 @@ void *_alloca(int);
 void foo() {
        __declspec(align(16)) int *buffer = (int *)_alloca(9);
 }
+
+typedef bool (__stdcall __stdcall *blarg)(int);