From 99b2fe5f54e2a37c486e7433f7c2907778431fb9 Mon Sep 17 00:00:00 2001 From: John McCall Date: Thu, 29 Apr 2010 23:50:39 +0000 Subject: Rebuild the nested name specifiers in member-pointer declarator chunks when entering the current instantiation. Set up a little to preserve type location information for typename types while we're in there. Fixes a Boost failure. llvm-svn: 102673 --- clang/test/SemaTemplate/nested-name-spec-template.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'clang/test/SemaTemplate/nested-name-spec-template.cpp') diff --git a/clang/test/SemaTemplate/nested-name-spec-template.cpp b/clang/test/SemaTemplate/nested-name-spec-template.cpp index 1691db74a11..9d25a051e8a 100644 --- a/clang/test/SemaTemplate/nested-name-spec-template.cpp +++ b/clang/test/SemaTemplate/nested-name-spec-template.cpp @@ -51,3 +51,16 @@ struct TestA { typedef typename N::template B::type type; // expected-error{{'B' following the 'template' keyword does not refer to a template}} \ // expected-error{{expected member name}} }; + +// Reduced from a Boost failure. +namespace test1 { + template struct pair { + T x; + T y; + + static T pair::* const mem_array[2]; + }; + + template + T pair::* const pair::mem_array[2] = { &pair::x, &pair::y }; +} -- cgit v1.2.3