clang-format: Indent relative to unary operators.
Before:
if (!aaaaaaaaaa( // break
aaaaa)) {
}
After:
if (!aaaaaaaaaa( // break
aaaaa)) {
}
Also cleaned up formatting using clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188891 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 4342781..df65196 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -3528,6 +3528,14 @@
verifyFormat("int a = i /* confusing comment */++;");
}
+TEST_F(FormatTest, IndentsRelativeToUnaryOperators) {
+ verifyFormat("if (!aaaaaaaaaa( // break\n"
+ " aaaaa)) {\n"
+ "}");
+ verifyFormat("aaaaaaaaaa(!aaaaaaaaaa( // break\n"
+ " aaaaa));");
+}
+
TEST_F(FormatTest, UndestandsOverloadedOperators) {
verifyFormat("bool operator<();");
verifyFormat("bool operator>();");