File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ constexpr auto outputEnvKey = "OID_METRICS_OUTPUT";
36
36
* "oid_metrics.json".
37
37
*/
38
38
struct TraceFlags {
39
- bool time : 1 = false ;
40
- bool rss : 1 = false ;
39
+ bool time = false ;
40
+ bool rss = false ;
41
41
42
42
operator bool () const {
43
43
return time || rss;
Original file line number Diff line number Diff line change @@ -2,9 +2,16 @@ definitions = '''
2
2
struct Foo10 {
3
3
int arr[10];
4
4
};
5
+
6
+ #pragma clang diagnostic push
7
+ #pragma clang diagnostic ignored "-Wzero-length-array"
5
8
struct Foo0 {
6
9
int arr[0];
7
10
};
11
+
12
+ using ZeroLengthIntArray = int[0];
13
+ #pragma clang diagnostic pop
14
+
8
15
struct MultiDim {
9
16
int arr[2][3];
10
17
};
@@ -59,7 +66,7 @@ definitions = '''
59
66
# WARNING: zero-length arrays are handled differently to non-empty arrays.
60
67
# They end up not being treated as containers. This should probably change
61
68
# in the future.
62
- param_types = [" int[0] " ]
69
+ param_types = [" ZeroLengthIntArray " ]
63
70
setup = " return {};"
64
71
expect_json = ' [{"staticSize":0, "dynamicSize":0}]'
65
72
[cases .ref_int10 ]
@@ -72,6 +79,6 @@ definitions = '''
72
79
# WARNING: zero-length arrays are handled differently to non-empty arrays.
73
80
# They end up not being treated as containers. This should probably change
74
81
# in the future.
75
- param_types = [" const int(&)[0] " ]
82
+ param_types = [" const ZeroLengthIntArray& " ]
76
83
setup = " return {};"
77
84
expect_json = ' [{"staticSize":0, "dynamicSize":0}]'
Original file line number Diff line number Diff line change @@ -56,7 +56,10 @@ def add_test_setup(f, config):
56
56
f"\n "
57
57
f'{ config .get ("raw_definitions" , "" )} \n '
58
58
f"namespace { ns } {{\n "
59
+ f"#pragma clang diagnostic push\n "
60
+ f"#pragma clang diagnostic ignored \" -Wunused-private-field\" \n "
59
61
f'{ config .get ("definitions" , "" )} \n '
62
+ f"#pragma clang diagnostic pop\n "
60
63
)
61
64
62
65
# fmt: on
You can’t perform that action at this time.
0 commit comments