mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
filecheck should not match a \n with a .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82758 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0f427ac24c
commit
d9485ddfdd
@ -50,7 +50,6 @@ class PatternChunk {
|
|||||||
public:
|
public:
|
||||||
PatternChunk(StringRef S, bool isRE) : Str(S), isRegEx(isRE) {}
|
PatternChunk(StringRef S, bool isRE) : Str(S), isRegEx(isRE) {}
|
||||||
|
|
||||||
|
|
||||||
size_t Match(StringRef Buffer, size_t &MatchLen) const {
|
size_t Match(StringRef Buffer, size_t &MatchLen) const {
|
||||||
if (!isRegEx) {
|
if (!isRegEx) {
|
||||||
// Fixed string match.
|
// Fixed string match.
|
||||||
@ -60,7 +59,7 @@ public:
|
|||||||
|
|
||||||
// Regex match.
|
// Regex match.
|
||||||
SmallVector<StringRef, 4> MatchInfo;
|
SmallVector<StringRef, 4> MatchInfo;
|
||||||
if (!Regex(Str, Regex::Sub).match(Buffer, &MatchInfo))
|
if (!Regex(Str, Regex::Sub|Regex::Newline).match(Buffer, &MatchInfo))
|
||||||
return StringRef::npos;
|
return StringRef::npos;
|
||||||
|
|
||||||
// Successful regex match.
|
// Successful regex match.
|
||||||
@ -70,7 +69,6 @@ public:
|
|||||||
MatchLen = FullMatch.size();
|
MatchLen = FullMatch.size();
|
||||||
return FullMatch.data()-Buffer.data();
|
return FullMatch.data()-Buffer.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Pattern {
|
class Pattern {
|
||||||
|
Loading…
Reference in New Issue
Block a user