summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-07-11 21:27:40 +0000
committerDaniel Jasper <djasper@google.com>2013-07-11 21:27:40 +0000
commit51efbad7324659943d3a7ae32cbb516b7539486b (patch)
tree81c2c433107c679ba38f56f2cdfb770f5573da7e /clang/unittests/Format/FormatTest.cpp
parent29b3fdc8c2d5502196b3aa2da0012fda65c6b531 (diff)
downloadbcm5719-llvm-51efbad7324659943d3a7ae32cbb516b7539486b.tar.gz
bcm5719-llvm-51efbad7324659943d3a7ae32cbb516b7539486b.zip
clang-format: Fix bug concerning the alignment of "}".
Before: int i; // indented 2 space more than clang-format would use. SomeReturnType // clang-format invoked on this line. SomeFunctionMakingLBraceEndInColumn80() { } // This is the indent clang-format would prefer. After: int i; // indented 2 space more than clang-format would use. SomeReturnType // clang-format invoked on this line. SomeFunctionMakingLBraceEndInColumn80() { } llvm-svn: 186120
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index ae4d9f5c0d9..6e53f92e5a8 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4810,6 +4810,13 @@ TEST_F(FormatTest, ReformatRegionAdjustsIndent) {
" // line 2\n"
" int b;",
35, 0, getLLVMStyle()));
+ EXPECT_EQ(" int a;\n"
+ " void\n"
+ " ffffff() {\n"
+ " }",
+ format(" int a;\n"
+ "void ffffff() {}",
+ 11, 0, getLLVMStyleWithColumns(11)));
}
TEST_F(FormatTest, BreakStringLiterals) {
OpenPOWER on IntegriCloud