summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Lex/PTHLexer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp
index 4a84f9b3afa..c5fc6f3da79 100644
--- a/clang/lib/Lex/PTHLexer.cpp
+++ b/clang/lib/Lex/PTHLexer.cpp
@@ -400,6 +400,9 @@ unsigned PTHSpellingSearch::getSpellingBinarySearch(unsigned fpos,
}
if (TokOffset < fpos) {
+ if (i == min)
+ break;
+
min = i;
continue;
}
OpenPOWER on IntegriCloud