History log of /external/llvm/utils/FileCheck/FileCheck.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4c5e43da7792f75567b693105cc53e3f1992ad98 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master llvm for rebase to r233350

Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
/external/llvm/utils/FileCheck/FileCheck.cpp
ebe69fe11e48d322045d5949c83283927a0d790b 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r230699.

Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
/external/llvm/utils/FileCheck/FileCheck.cpp
37ed9c199ca639565f6ce88105f9e39e898d82d0 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r222494.

Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
/external/llvm/utils/FileCheck/FileCheck.cpp
c6a4f5e819217e1e12c458aed8e7b122e23a3a58 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/utils/FileCheck/FileCheck.cpp
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/utils/FileCheck/FileCheck.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/utils/FileCheck/FileCheck.cpp
0ab53c711295f0469c86db088dc895238da801aa 13-Nov-2013 Alexey Samsonov <samsonov@google.com> FileCheck: fix matching of one check-prefix is a prefix of another

Summary:
Fix a case when "FileCheck --check-prefix=CHECK --check-prefix=CHECKER"
would silently ignore check-lines of the form:
CHECKER: foo

Reviewers: dsanders

Reviewed By: dsanders

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2168

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
7df66416541b2001f2eb34eda543e2202617ba85 13-Nov-2013 Alexey Samsonov <samsonov@google.com> FileCheck: fix a bug with multiple --check-prefix options.

Summary:
This fixes a subtle bug in new FileCheck feature added
in r194343. When we search for the first satisfying check-prefix,
we should actually return the first encounter of some check-prefix as a
substring, even if it's not a part of valid check-line. Otherwise
"FileCheck --check-prefix=FOO --check-prefix=BAR" with check file:

FOO not a vaild check-line
FOO: foo
BAR: bar

incorrectly accepted file:

fog
bar

as it skipped the first two encounters of FOO, matching only BAR: line.

Reviewers: arsenm, dsanders

Reviewed By: dsanders

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2166

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
ee4f5eae1c416eddbecbb2d742e2bb8dc0032bf6 10-Nov-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Allow multiple check prefixes in FileCheck.

This is useful if you want to run multiple variations
of a single test, and the majority of check lines
should be the same.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
e3ba15c794839abe076e3e2bdf6c626396a19d4d 12-Oct-2013 Will Dietz <wdietz2@illinois.edu> Add missing #include's to cctype when using isdigit/alpha/etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
e5f740cc4f994c0db13a66de699bf95ccf24130e 11-Oct-2013 Stephen Lin <stephenwlin@gmail.com> Really fix CHECK-LABEL and CHECK-DAG interaction. This actually just restores the initial implementation that was in r186162 but got lost in some subsequent refactoring. More explicit variable names and comments are present now to hopefully prevent repeat regression, as well as another test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
563c18283926b18bbdb6d3ad6cf02594399e2baf 11-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix handling of CHECK-DAG inside of CHECK-LABEL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
c61c8116212c68ebc81a9dc06327d6cc806b1f08 18-Sep-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Missed using check type enum in one place

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
53bb26f61c65b6f63e9aa2950429bb889683bc11 18-Sep-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Use function's argument instead of the global flag.

For now it happens the argument is always the same.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
4f67afc3d67d9a68f1b37767c9c2966a775186bd 18-Sep-2013 Matt Arsenault <Matthew.Arsenault@amd.com> FileCheck refactor: use enum instead of bunch of bools

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
6d3aa547a522ae53c3aff6b40f0a23f9a22dcd87 16-Aug-2013 Stephen Lin <stephenwlin@gmail.com> FileCheck: Fix stray quote in CHECK-LABEL error message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
d9a84efe44db2f4d983e49bc7370fc8cef449214 13-Aug-2013 Rui Ueyama <ruiu@google.com> [FileCheck] Fix a bug that cause FileCheck to misidentify check-prefix

