зеркало из https://github.com/github/codeql.git
Swift: add comments about SwiftDispatcher lifetime
This commit is contained in:
Родитель
acbe9ff9f9
Коммит
f857cd11c4
|
@ -7,6 +7,7 @@ namespace codeql {
|
|||
|
||||
class DeclVisitor : public swift::DeclVisitor<DeclVisitor> {
|
||||
public:
|
||||
// SwiftDispatcher should outlive the DeclVisitor
|
||||
DeclVisitor(SwiftDispatcher& dispatcher) : dispatcher(dispatcher) {}
|
||||
|
||||
template <typename E>
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace codeql {
|
|||
|
||||
class ExprVisitor : public swift::ExprVisitor<ExprVisitor> {
|
||||
public:
|
||||
// SwiftDispatcher should outlive the ExprVisitor
|
||||
ExprVisitor(SwiftDispatcher& dispatcher) : dispatcher(dispatcher) {}
|
||||
|
||||
template <typename E>
|
||||
|
|
|
@ -20,6 +20,7 @@ class PatchedPatternVisitor : public swift::PatternVisitor<ImplClass, PatternRet
|
|||
|
||||
class PatternVisitor : public PatchedPatternVisitor<PatternVisitor> {
|
||||
public:
|
||||
// SwiftDispatcher should outlive the PatternVisitor
|
||||
PatternVisitor(SwiftDispatcher& dispatcher) : dispatcher(dispatcher) {}
|
||||
|
||||
template <typename E>
|
||||
|
|
|
@ -21,6 +21,7 @@ class PatchedStmtVisitor : public swift::StmtVisitor<ImplClass, StmtRetTy, Args.
|
|||
|
||||
class StmtVisitor : public PatchedStmtVisitor<StmtVisitor> {
|
||||
public:
|
||||
// SwiftDispatcher should outlive the StmtVisitor
|
||||
StmtVisitor(SwiftDispatcher& dispatcher) : dispatcher(dispatcher) {}
|
||||
|
||||
template <typename E>
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace codeql {
|
|||
|
||||
class TypeVisitor : public swift::TypeVisitor<TypeVisitor> {
|
||||
public:
|
||||
// SwiftDispatcher should outlive the TypeVisitor
|
||||
TypeVisitor(SwiftDispatcher& dispatcher) : dispatcher(dispatcher) {}
|
||||
|
||||
template <typename E>
|
||||
|
|
Загрузка…
Ссылка в новой задаче