diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-03-01 20:11:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-03-01 20:11:18 +0000 |
commit | 94fdffa4a572fc14ac296f5f1aae9db3734c72f1 (patch) | |
tree | 9d816e05f756c8d0f9f37a9a3eae7a06a873dd3f /test/SemaCXX/nested-name-spec-locations.cpp | |
parent | 438d7f05d34abfdf6a8a8954a957b97275162070 (diff) |
Push nested-name-specifier source-location information into dependent
template specialization types. There are still a few rough edges to
clean up with some of the parser actions dropping
nested-name-specifiers too early.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/nested-name-spec-locations.cpp')
-rw-r--r-- | test/SemaCXX/nested-name-spec-locations.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/SemaCXX/nested-name-spec-locations.cpp b/test/SemaCXX/nested-name-spec-locations.cpp index 996b1cf50a..841937afc2 100644 --- a/test/SemaCXX/nested-name-spec-locations.cpp +++ b/test/SemaCXX/nested-name-spec-locations.cpp @@ -85,3 +85,28 @@ struct TypenameTypeTester { }; TypenameTypeTester<int> TypenameTypeCheck; // expected-note{{in instantiation of template class}} + +template<typename T, typename U> +struct DependentTemplateSpecializationTypeTester { + typedef typename T::template apply<typename add_reference<U>::type + * // expected-error{{declared as a pointer to a reference of type}} + >::type type; +}; + +struct HasApply { + template<typename T> + struct apply { + typedef T type; + }; +}; + +DependentTemplateSpecializationTypeTester<HasApply, int> DTSTCheck; // expected-note{{in instantiation of template class}} + +template<typename T, typename U> +struct DependentTemplateSpecializationTypeTester2 { + typedef typename T::template apply<typename add_reference<U>::type + * // expected-error{{declared as a pointer to a reference of type}} + > type; +}; + +DependentTemplateSpecializationTypeTester2<HasApply, int> DTSTCheck2; // expected-note{{in instantiation of template class}} |