swift
fa1558a1 - [frontend] Add an option called -verify-additional-prefix to add additional check prefixes to the DiagnosticVerifier.

Commit
2 years ago
[frontend] Add an option called -verify-additional-prefix to add additional check prefixes to the DiagnosticVerifier. This enables one to use varying prefixes when checking diagnostics with the DiagnosticVerifier. So for instance, I can make a test work both with and without send-non-sendable enabled by adding additional prefixes. As an example: ```swift // RUN: %target-swift-frontend ... -verify-additional-prefix no-sns- // RUN: %target-swift-frontend ... -verify-additional-prefix sns- let x = ... // expected-error {{This is always checked no matter what prefixes I added}} let y = ... // expected-no-sns-error {{This is only checked if send non sendable is disabled}} let z = ... // expected-sns-error {{This is only checked if send non sendable is enabled}} let w = ... // expected-no-sns-error {{This is checked for a specific error when sns is disabled...}} // expected-sns-error @-1 {{and for a different error when sns is enabled}} ``` rdar://114643840
Author
Committer
Parents
Loading