]> granicus.if.org Git - clang/commitdiff
[clang-format] Fix -Wconversion-null warning in GCC
authorReuben Thomas <reuben.thomas@me.com>
Mon, 15 Apr 2019 20:13:20 +0000 (20:13 +0000)
committerReuben Thomas <reuben.thomas@me.com>
Mon, 15 Apr 2019 20:13:20 +0000 (20:13 +0000)
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

unittests/Format/FormatTest.cpp

index d95f5d64efa6c4ccf4b5340a803ef9f918bb0ea1..2ac0078dac977baf670d6a2a7a0508e308da691d 100644 (file)
@@ -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);