brintos

brintos / llvm-project-archived public Read only

0
0
Text · 657 B · a428c15 Raw
12 lines · cpp
1// Regression test for #1393752// Clang uses 1-based indexing for source locations given from the command-line.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 %s7// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:1:0 %s -o - 2>&1 \8// RUN:     | FileCheck -check-prefix=CHECK-DIAG %s9 10// CHECK-DIAG: error: invalid value '{{.*}}' in '-code-completion-at={{.*}}'11// CHECK-NEXT: hint: -code-completion-at=<file>:<line>:<column> requires <line> and <column> to be integers greater than zero12