diff options
author | Richard Trieu <rtrieu@google.com> | 2012-09-28 20:32:51 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2012-09-28 20:32:51 +0000 |
commit | 3c88301b551add30e9a4b59af325534643dc4b21 (patch) | |
tree | 134173dd98a5f6d1db5bf77ffa30b1bf726aafe2 /test/Misc/diag-template-diffing-color.cpp | |
parent | 70d38f3179251bb3e7253a52bf54f8fa2314590a (diff) |
Update template type diffing to handle qualifiers. Differing qualifiers will
now be printed with highlighting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Misc/diag-template-diffing-color.cpp')
-rw-r--r-- | test/Misc/diag-template-diffing-color.cpp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/test/Misc/diag-template-diffing-color.cpp b/test/Misc/diag-template-diffing-color.cpp index 6903e848d3..cfa1a681e1 100644 --- a/test/Misc/diag-template-diffing-color.cpp +++ b/test/Misc/diag-template-diffing-color.cpp @@ -17,3 +17,56 @@ foo<double> &B = A; // TREE: non-const lvalue reference cannot bind to a value of unrelated type // TREE: foo< // TREE: [{{.}}[0;1;36mdouble{{.}}[0m{{.}}[1m != {{.}}[0;1;36mint{{.}}[0m{{.}}[1m]>{{.}}[0m + +template<typename> class vector {}; + +void set15(vector<const vector<int> >) {} +void test15() { + set15(vector<const vector<const int> >()); +} +// CHECK: {{.*}}candidate function not viable: no known conversion from 'vector<const vector<{{.}}[0;1;36mconst{{ ?.}}[0m{{ ?}}int>>' to 'vector<const vector<int>>' for 1st argument +// TREE: {{.*}}candidate function not viable: no known conversion from argument type to parameter type for 1st argument +// TREE: vector< +// TREE: const vector< +// TREE: [{{.}}[0;1;36mconst{{ ?.}}[0m{{ ?}}!= {{.}}[0;1;36m(no qualifiers){{.}}[0m] int>> + +void set16(vector<vector<int> >) {} +void test16() { + set16(vector<const vector<int> >()); +} +// CHECK: {{.*}}candidate function not viable: no known conversion from 'vector<{{.}}[0;1;36mconst{{ ?.}}[0m{{ ?}}vector<[...]>>' to 'vector<vector<[...]>>' for 1st argument +// TREE: {{.*}}candidate function not viable: no known conversion from argument type to parameter type for 1st argument +// TREE: vector< +// TREE: [{{.}}[0;1;36mconst{{ ?.}}[0m{{ ?}}!= {{.}}[0;1;36m(no qualifiers){{ ?.}}[0m]{{ ?}}vector< +// TREE: [...]>> + +void set17(vector<const vector<int> >) {} +void test17() { + set17(vector<vector<int> >()); +} +// CHECK: candidate function not viable: no known conversion from 'vector<vector<[...]>>' to 'vector<{{.}}[0;1;36mconst{{ ?.}}[0m{{ ?}}vector<[...]>>' for 1st argument +// TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument +// TREE: vector< +// TREE: [{{.}}[0;1;36m(no qualifiers){{ ?.}}[0m{{ ?}}!= {{.}}[0;1;36mconst{{.}}[0m] vector< +// TREE: [...]>> + +void set18(vector<volatile vector<int> >) {} +void test18() { + set18(vector<const vector<int> >()); +} +// CHECK: candidate function not viable: no known conversion from 'vector<{{.}}[0;1;36mconst{{ ?.}}[0m{{ ?}}vector<[...]>>' to 'vector<{{.}}[0;1;36mvolatile{{ ?.}}[0m{{ ?}}vector<[...]>>' for 1st argument +// TREE: no matching function for call to 'set18' +// TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument +// TREE: vector< +// TREE: [{{.}}[0;1;36mconst{{ ?.}}[0m{{ ?}}!= {{.}}[0;1;36mvolatile{{.}}[0m] vector< +// TREE: [...]>> + +void set19(vector<const volatile vector<int> >) {} +void test19() { + set19(vector<const vector<int> >()); +} +// CHECK: candidate function not viable: no known conversion from 'vector<const vector<[...]>>' to 'vector<const {{.}}[0;1;36mvolatile{{ ?.}}[0m{{ ?}}vector<[...]>>' for 1st argument +// TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument +// TREE: vector< +// TREE: [const != const {{.}}[0;1;36mvolatile{{.}}[0m] vector< +// TREE: [...]>> |