<div class="gmail_extra"><div class="gmail_quote">On Fri, Sep 7, 2012 at 2:47 AM, Ted Kremenek <span dir="ltr"><<a href="mailto:kremenek@apple.com" target="_blank" class="cremed">kremenek@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: kremenek<br>
Date: Fri Sep 7 01:47:16 2012<br>
New Revision: 163371<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=163371&view=rev" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project?rev=163371&view=rev</a><br>
Log:<br>
Add -exact-match option to FileCheck to allow clients to do exact matches without using regular expressions.<br></blockquote><div><br></div><div>This seems strange to me... What's the use case in mind? What's the plan for this feature?</div>
<div><br></div><div>Also, if this feature is going to stay, it should be documented.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
llvm/trunk/utils/FileCheck/FileCheck.cpp<br>
<br>
Modified: llvm/trunk/utils/FileCheck/FileCheck.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/FileCheck.cpp?rev=163371&r1=163370&r2=163371&view=diff" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/FileCheck.cpp?rev=163371&r1=163370&r2=163371&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/utils/FileCheck/FileCheck.cpp (original)<br>
+++ llvm/trunk/utils/FileCheck/FileCheck.cpp Fri Sep 7 01:47:16 2012<br>
@@ -45,6 +45,10 @@<br>
NoCanonicalizeWhiteSpace("strict-whitespace",<br>
cl::desc("Do not treat all horizontal whitespace as equivalent"));<br>
<br>
+static cl::opt<bool><br>
+NoRegex("exact-match",<br>
+ cl::desc("Look for exact matches without using regular expressions"));<br>
+<br>
//===----------------------------------------------------------------------===//<br>
// Pattern Handling Code.<br>
//===----------------------------------------------------------------------===//<br>
@@ -124,7 +128,7 @@<br>
}<br>
<br>
// Check to see if this is a fixed string, or if it has regex pieces.<br>
- if (PatternStr.size() < 2 ||<br>
+ if (PatternStr.size() < 2 || NoRegex ||<br>
(PatternStr.find("{{") == StringRef::npos &&<br>
PatternStr.find("[[") == StringRef::npos)) {<br>
FixedStr = PatternStr;<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" class="cremed">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank" class="cremed">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>