From b1d397c23e1f8fd8b404d5731d531e7500f7140d Mon Sep 17 00:00:00 2001 From: John McCall Date: Thu, 5 Aug 2010 17:13:11 +0000 Subject: [PATCH] Allow multiple __declspec attributes after a class-key. Patch by Francois Pichet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110344 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Parse/ParseDeclCXX.cpp | 2 +- test/Parser/MicrosoftExtensions.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index bd8c245f55..55e677dbaa 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -646,7 +646,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind, AttrList = ParseGNUAttributes(); // If declspecs exist after tag, parse them. - if (Tok.is(tok::kw___declspec)) + while (Tok.is(tok::kw___declspec)) AttrList = ParseMicrosoftDeclSpec(AttrList); // If C++0x attributes exist here, parse them. diff --git a/test/Parser/MicrosoftExtensions.c b/test/Parser/MicrosoftExtensions.c index 7b6e60faa4..ec272cdf9c 100644 --- a/test/Parser/MicrosoftExtensions.c +++ b/test/Parser/MicrosoftExtensions.c @@ -3,6 +3,7 @@ __stdcall int func0(); int __stdcall func(); typedef int (__cdecl *tptr)(); void (*__fastcall fastpfunc)(); +struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) __declspec(novtable) IUnknown {}; extern __declspec(dllimport) void __stdcall VarR4FromDec(); __declspec(deprecated) __declspec(deprecated) char * __cdecl ltoa( long _Val, char * _DstBuf, int _Radix); __declspec(noalias) __declspec(restrict) void * __cdecl xxx( void * _Memory ); -- 2.40.0