diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-11-29 08:30:24 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-29 08:30:24 +0000 |
| commit | 53b95c4080df712356fd01dae965c68e6b721373 (patch) | |
| tree | 595506eae376038b47272b89dadaf8c77bff0b3e /llvm/utils/FileCheck | |
| parent | 3d221f2fcea813daac37f5d204e11efde7878f70 (diff) | |
| download | bcm5719-llvm-53b95c4080df712356fd01dae965c68e6b721373.tar.gz bcm5719-llvm-53b95c4080df712356fd01dae965c68e6b721373.zip | |
Fix FileCheck crash when fuzzy scanning starting at the end of the file.
llvm-svn: 90065
Diffstat (limited to 'llvm/utils/FileCheck')
| -rw-r--r-- | llvm/utils/FileCheck/FileCheck.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index 101ff248808..078028a115c 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -398,7 +398,7 @@ void Pattern::PrintFailureInfo(const SourceMgr &SM, StringRef Buffer, } } - if (BestQuality < 50) { + if (Best != StringRef::npos && BestQuality < 50) { // Print the "possible intended match here" line if we found something // reasonable. SM.PrintMessage(SMLoc::getFromPointer(Buffer.data() + Best), |

