111
|
1 /* This is padding (to avoid the generated patch containing DejaGnu
|
|
2 directives). */
|
|
3
|
|
4 /* { dg-options "-fdiagnostics-generate-patch" } */
|
|
5
|
|
6 // { dg-do compile { target c++11 } }
|
|
7
|
|
8 void test (int i)
|
|
9 {
|
131
|
10 auto a = { &i }; // { dg-error "deducing from brace-enclosed initializer list requires '#include <initializer_list>'" }
|
111
|
11 }
|
|
12
|
|
13 /* Verify the output from -fdiagnostics-generate-patch.
|
|
14 We expect the patch to begin with a header, containing this
|
|
15 source filename, via an absolute path.
|
|
16 Given the path, we can only capture it via regexps. */
|
|
17 /* { dg-regexp "\\-\\-\\- .*" } */
|
|
18 /* { dg-regexp "\\+\\+\\+ .*" } */
|
|
19 /* Use #if 0/#endif rather than comments, to allow the text to contain
|
|
20 a comment. */
|
|
21 #if 0
|
|
22 { dg-begin-multiline-output "" }
|
|
23 @@ -1,3 +1,4 @@
|
|
24 +#include <initializer_list>
|
|
25 /* This is padding (to avoid the generated patch containing DejaGnu
|
|
26 directives). */
|
131
|
27
|
111
|
28 { dg-end-multiline-output "" }
|
|
29 #endif
|