-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d5623a6
commit ec3e18d
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// RUN: strip-comments.sh %s | exfail filecheck %s --reject-empty-vars | filecheck %s --check-prefix DIAG | ||
|
||
test 123 | ||
// CHECK: test [[VAL:]] | ||
// CHECK-SAME: [[VAL]] | ||
|
||
// the warning printed: | ||
// DIAG: Warning: Empty pattern capture | ||
// DIAG-NEXT: Check rule at {{.*}}tests/filecheck/diagnostics/reject-empty-vars.test:4 | ||
// DIAG-NEXT: CHECK: test [[VAL:]] | ||
// the error printed: | ||
// DIAG-NEXT: tests/filecheck/diagnostics/reject-empty-vars.test:4: error: Empty value captured for variable "VAL" | ||
// DIAG-NEXT: Matching at <stdin>:1:6 | ||
// DIAG-NEXT: test 123 | ||
// DIAG-NEXT: {{ }}^ |