diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-02-25 22:18:32 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-02-25 22:18:32 +0000 |
| commit | 1e249f86413143a681ead49d14bacb4f0f83a4cb (patch) | |
| tree | f3834b502cf56a4819bdf13020c1da569ced1e5c /clang/test | |
| parent | f47b911f6e0eb586134e2c65f62e5f7954e73e4c (diff) | |
| download | bcm5719-llvm-1e249f86413143a681ead49d14bacb4f0f83a4cb.tar.gz bcm5719-llvm-1e249f86413143a681ead49d14bacb4f0f83a4cb.zip | |
Improve location information on "reused" class template specialization
decls. Test and document the semantic location of class template
specialization definitions that occur within a scope enclosing the
scope of the class template.
llvm-svn: 65478
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaTemplate/class-template-spec.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/class-template-spec.cpp b/clang/test/SemaTemplate/class-template-spec.cpp index 4ae1b9bdc97..15c797a5daf 100644 --- a/clang/test/SemaTemplate/class-template-spec.cpp +++ b/clang/test/SemaTemplate/class-template-spec.cpp @@ -52,8 +52,11 @@ template<> struct ::A<double>; namespace N { template<typename T> struct B; // expected-note 2{{template is declared here}} + template<> struct ::N::B<char>; // okay template<> struct ::N::B<short>; // okay template<> struct ::N::B<int>; // okay + + int f(int); } template<> struct N::B<int> { }; // okay @@ -65,3 +68,7 @@ namespace M { template<> struct ::A<long double>; // expected-error{{class template specialization of 'A' must occur in the global scope}} } + +template<> struct N::B<char> { + int testf(int x) { return f(x); } +}; |

