diff options
author | Joao Matos <ripzonetriton@gmail.com> | 2012-08-31 18:45:21 +0000 |
---|---|---|
committer | Joao Matos <ripzonetriton@gmail.com> | 2012-08-31 18:45:21 +0000 |
commit | dc86f94f623b285b61192cf1a1ca8daa87d28422 (patch) | |
tree | a8ecafd8615742d6ef208e6e1666162f0fd94f61 /clang/test/Parser/MicrosoftExtensions.cpp | |
parent | d65f1c8d6ebdd070db205f958d647d88b93fcf5b (diff) | |
download | bcm5719-llvm-dc86f94f623b285b61192cf1a1ca8daa87d28422.tar.gz bcm5719-llvm-dc86f94f623b285b61192cf1a1ca8daa87d28422.zip |
Improved MSVC __interface support by adding first class support for it, instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.
llvm-svn: 163013
Diffstat (limited to 'clang/test/Parser/MicrosoftExtensions.cpp')
-rw-r--r-- | clang/test/Parser/MicrosoftExtensions.cpp | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/clang/test/Parser/MicrosoftExtensions.cpp b/clang/test/Parser/MicrosoftExtensions.cpp index 6219e29f597..d1e8866929e 100644 --- a/clang/test/Parser/MicrosoftExtensions.cpp +++ b/clang/test/Parser/MicrosoftExtensions.cpp @@ -171,19 +171,27 @@ void redundant_typename() { int k = typename var;// expected-error {{expected a qualified name after 'typename'}} } - -__interface MicrosoftInterface; -__interface MicrosoftInterface { - virtual void foo1() = 0; - virtual void foo2() = 0; -}; - -void interface_test() { - MicrosoftInterface* a; - a->foo1(); -} - -__int64 x7 = __int64(0); +
+__interface MicrosoftInterface;
+__interface MicrosoftInterface {
+ void foo1() = 0;
+ virtual void foo2() = 0;
+};
+
+__interface MicrosoftDerivedInterface : public MicrosoftInterface {
+ void foo1();
+ void foo2() override;
+ void foo3();
+};
+
+void interface_test() {
+ MicrosoftInterface* a;
+ a->foo1();
+ MicrosoftDerivedInterface* b;
+ b->foo2();
+}
+
+__int64 x7 = __int64(0);
namespace If_exists_test { |