Skip to content

[SR-11320] Verify diagnostics mode should allow you to specify the column of a diagnostic #53721

@beccadax

Description

@beccadax
Previous ID SR-11320
Radar None
Original Reporter @beccadax
Type New Feature
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels New Feature
Assignee owenvoorhees (JIRA)
Priority Medium

md5: 02d1ee561742a233d1d549d810aa4043

Issue Description:

An expected-error, expected-warning, or expected-info comment should be able to specify a column number, perhaps using a syntax like:

// expected-error@:42 {{diagnostic message here}}

See e.g. #26544 for an example of a situation where this would be useful.

The compiler's -verify mode is implemented in lib/Frontend/DiagnosticVerifier.cpp. You'll need to parse the new information, store it, and later check it if it's been set. Make sure this feature is optional—we have a lot of tests already that don't use this, and we don't want to update all of them!

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrontendArea → compiler: FrontendcompilerThe Swift compiler itselfdiagnostic verifierArea → compiler → Frontend: The `DiagnosticVerifier` classfeatureA feature request or implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions