summaryrefslogtreecommitdiff
path: root/test/FileCheck
Commit message (Collapse)AuthorAge
* FileCheck: fix a bug with multiple --check-prefix options. Similar to r194565Daniel Sanders2013-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Directives are being ignored, when they occur between a partial-word false match and any match on another prefix. For example, with FOO and BAR prefixes: _FOO FOO: foo BAR: bar FileCheck incorrectly matches: fog bar This happens because FOO falsely matched as a partial word at '_FOO' and was ignored while BAR matched at 'BAR:'. The match of BAR is incorrectly returned as the 'first match' causing the FOO directive to be discarded. Fixed this the same way as r194565 (D2166) did for a similar test case. The partial-word false match should be counted as a match for the purposes of finding the first match of a prefix, but should be returned as a false match using CheckTy::CheckNone so that it isn't treated as a directive. Fixes PR17995 Reviewers: samsonov, arsenm Reviewed By: samsonov CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2228 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195248 91177308-0d34-0410-b5e6-96231b3b80d8
* FileCheck: fix matching of one check-prefix is a prefix of anotherAlexey Samsonov2013-11-13
| | | | | | | | | | | | | | | | | 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
* FileCheck: fix a bug with multiple --check-prefix options.Alexey Samsonov2013-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Allow multiple check prefixes in FileCheck.Matt Arsenault2013-11-10
| | | | | | | | 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
* Add FileCheck tests for @LINEMatt Arsenault2013-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193782 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix "existant" typosAlp Toker2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193579 91177308-0d34-0410-b5e6-96231b3b80d8
* Really fix CHECK-LABEL and CHECK-DAG interaction. This actually just ↵Stephen Lin2013-10-11
| | | | | | 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
* Fix handling of CHECK-DAG inside of CHECK-LABEL.Rafael Espindola2013-10-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192463 91177308-0d34-0410-b5e6-96231b3b80d8
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-16
| | | | | | | | | | | | | | | | | - Instead of setting the suffixes in a bunch of places, just set one master list in the top-level config. We now only modify the suffix list in a few suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py). - Aside from removing the need for a bunch of lit.local.cfg files, this enables 4 tests that were inadvertently being skipped (one in Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been XFAILED). - This commit also fixes a bunch of config files to use config.root instead of older copy-pasted code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188513 91177308-0d34-0410-b5e6-96231b3b80d8
* [FileCheck] Fix a bug that cause FileCheck to misidentify check-prefixRui Ueyama2013-08-12
| | | | | | | | | 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
* Fix handling of CHECK-DAG combined with CHECK-NOTTim Northover2013-08-02
| | | | | | Patch by Daniel Sanders. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187651 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new directive called CHECK-LABEL to FileCheck.Stephen Lin2013-07-12
| | | | | | | | | 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
* Prefix failing commands with not to make clear they are expected to fail.Rafael Espindola2013-07-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185554 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'CHECK-DAG' supportMichael Liao2013-05-14
| | | | | | | | 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
* Remove SMLoc paired with CHECK-NOT patterns. Not functionality change.Michael Liao2013-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Canonicalize line endings to Linux style also when the --strict-whitespace ↵Guy Benyei2013-02-06
| | | | | | 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
* Fix a bug in FileCheck that wouldn't let define variables as follows:Eli Bendersky2012-12-02
| | | | | | | | | | | | | | | ; 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
* Support referencing variables defined on the same line.Eli Bendersky2012-12-01
| | | | | | | | | 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
* Add a FileCheck test that makes sure two different CHECKs won't match theEli Bendersky2012-11-29
| | | | | | | same string git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168942 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some tests for the FileCheck utility.Eli Bendersky2012-11-15
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121112/156007.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168113 91177308-0d34-0410-b5e6-96231b3b80d8