diff options
author | Daniel Jasper <djasper@google.com> | 2012-12-06 13:16:39 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2012-12-06 13:16:39 +0000 |
commit | d56a737842f28db4403430082c4d2686bc6cc3b3 (patch) | |
tree | 8dd53289fdb8f05835b1c149dc3996a3b3bd5e98 /unittests/Format/FormatTest.cpp | |
parent | 4a29065eb189b6132b82c071f75af84799ede0e7 (diff) |
Improve clang-format's handling of unary operators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169500 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 7628b34d4b..a2a37cf1a7 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -364,6 +364,9 @@ TEST_F(FormatTest, UndestandsUnaryOperators) { verifyFormat("if (i != -1) {\n}"); verifyFormat("if (i > -1) {\n}"); verifyFormat("if (i < -1) {\n}"); + verifyFormat("++(a->f());"); + verifyFormat("--(a->f());"); + verifyFormat("if (!(a->f())) {\n}"); } TEST_F(FormatTest, UndestandsOverloadedOperators) { |