[PATCH] D60320: [clang-format]: Add option to insert space after locical not operator
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 5 12:09:02 PDT 2019
MyDeveloperDay added a comment.
just a few nits, apart form that it LG
================
Comment at: clang/include/clang/Format/Format.h:1721
+ /// Defines whether a space should be placed after a logical `!`
+ bool SpaceAfterLogicalNot;
----------------
nit: end the sentence with a "."
================
Comment at: clang/include/clang/Format/Format.h:1924
SpaceBeforeParens == R.SpaceBeforeParens &&
+ SpaceAfterLogicalNot == R.SpaceAfterLogicalNot &&
SpaceBeforeRangeBasedForLoopColon ==
----------------
nit: so I recently observed that these are alphabetic, move this up to line 1916
================
Comment at: clang/lib/Format/Format.cpp:492
IO.mapOptional("SpaceBeforeParens", Style.SpaceBeforeParens);
+ IO.mapOptional("SpaceAfterLogicalNot", Style.SpaceAfterLogicalNot);
IO.mapOptional("SpaceBeforeRangeBasedForLoopColon",
----------------
nit: these are alphabetic
================
Comment at: clang/unittests/Format/FormatTest.cpp:9694
+ verifyFormat("\"Error!\"", Spaces);
+}
+
----------------
could you add an example where someone does `!!` would it appear as `! ! (` or '!!'
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60320/new/
https://reviews.llvm.org/D60320
More information about the cfe-commits
mailing list