diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-01-10 00:48:18 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-01-10 00:48:18 +0000 |
| commit | b37080a9692bafeec86c8587d0ecfa9c2385ba17 (patch) | |
| tree | 98665c7f430f2e021037c54916095002d8af739f | |
| parent | d9c238dc9f17ded5f90cd0ae218f0973cc7648f7 (diff) | |
| download | bcm5719-llvm-b37080a9692bafeec86c8587d0ecfa9c2385ba17.tar.gz bcm5719-llvm-b37080a9692bafeec86c8587d0ecfa9c2385ba17.zip | |
Allow multiple Microsoft calling-convention keywords. Fixes rdar://problem/6486133
llvm-svn: 62018
| -rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 4 | ||||
| -rw-r--r-- | clang/test/Parser/MicrosoftExtensions.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index ac1a4be8456..3ec1764612a 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -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 diff --git a/clang/test/Parser/MicrosoftExtensions.c b/clang/test/Parser/MicrosoftExtensions.c index beeef0a9f55..27283de79cc 100644 --- a/clang/test/Parser/MicrosoftExtensions.c +++ b/clang/test/Parser/MicrosoftExtensions.c @@ -26,3 +26,5 @@ void *_alloca(int); void foo() { __declspec(align(16)) int *buffer = (int *)_alloca(9); } + +typedef bool (__stdcall __stdcall *blarg)(int); |

