Skip to content

use relative lines in completion tests #59553

@sam-mccall

Description

@sam-mccall

tests under clang/test/CodeComplete are hard to maintain because they contain -code-complete-at=%s:123:45 everywhere, and inserting/deleting text requires rewriting all the line numbers.
Probably other clang tests have this problem, but these are the worst.

Lit supports %(line) and FileCheck supports [[@LINE]] (and also {{.*}} where appropriate) to deal with this. %(line) was added in 2012 and never used - I wonder whether this is related to Google's downstream testrunner not supporting it :-)

plan:

  • add %(line) support to the private downstream testrunner
  • add a script to apply these replacements based on regex search
  • apply the script to the CodeComplete tests

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"test-suite

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions