From 2bd7a64d127785d9ee4b5644f92f0d1eabf603e0 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Mon, 19 Jan 2015 10:50:51 +0000 Subject: clang-format: Fix endless loop on incomplete try-catch-block. llvm-svn: 226447 --- clang/lib/Format/UnwrappedLineParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Format') diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index ec04af5231b..00dc1bda538 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -1198,7 +1198,7 @@ void UnwrappedLineParser::parseTryCatch() { parseParens(); continue; } - if (FormatTok->isOneOf(tok::semi, tok::r_brace)) + if (FormatTok->isOneOf(tok::semi, tok::r_brace, tok::eof)) return; nextToken(); } -- cgit v1.2.3