comparison gcc/testsuite/g++.dg/plugin/show-template-tree-color-labels.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* Verify colorization of the labels in diagnostic-show-locus.c
2 for template comparisons.
3 Doing so requires a plugin; see the comments in the plugin for the
4 rationale. */
5
6 // { dg-options "-fdiagnostics-color=always -fdiagnostics-show-caret" }
7
8 template<typename> struct vector {};
9 template<typename, typename> struct map {};
10
11 void fn_1(vector<int>);
12 void fn_2(map<int, int>);
13
14 void test_1 (vector<double> vec)
15 {
16 fn_1 (vec);
17 /* { dg-begin-multiline-output "" }
18 could not convert 'vec' from 'vector<double>' to 'vector<int>'
19 fn_1 (vec);
20 ^~~
21 |
22 vector<double>
23 { dg-end-multiline-output "" } */
24 // TODO: we don't yet highlight the mismatching part with color
25 }
26
27 void test_2 (const map<int, double> &m)
28 {
29 fn_2 (m);
30 /* { dg-begin-multiline-output "" }
31 could not convert 'm' from 'map<[...],double>' to 'map<[...],int>'
32 fn_2 (m);
33 ^
34 |
35 map<[...],double>
36 { dg-end-multiline-output "" } */
37 // TODO: we don't yet highlight the mismatching part with color
38 }