Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/diagnostic/param-type-mismatch-3.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line source
// { dg-do compile { target c++14 } } // { dg-options "-fdiagnostics-show-caret" } void f2(int, char (*)(int), int) { } // { dg-line f2 } void test_1 () { auto glambda = [](auto a) { return a; }; // { dg-line candidate } int (*fp)(int) = glambda; f2(1, glambda, 3); // { dg-error "invalid user-defined conversion" } /* { dg-begin-multiline-output "" } f2(1, glambda, 3); ^~~~~~~ { dg-end-multiline-output "" } */ // { dg-message "candidate is: " "" { target *-*-* } candidate } /* { dg-begin-multiline-output "" } auto glambda = [](auto a) { return a; }; ^ { dg-end-multiline-output "" } */ // { dg-message "no known conversion from " "" { target *-*-* } candidate } // { dg-message "initializing argument 2 of " "" { target *-*-* } f2 } /* { dg-begin-multiline-output "" } void f2(int, char (*)(int), int) { } ^~~~~~~~~~~~~ { dg-end-multiline-output "" } */ }