diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-19 00:52:42 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-19 00:52:42 +0000 |
commit | 611a8c49c6a5848aed17eced8f2f3f7b1b7577a1 (patch) | |
tree | 3566b35cd469b03c6e196f59e44f8388cc9bb7b7 /test/SemaTemplate/class-template-spec.cpp | |
parent | c1debf333186f1307cd7d086c3db3e39d7da0a12 (diff) |
Provide a proper source location when building an implicit dereference. Fixes PR3600
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64993 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/class-template-spec.cpp')
-rw-r--r-- | test/SemaTemplate/class-template-spec.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaTemplate/class-template-spec.cpp b/test/SemaTemplate/class-template-spec.cpp index db6759814b..9347bf5997 100644 --- a/test/SemaTemplate/class-template-spec.cpp +++ b/test/SemaTemplate/class-template-spec.cpp @@ -29,3 +29,14 @@ template<> class A<float, FLOAT>; template<> class A<FLOAT, float> { }; // expected-error{{redefinition}} template<> class A<float, int> { }; // expected-error{{redefinition}} + +template<typename T, typename U = int> class X; + +template <> class X<int, int> { int foo(); }; // #1 +template <> class X<float> { int bar(); }; // #2 + +typedef int int_type; +void testme(X<int_type> *x1, X<float, int> *x2) { + x1->foo(); // okay: refers to #1 + x2->bar(); // okay: refers to #2 +} |