Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/gcc/testsuite/g++.dg/plugin/show-template-tree-color-no-elide-type.C
2023-03-06 14:48:14 +01:00

31 lines
1.1 KiB
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* 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 "" } */
}