mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #14950 from Nonchalant/sr_7040_redundant_D
[SR-7040] Redundant prefix of compilation flag specific error
This commit is contained in:
@@ -192,6 +192,9 @@ static void validateArgs(DiagnosticEngine &diags, const ArgList &Args) {
|
||||
diags.diagnose(SourceLoc(),
|
||||
diag::cannot_assign_value_to_conditional_compilation_flag,
|
||||
name);
|
||||
else if (name.startswith("-D"))
|
||||
diags.diagnose(SourceLoc(), diag::redundant_prefix_compilation_flag,
|
||||
name);
|
||||
else if (!Lexer::isIdentifier(name))
|
||||
diags.diagnose(SourceLoc(), diag::invalid_conditional_compilation_flag,
|
||||
name);
|
||||
|
||||
Reference in New Issue
Block a user