Run formatter. It appears that an update to clang_format has broken CI. Change-Id: I7e5e5006a98c5b99c5577eead6852a776a6a6964 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/24060 Commit-Queue: Matt Stark <msta@google.com> Reviewed-by: Takuto Ikuta <tikuta@google.com>
diff --git a/src/base/logging.h b/src/base/logging.h index 18f827f..a5b3e55 100644 --- a/src/base/logging.h +++ b/src/base/logging.h
@@ -167,9 +167,9 @@ // better to have compact code for these operations. #define COMPACT_GOOGLE_LOG_EX_INFO(ClassName, ...) \ ::logging::ClassName(__FILE__, __LINE__, ::logging::LOG_INFO, ##__VA_ARGS__) -#define COMPACT_GOOGLE_LOG_EX_WARNING(ClassName, ...) \ - ::logging::ClassName(__FILE__, __LINE__, ::logging::LOG_WARNING, \ - ##__VA_ARGS__) +#define COMPACT_GOOGLE_LOG_EX_WARNING(ClassName, ...) \ + ::logging::ClassName(__FILE__, __LINE__, \ + ::logging::LOG_WARNING, ##__VA_ARGS__) #define COMPACT_GOOGLE_LOG_EX_ERROR(ClassName, ...) \ ::logging::ClassName(__FILE__, __LINE__, ::logging::LOG_ERROR, ##__VA_ARGS__) #define COMPACT_GOOGLE_LOG_EX_FATAL(ClassName, ...) \
diff --git a/src/base/numerics/checked_math_impl.h b/src/base/numerics/checked_math_impl.h index 4554a76..673f6d6 100644 --- a/src/base/numerics/checked_math_impl.h +++ b/src/base/numerics/checked_math_impl.h
@@ -417,20 +417,20 @@ // This is just boilerplate that wraps the standard floating point arithmetic. // A macro isn't the nicest solution, but it beats rewriting these repeatedly. -#define BASE_FLOAT_ARITHMETIC_OPS(NAME, OP) \ - template <typename T, typename U> \ - struct Checked##NAME## \ - Op<T, U, \ - typename std::enable_if<std::is_floating_point<T>::value || \ - std::is_floating_point<U>::value>::type> { \ - using result_type = typename MaxExponentPromotion<T, U>::type; \ - template <typename V> \ - static constexpr bool Do(T x, U y, V* result) { \ - using Promotion = typename MaxExponentPromotion<T, U>::type; \ - Promotion presult = x OP y; \ - *result = static_cast<V>(presult); \ - return IsValueInRangeForNumericType<V>(presult); \ - } \ +#define BASE_FLOAT_ARITHMETIC_OPS(NAME, OP) \ + template <typename T, typename U> \ + struct Checked##NAME##Op< \ + T, U, \ + typename std::enable_if<std::is_floating_point<T>::value || \ + std::is_floating_point<U>::value>::type> { \ + using result_type = typename MaxExponentPromotion<T, U>::type; \ + template <typename V> \ + static constexpr bool Do(T x, U y, V* result) { \ + using Promotion = typename MaxExponentPromotion<T, U>::type; \ + Promotion presult = x OP y; \ + *result = static_cast<V>(presult); \ + return IsValueInRangeForNumericType<V>(presult); \ + } \ }; BASE_FLOAT_ARITHMETIC_OPS(Add, +)
diff --git a/src/base/numerics/clamped_math_impl.h b/src/base/numerics/clamped_math_impl.h index 814d6c3..303a7e9 100644 --- a/src/base/numerics/clamped_math_impl.h +++ b/src/base/numerics/clamped_math_impl.h
@@ -315,17 +315,17 @@ // This is just boilerplate that wraps the standard floating point arithmetic. // A macro isn't the nicest solution, but it beats rewriting these repeatedly. -#define BASE_FLOAT_ARITHMETIC_OPS(NAME, OP) \ - template <typename T, typename U> \ - struct Clamped##NAME## \ - Op<T, U, \ - typename std::enable_if<std::is_floating_point<T>::value || \ - std::is_floating_point<U>::value>::type> { \ - using result_type = typename MaxExponentPromotion<T, U>::type; \ - template <typename V = result_type> \ - static constexpr V Do(T x, U y) { \ - return saturated_cast<V>(x OP y); \ - } \ +#define BASE_FLOAT_ARITHMETIC_OPS(NAME, OP) \ + template <typename T, typename U> \ + struct Clamped##NAME##Op< \ + T, U, \ + typename std::enable_if<std::is_floating_point<T>::value || \ + std::is_floating_point<U>::value>::type> { \ + using result_type = typename MaxExponentPromotion<T, U>::type; \ + template <typename V = result_type> \ + static constexpr V Do(T x, U y) { \ + return saturated_cast<V>(x OP y); \ + } \ }; BASE_FLOAT_ARITHMETIC_OPS(Add, +)
diff --git a/src/gn/config_values.h b/src/gn/config_values.h index 434f807..0c3a444 100644 --- a/src/gn/config_values.h +++ b/src/gn/config_values.h
@@ -23,12 +23,20 @@ // Appends the values from the given config to this one. void AppendValues(const ConfigValues& append); -#define STRING_VALUES_ACCESSOR(name) \ - const std::vector<std::string>& name() const { return name##_; } \ - std::vector<std::string>& name() { return name##_; } -#define DIR_VALUES_ACCESSOR(name) \ - const std::vector<SourceDir>& name() const { return name##_; } \ - std::vector<SourceDir>& name() { return name##_; } +#define STRING_VALUES_ACCESSOR(name) \ + const std::vector<std::string>& name() const { \ + return name##_; \ + } \ + std::vector<std::string>& name() { \ + return name##_; \ + } +#define DIR_VALUES_ACCESSOR(name) \ + const std::vector<SourceDir>& name() const { \ + return name##_; \ + } \ + std::vector<SourceDir>& name() { \ + return name##_; \ + } // ================================================================= // IMPORTANT: If you add a new one, be sure to update AppendValues()