diff options
| author | Daniel Jasper <djasper@google.com> | 2014-06-02 10:57:55 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-06-02 10:57:55 +0000 |
| commit | 4afc6b3e16c60b2a74f9b1938949bc72efe6b2a3 (patch) | |
| tree | 2cdde70f40a8a1febfc68bd74332d1975699f59b /clang/unittests/Format/FormatTest.cpp | |
| parent | 5181dd3a5616d53f7d5d6849b25cac3eaa060aaa (diff) | |
| download | bcm5719-llvm-4afc6b3e16c60b2a74f9b1938949bc72efe6b2a3.tar.gz bcm5719-llvm-4afc6b3e16c60b2a74f9b1938949bc72efe6b2a3.zip | |
clang-format: No space between ")" and braced init list.
Before:
auto j = decltype(i) {};
After:
auto j = decltype(i){};
This fixes llvm.org/PR19892.
llvm-svn: 210013
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 19abd37c33c..2718a8992cd 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -4798,8 +4798,8 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyFormat("STATIC_ASSERT((a & b) == 0);"); verifyFormat("STATIC_ASSERT(0 == (a & b));"); verifyFormat("template <bool a, bool b> " - "typename t::if<x && y>::type f() {};"); - verifyFormat("template <int *y> f() {};"); + "typename t::if<x && y>::type f() {}"); + verifyFormat("template <int *y> f() {}"); verifyFormat("vector<int *> v;"); verifyFormat("vector<int *const> v;"); verifyFormat("vector<int *const **const *> v;"); @@ -5256,7 +5256,7 @@ TEST_F(FormatTest, LayoutCallsInsideBraceInitializers) { } TEST_F(FormatTest, LayoutBraceInitializersInReturnStatement) { - verifyFormat("return (a)(b) {1, 2, 3};"); + verifyFormat("return (a)(b){1, 2, 3};"); } TEST_F(FormatTest, LayoutCxx11BraceInitializers) { @@ -5286,6 +5286,7 @@ TEST_F(FormatTest, LayoutCxx11BraceInitializers) { verifyFormat("int foo(int i) { return fo1{}(i); }"); verifyFormat("int foo(int i) { return fo1{}(i); }"); + verifyFormat("auto i = decltype(x){};"); // In combination with BinPackParameters = false. FormatStyle NoBinPacking = getLLVMStyle(); @@ -7072,7 +7073,7 @@ TEST_F(FormatTest, DoNotCreateUnreasonableUnwrappedLines) { verifyFormat("void f() {\n" " return g() {}\n" " void h() {}"); - verifyFormat("int a[] = {void forgot_closing_brace() {f();\n" + verifyFormat("int a[] = {void forgot_closing_brace(){f();\n" "g();\n" "}"); } |

