diff options
| author | Thomas Preud'homme <thomasp@graphcore.ai> | 2019-06-19 23:47:10 +0000 |
|---|---|---|
| committer | Thomas Preud'homme <thomasp@graphcore.ai> | 2019-06-19 23:47:10 +0000 |
| commit | baae41ff76f662987f31447686ba819dcd748b3f (patch) | |
| tree | 1747d97ac5922f518788a39ff57b7c87d9de0670 /llvm/test | |
| parent | e24b34e9c9b97bd881e697941406e866e7809284 (diff) | |
| download | bcm5719-llvm-baae41ff76f662987f31447686ba819dcd748b3f.tar.gz bcm5719-llvm-baae41ff76f662987f31447686ba819dcd748b3f.zip | |
FileCheck: Return parse error w/ Error & Expected
Summary:
Make use of Error and Expected to bubble up diagnostics and force
checking of errors in the callers.
Reviewers: jhenderson, jdenny, probinson, arichardson
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63125
llvm-svn: 363900
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/FileCheck/numeric-expression.txt | 12 | ||||
| -rw-r--r-- | llvm/test/FileCheck/string-defines-diagnostics.txt | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/llvm/test/FileCheck/numeric-expression.txt b/llvm/test/FileCheck/numeric-expression.txt index 42ca7be692a..91cb4b242f1 100644 --- a/llvm/test/FileCheck/numeric-expression.txt +++ b/llvm/test/FileCheck/numeric-expression.txt @@ -128,3 +128,15 @@ INPUT-NUM-CONFLICT-NEXT: {{^ \^$}} CLI-NUM-CONFLICT: Global defines:2:20: error: string variable with name 'STRVAR' already exists CLI-NUM-CONFLICT-NEXT: Global define #2: #STRVAR=42 CLI-NUM-CONFLICT-NEXT: {{^ \^$}} + +; Numeric variable definition with too big value. +RUN: not FileCheck --check-prefix BIGVAL --input-file %s %s 2>&1 \ +RUN: | FileCheck --strict-whitespace --check-prefix BIGVAL-MSG %s + +BIG VALUE +NUMVAR: 10000000000000000000000 +BIGVAL-LABEL: BIG VALUE +BIGVAL-NEXT: NUMVAR: [[#NUMVAR:]] +BIGVAL-MSG: numeric-expression.txt:[[#@LINE-3]]:9: error: Unable to represent numeric value +BIGVAL-MSG-NEXT: {{N}}UMVAR: 10000000000000000000000 +BIGVAL-MSG-NEXT: {{^ \^$}} diff --git a/llvm/test/FileCheck/string-defines-diagnostics.txt b/llvm/test/FileCheck/string-defines-diagnostics.txt index 76b3af89f57..60adff47e1d 100644 --- a/llvm/test/FileCheck/string-defines-diagnostics.txt +++ b/llvm/test/FileCheck/string-defines-diagnostics.txt @@ -28,7 +28,7 @@ ERRCLIVAR2: Missing variable name in command-line definition '-D=' RUN: not FileCheck -D10VALUE=10 --input-file %s %s 2>&1 \ RUN: | FileCheck %s --strict-whitespace --check-prefix ERRCLIFMT -ERRCLIFMT: Global defines:1:19: error: invalid name in string variable definition '10VALUE' +ERRCLIFMT: Global defines:1:19: error: invalid variable name ERRCLIFMT-NEXT: Global define #1: 10VALUE=10 ERRCLIFMT-NEXT: {{^ \^$}} |

