mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Skip whitespace when looking for a potential intended match.
Before: <stdin>:94:1: note: possible intended match here movsd 4096(%rsi), %xmm0 ^ After: <stdin>:94:2: note: possible intended match here movsd 4096(%rsi), %xmm0 ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94847 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e546343799
commit
d8a5541a51
@ -382,6 +382,11 @@ void Pattern::PrintFailureInfo(const SourceMgr &SM, StringRef Buffer,
|
||||
if (Buffer[i] == '\n')
|
||||
++NumLinesForward;
|
||||
|
||||
// Patterns have leading whitespace stripped, so skip whitespace when
|
||||
// looking for something which looks like a pattern.
|
||||
if (Buffer[i] == ' ' || Buffer[i] == '\t')
|
||||
continue;
|
||||
|
||||
// Compute the "quality" of this match as an arbitrary combination of the
|
||||
// match distance and the number of lines skipped to get to this match.
|
||||
unsigned Distance = ComputeMatchDistance(Buffer.substr(i), VariableTable);
|
||||
|
Loading…
x
Reference in New Issue
Block a user