diff options
author | 2016-08-26 15:06:11 -0700 | |
---|---|---|
committer | 2016-08-26 17:52:41 -0700 | |
commit | 1a0de6acd03b43a03678b58f47b2f21b5215cc22 (patch) | |
tree | 7d03f89b9d64ebc40ea382011de524d18a004f73 /runtime/entrypoints_order_test.cc | |
parent | cc55a7ce2aa0f10c2da9efaa89855cf075e56e20 (diff) |
Fix clang-tidy warnings in art.
* Add parentheses around macro parameters, or
use NOLINT to suppress warning.
Bug: 28705665
Test: build with WITH_TIDY=1
Change-Id: Ifc922c2e66215772042bac372754ea70074f0053
Diffstat (limited to 'runtime/entrypoints_order_test.cc')
-rw-r--r-- | runtime/entrypoints_order_test.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/entrypoints_order_test.cc b/runtime/entrypoints_order_test.cc index 004cdc47b9..b102334418 100644 --- a/runtime/entrypoints_order_test.cc +++ b/runtime/entrypoints_order_test.cc @@ -37,7 +37,7 @@ namespace art { // name. #define EXPECT_OFFSET_DIFF(first_type, first_field, second_type, second_field, diff, name) \ CHECKED(OFFSETOF_MEMBER(second_type, second_field) \ - - OFFSETOF_MEMBER(first_type, first_field) == diff, name) + - OFFSETOF_MEMBER(first_type, first_field) == (diff), name) // Helper macro for when the fields are from the same type. #define EXPECT_OFFSET_DIFFNP(type, first_field, second_field, diff) \ @@ -45,15 +45,16 @@ namespace art { type ## _ ## first_field ## _ ## second_field) // Helper macro for when the fields are from the same type and in the same member of said type. +// NOLINT, do not add parentheses around 'prefix'. #define EXPECT_OFFSET_DIFFP(type, prefix, first_field, second_field, diff) \ - EXPECT_OFFSET_DIFF(type, prefix . first_field, type, prefix . second_field, diff, \ + EXPECT_OFFSET_DIFF(type, prefix . first_field, type, prefix . second_field, diff, /* NOLINT */ \ type ## _ ## prefix ## _ ## first_field ## _ ## second_field) // Macro to check whether two fields have at least an expected difference in offsets. The error is // named name. #define EXPECT_OFFSET_DIFF_GT(first_type, first_field, second_type, second_field, diff, name) \ CHECKED(OFFSETOF_MEMBER(second_type, second_field) \ - - OFFSETOF_MEMBER(first_type, first_field) >= diff, name) + - OFFSETOF_MEMBER(first_type, first_field) >= (diff), name) // Helper macro for when the fields are from the same type. #define EXPECT_OFFSET_DIFF_GT3(type, first_field, second_field, diff, name) \ |