Fix <rdar://problem/5956221> clang ObjC rewriter: Microsoft-specific __fastcall keyword unrecognized.

This fix is C++ specific.

llvm-svn: 61816
This commit is contained in:
Steve Naroff 2009-01-06 17:40:00 +00:00
parent 9fee535c84
commit 1f42c2e94d
2 changed files with 7 additions and 1 deletions

View File

@ -625,6 +625,12 @@ Parser::TPResult Parser::isCXXDeclarationSpecifier() {
case tok::kw___attribute:
return TPResult::True();
// Microsoft
case tok::kw___cdecl:
case tok::kw___stdcall:
case tok::kw___fastcall:
return PP.getLangOptions().Microsoft ? TPResult::True() : TPResult::False();
// The ambiguity resides in a simple-type-specifier/typename-specifier
// followed by a '('. The '(' could either be the start of:
//

View File

@ -1,4 +1,4 @@
// RUN: clang -fsyntax-only -verify -fms-extensions %s
// RUN: clang -fsyntax-only -verify -fms-extensions -x=objective-c++ %s
__stdcall int func0();
int __stdcall func();
typedef int (__cdecl *tptr)();