FileCheck should check to make sure the prefix was found, and not a word
containing it (e.g -check-prefix=BASEREL shouldn't match NOBASEREL).

Patch by Ron Ofir.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
e57343b6365df5b7318c5076f917ad40cf621555 02-Aug-2013 Tim Northover <tnorthover@apple.com> Fix handling of CHECK-DAG combined with CHECK-NOT

Patch by Daniel Sanders.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
178504b07b793b3fde46d950b8f10e0794193e02 12-Jul-2013 Stephen Lin <stephenwlin@gmail.com> Add new directive called CHECK-LABEL to FileCheck.

CHECK-LABEL is meant to be used in place on CHECK on lines containing identifiers or other unique labels (they need not actually be labels in the source or output language, though.) This is used to break up the input stream into separate blocks delineated by CHECK-LABEL lines, each of which is checked independently. This greatly improves the accuracy of errors and fix-it hints in many cases, and allows for FileCheck to recover from errors in one block by continuing to subsequent blocks.

Some tests will be converted to use this new directive in forthcoming patches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
dd5af27a74a01f0d03356cea15d3a403f4964f8b 25-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> keep only the StringRef version of getFileOrSTDIN.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
95ab32667456b13ad56634cc7554cde8a50db95a 14-May-2013 Michael Liao <michael.liao@intel.com> Add 'CHECK-DAG' support

Refer to 'FileCheck.rst'f for details of 'CHECK-DAG'.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
7efbbd61eb0aa85ec189db8f02c85ad9078946e9 14-May-2013 Michael Liao <michael.liao@intel.com> Refactor string checking. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
0fc7137f2f8a99cb749024c51e3247f4b24e1ee0 25-Apr-2013 Michael Liao <michael.liao@intel.com> Remove SMLoc paired with CHECK-NOT patterns. Not functionality change.

Pattern has source location by itself. After adding a trivial method to
retrieve it, it's unnecessary to pair a source location for CHECK-NOT patterns.
One thing revised after this is the diagnostic info is more accurate by
pointing to the start of the CHECK-NOT pattern instead of the end of the
CHECK-NOT pattern. E.g. diagnostic message previously looks like

<stdin>:1:1: error: CHECK-NOT: string occurred!
test
^
test.txt:1:16: note: CHECK-NOT: pattern specified here
CHECK-NOT: test
^

is changed to

<stdin>:1:1: error: CHECK-NOT: string occurred!
test
^
test.txt:1:12: note: CHECK-NOT: pattern specified here
CHECK-NOT: test
^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
c16f8c5e564fc2d69c75e85bdda66ad001d6b99e 25-Apr-2013 Michael Liao <michael.liao@intel.com> Remove tailing whitespaces



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
7cdba152bbe4debfb58ed6d9559ef77aae8a0b31 23-Mar-2013 Benjamin Kramer <benny.kra@googlemail.com> Plug a memory leak in FileCheck when the input file is empty.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
87d0b9ed1462705dd9bf1cb7f67d0bf03af776c8 12-Feb-2013 Guy Benyei <guy.benyei@intel.com> Add static cast to unsigned char whenever a character classification function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
4cc74fcba06ce43ee325510dc6137bd050f96c68 06-Feb-2013 Guy Benyei <guy.benyei@intel.com> Canonicalize line endings to Linux style also when the --strict-whitespace flag is in use. This flag is supposed to affect horizontal whitespaces only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
4ffd89fa4d2788611187d1a534d2ed46adf1702c 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort the #include lines for utils/...

I've tried to find main moudle headers where possible, but the TableGen
stuff may warrant someone else looking at it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
4db6511779e70780f7b36bb7ef54276752f5f640 02-Dec-2012 Eli Bendersky <eliben@google.com> Fix a bug in FileCheck that wouldn't let define variables as follows:

; CHECK: [[VAR:[a-z]]]

The problem was that to find the end of the regex var definition, it was
simplistically looking for the next ]] and finding the incorrect one. A
better approach is to count nesting of brackets (taking escaping into
account). This way the brackets that are part of the regex can be discovered
and skipped properly, and the ]] ending is detected in the right place.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
9756ca7ba0c7f6c3b1e76ee12ca27ddca04be9d7 01-Dec-2012 Eli Bendersky <eliben@google.com> Support referencing variables defined on the same line.

See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/157198.html
and related discussions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
1e5cbcb10adaca5c80121293b6c414d9285ebcee 30-Nov-2012 Eli Bendersky <eliben@google.com> Clean up whitespace and add comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
7f8e76f5140be7cc9ed1cb66cdcdedfa28147641 30-Nov-2012 Eli Bendersky <eliben@google.com> Make FileCheck return 2 in case of an error as documented,
instead of 1 or true (?!)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
65f3f32100b80366785f86c64a7ff0ee697107eb 15-Nov-2012 Dmitri Gribenko <gribozavr@gmail.com> FileCheck: remove useless 'continue' at the end of a 'while(){}' loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
70a870add82dab944b98ee1840fafff33795fc95 14-Nov-2012 Alexander Kornienko <alexfh@google.com> Support for [[@LINE]], [[@LINE+<offset>]], [[@LINE-<offset>]] expressions in
FileCheck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
9d227af8f73301392d8b629d20f26e98ce96d5aa 21-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Clarify comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
30ce40e3f77d1432903c24caf816c54bb260d833 18-Sep-2012 Benjamin Kramer <benny.kra@googlemail.com> FileCheck: Fix off-by-one bug that made CHECK-NOT: ignore the next character after the colon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
4f50517577bb74fb4d2a18ad613fd05aa48f564d 08-Sep-2012 Ted Kremenek <kremenek@apple.com> Revert "Add -exact-match option to FileCheck to allow clients to do exact matches without using regular expressions."

