Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
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
- Loading branch information
Showing
with
368 additions
and 15 deletions.
- +1 −0 include/swift/AST/Attr.h
- +56 −0 include/swift/AST/Decl.h
- +1 −0 include/swift/AST/DeclNodes.def
- +11 −0 include/swift/AST/DiagnosticsParse.def
- +3 −0 include/swift/AST/DiagnosticsSema.def
- +4 −4 include/swift/AST/Stmt.h
- +5 −0 include/swift/AST/TypeMemberVisitor.h
- +3 −0 include/swift/Parse/Parser.h
- +4 −0 include/swift/SIL/SILWitnessVisitor.h
- +2 −0 include/swift/Syntax/TokenKinds.def
- +10 −0 lib/AST/ASTDumper.cpp
- +11 −0 lib/AST/ASTPrinter.cpp
- +1 −0 lib/AST/ASTScope.cpp
- +7 −1 lib/AST/ASTWalker.cpp
- +5 −0 lib/AST/Decl.cpp
- +2 −1 lib/AST/Stmt.cpp
- +2 −0 lib/FrontendTool/ReferenceDependencies.cpp
- +1 −0 lib/IDE/CodeCompletion.cpp
- +3 −1 lib/IRGen/GenDecl.cpp
- +1 −0 lib/Index/IndexSymbol.cpp
- +99 −0 lib/Parse/ParseDecl.cpp
- +18 −4 lib/Parse/ParseStmt.cpp
- +4 −0 lib/SILGen/SILGen.cpp
- +1 −0 lib/SILGen/SILGen.h
- +1 −0 lib/SILGen/SILGenDecl.cpp
- +12 −0 lib/Sema/TypeCheckDecl.cpp
- +7 −0 lib/Sema/TypeCheckStmt.cpp
- +4 −0 lib/Serialization/Serialization.cpp
- +63 −0 test/Sema/pound_diagnostics.swift
- +4 −1 test/Syntax/Outputs/round_trip_parse_gen.swift.withkinds
- +3 −0 test/Syntax/round_trip_parse_gen.swift
- +16 −0 utils/gyb_syntax_support/DeclNodes.py
- +1 −1 utils/swift-mode.el
- +2 −2 utils/vim/syntax/swift.vim
Oops, something went wrong.