]> granicus.if.org Git - clang/commitdiff
clang-format: Address review comments of r216501.
authorDaniel Jasper <djasper@google.com>
Wed, 27 Aug 2014 17:16:46 +0000 (17:16 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 27 Aug 2014 17:16:46 +0000 (17:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216565 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/UnwrappedLineParser.cpp

index aad3faa1965bc2b1b0d0c1d8bbdd0887e202713f..56cad19277dff034892360c987b04d9a7186ae54 100644 (file)
@@ -662,8 +662,7 @@ void UnwrappedLineParser::parseStructuralElement() {
     FormatTok->Finalized = true;
     nextToken();
     if (FormatTok->is(tok::l_brace)) {
-      FormatTok->Finalized = true;
-      while (FormatTok) {
+      while (FormatTok && FormatTok->isNot(tok::eof)) {
         FormatTok->Finalized = true;
         if (FormatTok->is(tok::r_brace)) {
           nextToken();