summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorOwen Pan <owenpiano@gmail.com>2019-04-07 21:05:52 +0000
committerOwen Pan <owenpiano@gmail.com>2019-04-07 21:05:52 +0000
commite4f95e8e39b639b633347838d8bc7d8f2594df83 (patch)
tree2e649ec7c6b9f76f6a0cdb44280f34127bd39740 /clang/unittests/Format/FormatTest.cpp
parentf38b46ffca9b55d476229dce6bca4f3274cffb6d (diff)
downloadbcm5719-llvm-e4f95e8e39b639b633347838d8bc7d8f2594df83.tar.gz
bcm5719-llvm-e4f95e8e39b639b633347838d8bc7d8f2594df83.zip
[clang-format] Fix bug https://bugs.llvm.org/show_bug.cgi?id=41413
Differential Revision: https://reviews.llvm.org/D60374 llvm-svn: 357877
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index dc2512a9e27..3256ea54ab6 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -12822,6 +12822,24 @@ TEST_F(FormatTest, ConfigurableContinuationIndentWidth) {
format("int i = longFunction(arg);", SixIndent));
}
+TEST_F(FormatTest, WrappedClosingParenthesisIndent) {
+ FormatStyle Style = getLLVMStyle();
+ verifyFormat(
+ "int Foo::getter(\n"
+ " //\n"
+ ") const {\n"
+ " return foo;\n"
+ "}",
+ Style);
+ verifyFormat(
+ "void Foo::setter(\n"
+ " //\n"
+ ") {\n"
+ " foo = 1;\n"
+ "}",
+ Style);
+}
+
TEST_F(FormatTest, SpacesInAngles) {
FormatStyle Spaces = getLLVMStyle();
Spaces.SpacesInAngles = true;
OpenPOWER on IntegriCloud