Skip to content

[AST] NFC: Add doc comment for isSynthesized #77524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions include/swift/AST/Decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2848,6 +2848,15 @@ class ValueDecl : public Decl {
return Bits.ValueDecl.IsUserAccessible;
}

/// Whether this decl has been synthesized by the compiler for use by the
/// user.
///
/// This is a refinement of isImplicit; all synthesized decls are implicit,
/// but not all implicit decls are synthesized. The difference comes down to
/// whether or not the decl is user-facing, e.g the implicit memberwise
/// initializer is considered synthesized. Decls that are only meant for the
/// compiler, e.g the implicit FuncDecl for a DeferStmt, are not considered
/// synthesized.
bool isSynthesized() const {
return Bits.ValueDecl.Synthesized;
}
Expand Down