From 2a96956cd3aa7603bf74cc77bc502494c37bd178 Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Mon, 23 Sep 2024 23:36:48 +0000 Subject: [PATCH] Roll Clang to 3928edecfbd116d56bbe7411365d50bb567380a1. Re-run clang-format. TEST=ci Change-Id: If40a619e32a17ae95c5ee39e36ef0effd07e90b3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/385363 Reviewed-by: Brian Quinlan Commit-Queue: Ryan Macnak --- DEPS | 2 +- .../vm/compiler/assembler/disassembler_x86.cc | 2 +- runtime/vm/compiler/backend/range_analysis.cc | 8 ++++---- runtime/vm/compiler/compiler_timings.cc | 2 +- runtime/vm/compiler/stub_code_compiler.cc | 6 +++--- runtime/vm/object.cc | 2 +- runtime/vm/service.cc | 16 +++++++++------- runtime/vm/snapshot_test.cc | 6 +++--- runtime/vm/stub_code.cc | 7 +++---- runtime/vm/stub_code.h | 4 ++-- 10 files changed, 28 insertions(+), 27 deletions(-) diff --git a/DEPS b/DEPS index dd46c9d6c103..7176bae45eca 100644 --- a/DEPS +++ b/DEPS @@ -76,7 +76,7 @@ vars = { "jsc_tag": "version:282418", # https://chrome-infra-packages.appspot.com/p/fuchsia/third_party/clang - "clang_version": "git_revision:0cfd03ac0d3f9713090a581bda07584754c73a49", + "clang_version": "git_revision:3928edecfbd116d56bbe7411365d50bb567380a1", # https://chrome-infra-packages.appspot.com/p/gn/gn "gn_version": "git_revision:20806f79c6b4ba295274e3a589d85db41a02fdaa", diff --git a/runtime/vm/compiler/assembler/disassembler_x86.cc b/runtime/vm/compiler/assembler/disassembler_x86.cc index c08933b5b77d..3c6b147dd245 100644 --- a/runtime/vm/compiler/assembler/disassembler_x86.cc +++ b/runtime/vm/compiler/assembler/disassembler_x86.cc @@ -331,7 +331,7 @@ class DisassemblerX64 : public ValueObject { int PrintOperands(const char* mnem, OperandType op_order, uint8_t* data); - typedef const char* (DisassemblerX64::* RegisterNameMapping)(int reg) const; + typedef const char* (DisassemblerX64::*RegisterNameMapping)(int reg) const; int PrintRightOperandHelper(uint8_t* modrmp, RegisterNameMapping register_name); diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc index 06704058e345..77a6a4f68e7b 100644 --- a/runtime/vm/compiler/backend/range_analysis.cc +++ b/runtime/vm/compiler/backend/range_analysis.cc @@ -917,10 +917,10 @@ class BoundsCheckGeneralizer { } } - typedef Definition* (BoundsCheckGeneralizer::* PhiBoundFunc)(PhiInstr*, - LoopInfo*, - InductionVar*, - Instruction*); + typedef Definition* (BoundsCheckGeneralizer::*PhiBoundFunc)(PhiInstr*, + LoopInfo*, + InductionVar*, + Instruction*); // Construct symbolic lower bound for a value at the given point. Definition* ConstructLowerBound(Definition* value, Instruction* point) { diff --git a/runtime/vm/compiler/compiler_timings.cc b/runtime/vm/compiler/compiler_timings.cc index 9ac0e6cdbe61..b0314427e664 100644 --- a/runtime/vm/compiler/compiler_timings.cc +++ b/runtime/vm/compiler/compiler_timings.cc @@ -60,7 +60,7 @@ void CompilerTimings::PrintTimers( (*static_cast(pa))->TotalElapsedTime(); const auto b_elapsed = (*static_cast(pb))->TotalElapsedTime(); - return b_elapsed a_elapsed ? 1 : 0; + return b_elapsed < a_elapsed ? -1 : b_elapsed > a_elapsed ? 1 : 0; }); // Print sorted in descending order. diff --git a/runtime/vm/compiler/stub_code_compiler.cc b/runtime/vm/compiler/stub_code_compiler.cc index 2e5920b21980..7677680cdd8f 100644 --- a/runtime/vm/compiler/stub_code_compiler.cc +++ b/runtime/vm/compiler/stub_code_compiler.cc @@ -1698,9 +1698,9 @@ EMIT_BOX_ALLOCATION(Int32x4) static void GenerateBoxFpuValueStub(Assembler* assembler, const dart::Class& cls, const RuntimeEntry& runtime_entry, - void (Assembler::* store_value)(FpuRegister, - Register, - int32_t)) { + void (Assembler::*store_value)(FpuRegister, + Register, + int32_t)) { Label call_runtime; if (!FLAG_use_slow_path && FLAG_inline_alloc) { __ TryAllocate(cls, &call_runtime, compiler::Assembler::kFarJump, diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc index 6a4137c3d47e..35c779db5612 100644 --- a/runtime/vm/object.cc +++ b/runtime/vm/object.cc @@ -25974,7 +25974,7 @@ const intptr_t 16, // kTypedDataFloat32x4ArrayCid. 16, // kTypedDataInt32x4ArrayCid. 16, // kTypedDataFloat64x2ArrayCid, - }; +}; bool TypedData::CanonicalizeEquals(const Instance& other) const { if (this->ptr() == other.ptr()) { diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc index bfdf57ec0389..d851c31f8844 100644 --- a/runtime/vm/service.cc +++ b/runtime/vm/service.cc @@ -6011,17 +6011,19 @@ static void GetDefaultClassesAliases(Thread* thread, JSONStream* js) { CLASS_LIST_SETS(DEFINE_ADD_VALUE_F_CID) } #define DEFINE_ADD_MAP_KEY(clazz) \ - {JSONArray internals(&map, #clazz); \ - DEFINE_ADD_VALUE_F_CID(TypedData##clazz) \ - DEFINE_ADD_VALUE_F_CID(TypedData##clazz##View) \ - DEFINE_ADD_VALUE_F_CID(ExternalTypedData##clazz) \ - DEFINE_ADD_VALUE_F_CID(UnmodifiableTypedData##clazz##View) \ + { \ + JSONArray internals(&map, #clazz); \ + DEFINE_ADD_VALUE_F_CID(TypedData##clazz) \ + DEFINE_ADD_VALUE_F_CID(TypedData##clazz##View) \ + DEFINE_ADD_VALUE_F_CID(ExternalTypedData##clazz) \ + DEFINE_ADD_VALUE_F_CID(UnmodifiableTypedData##clazz##View) \ } CLASS_LIST_TYPED_DATA(DEFINE_ADD_MAP_KEY) #undef DEFINE_ADD_MAP_KEY #define DEFINE_ADD_MAP_KEY(clazz) \ - {JSONArray internals(&map, #clazz); \ - DEFINE_ADD_VALUE_F_CID(Ffi##clazz) \ + { \ + JSONArray internals(&map, #clazz); \ + DEFINE_ADD_VALUE_F_CID(Ffi##clazz) \ } CLASS_LIST_FFI(DEFINE_ADD_MAP_KEY) #undef DEFINE_ADD_MAP_KEY diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc index ab21cecb30f7..f1139ac5b8bc 100644 --- a/runtime/vm/snapshot_test.cc +++ b/runtime/vm/snapshot_test.cc @@ -598,7 +598,7 @@ ISOLATE_UNIT_TEST_CASE(SerializeByteArray) { serialized_array ^= ReadMessage(thread, message.get()); \ for (int i = 0; i < kArrayLength; i++) { \ EXPECT_EQ(static_cast(i), \ - serialized_array.Get##darttype(i* scale)); \ + serialized_array.Get##darttype(i * scale)); \ } \ } @@ -618,7 +618,7 @@ ISOLATE_UNIT_TEST_CASE(SerializeByteArray) { serialized_array ^= ReadMessage(thread, message.get()); \ for (int i = 0; i < length; i++) { \ EXPECT_EQ(static_cast(data[i]), \ - serialized_array.Get##darttype(i* scale)); \ + serialized_array.Get##darttype(i * scale)); \ } \ } @@ -639,7 +639,7 @@ ISOLATE_UNIT_TEST_CASE(SerializeByteArray) { serialized_view ^= ReadMessage(thread, message.get()); \ for (int i = 0; i < length; i++) { \ EXPECT_EQ(static_cast(data[i]), \ - serialized_view.Get##darttype(i* scale)); \ + serialized_view.Get##darttype(i * scale)); \ } \ } diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc index 6347dc0224a4..7b7216ce3261 100644 --- a/runtime/vm/stub_code.cc +++ b/runtime/vm/stub_code.cc @@ -91,10 +91,9 @@ void StubCode::Init() { #undef STUB_CODE_GENERATE #undef STUB_CODE_SET_OBJECT_POOL -CodePtr StubCode::Generate( - const char* name, - compiler::ObjectPoolBuilder* object_pool_builder, - void (compiler::StubCodeCompiler::* GenerateStub)()) { +CodePtr StubCode::Generate(const char* name, + compiler::ObjectPoolBuilder* object_pool_builder, + void (compiler::StubCodeCompiler::*GenerateStub)()) { auto thread = Thread::Current(); SafepointWriteRwLocker ml(thread, thread->isolate_group()->program_lock()); diff --git a/runtime/vm/stub_code.h b/runtime/vm/stub_code.h index 9f40146910c3..81775a54ba49 100644 --- a/runtime/vm/stub_code.h +++ b/runtime/vm/stub_code.h @@ -91,7 +91,7 @@ class StubCode : public AllStatic { // code executable area. static CodePtr Generate(const char* name, compiler::ObjectPoolBuilder* object_pool_builder, - void (compiler::StubCodeCompiler::* GenerateStub)()); + void (compiler::StubCodeCompiler::*GenerateStub)()); #endif // !defined(DART_PRECOMPILED_RUNTIME) static const Code& UnoptimizedStaticCallEntry(intptr_t num_args_tested); @@ -132,7 +132,7 @@ class StubCode : public AllStatic { Code* code; const char* name; #if !defined(DART_PRECOMPILED_RUNTIME) - void (compiler::StubCodeCompiler::* generator)(); + void (compiler::StubCodeCompiler::*generator)(); #endif }; static StubCodeEntry entries_[kNumStubEntries];