summaryrefslogtreecommitdiff
path: root/libartbase/base/bit_struct.h
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2018-10-18 13:22:23 -0700
committer Andreas Gampe <agampe@google.com> 2018-10-19 12:14:10 -0700
commit584771b5a85843700289ffcd36a46f3b187ca349 (patch)
treea88996e445a1a2aee66e15ee58b977891ddf9618 /libartbase/base/bit_struct.h
parent6bc39b1e080d574a0ed0c4dabe4d0895dd40456c (diff)
ART: Fix tidy bugprone-macro-parentheses
Add parens where necessary, add NOLINT for the cases where it's wrong. Bug: 32619234 Test: WITH_TIDY=1 mmma art Change-Id: If56ce51c078e9adf26b9469a01c95a857aac66a4
Diffstat (limited to 'libartbase/base/bit_struct.h')
-rw-r--r--libartbase/base/bit_struct.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/libartbase/base/bit_struct.h b/libartbase/base/bit_struct.h
index 9814fd4f3a..292eca0e0c 100644
--- a/libartbase/base/bit_struct.h
+++ b/libartbase/base/bit_struct.h
@@ -274,13 +274,13 @@ using BitStructUint =
// If a standard-layout union contains several standard-layout structs that share a common
// initial sequence ... it is permitted to inspect the common initial sequence of any of
// standard-layout struct members.
-#define BITSTRUCT_DEFINE_START(name, bitwidth) \
- union name { \
- art::detail::DefineBitStructSize<(bitwidth)> _; \
- static constexpr size_t BitStructSizeOf() { return (bitwidth); } \
- name& operator=(const name& other) { _ = other._; return *this; } \
- name(const name& other) : _(other._) {} \
- name() = default; \
+#define BITSTRUCT_DEFINE_START(name, bitwidth) \
+ union name { /* NOLINT */ \
+ art::detail::DefineBitStructSize<(bitwidth)> _; \
+ static constexpr size_t BitStructSizeOf() { return (bitwidth); } \
+ name& operator=(const name& other) { _ = other._; return *this; } /* NOLINT */ \
+ name(const name& other) : _(other._) {} \
+ name() = default; \
~name() = default;
// End the definition of a bitstruct, and insert a sanity check