From dc86f94f623b285b61192cf1a1ca8daa87d28422 Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Fri, 31 Aug 2012 18:45:21 +0000 Subject: 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 --- clang/test/Parser/MicrosoftExtensions.cpp | 34 +++++++++++++++++++------------ 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'clang/test/Parser/MicrosoftExtensions.cpp') 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 { -- cgit v1.2.3