diff options
| author | Alex Lorenz <arphaman@gmail.com> | 2017-04-18 15:12:34 +0000 |
|---|---|---|
| committer | Alex Lorenz <arphaman@gmail.com> | 2017-04-18 15:12:34 +0000 |
| commit | 47fd10c3b530c8b7ef262335279486aecf83cb6c (patch) | |
| tree | 1194cf78c58387380ff6f6c900050b67f2fd8c31 /clang/test | |
| parent | e50544cdf20ea615481958bdbe37314845c72df3 (diff) | |
| download | bcm5719-llvm-47fd10c3b530c8b7ef262335279486aecf83cb6c.tar.gz bcm5719-llvm-47fd10c3b530c8b7ef262335279486aecf83cb6c.zip | |
[ASTPrinter] Print template parameter lists for out-of-line functions
llvm-svn: 300560
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Misc/ast-print-out-of-line-func.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/clang/test/Misc/ast-print-out-of-line-func.cpp b/clang/test/Misc/ast-print-out-of-line-func.cpp index 7c4f7ae7f81..7d42f1f4037 100644 --- a/clang/test/Misc/ast-print-out-of-line-func.cpp +++ b/clang/test/Misc/ast-print-out-of-line-func.cpp @@ -52,3 +52,44 @@ void Wrapper::Inner::staticMember() { } // CHECK: void Wrapper::Inner::staticMember() } + +template<int x, typename T> +class TemplateRecord { + void function(); + template<typename U> void functionTemplate(T, U); +}; + +template<int x, typename T> +void TemplateRecord<x, T>::function() { } +// CHECK: template <int x, typename T> void TemplateRecord<x, T>::function() + +template<int x, typename T> +template<typename U> +void TemplateRecord<x, T>::functionTemplate(T, U) { } +// CHECK: template <int x, typename T> template <typename U> void TemplateRecord<x, T>::functionTemplate(T, U) + +template<> +class TemplateRecord<0, int> { + void function(); + template<typename U> void functionTemplate(int, U); +}; + +void TemplateRecord<0, int>::function() { } +// CHECK: void TemplateRecord<0, int>::function() + +template<typename U> +void TemplateRecord<0, int>::functionTemplate(int, U) { } +// CHECK: template <typename U> void TemplateRecord<0, int>::functionTemplate(int, U) + +template<typename T> +struct OuterTemplateRecord { + template<typename U> + struct Inner { + void function(); + }; +}; + +template<typename T> +template<typename U> +void OuterTemplateRecord<T>::Inner<U>::function() { } +// CHECK: template <typename T> template <typename U> void OuterTemplateRecord<T>::Inner<U>::function() |

