Skip to content

Commit f810362

Browse files
authored
Merge pull request #17566 from rjmccall/storage-impls
Generalize storage implementations to support generalized accessors
2 parents ff17676 + 9bee3ca commit f810362

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2718
-1866
lines changed

include/swift/AST/ASTWalker.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,16 @@ class ASTWalker {
201201
/// params in AbstractFunctionDecl and NominalTypeDecl.
202202
virtual bool shouldWalkIntoGenericParams() { return false; }
203203

204+
/// This method configures whether the walker should walk into the
205+
/// initializers of lazy variables. These initializers are semantically
206+
/// different from other initializers in their context and so sometimes
207+
/// should not be visited.
208+
///
209+
/// Note that visiting the body of the lazy getter will find a
210+
/// LazyInitializerExpr with the initializer as its sub-expression.
211+
/// However, ASTWalker does not walk into LazyInitializerExprs on its own.
212+
virtual bool shouldWalkIntoLazyInitializers() { return true; }
213+
204214
/// walkToParameterListPre - This method is called when first visiting a
205215
/// ParameterList, before walking into its parameters. If it returns false,
206216
/// the subtree is skipped.

0 commit comments

Comments
 (0)