From: Reuben Thomas Date: Mon, 15 Apr 2019 20:13:20 +0000 (+0000) Subject: [clang-format] Fix -Wconversion-null warning in GCC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5bb4348faf4dd02076b0e8e2d462910052fe8972;p=clang [clang-format] Fix -Wconversion-null warning in GCC GCC -Wconversion-null warning appeared after 9a63380260860b657b72f07c4f0e61e382ab934a. There was a similar problem already in the past: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20131230/096230.html Patch committed on behalf of @dendibakh Differential Revision: https://reviews.llvm.org/D60726 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358441 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index d95f5d64ef..2ac0078dac 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -11393,6 +11393,7 @@ TEST_F(FormatTest, ParsesConfigurationBools) { CHECK_PARSE_BOOL(SpacesInCStyleCastParentheses); CHECK_PARSE_BOOL(SpaceAfterCStyleCast); CHECK_PARSE_BOOL(SpaceAfterTemplateKeyword); + CHECK_PARSE_BOOL(SpaceAfterLogicalNot); CHECK_PARSE_BOOL(SpaceBeforeAssignmentOperators); CHECK_PARSE_BOOL(SpaceBeforeCpp11BracedList); CHECK_PARSE_BOOL(SpaceBeforeCtorInitializerColon); @@ -11566,12 +11567,6 @@ TEST_F(FormatTest, ParsesConfiguration) { CHECK_PARSE("SpaceAfterControlStatementKeyword: true", SpaceBeforeParens, FormatStyle::SBPO_ControlStatements); - Style.SpaceAfterLogicalNot = false; - CHECK_PARSE("SpaceAfterLogicalNot: true", SpaceAfterLogicalNot, - true); - CHECK_PARSE("SpaceAfterLogicalNot: false", SpaceAfterLogicalNot, - false); - Style.ColumnLimit = 123; FormatStyle BaseStyle = getLLVMStyle(); CHECK_PARSE("BasedOnStyle: LLVM", ColumnLimit, BaseStyle.ColumnLimit);