diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-08-02 23:24:31 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-08-02 23:24:31 +0000 |
| commit | 9dc8bd327f8ae80ea4366be6da910ed01ddc4468 (patch) | |
| tree | 4c75abc7b8e24d7cad036b1c3c97edf3f74c48a3 /clang/test/SemaTemplate | |
| parent | bbb772ace9f28aa1bde762722c7424549fdf6e51 (diff) | |
| download | bcm5719-llvm-9dc8bd327f8ae80ea4366be6da910ed01ddc4468.tar.gz bcm5719-llvm-9dc8bd327f8ae80ea4366be6da910ed01ddc4468.zip | |
Keep track of the template arguments deduced when matching a class
template partial specialization. Then, use those template arguments
when instantiating members of that class template partial
specialization. Fixes PR4607.
llvm-svn: 77925
Diffstat (limited to 'clang/test/SemaTemplate')
| -rw-r--r-- | clang/test/SemaTemplate/partial-spec-instantiate.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/partial-spec-instantiate.cpp b/clang/test/SemaTemplate/partial-spec-instantiate.cpp new file mode 100644 index 00000000000..8d1ae238977 --- /dev/null +++ b/clang/test/SemaTemplate/partial-spec-instantiate.cpp @@ -0,0 +1,20 @@ +// RUN: clang-cc -fsyntax-only %s + +// PR4607 +template <class T> struct X {}; + +template <> struct X<char> +{ + static char* g(); +}; + +template <class T> struct X2 {}; + +template <class U> +struct X2<U*> { + static void f() { + X<U>::g(); + } +}; + +void a(char *a, char *b) {X2<char*>::f();} |