Turns out I did not need it after all. If we find a use for it in the future, we
can resurrect it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
2e578388ab8b0f6070ad95bae584423931a98c78 07-Sep-2012 Ted Kremenek <kremenek@apple.com> Add -exact-match option to FileCheck to allow clients to do exact matches without using regular expressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
3f2d5f60b31fd057c10f77b2e607b23a8c94f6d3 16-Oct-2011 Chris Lattner <sabre@nondot.org> Make SMDiagnostic a little more sane. Instead of passing around note/warning/error as a
string, pass it around as an enum.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
d8b7aa26134d2abee777f745c32005e63dea2455 16-Oct-2011 Chris Lattner <sabre@nondot.org> Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang does. Enhance
the X86 asmparser to produce ranges in the one case that was annoying me, for example:

test.s:10:15: error: invalid operand for instruction
movl 0(%rax), 0(%edx)
^~~~~~~

It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use
ranges where appropriate if someone is interested.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142106 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
42e31dfd4f3c7fe8f83c930cd3a1700cef6914ea 09-Apr-2011 Chris Lattner <sabre@nondot.org> fix PR9629 - We were lowering regexes like a{{b|c}}d into ab|cd, which
is substantially different than a(b|c)d. Form the latter regex instead.
This found a few problems in the testsuite, which serves as its test.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129196 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
13a38c4cb4c90a6d2b5313a6517d6291cb924730 09-Apr-2011 Chris Lattner <sabre@nondot.org> various cleanups, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
1aac1864cfb66ae3d322ff7e28738d03bc1d1bfc 09-Feb-2011 Chris Lattner <sabre@nondot.org> emit a specific error when the input file is empty. This fixes
an annoyance of mine when working on tests: if the input .ll file
is broken, opt outputs an error and generates an empty file. FileCheck
then emits its "ooh I couldn't find the first CHECK line, scanning
from ..." which obfuscates the actual problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
3ff9563c3e391954b2e224afcf8b2b0fcc3888aa 16-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an out parm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
333fb04506233255f10d8095c9e2de5e5f0fdc6f 09-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
1f6efa3996dd1929fbc129203ce5009b620e6969 29-Nov-2010 Michael J. Spencer <bigcheesegs@gmail.com> Merge System into Support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
9f6e03fa1e05f7c59379e68d7626400ca508cfb0 14-Nov-2010 NAKAMURA Takumi <geek4civic@gmail.com> FileCheck: Eliminate DOSish \r from input file.

It can pass two tests below on Win32.
- Clang :: CodeGenCXX/dyncast.cpp
- LLVM :: CodeGen/ARM/globals.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
824c10ece26fd031591b1770acc8a6c2575a3ab8 15-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Teach FileCheck to handle trailing CHECK-NOT patterns.

A CHECK-NOT pattern without a following CHECK pattern simply checks that the
pattern doesn't match before the end of the input file.

You can even have only CHECK-NOT patterns to check that strings appear nowhere
in the input file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
7112c86fc208145334aaa04812c794ce6feef416 20-Aug-2010 Mikhail Glushenkov <foldr@codedgers.com> Trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
4c842dda3939c6b9f83ba7e8e19e43445cd9a832 06-Apr-2010 Chris Lattner <sabre@nondot.org> stringref-ize the MemoryBuffer::get apis. This requires
a co-committed clang patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
7a68e0df0d2eb46f509ef086729e46a0e79e4750 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> FileCheck: Don't print "possibly intended match" line if it would match the
"scanning from here" one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
0806f9ff5860ce351540ff2897dec1667154ca19 30-Jan-2010 Daniel Dunbar <daniel@zuster.org> FileCheck: When looking for "possible matches", only compare against the prefix
line. Turns out edit_distance can be slow if the string we are scanning for
happens to be quite large.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
e3a1e506809acbddceb6840914879c498d454f26 29-Jan-2010 Dan Gohman <gohman@apple.com> Minor code cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
d8a5541a513695039d1eb83eeced05d51ce9f567 29-Jan-2010 Dan Gohman <gohman@apple.com> Skip whitespace when looking for a potential intended match.
Before:

