clang-format: Quickfix for braced init lists detected as lambdas.
Before:
constexpr char hello [] { "hello" };
After:
constexpr char hello[]{ "hello" };
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190046 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 5e5a579..4c66ef0 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -6300,6 +6300,9 @@
" x.end(), //\n"
" [&](int, int) { return 1; });\n"
"}\n");
+
+ // Not lambdas.
+ verifyFormat("constexpr char hello[]{ \"hello\" };");
}
TEST_F(FormatTest, FormatsBlocks) {