Skip to content

Commit a1e7041

Browse files
authored
Update dev container to Ubuntu 24.10 (#378)
1 parent adabe81 commit a1e7041

File tree

21 files changed

+371
-318
lines changed

21 files changed

+371
-318
lines changed

.devcontainer/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM ubuntu:24.10
2+
3+
RUN apt-get update && apt-get install -y \
4+
bash-completion \
5+
build-essential \
6+
clang-format \
7+
clangd \
8+
cmake \
9+
ninja-build \
10+
python3-pip \
11+
python3-venv \
12+
wget
13+
14+
RUN wget -nd -P /tmp/ https://github.com/watchexec/watchexec/releases/download/v2.2.0/watchexec-2.2.0-$(uname -m)-unknown-linux-gnu.deb \
15+
&& dpkg -i /tmp/watchexec-2.2.0-$(uname -m)-unknown-linux-gnu.deb \
16+
&& rm -f /tmp/watchexec-2.2.0-$(uname -m)-unknown-linux-gnu.deb

.devcontainer/ubuntu/devcontainer.json renamed to .devcontainer/devcontainer.json

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "Ubuntu 24.04",
2+
"name": "Ubuntu 24.10",
33

44
"build": {
55
"dockerfile": "Dockerfile"
@@ -16,19 +16,23 @@
1616
"postCreateCommand": "npm ci",
1717

1818
"features": {
19+
"ghcr.io/devcontainers/features/common-utils": {},
1920
"ghcr.io/devcontainers/features/github-cli": "latest",
20-
"ghcr.io/devcontainers/features/node": "latest",
21-
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
21+
"ghcr.io/devcontainers/features/node": "latest"
2222
},
2323

2424
"customizations": {
2525
"vscode": {
2626
"extensions": [
27-
"ms-vscode.cpptools",
28-
"ms-vscode.cmake-tools",
29-
"esbenp.prettier-vscode",
30-
"dbaeumer.vscode-eslint"
31-
]
27+
"llvm-vs-code-extensions.vscode-clangd",
28+
"llvm-vs-code-extensions.lldb-dap"
29+
],
30+
"settings": {
31+
"clangd.arguments": [
32+
"--compile-commands-dir=build",
33+
"--completion-style=bundled"
34+
]
35+
}
3236
}
3337
}
3438
}

