Skip to content

Commit 880f557

Browse files
committed
Update clang-format config
1 parent 978f250 commit 880f557

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

.clang-format

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,22 @@ AccessModifierOffset: -4
55
AlignAfterOpenBracket: DontAlign
66
BinPackParameters: true
77
BraceWrapping:
8-
AfterClass: true
8+
AfterCaseLabel: true
9+
AfterClass: true
910
AfterControlStatement: true
10-
AfterEnum: true
11-
AfterFunction: true
12-
AfterNamespace: true
13-
AfterObjCDeclaration: true
14-
AfterStruct: true
15-
AfterUnion: true
16-
BeforeCatch: true
17-
BeforeElse: true
18-
SplitEmptyFunction: false
11+
AfterEnum: true
12+
AfterFunction: true
13+
AfterNamespace: true
14+
AfterStruct: true
15+
AfterUnion: true
16+
# AfterExternBlock: true
17+
BeforeCatch: true
18+
BeforeElse: true
19+
# BeforeLambdaBody: true
20+
# BeforeWhile: true
21+
SplitEmptyFunction: false
22+
SplitEmptyRecord: false
23+
SplitEmptyNamespace: false
1924
BreakBeforeBraces: Custom
2025
BreakBeforeTernaryOperators: false
2126
ColumnLimit: 100
@@ -34,6 +39,7 @@ IncludeCategories:
3439
Priority: 4
3540
IncludeIsMainRegex: '(Test)?$'
3641
IndentCaseLabels: false
42+
# IndentExternBlock: NoIndent
3743
IndentWidth: 4
3844
MaxEmptyLinesToKeep: 2
3945
PenaltyBreakAssignment: 1

lib/evmone/evmone.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ extern "C" {
1313
EVMC_EXPORT evmc_vm* evmc_create_evmone() noexcept
1414
{
1515
static constexpr auto destroy = [](evmc_vm*) noexcept {};
16-
static constexpr auto get_capabilities = [](evmc_vm*) noexcept
17-
{
16+
static constexpr auto get_capabilities = [](evmc_vm*) noexcept {
1817
return evmc_capabilities_flagset{EVMC_CAPABILITY_EVM1};
1918
};
2019

test/internal_benchmarks/find_jumpdest_bench.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,12 @@ struct map_builder
8585
};
8686

8787
template <typename T>
88-
const std::array<std::pair<T, T>, jumpdest_map_size> map_builder<T>::map = []() noexcept
89-
{
88+
const std::array<std::pair<T, T>, jumpdest_map_size> map_builder<T>::map = []() noexcept {
9089
auto m = std::array<std::pair<T, T>, jumpdest_map_size>{};
9190
for (size_t i = 0; i < m.size(); ++i)
9291
m[i] = {static_cast<T>(2 * i + 1), static_cast<T>(2 * i + 2)};
9392
return m;
94-
}
95-
();
93+
}();
9694

9795
template <typename T, T (*F)(const std::pair<T, T>*, size_t, T) noexcept>
9896
void find_jumpdest(benchmark::State& state)
@@ -195,17 +193,15 @@ struct split_map_builder
195193
};
196194

197195
template <typename T>
198-
const split_map<T> split_map_builder<T>::map = []() noexcept
199-
{
196+
const split_map<T> split_map_builder<T>::map = []() noexcept {
200197
auto m = split_map<T>{};
201198
for (size_t i = 0; i < m.key.size(); ++i)
202199
{
203200
m.key[i] = static_cast<T>(2 * i + 1);
204201
m.value[i] = static_cast<T>(2 * i + 2);
205202
}
206203
return m;
207-
}
208-
();
204+
}();
209205

210206
template <typename T>
211207
inline T lower_bound(const T* begin, const T* values, size_t size, T offset) noexcept

test/utils/dump.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ void dump(const evmone::code_analysis& analysis)
3030
{
3131
block = &instr.arg.block;
3232

33-
const auto get_jumpdest_offset = [&analysis](size_t index) noexcept
34-
{
33+
const auto get_jumpdest_offset = [&analysis](size_t index) noexcept {
3534
for (size_t t = 0; t < analysis.jumpdest_targets.size(); ++t)
3635
{
3736
if (static_cast<size_t>(analysis.jumpdest_targets[t]) == index)

0 commit comments

Comments
 (0)