summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/alias-templates.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-25 16:15:54 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-25 16:15:54 +0000
commit0dd22bc4d6b03d4448ca42ab08a5b8e3669bbdf8 (patch)
treead20a682cc9be1f4e260cd74650ae22752830dbb /clang/test/SemaTemplate/alias-templates.cpp
parentf7bf3db070d476d590a5cbe7045ffe5dbd8ef701 (diff)
downloadbcm5719-llvm-0dd22bc4d6b03d4448ca42ab08a5b8e3669bbdf8.tar.gz
bcm5719-llvm-0dd22bc4d6b03d4448ca42ab08a5b8e3669bbdf8.zip
When we're substituting into a function parameter pack and expect to
get a function parameter pack (but don't due to weird substitutions), complain. Fixes the last bit of PR11848. llvm-svn: 148960
Diffstat (limited to 'clang/test/SemaTemplate/alias-templates.cpp')
-rw-r--r--clang/test/SemaTemplate/alias-templates.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/test/SemaTemplate/alias-templates.cpp b/clang/test/SemaTemplate/alias-templates.cpp
index c0f9e21b353..75615ee2951 100644
--- a/clang/test/SemaTemplate/alias-templates.cpp
+++ b/clang/test/SemaTemplate/alias-templates.cpp
@@ -85,7 +85,7 @@ namespace PR11848 {
template<typename T>
struct Hidden1 {
template<typename ...Ts>
- Hidden1(typename T::template U<Ts> ...ts);
+ Hidden1(typename T::template U<Ts> ...ts); // expected-error{{type 'typename Hide::U<Ts>' (aka 'int') of function parameter pack does not contain any unexpanded parameter packs}}
};
template<typename T, typename ...Ts>
@@ -97,7 +97,6 @@ namespace PR11848 {
template<typename T> using U = int;
};
- // FIXME: This case crashes clang at the moment.
- //Hidden1<Hide> h1;
+ Hidden1<Hide> h1; // expected-note{{in instantiation of template class 'PR11848::Hidden1<PR11848::Hide>' requested here}}
Hidden2<Hide, double, char> h2(1, 2);
}
OpenPOWER on IntegriCloud