aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-25 06:47:09 +0000
committerChris Lattner <sabre@nondot.org>2009-09-25 06:47:09 +0000
commitd33999c4a5ccdb8cd555477e51987ce6c3ed1f04 (patch)
tree754b206d65f8e2c5d119bf919f3e8b1d980a977b /utils
parent57f2699a01d2bf5a7544da99676c612955bbd05f (diff)
downloadexternal_llvm-d33999c4a5ccdb8cd555477e51987ce6c3ed1f04.zip
external_llvm-d33999c4a5ccdb8cd555477e51987ce6c3ed1f04.tar.gz
external_llvm-d33999c4a5ccdb8cd555477e51987ce6c3ed1f04.tar.bz2
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
Diffstat (limited to 'utils')
-rw-r--r--utils/FileCheck/FileCheck.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/utils/FileCheck/FileCheck.cpp b/utils/FileCheck/FileCheck.cpp
index 199e95f..1f79b92 100644
--- a/utils/FileCheck/FileCheck.cpp
+++ b/utils/FileCheck/FileCheck.cpp
@@ -50,7 +50,6 @@ class PatternChunk {
public:
PatternChunk(StringRef S, bool isRE) : Str(S), isRegEx(isRE) {}
-
size_t Match(StringRef Buffer, size_t &MatchLen) const {
if (!isRegEx) {
// Fixed string match.
@@ -60,7 +59,7 @@ public:
// Regex match.
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;
// Successful regex match.
@@ -70,7 +69,6 @@ public:
MatchLen = FullMatch.size();
return FullMatch.data()-Buffer.data();
}
-
};
class Pattern {