From bca07a4524feb4edec581062d631a13116320a24 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 20 Feb 2011 13:06:31 +0000 Subject: Vendor import of clang trunk r126079: http://llvm.org/svn/llvm-project/cfe/trunk@126079 --- test/SemaTemplate/instantiate-member-expr.cpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'test/SemaTemplate/instantiate-member-expr.cpp') diff --git a/test/SemaTemplate/instantiate-member-expr.cpp b/test/SemaTemplate/instantiate-member-expr.cpp index 188705ce2139d..a31569a0c3952 100644 --- a/test/SemaTemplate/instantiate-member-expr.cpp +++ b/test/SemaTemplate/instantiate-member-expr.cpp @@ -6,10 +6,10 @@ struct S { template struct vector { - void push_back(const T&) { int a[sizeof(T) ? -1: -1]; } // expected-error {{array size is negative}} + void push_back(const T&) { int a[sizeof(T) ? -1: -1]; } // expected-error {{array with a negative size}} }; -class GRExprEngine { +class ExprEngine { public: typedef vector >CheckersOrdered; CheckersOrdered Checkers; @@ -22,8 +22,8 @@ public: class RetainReleaseChecker { }; -void f(GRExprEngine& Eng) { - Eng.registerCheck(new RetainReleaseChecker); // expected-note {{in instantiation of function template specialization 'GRExprEngine::registerCheck' requested here}} +void f(ExprEngine& Eng) { + Eng.registerCheck(new RetainReleaseChecker); // expected-note {{in instantiation of function template specialization 'ExprEngine::registerCheck' requested here}} } // PR 5838 @@ -49,3 +49,20 @@ namespace test1 { }; template struct O::B; // expected-note {{in instantiation}} } + +// PR7248 +namespace test2 { + template struct A { + void foo() { + T::bar(); // expected-error {{type 'int' cannot}} + } + }; + + template class B { + void foo(A a) { + a.test2::template A::foo(); // expected-note {{in instantiation}} + } + }; + + template class B; +} -- cgit v1.2.3