@@ -69,7 +69,7 @@ TEST_F(ContextTest, Callsite) {
69
69
__llvm_ctx_profile_expected_callee[0 ] = &FakeCalleeAddress;
70
70
__llvm_ctx_profile_callsite[0 ] = &Ctx->subContexts ()[2 ];
71
71
// This is what the callee does
72
- FunctionData FData = { 0 } ;
72
+ FunctionData FData;
73
73
auto *Subctx =
74
74
__llvm_ctx_profile_get_context (&FData, &FakeCalleeAddress, 2 , 3 , 1 );
75
75
// This should not have required creating a flat context.
@@ -93,7 +93,7 @@ TEST_F(ContextTest, ScratchNoCollectionProfilingNotStarted) {
93
93
int FakeCalleeAddress = 0 ;
94
94
// this would be the very first function executing this. the TLS is empty,
95
95
// too.
96
- FunctionData FData = { 0 } ;
96
+ FunctionData FData;
97
97
auto *Ctx =
98
98
__llvm_ctx_profile_get_context (&FData, &FakeCalleeAddress, 2 , 3 , 1 );
99
99
// We never entered a context (_start_context was never called) - so the
@@ -111,7 +111,7 @@ TEST_F(ContextTest, ScratchNoCollectionProfilingStarted) {
111
111
__llvm_ctx_profile_start_collection ();
112
112
// this would be the very first function executing this. the TLS is empty,
113
113
// too.
114
- FunctionData FData = { 0 } ;
114
+ FunctionData FData;
115
115
auto *Ctx =
116
116
__llvm_ctx_profile_get_context (&FData, &FakeCalleeAddress, 2 , 3 , 1 );
117
117
// We never entered a context (_start_context was never called) - so the
@@ -130,7 +130,7 @@ TEST_F(ContextTest, ScratchDuringCollection) {
130
130
int OtherFakeCalleeAddress = 0 ;
131
131
__llvm_ctx_profile_expected_callee[0 ] = &FakeCalleeAddress;
132
132
__llvm_ctx_profile_callsite[0 ] = &Ctx->subContexts ()[2 ];
133
- FunctionData FData[3 ] = { 0 } ;
133
+ FunctionData FData[3 ];
134
134
auto *Subctx = __llvm_ctx_profile_get_context (
135
135
&FData[0 ], &OtherFakeCalleeAddress, 2 , 3 , 1 );
136
136
// We expected a different callee - so return scratch. It mimics what happens
@@ -175,7 +175,7 @@ TEST_F(ContextTest, NeedMoreMemory) {
175
175
const auto *CurrentMem = Root.CurrentMem ;
176
176
__llvm_ctx_profile_expected_callee[0 ] = &FakeCalleeAddress;
177
177
__llvm_ctx_profile_callsite[0 ] = &Ctx->subContexts ()[2 ];
178
- FunctionData FData = { 0 } ;
178
+ FunctionData FData;
179
179
// Allocate a massive subcontext to force new arena allocation
180
180
auto *Subctx =
181
181
__llvm_ctx_profile_get_context (&FData, &FakeCalleeAddress, 3 , 1 << 20 , 1 );
@@ -216,7 +216,7 @@ TEST_F(ContextTest, Dump) {
216
216
int FakeCalleeAddress = 0 ;
217
217
__llvm_ctx_profile_expected_callee[0 ] = &FakeCalleeAddress;
218
218
__llvm_ctx_profile_callsite[0 ] = &Ctx->subContexts ()[2 ];
219
- FunctionData FData = { 0 } ;
219
+ FunctionData FData;
220
220
auto *Subctx =
221
221
__llvm_ctx_profile_get_context (&FData, &FakeCalleeAddress, 2 , 3 , 1 );
222
222
(void )Subctx;
@@ -267,7 +267,7 @@ TEST_F(ContextTest, Dump) {
267
267
void writeFlat (GUID Guid, const uint64_t *Buffer,
268
268
size_t BufferSize) override {
269
269
++FlatsWritten;
270
- EXPECT_EQ (BufferSize, 3 );
270
+ EXPECT_EQ (BufferSize, 3U );
271
271
EXPECT_EQ (Buffer[0 ], 15U );
272
272
EXPECT_EQ (Buffer[1 ], 0U );
273
273
EXPECT_EQ (Buffer[2 ], 0U );
@@ -284,6 +284,7 @@ TEST_F(ContextTest, Dump) {
284
284
__llvm_ctx_profile_start_collection ();
285
285
auto *Flat =
286
286
__llvm_ctx_profile_get_context (&FData, &FakeCalleeAddress, 2 , 3 , 1 );
287
+ (void )Flat;
287
288
EXPECT_NE (FData.FlatCtx , nullptr );
288
289
FData.FlatCtx ->counters ()[0 ] = 15U ;
289
290
TestProfileWriter W2 (&Root, 0 );
0 commit comments