clang-format: Fix incorrect lambda recognition.
Before:
std::unique_ptr<int[]> foo() {}
After:
std::unique_ptr<int []> foo() {}
Also, the formatting could go severely wrong after such a function
before.
llvm-svn: 199817
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index a029176..7b3ea6e 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -7889,6 +7889,7 @@
verifyFormat("constexpr char hello[]{ \"hello\" };");
verifyFormat("double &operator[](int i) { return 0; }\n"
"int i;");
+ verifyFormat("std::unique_ptr<int[]> foo() {}");
}
TEST_F(FormatTest, FormatsBlocks) {