Skip to content

Commit 90a3beb

Browse files
committed
Test for diagnostic using FileCheck
1 parent 5f24643 commit 90a3beb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:0:1 %s -o -
2-
// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:1:0 %s -o -
3-
41
// Related to #139375
52
// Clang uses 1-based indexing for source locations given from the command-line.
6-
// Verify Clang doesn’t crash when 0 is given as line or column number.
3+
// Verify that Clang rejects 0 as an invalid value for line or column number.
4+
5+
// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:0:1 %s -o - 2>&1 \
6+
// RUN: | FileCheck -check-prefix=CHECK-DIAG %s
7+
// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:1:0 %s -o - 2>&1 \
8+
// RUN: | FileCheck -check-prefix=CHECK-DIAG %s
9+
10+
// CHECK-DIAG: error: invalid value '{{.*}}' in '-code-completion-at={{.*}}'

0 commit comments

Comments
 (0)