r358441 - [clang-format] Fix -Wconversion-null warning in GCC
Reuben Thomas via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 15 13:13:20 PDT 2019
Author: reuk
Date: Mon Apr 15 13:13:20 2019
New Revision: 358441
URL: http://llvm.org/viewvc/llvm-project?rev=358441&view=rev
Log:
[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
Modified:
cfe/trunk/unittests/Format/FormatTest.cpp
Modified: cfe/trunk/unittests/Format/FormatTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=358441&r1=358440&r2=358441&view=diff
==============================================================================
--- cfe/trunk/unittests/Format/FormatTest.cpp (original)
+++ cfe/trunk/unittests/Format/FormatTest.cpp Mon Apr 15 13:13:20 2019
@@ -11393,6 +11393,7 @@ TEST_F(FormatTest, ParsesConfigurationBo
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);
More information about the cfe-commits
mailing list