mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Implement #warning and #error (#14048)
* Implement #warning and #error * Fix #warning/#error in switch statements * Fix AST printing for #warning/#error * Add to test case * Add extra handling to ParseDeclPoundDiagnostic * fix dumping * Consume the right paren even in the failure case * Diagnose extra tokens on the same line after a diagnostic directive
This commit is contained in:
@@ -69,6 +69,7 @@ static bool declIsPrivate(const Decl *member) {
|
||||
case DeclKind::EnumCase:
|
||||
case DeclKind::TopLevelCode:
|
||||
case DeclKind::IfConfig:
|
||||
case DeclKind::PoundDiagnostic:
|
||||
return true;
|
||||
|
||||
case DeclKind::Extension:
|
||||
@@ -240,6 +241,7 @@ bool swift::emitReferenceDependencies(DiagnosticEngine &diags,
|
||||
case DeclKind::PatternBinding:
|
||||
case DeclKind::TopLevelCode:
|
||||
case DeclKind::IfConfig:
|
||||
case DeclKind::PoundDiagnostic:
|
||||
// No action necessary.
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user