Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14864977
D13836.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Subscribers
None
D13836.diff
View Options
diff --git a/arcanist/linter/ClangFormatLinter.php b/arcanist/linter/ClangFormatLinter.php
--- a/arcanist/linter/ClangFormatLinter.php
+++ b/arcanist/linter/ClangFormatLinter.php
@@ -38,11 +38,13 @@
list($stdout) = execx('%C -version', $this->getExecutableCommand());
$matches = array();
- $regex = '/^clang-format version (?P<version>\d+\.\d+)\./';
+ $regex = '/clang-format version (?P<version>\d+\.\d+)\./';
if (preg_match($regex, $stdout, $matches)) {
$version = $matches['version'];
} else {
- return false;
+ throw new Exception(pht('Unable to read clang-format version. Please '.
+ 'make sure clang-format version 12.x is '.
+ 'installed and in the PATH.'));
}
/*
diff --git a/src/crypto/ripemd160.cpp b/src/crypto/ripemd160.cpp
--- a/src/crypto/ripemd160.cpp
+++ b/src/crypto/ripemd160.cpp
@@ -12,9 +12,7 @@
namespace {
/// Internal RIPEMD-160 implementation.
namespace ripemd160 {
- inline uint32_t f1(uint32_t x, uint32_t y, uint32_t z) {
- return x ^ y ^ z;
- }
+ inline uint32_t f1(uint32_t x, uint32_t y, uint32_t z) { return x ^ y ^ z; }
inline uint32_t f2(uint32_t x, uint32_t y, uint32_t z) {
return (x & y) | (~x & z);
}
diff --git a/src/crypto/sha1.cpp b/src/crypto/sha1.cpp
--- a/src/crypto/sha1.cpp
+++ b/src/crypto/sha1.cpp
@@ -22,16 +22,12 @@
inline uint32_t f1(uint32_t b, uint32_t c, uint32_t d) {
return d ^ (b & (c ^ d));
}
- inline uint32_t f2(uint32_t b, uint32_t c, uint32_t d) {
- return b ^ c ^ d;
- }
+ inline uint32_t f2(uint32_t b, uint32_t c, uint32_t d) { return b ^ c ^ d; }
inline uint32_t f3(uint32_t b, uint32_t c, uint32_t d) {
return (b & c) | (d & (b | c));
}
- inline uint32_t left(uint32_t x) {
- return (x << 1) | (x >> 31);
- }
+ inline uint32_t left(uint32_t x) { return (x << 1) | (x >> 31); }
/** Initialize SHA-1 state. */
inline void Initialize(uint32_t *s) {
diff --git a/src/crypto/sha256_avx2.cpp b/src/crypto/sha256_avx2.cpp
--- a/src/crypto/sha256_avx2.cpp
+++ b/src/crypto/sha256_avx2.cpp
@@ -12,13 +12,9 @@
namespace sha256d64_avx2 {
namespace {
- __m256i inline K(uint32_t x) {
- return _mm256_set1_epi32(x);
- }
+ __m256i inline K(uint32_t x) { return _mm256_set1_epi32(x); }
- __m256i inline Add(__m256i x, __m256i y) {
- return _mm256_add_epi32(x, y);
- }
+ __m256i inline Add(__m256i x, __m256i y) { return _mm256_add_epi32(x, y); }
__m256i inline Add(__m256i x, __m256i y, __m256i z) {
return Add(Add(x, y), z);
}
@@ -40,24 +36,14 @@
x = Add(x, y, z, w);
return x;
}
- __m256i inline Xor(__m256i x, __m256i y) {
- return _mm256_xor_si256(x, y);
- }
+ __m256i inline Xor(__m256i x, __m256i y) { return _mm256_xor_si256(x, y); }
__m256i inline Xor(__m256i x, __m256i y, __m256i z) {
return Xor(Xor(x, y), z);
}
- __m256i inline Or(__m256i x, __m256i y) {
- return _mm256_or_si256(x, y);
- }
- __m256i inline And(__m256i x, __m256i y) {
- return _mm256_and_si256(x, y);
- }
- __m256i inline ShR(__m256i x, int n) {
- return _mm256_srli_epi32(x, n);
- }
- __m256i inline ShL(__m256i x, int n) {
- return _mm256_slli_epi32(x, n);
- }
+ __m256i inline Or(__m256i x, __m256i y) { return _mm256_or_si256(x, y); }
+ __m256i inline And(__m256i x, __m256i y) { return _mm256_and_si256(x, y); }
+ __m256i inline ShR(__m256i x, int n) { return _mm256_srli_epi32(x, n); }
+ __m256i inline ShL(__m256i x, int n) { return _mm256_slli_epi32(x, n); }
__m256i inline Ch(__m256i x, __m256i y, __m256i z) {
return Xor(z, And(x, Xor(y, z)));
diff --git a/src/crypto/sha256_sse41.cpp b/src/crypto/sha256_sse41.cpp
--- a/src/crypto/sha256_sse41.cpp
+++ b/src/crypto/sha256_sse41.cpp
@@ -12,13 +12,9 @@
namespace sha256d64_sse41 {
namespace {
- __m128i inline K(uint32_t x) {
- return _mm_set1_epi32(x);
- }
+ __m128i inline K(uint32_t x) { return _mm_set1_epi32(x); }
- __m128i inline Add(__m128i x, __m128i y) {
- return _mm_add_epi32(x, y);
- }
+ __m128i inline Add(__m128i x, __m128i y) { return _mm_add_epi32(x, y); }
__m128i inline Add(__m128i x, __m128i y, __m128i z) {
return Add(Add(x, y), z);
}
@@ -40,24 +36,14 @@
x = Add(x, y, z, w);
return x;
}
- __m128i inline Xor(__m128i x, __m128i y) {
- return _mm_xor_si128(x, y);
- }
+ __m128i inline Xor(__m128i x, __m128i y) { return _mm_xor_si128(x, y); }
__m128i inline Xor(__m128i x, __m128i y, __m128i z) {
return Xor(Xor(x, y), z);
}
- __m128i inline Or(__m128i x, __m128i y) {
- return _mm_or_si128(x, y);
- }
- __m128i inline And(__m128i x, __m128i y) {
- return _mm_and_si128(x, y);
- }
- __m128i inline ShR(__m128i x, int n) {
- return _mm_srli_epi32(x, n);
- }
- __m128i inline ShL(__m128i x, int n) {
- return _mm_slli_epi32(x, n);
- }
+ __m128i inline Or(__m128i x, __m128i y) { return _mm_or_si128(x, y); }
+ __m128i inline And(__m128i x, __m128i y) { return _mm_and_si128(x, y); }
+ __m128i inline ShR(__m128i x, int n) { return _mm_srli_epi32(x, n); }
+ __m128i inline ShL(__m128i x, int n) { return _mm_slli_epi32(x, n); }
__m128i inline Ch(__m128i x, __m128i y, __m128i z) {
return Xor(z, And(x, Xor(y, z)));
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -1246,8 +1246,9 @@
if (style & CClientUIInterface::MODAL) {
// Check for buttons, use OK as default, if none was supplied
QMessageBox::StandardButton buttons;
- if (!(buttons = (QMessageBox::StandardButton)(
- style & CClientUIInterface::BTN_MASK))) {
+ if (!(buttons =
+ (QMessageBox::StandardButton)(style & CClientUIInterface::
+ BTN_MASK))) {
buttons = QMessageBox::Ok;
}
diff --git a/src/test/checkqueue_tests.cpp b/src/test/checkqueue_tests.cpp
--- a/src/test/checkqueue_tests.cpp
+++ b/src/test/checkqueue_tests.cpp
@@ -31,7 +31,8 @@
#ifdef DEBUG_LOCKCONTENTION
: TestingSetup{CBaseChainParams::MAIN, /*extra_args=*/{
"-debugexclude=lock"
- }} {}
+ }} {
+ }
#else
: TestingSetup{CBaseChainParams::MAIN} {
}
diff --git a/src/util/variant.h b/src/util/variant.h
--- a/src/util/variant.h
+++ b/src/util/variant.h
@@ -7,9 +7,7 @@
namespace variant {
-template <class... Ts> struct overloaded : Ts... {
- using Ts::operator()...;
-};
+template <class... Ts> struct overloaded : Ts... { using Ts::operator()...; };
// explicit deduction guide (not needed as of C++20)
template <class... Ts> overloaded(Ts...) -> overloaded<Ts...>;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 20, 23:54 (54 m, 28 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5866178
Default Alt Text
D13836.diff (6 KB)
Attached To
D13836: [linter] Match clang-format version from homebrew
Event Timeline
Log In to Comment