diff options
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 635a34499da..2714a513bcb 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -6472,6 +6472,8 @@ TEST_F(FormatTest, UnderstandsSquareAttributes) { // Make sure we do not mistake attributes for array subscripts. verifyFormat("int a() {}\n" "[[unused]] int b() {}\n"); + verifyFormat("NSArray *arr;\n" + "arr[[Foo() bar]];"); // On the other hand, we still need to correctly find array subscripts. verifyFormat("int a = std::vector<int>{1, 2, 3}[0];"); |