[llvm-commits] [llvm] r90065 - /llvm/trunk/utils/FileCheck/FileCheck.cpp
Daniel Dunbar
daniel at zuster.org
Sun Nov 29 00:30:24 PST 2009
Author: ddunbar
Date: Sun Nov 29 02:30:24 2009
New Revision: 90065
URL: http://llvm.org/viewvc/llvm-project?rev=90065&view=rev
Log:
Fix FileCheck crash when fuzzy scanning starting at the end of the file.
Modified:
llvm/trunk/utils/FileCheck/FileCheck.cpp
Modified: llvm/trunk/utils/FileCheck/FileCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/FileCheck.cpp?rev=90065&r1=90064&r2=90065&view=diff
==============================================================================
--- llvm/trunk/utils/FileCheck/FileCheck.cpp (original)
+++ llvm/trunk/utils/FileCheck/FileCheck.cpp Sun Nov 29 02:30:24 2009
@@ -398,7 +398,7 @@
}
}
- 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),
More information about the llvm-commits
mailing list