diff options
author | Daniel Jasper <djasper@google.com> | 2014-09-29 08:07:46 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-09-29 08:07:46 +0000 |
commit | 91881d99f7ca2d554f03b4499983a46c03c23acd (patch) | |
tree | 62e47296b3d8e85c91876a53b3aa7b2d94098baa /clang/unittests/Format | |
parent | f03e6d84bc649ff230b197fb9c2dffaeebd9edef (diff) | |
download | bcm5719-llvm-91881d99f7ca2d554f03b4499983a46c03c23acd.tar.gz bcm5719-llvm-91881d99f7ca2d554f03b4499983a46c03c23acd.zip |
clang-format: Fix GCC warning about implicit bool pointer conversion.
Introduced in r217880.
llvm-svn: 218597
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index a88464f3824..f44fec6fe98 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -8353,13 +8353,15 @@ TEST_F(FormatTest, GetsCorrectBasedOnStyle) { EXPECT_ALL_STYLES_EQUAL(Styles); } -#define CHECK_PARSE_BOOL(FIELD) \ +#define CHECK_PARSE_BOOL_FIELD(FIELD, CONFIG_NAME) \ Style.FIELD = false; \ - EXPECT_EQ(0, parseConfiguration(#FIELD ": true", &Style).value()); \ + EXPECT_EQ(0, parseConfiguration(CONFIG_NAME ": true", &Style).value()); \ EXPECT_TRUE(Style.FIELD); \ - EXPECT_EQ(0, parseConfiguration(#FIELD ": false", &Style).value()); \ + EXPECT_EQ(0, parseConfiguration(CONFIG_NAME ": false", &Style).value()); \ EXPECT_FALSE(Style.FIELD); +#define CHECK_PARSE_BOOL(FIELD) CHECK_PARSE_BOOL_FIELD(FIELD, #FIELD) + #define CHECK_PARSE(TEXT, FIELD, VALUE) \ EXPECT_NE(VALUE, Style.FIELD); \ EXPECT_EQ(0, parseConfiguration(TEXT, &Style).value()); \ @@ -8382,9 +8384,7 @@ TEST_F(FormatTest, ParsesConfigurationBools) { CHECK_PARSE_BOOL(BreakConstructorInitializersBeforeComma); CHECK_PARSE_BOOL(ConstructorInitializerAllOnOneLineOrOnePerLine); CHECK_PARSE_BOOL(DerivePointerAlignment); - // For backward compatibility: - CHECK_PARSE("DerivePointerBinding: true", DerivePointerAlignment, true); - CHECK_PARSE("DerivePointerBinding: false", DerivePointerAlignment, false); + CHECK_PARSE_BOOL_FIELD(DerivePointerAlignment, "DerivePointerBinding"); CHECK_PARSE_BOOL(IndentCaseLabels); CHECK_PARSE_BOOL(IndentWrappedFunctionNames); CHECK_PARSE_BOOL(KeepEmptyLinesAtTheStartOfBlocks); |