.devcontainer/ubuntu/Dockerfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/frontend/cxx/cli.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ struct CLIOptionDescr {
6868
std::string arg;
6969
std::string help;
7070
CLIOptionDescrKind kind;
71-
bool CLI::*flag = nullptr;
71+
bool CLI::* flag = nullptr;
7272
CLIOptionVisibility visibility{CLIOptionVisibility::kDefault};
7373

7474
CLIOptionDescr(std::string option, std::string arg, std::string help,
@@ -88,7 +88,7 @@ struct CLIOptionDescr {
8888
kind(kind),
8989
visibility(visibility) {}
9090

91-
CLIOptionDescr(std::string option, std::string help, bool CLI::*flag,
91+
CLIOptionDescr(std::string option, std::string help, bool CLI::* flag,
9292
CLIOptionVisibility visibility = CLIOptionVisibility::kDefault)
9393
: option(std::move(option)),
9494
help(std::move(help)),

src/frontend/cxx/frontend.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
namespace {
5757
using namespace cxx;
5858

59-
auto readAll(const std::string& fileName,
60-
std::istream& in) -> std::optional<std::string> {
59+
auto readAll(const std::string& fileName, std::istream& in)
60+
-> std::optional<std::string> {
6161
std::string code;
6262
char buffer[4 * 1024];
6363
do {

src/parser/cxx/control.cc

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ auto Control::getLongDoubleType() -> const LongDoubleType* {
343343
return &d->longDoubleType;
344344
}
345345

346-
auto Control::getQualType(const Type* elementType,
347-
CvQualifiers cvQualifiers) -> const QualType* {
346+
auto Control::getQualType(const Type* elementType, CvQualifiers cvQualifiers)
347+
-> const QualType* {
348348
return &*d->qualTypes.emplace(elementType, cvQualifiers).first;
349349
}
350350

@@ -360,8 +360,8 @@ auto Control::getConstVolatileType(const Type* elementType) -> const QualType* {
360360
return getQualType(elementType, CvQualifiers::kConstVolatile);
361361
}
362362

363-
auto Control::getBoundedArrayType(const Type* elementType,
364-
std::size_t size) -> const BoundedArrayType* {
363+
auto Control::getBoundedArrayType(const Type* elementType, std::size_t size)
364+
-> const BoundedArrayType* {
365365
return &*d->boundedArrayTypes.emplace(elementType, size).first;
366366
}
367367

@@ -392,8 +392,8 @@ auto Control::getOverloadSetType(OverloadSetSymbol* symbol)
392392
auto Control::getFunctionType(const Type* returnType,
393393
std::vector<const Type*> parameterTypes,
394394
bool isVariadic, CvQualifiers cvQualifiers,
395-
RefQualifier refQualifier,
396-
bool isNoexcept) -> const FunctionType* {
395+
RefQualifier refQualifier, bool isNoexcept)
396+
-> const FunctionType* {
397397
return &*d->functionTypes
398398
.emplace(returnType, std::move(parameterTypes), isVariadic,
399399
cvQualifiers, refQualifier, isNoexcept)
@@ -422,17 +422,19 @@ auto Control::getTemplateTypeParameterType(TemplateTypeParameterSymbol* symbol)
422422
return &*d->templateTypeParameterTypes.emplace(symbol).first;
423423
}
424424

425-
auto Control::getUnresolvedNameType(
426-
TranslationUnit* unit, NestedNameSpecifierAST* nestedNameSpecifier,
427-
UnqualifiedIdAST* unqualifiedId) -> const UnresolvedNameType* {
425+
auto Control::getUnresolvedNameType(TranslationUnit* unit,
426+
NestedNameSpecifierAST* nestedNameSpecifier,
427+
UnqualifiedIdAST* unqualifiedId)
428+
-> const UnresolvedNameType* {
428429
return &*d->unresolvedNameTypes
429430
.emplace(unit, nestedNameSpecifier, unqualifiedId)
430431
.first;
431432
}
432433

433-
auto Control::getUnresolvedBoundedArrayType(
434-
TranslationUnit* unit, const Type* elementType,
435-
ExpressionAST* sizeExpression) -> const UnresolvedBoundedArrayType* {
434+
auto Control::getUnresolvedBoundedArrayType(TranslationUnit* unit,
435+
const Type* elementType,
436+
ExpressionAST* sizeExpression)
437+
-> const UnresolvedBoundedArrayType* {
436438
return &*d->unresolvedBoundedArrayTypes
437439
.emplace(unit, elementType, sizeExpression)
438440
.first;

src/parser/cxx/control.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ class Control {
108108
-> const QualType*;
109109
[[nodiscard]] auto getConstVolatileType(const Type* elementType)
110110
-> const QualType*;
111-
[[nodiscard]] auto getBoundedArrayType(
112-
const Type* elementType, std::size_t size) -> const BoundedArrayType*;
111+
[[nodiscard]] auto getBoundedArrayType(const Type* elementType,
112+
std::size_t size)
113+
-> const BoundedArrayType*;
113114
[[nodiscard]] auto getUnboundedArrayType(const Type* elementType)
114115
-> const UnboundedArrayType*;
115116
[[nodiscard]] auto getPointerType(const Type* elementType)
@@ -123,14 +124,14 @@ class Control {
123124
[[nodiscard]] auto getFunctionType(
124125
const Type* returnType, std::vector<const Type*> parameterTypes,
125126
bool isVariadic = false, CvQualifiers cvQualifiers = CvQualifiers::kNone,
126-
RefQualifier refQualifier = RefQualifier::kNone,
127-
bool isNoexcept = false) -> const FunctionType*;
127+
RefQualifier refQualifier = RefQualifier::kNone, bool isNoexcept = false)
128+
-> const FunctionType*;
128129
[[nodiscard]] auto getMemberObjectPointerType(const ClassType* classType,
129130
const Type* elementType)
130131
-> const MemberObjectPointerType*;
131132
[[nodiscard]] auto getMemberFunctionPointerType(
132-
const ClassType* classType,
133-
const FunctionType* functionType) -> const MemberFunctionPointerType*;
133+
const ClassType* classType, const FunctionType* functionType)
134+
-> const MemberFunctionPointerType*;
134135
[[nodiscard]] auto getTypeParameterType(TypeParameterSymbol* symbol)
135136
-> const TypeParameterType*;
136137
[[nodiscard]] auto getTemplateTypeParameterType(

src/parser/cxx/flatbuffers/ast_decoder.cc

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ auto ASTDecoder::decodeUnit(const void* ptr, io::Unit type) -> UnitAST* {
5959
} // switch
6060
}
6161

62-
auto ASTDecoder::decodeDeclaration(const void* ptr,
63-
io::Declaration type) -> DeclarationAST* {
62+
auto ASTDecoder::decodeDeclaration(const void* ptr, io::Declaration type)
63+
-> DeclarationAST* {
6464
switch (type) {
6565
case io::Declaration_SimpleDeclaration:
6666
return decodeSimpleDeclaration(
@@ -150,8 +150,8 @@ auto ASTDecoder::decodeDeclaration(const void* ptr,
150150
} // switch
151151
}
152152

153-
auto ASTDecoder::decodeStatement(const void* ptr,
154-
io::Statement type) -> StatementAST* {
153+
auto ASTDecoder::decodeStatement(const void* ptr, io::Statement type)
154+
-> StatementAST* {
155155
switch (type) {
156156
case io::Statement_LabeledStatement:
157157
return decodeLabeledStatement(
@@ -212,8 +212,8 @@ auto ASTDecoder::decodeStatement(const void* ptr,
212212
} // switch
213213
}
214214

215-
auto ASTDecoder::decodeExpression(const void* ptr,
216-
io::Expression type) -> ExpressionAST* {
215+
auto ASTDecoder::decodeExpression(const void* ptr, io::Expression type)
216+
-> ExpressionAST* {
217217
switch (type) {
218218
case io::Expression_GeneratedLiteralExpression:
219219
return decodeGeneratedLiteralExpression(
@@ -390,8 +390,9 @@ auto ASTDecoder::decodeExpression(const void* ptr,
390390
} // switch
391391
}
392392

393-
auto ASTDecoder::decodeTemplateParameter(
394-
const void* ptr, io::TemplateParameter type) -> TemplateParameterAST* {
393+
auto ASTDecoder::decodeTemplateParameter(const void* ptr,
394+
io::TemplateParameter type)
395+
-> TemplateParameterAST* {
395396
switch (type) {
396397
case io::TemplateParameter_TemplateTypeParameter:
397398
return decodeTemplateTypeParameter(
@@ -410,8 +411,8 @@ auto ASTDecoder::decodeTemplateParameter(
410411
} // switch
411412
}
412413

413-
auto ASTDecoder::decodeSpecifier(const void* ptr,
414-
io::Specifier type) -> SpecifierAST* {
414+
auto ASTDecoder::decodeSpecifier(const void* ptr, io::Specifier type)
415+
-> SpecifierAST* {
415416
switch (type) {
416417
case io::Specifier_GeneratedTypeSpecifier:
417418
return decodeGeneratedTypeSpecifier(
@@ -526,8 +527,8 @@ auto ASTDecoder::decodeSpecifier(const void* ptr,
526527
} // switch
527528
}
528529

529-
auto ASTDecoder::decodePtrOperator(const void* ptr,
530-
io::PtrOperator type) -> PtrOperatorAST* {
530+
auto ASTDecoder::decodePtrOperator(const void* ptr, io::PtrOperator type)
531+
-> PtrOperatorAST* {
531532
switch (type) {
532533
case io::PtrOperator_PointerOperator:
533534
return decodePointerOperator(
@@ -562,8 +563,9 @@ auto ASTDecoder::decodeCoreDeclarator(const void* ptr, io::CoreDeclarator type)
562563
} // switch
563564
}
564565

565-
auto ASTDecoder::decodeDeclaratorChunk(
566-
const void* ptr, io::DeclaratorChunk type) -> DeclaratorChunkAST* {
566+
auto ASTDecoder::decodeDeclaratorChunk(const void* ptr,
567+
io::DeclaratorChunk type)
568+
-> DeclaratorChunkAST* {
567569
switch (type) {
568570
case io::DeclaratorChunk_FunctionDeclaratorChunk:
569571
return decodeFunctionDeclaratorChunk(
@@ -608,8 +610,9 @@ auto ASTDecoder::decodeUnqualifiedId(const void* ptr, io::UnqualifiedId type)
608610
} // switch
609611
}
610612

611-
auto ASTDecoder::decodeNestedNameSpecifier(
612-
const void* ptr, io::NestedNameSpecifier type) -> NestedNameSpecifierAST* {
613+
auto ASTDecoder::decodeNestedNameSpecifier(const void* ptr,
614+
io::NestedNameSpecifier type)
615+
-> NestedNameSpecifierAST* {
613616
switch (type) {
614617
case io::NestedNameSpecifier_GlobalNestedNameSpecifier:
615618
return decodeGlobalNestedNameSpecifier(
@@ -628,8 +631,8 @@ auto ASTDecoder::decodeNestedNameSpecifier(
628631
} // switch
629632
}
630633

631-
auto ASTDecoder::decodeFunctionBody(const void* ptr,
632-
io::FunctionBody type) -> FunctionBodyAST* {
634+
auto ASTDecoder::decodeFunctionBody(const void* ptr, io::FunctionBody type)
635+
-> FunctionBodyAST* {
633636
switch (type) {
634637
case io::FunctionBody_DefaultFunctionBody:
635638
return decodeDefaultFunctionBody(
@@ -648,8 +651,9 @@ auto ASTDecoder::decodeFunctionBody(const void* ptr,
648651
} // switch
649652
}
650653

651-
auto ASTDecoder::decodeTemplateArgument(
652-
const void* ptr, io::TemplateArgument type) -> TemplateArgumentAST* {
654+
auto ASTDecoder::decodeTemplateArgument(const void* ptr,
655+
io::TemplateArgument type)
656+
-> TemplateArgumentAST* {
653657
switch (type) {
654658
case io::TemplateArgument_TypeTemplateArgument:
655659
return decodeTypeTemplateArgument(
@@ -662,8 +666,9 @@ auto ASTDecoder::decodeTemplateArgument(
662666
} // switch
663667
}
664668

665-
auto ASTDecoder::decodeExceptionSpecifier(
666-
const void* ptr, io::ExceptionSpecifier type) -> ExceptionSpecifierAST* {
669+
auto ASTDecoder::decodeExceptionSpecifier(const void* ptr,
670+
io::ExceptionSpecifier type)
671+
-> ExceptionSpecifierAST* {
667672
switch (type) {
668673
case io::ExceptionSpecifier_ThrowExceptionSpecifier:
669674
return decodeThrowExceptionSpecifier(
@@ -676,8 +681,8 @@ auto ASTDecoder::decodeExceptionSpecifier(
676681
} // switch
677682
}
678683

679-
auto ASTDecoder::decodeRequirement(const void* ptr,
680-
io::Requirement type) -> RequirementAST* {
684+
auto ASTDecoder::decodeRequirement(const void* ptr, io::Requirement type)
685+
-> RequirementAST* {
681686
switch (type) {
682687
case io::Requirement_SimpleRequirement:
683688
return decodeSimpleRequirement(
@@ -765,8 +770,9 @@ auto ASTDecoder::decodeExceptionDeclaration(const void* ptr,
765770
} // switch
766771
}
767772

768-
auto ASTDecoder::decodeAttributeSpecifier(
769-
const void* ptr, io::AttributeSpecifier type) -> AttributeSpecifierAST* {
773+
auto ASTDecoder::decodeAttributeSpecifier(const void* ptr,
774+
io::AttributeSpecifier type)
775+
-> AttributeSpecifierAST* {
770776
switch (type) {
771777
case io::AttributeSpecifier_CxxAttribute:
772778
return decodeCxxAttribute(reinterpret_cast<const io::CxxAttribute*>(ptr));

src/parser/cxx/literals.cc

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,9 @@ void IntegerLiteral::initialize() const {
354354
components_ = Components::from(value(), nullptr);
355355
}
356356

357-
auto IntegerLiteral::Components::from(
358-
std::string_view text, DiagnosticsClient *diagnostics) -> Components {
357+
auto IntegerLiteral::Components::from(std::string_view text,
358+
DiagnosticsClient *diagnostics)
359+
-> Components {
359360
std::string integerPart;
360361
integerPart.reserve(text.size());
361362

@@ -576,8 +577,9 @@ void FloatLiteral::initialize() const {
576577
components_ = Components::from(value());
577578
}
578579

579-
auto FloatLiteral::Components::from(
580-
std::string_view text, DiagnosticsClient *diagnostics) -> Components {
580+
auto FloatLiteral::Components::from(std::string_view text,
581+
DiagnosticsClient *diagnostics)
582+
-> Components {
581583
std::size_t pos = 0;
582584

583585
auto LA = [&](int n = 0) -> int {
@@ -730,8 +732,9 @@ auto FloatLiteral::Components::from(
730732
return components;
731733
}
732734

733-
auto StringLiteral::Components::from(
734-
std::string_view text, DiagnosticsClient *diagnostics) -> Components {
735+
auto StringLiteral::Components::from(std::string_view text,
736+
DiagnosticsClient *diagnostics)
737+
-> Components {
735738
StringLiteralParser<std::string> parser(text, diagnostics);
736739

737740
parser.parseStringLiteral();
@@ -746,8 +749,9 @@ void StringLiteral::initialize() const {
746749
components_ = Components::from(value());
747750
}
748751

749-
auto CharLiteral::Components::from(
750-
std::string_view text, DiagnosticsClient *diagnostics) -> Components {
752+
auto CharLiteral::Components::from(std::string_view text,
753+
DiagnosticsClient *diagnostics)
754+
-> Components {
751755
StringLiteralParser<std::string> parser(text, diagnostics);
752756

753757
parser.parseCharLiteral();

src/parser/cxx/name_lookup.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ auto Lookup::qualifiedLookup(Scope* scope, const Name* name) const -> Symbol* {
4646
return lookupHelper(scope, name, cache);
4747
}
4848

49-
auto Lookup::qualifiedLookup(Symbol* scopedSymbol,
50-
const Name* name) const -> Symbol* {
49+
auto Lookup::qualifiedLookup(Symbol* scopedSymbol, const Name* name) const
50+
-> Symbol* {
5151
if (!scopedSymbol) return nullptr;
5252
switch (scopedSymbol->kind()) {
5353
case SymbolKind::kNamespace:

0 commit comments

Comments
 (0)