[llvm-commits] [llvm] r163371 - /llvm/trunk/utils/FileCheck/FileCheck.cpp
Chandler Carruth
chandlerc at google.com
Fri Sep 7 00:01:46 PDT 2012
On Fri, Sep 7, 2012 at 2:47 AM, Ted Kremenek <kremenek at apple.com> wrote:
> Author: kremenek
> Date: Fri Sep 7 01:47:16 2012
> New Revision: 163371
>
> URL: http://llvm.org/viewvc/llvm-project?rev=163371&view=rev
> Log:
> Add -exact-match option to FileCheck to allow clients to do exact matches
> without using regular expressions.
>
This seems strange to me... What's the use case in mind? What's the plan
for this feature?
Also, if this feature is going to stay, it should be documented.
>
> Modified:
> llvm/trunk/utils/FileCheck/FileCheck.cpp
>
> Modified: llvm/trunk/utils/FileCheck/FileCheck.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/FileCheck.cpp?rev=163371&r1=163370&r2=163371&view=diff
>
> ==============================================================================
> --- llvm/trunk/utils/FileCheck/FileCheck.cpp (original)
> +++ llvm/trunk/utils/FileCheck/FileCheck.cpp Fri Sep 7 01:47:16 2012
> @@ -45,6 +45,10 @@
> NoCanonicalizeWhiteSpace("strict-whitespace",
> cl::desc("Do not treat all horizontal whitespace as
> equivalent"));
>
> +static cl::opt<bool>
> +NoRegex("exact-match",
> + cl::desc("Look for exact matches without using regular
> expressions"));
> +
>
> //===----------------------------------------------------------------------===//
> // Pattern Handling Code.
>
> //===----------------------------------------------------------------------===//
> @@ -124,7 +128,7 @@
> }
>
> // Check to see if this is a fixed string, or if it has regex pieces.
> - if (PatternStr.size() < 2 ||
> + if (PatternStr.size() < 2 || NoRegex ||
> (PatternStr.find("{{") == StringRef::npos &&
> PatternStr.find("[[") == StringRef::npos)) {
> FixedStr = PatternStr;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120907/4ce194ba/attachment.html>
More information about the llvm-commits
mailing list