diff options
author | Daniel Jasper <djasper@google.com> | 2015-06-30 11:32:22 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-06-30 11:32:22 +0000 |
commit | 8378e8520c72c3f1ac96e14d85d4d6a0731aefa9 (patch) | |
tree | cc41a579795beebcf4850e82d9817a8aa8a2aea5 /unittests | |
parent | c9c4216d2fb6307478254dbdc77405c931532298 (diff) | |
download | clang-8378e8520c72c3f1ac96e14d85d4d6a0731aefa9.tar.gz |
clang-format: Properly parse parenthesis in braced lists.
Among other things, this makes clang-format understand arbitrary blocks
embedded in them, such as:
SomeFunction({MACRO({ return output; }), b});
where MACRO could e.g. expand to a lambda.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241059 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 743171fb00..ef5299aada 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -3184,6 +3184,8 @@ TEST_F(FormatTest, LayoutNestedBlocks) { "}, a);", Style); + verifyFormat("SomeFunction({MACRO({ return output; }), b});"); + verifyNoCrash("^{v^{a}}"); } |