diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-02-25 18:19:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-02-25 18:19:59 +0000 |
commit | f3db29fff6a583ecda823cf909ab7737d8d30129 (patch) | |
tree | bc17d5016ae4621929358b4e07dba957e27d707d /test/SemaCXX/nested-name-spec-locations.cpp | |
parent | e293d30e858e38f2bb028c37ecac2178f8d78aa9 (diff) |
Push nested-name-specifier source-location information into
pseudo-destructor expressions. Also, clean up some
template-instantiation and type-checking issues with
pseudo-destructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126498 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 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaCXX/nested-name-spec-locations.cpp b/test/SemaCXX/nested-name-spec-locations.cpp index f0f42f754c..e4dd6cf986 100644 --- a/test/SemaCXX/nested-name-spec-locations.cpp +++ b/test/SemaCXX/nested-name-spec-locations.cpp @@ -40,3 +40,24 @@ struct UnresolvedUsingTypenameDeclTester { UnresolvedUsingTypenameDeclTester<int> UnresolvedUsingTypenameDeclCheck; // expected-note{{in instantiation of template class}} + +template<typename T, typename U> +struct PseudoDestructorExprTester { + void f(T *t) { + t->T::template Inner<typename add_reference<U>::type + * // expected-error{{as a pointer to a reference of type}} + >::Blarg::~Blarg(); + } +}; + +struct HasInnerTemplate { + template<typename T> + struct Inner; + + typedef HasInnerTemplate T; +}; + +void PseudoDestructorExprCheck( + PseudoDestructorExprTester<HasInnerTemplate, float> tester) { + tester.f(0); // expected-note{{in instantiation of member function}} +} |