]> granicus.if.org Git - clang/commitdiff
Change the Microsoft __interface keyword to be an alias for struct (not class) since...
authorFrancois Pichet <pichet2000@gmail.com>
Thu, 1 Dec 2011 08:30:47 +0000 (08:30 +0000)
committerFrancois Pichet <pichet2000@gmail.com>
Thu, 1 Dec 2011 08:30:47 +0000 (08:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145580 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/TokenKinds.def
test/Parser/MicrosoftExtensions.cpp

index de345af7013551c308ef4da3f3f9f40a0fc05185..07cb4ce30026314350e4fb24d117fd3933f7aa8f 100644 (file)
@@ -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)
index 3a72ea0234c92c4f3af59f586771ed7fe346e1b2..0c5459cba255adc461db5d8337ac8b0a7ff850a3 100644 (file)
@@ -165,6 +165,11 @@ __interface MicrosoftInterface {
    virtual void foo2() = 0;
 };
 
+void interface_test() {
+  MicrosoftInterface* a;
+  a->foo1();
+}
+
 __int64 x7 = __int64(0);