<stdin>:94:1: note: possible intended match here
movsd 4096(%rsi), %xmm0
^

After:
<stdin>:94:2: note: possible intended match here
movsd 4096(%rsi), %xmm0
^


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
e546343799d1b7914024b62f6c188f5c0d66f7b3 29-Jan-2010 Dan Gohman <gohman@apple.com> Fix the position of the caret in the FileCheck error message.
Before:

test/CodeGen/X86/lsr-reuse.ll:52:34: error: expected string not found in input
; CHECK: movsd -2048(%rsi), %xmm0
^

After:

test/CodeGen/X86/lsr-reuse.ll:52:10: error: expected string not found in input
; CHECK: movsd -2048(%rsi), %xmm0
^


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
8cdf54c222e911f09b57ab0d8fdd3408979df91b 29-Jan-2010 Daniel Dunbar <daniel@zuster.org> FileCheck: Switch "possible match" calculation to use StringRef::edit_distance.
- Thanks Doug, who is obviously less lazy than me!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
a76a7883b557c315f29dbf95155dd5ae0352fecf 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix FileCheck crash when fuzzy scanning starting at the end of the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
ead2dacc9ee028906cb104c8c3d66ccbbebe6b10 22-Nov-2009 Daniel Dunbar <daniel@zuster.org> FileCheck, PR5239: Try to find the intended match on failures, but looking for a
good nearby fuzzy match. Frequently the input is nearly correct, and just
showing the user the a nearby sensible match is enough to diagnose the problem.
- The "fuzzyness" is pretty simple and arbitrary, but worked on my three test
cases. If you encounter problems, or places you think FileCheck should have
guessed but didn't, please add test cases to PR5239.

