Skip to content

Commit 45bdaaf

Browse files
authored
Support clang 18 (#801)
* Bump fmt * Update other files * Fix fmt::join error
1 parent 3e93325 commit 45bdaaf

File tree

221 files changed

+20196
-46351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+20196
-46351
lines changed

src/common/util/string_util.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include "common/util/string_util.h"
2323
#include "fmt/format.h"
24+
#include "fmt/ranges.h"
2425

2526
namespace bustub {
2627

src/include/binder/expressions/bound_column_ref.h

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include "binder/bound_expression.h"
2323
#include "common/macros.h"
24+
#include "fmt/ranges.h"
2425

2526
namespace bustub {
2627

src/include/execution/expressions/array_expression.h

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "common/exception.h"
2020
#include "execution/expressions/abstract_expression.h"
21+
#include "fmt/ranges.h"
2122
#include "type/value_factory.h"
2223

2324
namespace bustub {

src/primer/orset.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <vector>
1717
#include "common/exception.h"
1818
#include "fmt/format.h"
19+
#include "fmt/ranges.h"
1920

2021
namespace bustub {
2122

src/type/timestamp_type.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ auto TimestampType::ToString(const Value &val) const -> std::string {
110110
tm /= 100000;
111111
auto year = static_cast<uint16_t>(tm % 10000);
112112
tm /= 10000;
113-
auto tz = static_cast<int>(tm % 27);
113+
auto tz = static_cast<int8_t>(tm % 27);
114114
tz -= 12;
115115
tm /= 27;
116116
auto day = static_cast<uint16_t>(tm % 32);

src/type/vector_type.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include "common/exception.h"
1717
#include "common/macros.h"
18+
#include "fmt/ranges.h"
1819
#include "type/type_id.h"
1920
#include "type/type_util.h"
2021
#include "type/vector_type.h"

test/txn/txn_common.h

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "execution/execution_common.h"
4040
#include "fmt/core.h"
4141
#include "fmt/format.h"
42+
#include "fmt/ranges.h"
4243
#include "gtest/gtest.h"
4344
#include "storage/disk/disk_manager_memory.h"
4445
#include "storage/index/b_plus_tree.h"

third_party/fmt/.clang-format

+6
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ IndentPPDirectives: AfterHash
66
IndentCaseLabels: false
77
AlwaysBreakTemplateDeclarations: false
88
DerivePointerAlignment: false
9+
AllowShortCaseLabelsOnASingleLine: true
10+
AlignConsecutiveShortCaseStatements:
11+
Enabled: true
12+
AcrossEmptyLines: true
13+
AcrossComments: true
14+
AlignCaseColons: false

0 commit comments

Comments
 (0)