From 110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab Mon Sep 17 00:00:00 2001 From: dim Date: Mon, 2 May 2011 19:39:53 +0000 Subject: Vendor import of clang trunk r130700: http://llvm.org/svn/llvm-project/cfe/trunk@130700 --- test/Parser/MicrosoftExtensions.cpp | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'test/Parser/MicrosoftExtensions.cpp') diff --git a/test/Parser/MicrosoftExtensions.cpp b/test/Parser/MicrosoftExtensions.cpp index fd0d7d5..32ed375 100644 --- a/test/Parser/MicrosoftExtensions.cpp +++ b/test/Parser/MicrosoftExtensions.cpp @@ -95,6 +95,16 @@ void template_uuid() } +template +class COM_CLASS_TEMPLATE { }; + +typedef COM_CLASS_TEMPLATE COM_TYPE_1; +typedef COM_CLASS_TEMPLATE COM_TYPE_2; + +template +class COM_CLASS_TEMPLATE_REF { }; +typedef COM_CLASS_TEMPLATE COM_TYPE_REF; + class CtorCall { public: @@ -111,3 +121,46 @@ CtorCall& CtorCall::operator=(const CtorCall& that) } return *this; } + +template +class C1 { +public: + template + class Iterator { + }; +}; + +template +class C2 { + typename C1:: /*template*/ Iterator<0> Mypos; // expected-warning {{use 'template' keyword to treat 'Iterator' as a dependent template name}} +}; + +template +void f(){ + typename C1:: /*template*/ Iterator<0> Mypos; // expected-warning {{use 'template' keyword to treat 'Iterator' as a dependent template name}} +} + + + +class AAAA { }; + +template +void redundant_typename() { + typename T t;// expected-warning {{expected a qualified name after 'typename'}} + typename AAAA a;// expected-warning {{expected a qualified name after 'typename'}} + t = 3; +} + +int main() { + redundant_typename(); + f(); +} + + +__interface MicrosoftInterface; +__interface MicrosoftInterface { + virtual void foo1() = 0; + virtual void foo2() = 0; +}; + +__int64 x7 = __int64(0); -- cgit v1.1