From 6e0605d6540da56bf778a4fb2598764cf004723a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 26 Sep 2012 02:18:13 +0000 Subject: Teach Type::getAs that a TemplateSpecializationType for a type alias template can appear as sugar at any level of desugaring, just like a TypedefType. llvm-svn: 164655 --- clang/test/Misc/diag-template-diffing.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'clang/test/Misc/diag-template-diffing.cpp') 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 struct s14 {}; +template using a14 = s14; +typedef a14 b14; +template using c14 = b14; +int f14(c14); +int k14 = f14(a14()); +// CHECK-ELIDE-NOTREE: no matching function for call to 'f14' +// CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'a14' to 'a14' 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' to 'a14' 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. -- cgit v1.2.3