diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-09-26 02:18:13 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-09-26 02:18:13 +0000 |
commit | 6e0605d6540da56bf778a4fb2598764cf004723a (patch) | |
tree | 8fa0bd3203f16731717030bfb18452c52b46c920 /clang/test/Misc/diag-template-diffing.cpp | |
parent | a398d4cfafc66289e54398175137df2317e290d3 (diff) | |
download | bcm5719-llvm-6e0605d6540da56bf778a4fb2598764cf004723a.tar.gz bcm5719-llvm-6e0605d6540da56bf778a4fb2598764cf004723a.zip |
Teach Type::getAs<TemplateSpecializationType> that a TemplateSpecializationType
for a type alias template can appear as sugar at any level of desugaring, just
like a TypedefType.
llvm-svn: 164655
Diffstat (limited to 'clang/test/Misc/diag-template-diffing.cpp')
-rw-r--r-- | clang/test/Misc/diag-template-diffing.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/Misc/diag-template-diffing.cpp b/clang/test/Misc/diag-template-diffing.cpp index 9addcc50aec..24563e3ec89 100644 --- a/clang/test/Misc/diag-template-diffing.cpp +++ b/clang/test/Misc/diag-template-diffing.cpp @@ -426,6 +426,24 @@ void test13() { // CHECK-NOELIDE-TREE: &b13, // CHECK-NOELIDE-TREE: [&d13 != (no argument)]> +template<typename T> struct s14 {}; +template<typename T> using a14 = s14<T>; +typedef a14<int> b14; +template<typename T> using c14 = b14; +int f14(c14<int>); +int k14 = f14(a14<char>()); +// CHECK-ELIDE-NOTREE: no matching function for call to 'f14' +// CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'a14<char>' to 'a14<int>' for 1st argument +// CHECK-NOELIDE-NOTREE: no matching function for call to 'f14' +// CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'a14<char>' to 'a14<int>' for 1st argument +// CHECK-ELIDE-TREE: no matching function for call to 'f14' +// CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument +// CHECK-ELIDE-TREE: a14< +// CHECK-ELIDE-TREE: [char != int]> +// CHECK-NOELIDE-TREE: no matching function for call to 'f14' +// CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument +// CHECK-NOELIDE-TREE: a14< +// CHECK-NOELIDE-TREE: [char != int]> // CHECK-ELIDE-NOTREE: {{[0-9]*}} errors generated. // CHECK-NOELIDE-NOTREE: {{[0-9]*}} errors generated. |