diff options
author | Owen Pan <owenpiano@gmail.com> | 2019-04-07 21:05:52 +0000 |
---|---|---|
committer | Owen Pan <owenpiano@gmail.com> | 2019-04-07 21:05:52 +0000 |
commit | 7e0382b1715d2b3b4f58fbb87f64e3c5753bc052 (patch) | |
tree | b1dbb60b0f73aefba850dd13d518b81c551039ae /unittests | |
parent | 359a05461d132b1e2d74655cad1a01ace6f654e5 (diff) | |
download | clang-7e0382b1715d2b3b4f58fbb87f64e3c5753bc052.tar.gz |
[clang-format] Fix bug https://bugs.llvm.org/show_bug.cgi?id=41413
Differential Revision: https://reviews.llvm.org/D60374
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index dc2512a9e2..3256ea54ab 100644 --- a/unittests/Format/FormatTest.cpp +++ b/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; |