[llvm-commits] [llvm] r98971 - /llvm/trunk/utils/FileCheck/FileCheck.cpp
Daniel Dunbar
daniel at zuster.org
Fri Mar 19 11:07:44 PDT 2010
Author: ddunbar
Date: Fri Mar 19 13:07:43 2010
New Revision: 98971
URL: http://llvm.org/viewvc/llvm-project?rev=98971&view=rev
Log:
FileCheck: Don't print "possibly intended match" line if it would match the
"scanning from here" one.
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=98971&r1=98970&r2=98971&view=diff
==============================================================================
--- llvm/trunk/utils/FileCheck/FileCheck.cpp (original)
+++ llvm/trunk/utils/FileCheck/FileCheck.cpp Fri Mar 19 13:07:43 2010
@@ -401,11 +401,12 @@
}
}
- 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),
- "possible intended match here", "note");
+ // Print the "possible intended match here" line if we found something
+ // reasonable and not equal to what we showed in the "scanning from here"
+ // line.
+ if (Best && Best != StringRef::npos && BestQuality < 50) {
+ SM.PrintMessage(SMLoc::getFromPointer(Buffer.data() + Best),
+ "possible intended match here", "note");
// FIXME: If we wanted to be really friendly we would show why the match
// failed, as it can be hard to spot simple one character differences.
More information about the llvm-commits
mailing list