diff options
author | Francois Pichet <pichet2000@gmail.com> | 2011-04-27 05:07:51 +0000 |
---|---|---|
committer | Francois Pichet <pichet2000@gmail.com> | 2011-04-27 05:07:51 +0000 |
commit | 33477fdfd57a14b2df70a7e82bc708afcf07948f (patch) | |
tree | 3b36153bd24531923cd78c7067febb71cd406843 | |
parent | f7620e4d4913c4cae8a956593f1509aa40edc02f (diff) | |
download | bcm5719-llvm-33477fdfd57a14b2df70a7e82bc708afcf07948f.tar.gz bcm5719-llvm-33477fdfd57a14b2df70a7e82bc708afcf07948f.zip |
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.
llvm-svn: 130290
-rw-r--r-- | clang/include/clang/Basic/TokenKinds.def | 1 | ||||
-rw-r--r-- | clang/test/Parser/MicrosoftExtensions.cpp | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/clang/include/clang/Basic/TokenKinds.def b/clang/include/clang/Basic/TokenKinds.def index 5dc8ee64f47..1abdeb4116c 100644 --- a/clang/include/clang/Basic/TokenKinds.def +++ b/clang/include/clang/Basic/TokenKinds.def @@ -427,6 +427,7 @@ ALIAS("_thiscall" , __thiscall , KEYMS) 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) diff --git a/clang/test/Parser/MicrosoftExtensions.cpp b/clang/test/Parser/MicrosoftExtensions.cpp index 20da81d26fa..cf833039ede 100644 --- a/clang/test/Parser/MicrosoftExtensions.cpp +++ b/clang/test/Parser/MicrosoftExtensions.cpp @@ -147,3 +147,8 @@ int main() { } +__interface MicrosoftInterface; +__interface MicrosoftInterface { + virtual void foo1() = 0; + virtual void foo2() = 0; +};
\ No newline at end of file |