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 | 5a2f5d304897220f16e00c05cf122dd95e859aa9 (patch) | |
tree | 3684d0346fedee949b1e20f235db338fe76c52cb | |
parent | 57966fc0077ed462f1ddc0011fe4762ca9942b8f (diff) |
Allow multiple Microsoft calling-convention keywords. Fixes rdar://problem/6486133
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62018 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 4 | ||||
-rw-r--r-- | test/Parser/MicrosoftExtensions.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index ac1a4be845..3ec1764612 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/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/test/Parser/MicrosoftExtensions.c b/test/Parser/MicrosoftExtensions.c index beeef0a9f5..27283de79c 100644 --- a/test/Parser/MicrosoftExtensions.c +++ b/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); |