diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-01-13 22:16:45 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-01-13 22:16:45 +0000 |
commit | 7bd88aa620406ab99547169b973de085785a0ca2 (patch) | |
tree | e27e6ec898b70cc84339503954079cbbf12fd1e1 /lib/Lex/PTHLexer.cpp | |
parent | f02f6f0ee3e05b958bcf67f00f4503671d67eccd (diff) |
Fix corner cases in PTH getSpelling() binary search.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62187 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PTHLexer.cpp')
-rw-r--r-- | lib/Lex/PTHLexer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index 4a84f9b3af..c5fc6f3da7 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/lib/Lex/PTHLexer.cpp @@ -400,6 +400,9 @@ unsigned PTHSpellingSearch::getSpellingBinarySearch(unsigned fpos, } if (TokOffset < fpos) { + if (i == min) + break; + min = i; continue; } |