filecheck should not match a \n with a .
authorChris Lattner <sabre@nondot.org>
Fri, 25 Sep 2009 06:47:09 +0000 (06:47 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 25 Sep 2009 06:47:09 +0000 (06:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82758 91177308-0d34-0410-b5e6-96231b3b80d8

utils/FileCheck/FileCheck.cpp

index 199e95fd668db01bd848fa35cd2539f536d96a62..1f79b92e9d04e0177790e8e67ea293d8d12152bb 100644 (file)
@@ -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 {