aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-01-11 18:13:04 +0000
committerManuel Klimek <klimek@google.com>2013-01-11 18:13:04 +0000
commit606e07ecc0b7b0e01d23baa833b4b4c73af0d4f4 (patch)
tree119092defc4c073140e23e8b1eeb5ccf42e317f8 /unittests/Format/FormatTest.cpp
parent517e894c56211f57c487bdaba8ead0edc84396fe (diff)
Fix parsing of initializer lists with elaborated type specifier.
Now we correctly parse and format: verifyFormat("struct foo a = { bar }; int n; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172229 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index a16f66cd08..71fa83ccb1 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -1163,6 +1163,10 @@ TEST_F(FormatTest, PullTrivialFunctionDefinitionsIntoSingleLine) {
"}");
}
+TEST_F(FormatTest, BracedInitListWithElaboratedTypeSpecifier) {
+ verifyFormat("struct foo a = { bar };\nint n;");
+}
+
// FIXME: This breaks the order of the unwrapped lines:
// TEST_F(FormatTest, OrderUnwrappedLines) {
// verifyFormat("{\n"