forked from OSchip/llvm-project
446d6ec996
Summary: Code that used to be formatted as `if (! + object) {` is now formatted as `if (!+object) {` (we have a particular object in our codebase where unary `operator+` is overloaded to return the underlying value, which in this case is a `bool`) We still preserve the TypeScript behavior where `!` is a trailing non-null operator. (This is already tested by an existing unit test in `FormatTestJS.cpp`) It doesn't appear like handling of consecutive unary operators are tested in general, so I added another test for completeness Patch contributed by @kevinl! Reviewers: krasimir Reviewed By: krasimir Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D43312 llvm-svn: 326792 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
CleanupTest.cpp | ||
FormatTest.cpp | ||
FormatTestComments.cpp | ||
FormatTestJS.cpp | ||
FormatTestJava.cpp | ||
FormatTestObjC.cpp | ||
FormatTestProto.cpp | ||
FormatTestRawStrings.cpp | ||
FormatTestSelective.cpp | ||
FormatTestTextProto.cpp | ||
FormatTestUtils.h | ||
NamespaceEndCommentsFixerTest.cpp | ||
SortImportsTestJS.cpp | ||
SortIncludesTest.cpp | ||
UsingDeclarationsSorterTest.cpp |