aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/plugin/show-template-tree-color-no-elide-type.C
blob: cab0359f240d93f39a398cbfcdbdd4b01e740736 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* Verify colorization of the output of -fdiagnostics-show-template-tree,
   and within the %H and %I format codes.
   Doing so requires a plugin; see the comments in the plugin for the
   rationale.  */

// { dg-options "-fdiagnostics-show-template-tree -fdiagnostics-color=always -fno-elide-type" }

template<typename> struct vector {};
template<typename, typename> struct map {};

void fn_1(vector<int>);
void fn_2(map<int, int>);

void test ()
{
  fn_1 (vector<double> ());
  /* { dg-begin-multiline-output "" }
could not convert 'vector<double>()' from 'vector<double>' to 'vector<int>'
  vector<
    [double != int]>
     { dg-end-multiline-output "" } */

  fn_2 (map<int, double>());
  /* { dg-begin-multiline-output "" }
could not convert 'map<int, double>()' from 'map<int,double>' to 'map<int,int>'
  map<
    int,
    [double != int]>
     { dg-end-multiline-output "" } */
}