summaryrefslogtreecommitdiffstats
path: root/llvm/test/FileCheck/numeric-defines-diagnostics.txt
Commit message (Collapse)AuthorAgeFilesLines
* [FileCheck] Make FILECHECK_OPTS useful for its test suiteJoel E. Denny2019-11-211-0/+3
| | | | | | | | | | | | | | | | | | | | Without this patch, `FILECHECK_OPTS` isn't propagated to FileCheck's test suite so that `FILECHECK_OPTS` doesn't inadvertently affect test results by affecting the output of FileCheck calls under test. As a result, `FILECHECK_OPTS` is useless for debugging FileCheck's test suite. In `llvm/test/FileCheck/lit.local.cfg`, this patch provides a new subsitution, `%ProtectFileCheckOutput`, to address this problem for both `FILECHECK_OPTS` and the deprecated `FILECHECK_DUMP_INPUT_ON_FAILURE`. The rest of the patch uses `%ProtectFileCheckOutput` throughout the test suite Fixes PR40284. Reviewed By: probinson, thopre Differential Revision: https://reviews.llvm.org/D65121
* [FileCheck]] Canonicalize caret location testingThomas Preud'homme2019-07-241-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Testing of caret location in diagnostic message is currently made with CHECK directive with the following general format: CHECK: {{^ \^$}} James Henderson suggested the following would be more readable: CHECK: {{^}} ^{{$}} and when whole lines can be matched (as is the case for command-line testing where error messages do not include path): CHECK: ^ using the option --match-full-lines. This commit implements these 2 changes on all existing caret position tests. It also aligns the caret to the character it is trying to match in the above line. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64923 > llvm-svn: 366861 llvm-svn: 366898
* FileCheck [8/12]: Define numeric var from exprThomas Preud'homme2019-07-241-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is part of a patch series to add support for FileCheck numeric expressions. This specific patch lift the restriction for a numeric expression to either be a variable definition or a numeric expression to try to match. This commit allows a numeric variable to be set to the result of the evaluation of a numeric expression after it has been matched successfully. When it happens, the variable is allowed to be used on the same line since its value is known at match time. It also makes use of this possibility to reuse the parsing code to parse a command-line definition by crafting a mirror string of the -D option with the equal sign replaced by a colon sign, e.g. for option '-D#NUMVAL=10' it creates the string '-D#NUMVAL=10 (parsed as [[#NUMVAL:10]])' where the numeric expression is parsed to define NUMVAL. This result in a few tests needing updating for the location diagnostics on top of the tests for the new feature. It also enables empty numeric expression which match any number without defining a variable. This is done here rather than in commit #5 of the patch series because it requires to dissociate automatic regex insertion in RegExStr from variable definition which would make commit #5 even bigger than it already is. Copyright: - Linaro (changes up to diff 183612 of revision D55940) - GraphCore (changes in later versions of revision D55940 and in new revision created off D55940) Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60388 > llvm-svn: 366860 llvm-svn: 366897
* Revert "FileCheck [8/12]: Define numeric var from expr"Thomas Preud'homme2019-07-241-9/+17
| | | | | | This reverts commit 1b05977538d9487aa845ee2f3bec8b89c63c4f29. llvm-svn: 366872
* Revert "[FileCheck]] Canonicalize caret location testing"Thomas Preud'homme2019-07-241-12/+12
| | | | | | This reverts commit ba4e8d791342219c072a5c8de8a3f41fbb53c6be. llvm-svn: 366871
* [FileCheck]] Canonicalize caret location testingThomas Preud'homme2019-07-231-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Testing of caret location in diagnostic message is currently made with CHECK directive with the following general format: CHECK: {{^ \^$}} James Henderson suggested the following would be more readable: CHECK: {{^}} ^{{$}} and when whole lines can be matched (as is the case for command-line testing where error messages do not include path): CHECK: ^ using the option --match-full-lines. This commit implements these 2 changes on all existing caret position tests. It also aligns the caret to the character it is trying to match in the above line. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64923 llvm-svn: 366861
* FileCheck [8/12]: Define numeric var from exprThomas Preud'homme2019-07-231-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is part of a patch series to add support for FileCheck numeric expressions. This specific patch lift the restriction for a numeric expression to either be a variable definition or a numeric expression to try to match. This commit allows a numeric variable to be set to the result of the evaluation of a numeric expression after it has been matched successfully. When it happens, the variable is allowed to be used on the same line since its value is known at match time. It also makes use of this possibility to reuse the parsing code to parse a command-line definition by crafting a mirror string of the -D option with the equal sign replaced by a colon sign, e.g. for option '-D#NUMVAL=10' it creates the string '-D#NUMVAL=10 (parsed as [[#NUMVAL:10]])' where the numeric expression is parsed to define NUMVAL. This result in a few tests needing updating for the location diagnostics on top of the tests for the new feature. It also enables empty numeric expression which match any number without defining a variable. This is done here rather than in commit #5 of the patch series because it requires to dissociate automatic regex insertion in RegExStr from variable definition which would make commit #5 even bigger than it already is. Copyright: - Linaro (changes up to diff 183612 of revision D55940) - GraphCore (changes in later versions of revision D55940 and in new revision created off D55940) Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60388 llvm-svn: 366860
* [FileCheck] Factor some parsing checks outThomas Preud'homme2019-07-051-2/+2
| | | | | | | | | | | | | | | | | Summary: Both callers of parseNumericVariableDefinition() perform the same extra check that no character is found after the variable name. This patch factors out this check into parseNumericVariableDefinition(). Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64226 llvm-svn: 365191
* FileCheck [6/12]: Introduce numeric variable definitionThomas Preud'homme2019-06-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is part of a patch series to add support for FileCheck numeric expressions. This specific patch introduces support for defining numeric variable in a CHECK directive. This commit introduces support for defining numeric variable from a litteral value in the input text. Numeric expressions can then use the variable provided it is on a later line. Copyright: - Linaro (changes up to diff 183612 of revision D55940) - GraphCore (changes in later versions of revision D55940 and in new revision created off D55940) Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60386 llvm-svn: 362705
* Reinstate "FileCheck [5/12]: Introduce regular numeric variables"Thomas Preud'homme2019-05-141-0/+33
| | | | | | | | | | | | | | | | | | | | | | | This reinstates r360578 (git e47362c1ec1ea31b626336cc05822035601c3e57), reverted in r360653 (git 004393681c25e34e921adccc69ae6378090dee54), with a fix for the list added in FileCheck.rst to build without error. Copyright: - Linaro (changes up to diff 183612 of revision D55940) - GraphCore (changes in later versions of revision D55940 and in new revision created off D55940) Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60385 llvm-svn: 360665
* Revert "FileCheck [5/12]: Introduce regular numeric variables"Thomas Preud'homme2019-05-141-33/+0
| | | | | | | | This reverts r360578 (git e47362c1ec1ea31b626336cc05822035601c3e57) to solve the sphinx build failure on http://lab.llvm.org:8011/builders/llvm-sphinx-docs buildbot. llvm-svn: 360653
* FileCheck [5/12]: Introduce regular numeric variablesThomas Preud'homme2019-05-131-0/+33
Summary: This patch is part of a patch series to add support for FileCheck numeric expressions. This specific patch introduces regular numeric variables which can be set on the command-line. This commit introduces regular numeric variable that can be set on the command-line with the -D option to a numeric value. They can then be used in CHECK patterns in numeric expression with the same shape as @LINE numeric expression, ie. VAR, VAR+offset or VAR-offset where offset is an integer literal. The commit also enable strict whitespace in the verbose.txt testcase to check that the position or the location diagnostics. It fixes one of the existing CHECK in the process which was not accurately testing a location diagnostic (ie. the diagnostic was correct, not the CHECK). Copyright: - Linaro (changes up to diff 183612 of revision D55940) - GraphCore (changes in later versions of revision D55940 and in new revision created off D55940) Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60385 llvm-svn: 360578
OpenPOWER on IntegriCloud