From 2bf0d0ca426a273d8248cb08903bd2af8fa52a29 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 25 Sep 2009 06:47:09 +0000 Subject: [PATCH] filecheck should not match a \n with a . llvm-svn: 82758 --- utils/FileCheck/FileCheck.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/FileCheck/FileCheck.cpp b/utils/FileCheck/FileCheck.cpp index 199e95fd668..1f79b92e9d0 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 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 {