diff options
| author | Daniel Jasper <djasper@google.com> | 2014-03-28 07:48:59 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-03-28 07:48:59 +0000 |
| commit | 395193c7a0cd1366e33c1bd23590eb6ea06f5251 (patch) | |
| tree | c0e817d6125c0726a8912a89ae4b9b6e244a7ff6 /clang/lib | |
| parent | ba539d8dc84cb0c0d823f08febb4ed441155aaa1 (diff) | |
| download | bcm5719-llvm-395193c7a0cd1366e33c1bd23590eb6ea06f5251.tar.gz bcm5719-llvm-395193c7a0cd1366e33c1bd23590eb6ea06f5251.zip | |
clang-format: Recognize more ObjC blocks with parameters/return type.
llvm-svn: 204990
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index d863b5db0c0..204132daae3 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -694,9 +694,13 @@ void UnwrappedLineParser::parseStructuralElement() { break; case tok::caret: nextToken(); - if (FormatTok->is(tok::l_brace)) { + if (FormatTok->Tok.isAnyIdentifier() || + FormatTok->isSimpleTypeSpecifier()) + nextToken(); + if (FormatTok->is(tok::l_paren)) + parseParens(); + if (FormatTok->is(tok::l_brace)) parseChildBlock(); - } break; case tok::l_brace: if (!tryToParseBracedList()) { |