For example, previously FileCheck would report this:
--
t.cpp:21:55: error: expected string not found in input
// CHECK: define void @_Z2f25f2_s1([[i64_i64_ty]] %a0)
^
<stdin>:19:30: note: scanning from here
define void @_Z2f15f1_s1(%1) nounwind {
^
<stdin>:19:30: note: with variable "i64_i64_ty" equal to "%0"
--

and now it also reports this:
--
<stdin>:27:1: note: possible intended match here
define void @_Z2f25f2_s1(%0) nounwind {
^
--

which makes it clear that the CHECK just has an extra ' %a0' in it, without
having to check the input.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
fafe93c8bcbc538573bc5e890f24f9869a11f846 22-Nov-2009 Daniel Dunbar <daniel@zuster.org> FileCheck: When a string using variable references fails to match, print
additional information about the current definitions of the variables used in
the string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
964ac012017451ff24c33e6b749ec3223e1d291a 22-Nov-2009 Daniel Dunbar <daniel@zuster.org> Allow '_' in FileCheck variable names, it is nice to have at least one
separate character.
- Chris, OK?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
eec96958cd53ebb61bebfd3af416ace380df6f6c 27-Sep-2009 Chris Lattner <sabre@nondot.org> implement and document support for filecheck variables. This
allows matching and remembering a string and then matching and
verifying that the string occurs later in the file.

Change X86/xor.ll to use this in some cases where the test was
checking for an arbitrary register allocation decision.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
81f46d9ce1888308b33336f9bea72147430da36b 26-Sep-2009 Chris Lattner <sabre@nondot.org> remove support for "NoSub" from regex. It seems like a minor optimization
and makes the API more annoying. Add a Regex::getNumMatches() method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
94638f0081b6ec8c7cc5ad9fec8ddbdd6824d90d 25-Sep-2009 Chris Lattner <sabre@nondot.org> reject attempts to use ()'s in patterns, these are reserved for filecheck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
5d6a05f4d4faea0c0c96fbf2bb57655df2839b34 25-Sep-2009 Chris Lattner <sabre@nondot.org> reimplement the regex matching strategy by building a single
regex and matching it instead of trying to match chunks at a time.
Matching chunks at a time broke with check lines like
CHECK: foo {{.*}}bar
because the .* would eat the entire rest of the line and bar would
never match.

Now we just escape the fixed strings for the user, so that something
like:
CHECK: a() {{.*}}???
is matched as:
CHECK: {{a\(\) .*\?\?\?}}
transparently "under the covers".



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
2702e6aa53f603b20c3e46364bc1756788bd291a 25-Sep-2009 Chris Lattner <sabre@nondot.org> special case Patterns that are a single fixed string. This is a microscopic
perf win and is needed for future changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
d9485ddfddc6c5342141703e39399850200bf746 25-Sep-2009 Chris Lattner <sabre@nondot.org> 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
/external/llvm/utils/FileCheck/FileCheck.cpp
bfa2eed139550dca127c7d0453ec9d6a29ec1461 25-Sep-2009 Chris Lattner <sabre@nondot.org> turn a std::pair into a real class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
528700863adefca8de461ce28a7d903729fb96b4 24-Sep-2009 Chris Lattner <sabre@nondot.org> add and document regex support for FileCheck. You can now do stuff like:

; CHECK: movl {{%e[a-z][xi]}}, %eax

or whatever.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
adea46ed617982ea07fc3266d52717496c0076ce 24-Sep-2009 Chris Lattner <sabre@nondot.org> Use CanonicalizeInputFile to canonicalize the entire buffer containing the
CHECK strings, instead of canonicalizing the patterns directly. This allows
Pattern to just contain a StringRef instead of std::string.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
a29703e8426763fa5232f9a91e6a5fce4d4244d6 24-Sep-2009 Chris Lattner <sabre@nondot.org> change 'not' matching to use Pattern, move pattern parsing logic into
the Pattern class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
9fc6678bea11f32acba4e9b6624ae9a0d3a9287b 24-Sep-2009 Chris Lattner <sabre@nondot.org> refactor out the match string into its own Pattern class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
81115765218f1c1505ab6faf843ee4baf292d45f 21-Sep-2009 Chris Lattner <sabre@nondot.org> fix a FileCheck bug where:

; CHECK: foo
; CHECK-NOT: foo
; CHECK: bar

would always fail.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
3711b7adccc766fdbafbc6b22c2bb6c45181a3b9 21-Sep-2009 Chris Lattner <sabre@nondot.org> rewrite CountNumNewlinesBetween to be in terms of StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
f15380ba8ae35941dcd56d9a288ad023295dde30 21-Sep-2009 Chris Lattner <sabre@nondot.org> implement and document support for CHECK-NOT


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
96077036f06478d96c123283a50cfba49858fd40 21-Sep-2009 Chris Lattner <sabre@nondot.org> rewrite FileCheck in terms of StringRef instead of manual pointer pairs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
0b2353f277f7a92b48af20f9804c6c35d96ecb75 16-Aug-2009 Chris Lattner <sabre@nondot.org> when emitting errors about CHECK-NEXT directives, show the line that the
CHECK-NEXT is on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
5dafafdeb4d89b37c6b7efbeabaa7d818c7023fe 15-Aug-2009 Chris Lattner <sabre@nondot.org> implement support for CHECK-NEXT: in filecheck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
d7e250527c38297c900db43a9e2f1e56b235b3cc 15-Aug-2009 Chris Lattner <sabre@nondot.org> simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79121 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
7bee3271e883acf2d07b48f3796a7cdc158112db 15-Aug-2009 Chris Lattner <sabre@nondot.org> rewrite FindStringInBuffer to use an explicit loop instead of
trying to wrap strstr which is just too inconvenient. Make it
use a StringRef to avoid ".c_str()" calls.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
207e1bcf897d1c732f717b9773029651ecc59ab2 15-Aug-2009 Chris Lattner <sabre@nondot.org> Instead of using an std::pair, use a custom struct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
6f69aa356136ada3d414d04cfab4341e87b63165 02-Aug-2009 Daniel Dunbar <daniel@zuster.org> Fix an ENABLE_EXPENSIVE_CHECKS error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
e9e2733a04875bfab6596e362b37acd031f99010 12-Jul-2009 Daniel Dunbar <daniel@zuster.org> Tweak comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
d7073db1af89c0340eb81740beb78875d3c4a2f8 11-Jul-2009 Chris Lattner <sabre@nondot.org> improve filecheck's "scanning from here" caret position.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
88a7e9ee8dd2f1d2f40cdb9c378f050e45161783 11-Jul-2009 Chris Lattner <sabre@nondot.org> make filecheck default to canonicalizing horizontal whitespace
away. This way you can write a space and it matches arbitrary spaces and tabs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
af9005ddda7809a4ca1900d83fb349d52ef50c48 09-Jul-2009 Chris Lattner <sabre@nondot.org> stop on the first file mismatch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp
81cb8caa3eb482d45e0fd54f8022384256619178 08-Jul-2009 Chris Lattner <sabre@nondot.org> Add a new little "FileCheck" utility for regression testing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/FileCheck/FileCheck.cpp