summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index aad3faa1965..56cad19277d 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -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();
OpenPOWER on IntegriCloud