[cfe-commits] r130290 - in /cfe/trunk: include/clang/Basic/TokenKinds.def test/Parser/MicrosoftExtensions.cpp
Francois Pichet
pichet2000 at gmail.com
Tue Apr 26 22:07:52 PDT 2011
Author: fpichet
Date: Wed Apr 27 00:07:51 2011
New Revision: 130290
URL: http://llvm.org/viewvc/llvm-project?rev=130290&view=rev
Log:
Add support for Microsoft __interface keyword. An __interface class is basically a normal class containing just pure virtual functions. No urgency to enforce that restriction in clang for now, so make __interface an "class" alias.
Modified:
cfe/trunk/include/clang/Basic/TokenKinds.def
cfe/trunk/test/Parser/MicrosoftExtensions.cpp
Modified: cfe/trunk/include/clang/Basic/TokenKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TokenKinds.def?rev=130290&r1=130289&r2=130290&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TokenKinds.def (original)
+++ cfe/trunk/include/clang/Basic/TokenKinds.def Wed Apr 27 00:07:51 2011
@@ -427,6 +427,7 @@
ALIAS("_uuidof" , __uuidof , KEYMS | KEYBORLAND)
ALIAS("_inline" , inline , KEYMS)
ALIAS("_declspec" , __declspec , KEYMS)
+ALIAS("__interface" , class , KEYMS)
// Borland Extensions which should be disabled in strict conformance mode.
ALIAS("_pascal" , __pascal , KEYBORLAND)
Modified: cfe/trunk/test/Parser/MicrosoftExtensions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/MicrosoftExtensions.cpp?rev=130290&r1=130289&r2=130290&view=diff
==============================================================================
--- cfe/trunk/test/Parser/MicrosoftExtensions.cpp (original)
+++ cfe/trunk/test/Parser/MicrosoftExtensions.cpp Wed Apr 27 00:07:51 2011
@@ -147,3 +147,8 @@
}
+__interface MicrosoftInterface;
+__interface MicrosoftInterface {
+ virtual void foo1() = 0;
+ virtual void foo2() = 0;
+};
\ No newline at end of file
More information about the cfe-commits
mailing list