Swift: add a comment about lifetime

This commit is contained in:
Alex Denisov
2022-05-13 15:08:58 +02:00
parent c92576690f
commit d7f4c6fb0b

View File

@@ -53,6 +53,7 @@ std::string inline getKindName<swift::TypeRepr, swift::TypeReprKind>(swift::Type
// node (AST nodes that are not types: declarations, statements, expressions, etc.).
class SwiftDispatcher {
public:
// sourceManager, arena, and trap are supposed to outlive the SwiftDispatcher
SwiftDispatcher(const swift::SourceManager& sourceManager, TrapArena& arena, TrapOutput& trap)
: sourceManager{sourceManager}, arena{arena}, trap{trap} {}