diff options
author | Richard Trieu <rtrieu@google.com> | 2014-07-24 23:14:16 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2014-07-24 23:14:16 +0000 |
commit | 116083159cde2efb44eb326d4b7933a28eeea29d (patch) | |
tree | 4ea49e19c3681a47da6dca763e680bfc396082de /clang/test/Misc/diag-template-diffing.cpp | |
parent | 21921375cc23d4958560b3280c2684c9c52baa62 (diff) | |
download | bcm5719-llvm-116083159cde2efb44eb326d4b7933a28eeea29d.tar.gz bcm5719-llvm-116083159cde2efb44eb326d4b7933a28eeea29d.zip |
Print "(default)" for default template template arguments to match the
printing of other types.
llvm-svn: 213902
Diffstat (limited to 'clang/test/Misc/diag-template-diffing.cpp')
-rw-r--r-- | clang/test/Misc/diag-template-diffing.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/clang/test/Misc/diag-template-diffing.cpp b/clang/test/Misc/diag-template-diffing.cpp index 55ffb19c33f..e21dc9fb9e0 100644 --- a/clang/test/Misc/diag-template-diffing.cpp +++ b/clang/test/Misc/diag-template-diffing.cpp @@ -1178,11 +1178,32 @@ Wrapper<S<&global2, nullptr>> W12 = // CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global, [...]>>' to 'Wrapper<S<&global2, [...]>>' Wrapper<S<&global, &global>> W13 = MakeWrapper<S<&global, ptr>>(); -// C HECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<[...], nullptr>>' to 'Wrapper<S<[...], &global>>' +// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<[...], nullptr>>' to 'Wrapper<S<[...], &global>>' Wrapper<S<&global, ptr>> W14 = MakeWrapper<S<&global, &global>>(); // CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<[...], &global>>' to 'Wrapper<S<[...], ptr>>' } +namespace TemplateTemplateDefault { +template <class> class A{}; +template <class> class B{}; +template <class> class C{}; +template <template <class> class, template <class> class = A> + class T {}; + +T<A> t1 = T<A, C>(); +// CHECK-ELIDE-NOTREE: no viable conversion from 'T<[...], template C>' to 'T<[...], (default) template A>' +T<A, C> t2 = T<A>(); +// CHECK-ELIDE-NOTREE: no viable conversion from 'T<[...], (default) template A>' to 'T<[...], template C>' +T<A> t3 = T<B>(); +// CHECK-ELIDE-NOTREE: no viable conversion from 'T<template B>' to 'T<template A>' +T<B, C> t4 = T<C, B>(); +// CHECK-ELIDE-NOTREE: no viable conversion from 'T<template C, template B>' to 'T<template B, template C>' +T<A, A> t5 = T<B>(); +// CHECK-ELIDE-NOTREE: no viable conversion from 'T<template B, [...]>' to 'T<template A, [...]>' +T<B> t6 = T<A, A>(); +// CHECK-ELIDE-NOTREE: no viable conversion from 'T<template A, [...]>' to 'T<template B, [...]>' +} + // CHECK-ELIDE-NOTREE: {{[0-9]*}} errors generated. // CHECK-NOELIDE-NOTREE: {{[0-9]*}} errors generated. // CHECK-ELIDE-TREE: {{[0-9]*}} errors generated. |