projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c6f748
)
tsan: test: Initialize all fields of Params struct
author
Marco Elver
<elver@google.com>
Tue, 17 Aug 2021 14:54:07 +0000
(16:54 +0200)
committer
Marco Elver
<elver@google.com>
Tue, 17 Aug 2021 14:58:00 +0000
(16:58 +0200)
Some compilers started complaining about the test:
tsan_trace_test.cpp:128:21: error: missing field 'type' initializer
Fix it by initializing all 5 fields, even though the type field will be
reset in the for loop.
Differential Revision: https://reviews.llvm.org/D108207
compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp
b/compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp
index
571fc0a
..
f9d9b64
100644
(file)
--- a/
compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp
+++ b/
compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp
@@
-125,10
+125,10
@@
TEST(Trace, MemoryAccessSize) {
}
};
Thread::Params tests[] = {
- {1, 0, 1, true
}, {4, 0, 2, true
},
- {4, 2, 2, true
}, {8, 3, 1, true
},
- {2, 1, 1, true
}, {1, 1, 1, false
},
- {8, 5, 4, false
}, {4, static_cast<uptr>(-1l), 4, false
},
+ {1, 0, 1, true
, 0}, {4, 0, 2, true, 0
},
+ {4, 2, 2, true
, 0}, {8, 3, 1, true, 0
},
+ {2, 1, 1, true
, 0}, {1, 1, 1, false, 0
},
+ {8, 5, 4, false
, 0}, {4, static_cast<uptr>(-1l), 4, false, 0
},
};
for (auto params : tests) {
for (params.type = 0; params.type < 3; params.type++)