Browse Source

clang-format 18 in STYLE_CPP

clang-format 18 in STYLE\_CPP
commit_hash:e2018ac17a95817f09e131ee6d5316b2bdc2d39e
alevitskii 1 month ago
parent
commit
c9d773da09

+ 1 - 1
build/config/tests/cpp_style/default_configs.json

@@ -1,3 +1,3 @@
 {
-    "clang_format": "build/config/tests/cpp_style/config.clang-format"
+    "clang_format": "build/config/tests/cpp_style/config18.clang-format"
 }

+ 0 - 19
build/platform/clang/clang-format/clang-format16.json

@@ -1,19 +0,0 @@
-{
-    "by_platform": {
-        "darwin": {
-            "uri": "sbr:7402815718"
-        },
-        "darwin-arm64": {
-            "uri": "sbr:7402814010"
-        },
-        "linux": {
-            "uri": "sbr:7402818343"
-        },
-        "linux-aarch64": {
-            "uri": "sbr:7402817039"
-        },
-        "win32-clang-cl": {
-            "uri": "sbr:7402812744"
-        }
-    }
-}

+ 19 - 0
build/platform/clang/clang-format/clang-format18.json

@@ -0,0 +1,19 @@
+{
+    "by_platform": {
+        "darwin-arm64": {
+            "uri": "sbr:7831958167"
+        },
+        "darwin-x86_64": {
+            "uri": "sbr:7831990717"
+        },
+        "linux-aarch64": {
+            "uri": "sbr:7831996261"
+        },
+        "linux-x86_64": {
+            "uri": "sbr:7832045657"
+        },
+        "win32-x86_64": {
+            "uri": "sbr:7832062717"
+        }
+    }
+}

+ 1 - 1
build/platform/clang/clang-format/ya.make

@@ -2,6 +2,6 @@ RESOURCES_LIBRARY()
 
 # Note: the json below is also referred from build/ya.conf.json,
 # please change these references consistently
-DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(CLANG_FORMAT clang-format16.json)
+DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(CLANG_FORMAT clang-format18.json)
 
 END()

+ 1 - 1
util/generic/hash_table.h

@@ -348,7 +348,7 @@ private:
  * Note that there are no specializations for the case when only one or two
  * of the functors are empty as this is a case that's just way too rare.
  */
-template <class HashFcn, class ExtractKey, class EqualKey, class Alloc, bool IsEmpty = std::is_empty<HashFcn>::value&& std::is_empty<ExtractKey>::value&& std::is_empty<EqualKey>::value>
+template <class HashFcn, class ExtractKey, class EqualKey, class Alloc, bool IsEmpty = std::is_empty<HashFcn>::value && std::is_empty<ExtractKey>::value && std::is_empty<EqualKey>::value>
 class _yhashtable_base: public _allocator_base<Alloc> {
     using base_type = _allocator_base<Alloc>;
 

+ 1 - 1
util/generic/maybe.h

@@ -288,7 +288,7 @@ public:
     std::enable_if_t<TMoveAssignable<U>::value,
                      TMaybe&>
     operator=(TMaybe<U, Policy>&& right) noexcept(
-        std::is_nothrow_assignable<T&, U&&>::value&& std::is_nothrow_constructible<T, U&&>::value)
+        std::is_nothrow_assignable<T&, U&&>::value && std::is_nothrow_constructible<T, U&&>::value)
     {
         if (right.Defined()) {
             if (Defined()) {

+ 2 - 2
util/generic/maybe_traits.h

@@ -162,8 +162,8 @@ namespace NMaybe {
         constexpr TMoveAssignBase(TMoveAssignBase&&) = default;
         TMoveAssignBase& operator=(const TMoveAssignBase&) = default;
         TMoveAssignBase& operator=(TMoveAssignBase&& rhs) noexcept(
-            std::is_nothrow_move_assignable<T>::value&&
-                std::is_nothrow_move_constructible<T>::value)
+            std::is_nothrow_move_assignable<T>::value &&
+            std::is_nothrow_move_constructible<T>::value)
         {
             if (this->Defined_) {
                 if (rhs.Defined_) {

+ 2 - 2
util/generic/utility.h

@@ -73,8 +73,8 @@ namespace NSwapCheck {
 
     template <class T, class = void>
     struct TSwapSelector {
-        static inline void Swap(T& l, T& r) noexcept(std::is_nothrow_move_constructible<T>::value&&
-                                                         std::is_nothrow_move_assignable<T>::value) {
+        static inline void Swap(T& l, T& r) noexcept(std::is_nothrow_move_constructible<T>::value &&
+                                                     std::is_nothrow_move_assignable<T>::value) {
             T tmp(std::move(l));
             l = std::move(r);
             r = std::move(tmp);

+ 1 - 1
util/str_stl.h

@@ -160,7 +160,7 @@ struct THash: public ::hash<T> {
 };
 
 namespace NHashPrivate {
-    template <class TFirst, class TSecond, bool IsEmpty = std::is_empty<THash<TFirst>>::value&& std::is_empty<THash<TSecond>>::value>
+    template <class TFirst, class TSecond, bool IsEmpty = std::is_empty<THash<TFirst>>::value && std::is_empty<THash<TSecond>>::value>
     struct TPairHash {
     private:
         THash<TFirst> FirstHash;

+ 6 - 4
util/system/context.cpp

@@ -117,15 +117,17 @@ namespace {
     #if defined(_x86_64_)
     // not sure if Y_NO_SANITIZE is needed
     Y_NO_SANITIZE("address")
-    Y_NO_SANITIZE("memory") extern "C" void ContextTrampoLine(void*, void*, void*, void*, void*, void*, // register arguments, no defined value
-                                                              /* first argument passed through the stack */ void* t1,
-                                                              /* second argument passed through the stack */ void* t2) {
+    Y_NO_SANITIZE("memory") extern "C" void
+    ContextTrampoLine(void*, void*, void*, void*, void*, void*, // register arguments, no defined value
+                      /* first argument passed through the stack */ void* t1,
+                      /* second argument passed through the stack */ void* t2) {
         Y_ASSERT(t1 == t2);
         Run(t1);
     }
     #else
     Y_NO_SANITIZE("address")
-    Y_NO_SANITIZE("memory") static void ContextTrampoLine() {
+    Y_NO_SANITIZE("memory") static void
+    ContextTrampoLine() {
         void** argPtr = (void**)((char*)AlignUp(&argPtr + EXTRA_PUSH_ARGS, STACK_ALIGN) + STACK_ALIGN);
         Y_ASSERT(*(argPtr - 1) == *(argPtr - 2));
 

Some files were not shown because too many files changed in this diff