diff options
author | Richard Trieu <rtrieu@google.com> | 2012-06-29 21:12:16 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2012-06-29 21:12:16 +0000 |
commit | 529cdf4c2ef0985dd6f4b7b68ab76e6a1a5082d5 (patch) | |
tree | 1f311ba850991167cac65db687d57317a5cab054 /test/Misc/diag-template-diffing-color.cpp | |
parent | b0754170b249e896298df24fa28fbd9a008a114d (diff) |
Update the %diff modifer to have an alternate string print when a template tree
is selected. This will allow more flexibility when converting diagnostics to
use template type diffing.
Also updated the internal manual and test cases for correctly keeping the bold
attribute and for tree printing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159463 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 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Misc/diag-template-diffing-color.cpp b/test/Misc/diag-template-diffing-color.cpp index 502f6843af..b944ef2bb0 100644 --- a/test/Misc/diag-template-diffing-color.cpp +++ b/test/Misc/diag-template-diffing-color.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -fcolor-diagnostics %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -fcolor-diagnostics -fdiagnostics-show-template-tree %s 2>&1 | FileCheck %s -check-prefix=TREE // XFAIL: mingw32,win32 template<typename> struct foo {}; void func(foo<int>); @@ -6,3 +7,13 @@ int main() { func(foo<double>()); } // CHECK: {{.*}}candidate function not viable: no known conversion from 'foo<{{.}}[0;1;36mdouble{{.}}[0m>' to 'foo<{{.}}[0;1;36mint{{.}}[0m>' for 1st argument{{.}}[0m +// TREE: candidate function not viable: no known conversion for 1st argument +// TREE: foo< +// TREE: [{{.}}[0;1;36mdouble{{.}}[0m != {{.}}[0;1;36mint{{.}}[0m]>{{.}}[0m + +foo<int> A; +foo<double> &B = A; +// CHECK: {{.*}}non-const lvalue reference to type 'foo<{{.}}[0;1;36mdouble{{.}}[0m{{.}}[1m>' cannot bind to a value of unrelated type 'foo<{{.}}[0;1;36mint{{.}}[0m{{.}}[1m>'{{.}}[0m +// TREE: non-const lvalue reference cannot bind to a value of related type +// TREE: foo< +// TREE: [{{.}}[0;1;36mdouble{{.}}[0m{{.}}[1m != {{.}}[0;1;36mint{{.}}[0m{{.}}[1m]>{{.}}[0m |