diff options
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 1 | ||||
-rw-r--r-- | lib/Parse/ParseTentative.cpp | 1 | ||||
-rw-r--r-- | test/Parser/MicrosoftExtensions.c | 5 |
3 files changed, 7 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 3b65ee0ba7..c4126f3bb4 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -1353,6 +1353,7 @@ bool Parser::isDeclarationSpecifier() { case tok::less: return getLang().ObjC1; + case tok::kw___declspec: case tok::kw___cdecl: case tok::kw___stdcall: case tok::kw___fastcall: diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp index 11df2f45ce..a7c3e38931 100644 --- a/lib/Parse/ParseTentative.cpp +++ b/lib/Parse/ParseTentative.cpp @@ -626,6 +626,7 @@ Parser::TPResult Parser::isCXXDeclarationSpecifier() { return TPResult::True(); // Microsoft + case tok::kw___declspec: case tok::kw___cdecl: case tok::kw___stdcall: case tok::kw___fastcall: diff --git a/test/Parser/MicrosoftExtensions.c b/test/Parser/MicrosoftExtensions.c index 6b097ab7a8..beeef0a9f5 100644 --- a/test/Parser/MicrosoftExtensions.c +++ b/test/Parser/MicrosoftExtensions.c @@ -21,3 +21,8 @@ __forceinline InterlockedBitTestAndSet (long *Base, long Bit) }; } +void *_alloca(int); + +void foo() { + __declspec(align(16)) int *buffer = (int *)_alloca(9); +} |