From: Francois Pichet Date: Thu, 1 Dec 2011 08:30:47 +0000 (+0000) Subject: Change the Microsoft __interface keyword to be an alias for struct (not class) since... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2aba7115f9df1676d5c1811324cceff1b4c4a356;p=clang Change the Microsoft __interface keyword to be an alias for struct (not class) since members are public by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145580 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def index de345af701..07cb4ce300 100644 --- a/include/clang/Basic/TokenKinds.def +++ b/include/clang/Basic/TokenKinds.def @@ -501,7 +501,7 @@ ALIAS("_thiscall" , __thiscall , KEYMS) ALIAS("_uuidof" , __uuidof , KEYMS | KEYBORLAND) ALIAS("_inline" , inline , KEYMS) ALIAS("_declspec" , __declspec , KEYMS) -ALIAS("__interface" , class , KEYMS) +ALIAS("__interface" , struct , KEYMS) // Borland Extensions which should be disabled in strict conformance mode. ALIAS("_pascal" , __pascal , KEYBORLAND) diff --git a/test/Parser/MicrosoftExtensions.cpp b/test/Parser/MicrosoftExtensions.cpp index 3a72ea0234..0c5459cba2 100644 --- a/test/Parser/MicrosoftExtensions.cpp +++ b/test/Parser/MicrosoftExtensions.cpp @@ -165,6 +165,11 @@ __interface MicrosoftInterface { virtual void foo2() = 0; }; +void interface_test() { + MicrosoftInterface* a; + a->foo1(); +} + __int64 x7 = __int64(0);