From e21cb742249979c7e4584fded47e9da2445ebcd9 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 8 Jan 2014 15:59:42 +0000 Subject: clang-format: Don't hang forever when encountering a stray "}" in an @implementation block. PR18406. llvm-svn: 198770 --- clang/unittests/Format/FormatTest.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/unittests/Format/FormatTest.cpp') diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 756c71cf3c2..ea215ab7576 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -5596,6 +5596,10 @@ TEST_F(FormatTest, FormatObjCProtocol) { " int *looooooooooooooooooooooooooooongNumber;\n" "@property(nonatomic, assign, readonly)\n" " NSString *looooooooooooooooooooooooooooongName;"); + + verifyFormat("@implementation PR18406\n" + "}\n" + "@end"); } TEST_F(FormatTest, FormatObjCMethodDeclarations) { -- cgit v1.2.3