@@ -415,14 +415,13 @@ static void printAnnotatedDeclaration(const ValueDecl *VD,
415
415
while (VD->isImplicit () && VD->getOverriddenDecl ())
416
416
VD = VD->getOverriddenDecl ();
417
417
418
- // If this is a property wrapper backing property (_foo) or projected value
419
- // ($foo) and the wrapped property is not implicit, still print it.
420
- if (auto *VarD = dyn_cast<VarDecl>(VD)) {
421
- if (auto *Wrapped = VarD->getOriginalWrappedProperty ()) {
422
- if (!Wrapped->isImplicit ())
423
- PO.TreatAsExplicitDeclList .push_back (VD);
424
- }
425
- }
418
+ // VD may be a compiler synthesized member, constructor, or shorthand argument
419
+ // so always print it even if it's implicit.
420
+ //
421
+ // FIXME: Update PrintOptions::printQuickHelpDeclaration to print implicit
422
+ // decls by default. That causes issues due to newlines being printed before
423
+ // implicit OpaqueTypeDecls at time of writing.
424
+ PO.TreatAsExplicitDeclList .push_back (VD);
426
425
427
426
// Wrap this up in XML, as that's what we'll use for documentation comments.
428
427
OS<<" <Declaration>" ;
@@ -446,14 +445,14 @@ void SwiftLangSupport::printFullyAnnotatedDeclaration(const ValueDecl *VD,
446
445
while (VD->isImplicit () && VD->getOverriddenDecl ())
447
446
VD = VD->getOverriddenDecl ();
448
447
449
- // If this is a property wrapper backing property (_foo) or projected value
450
- // ($foo) and the wrapped property is not implicit, still print it .
451
- if ( auto *VarD = dyn_cast<VarDecl>(VD)) {
452
- if ( auto *Wrapped = VarD-> getOriginalWrappedProperty ()) {
453
- if (!Wrapped-> isImplicit ())
454
- PO. TreatAsExplicitDeclList . push_back (VD);
455
- }
456
- }
448
+ // VD may be a compiler synthesized member, constructor, or shorthand argument
449
+ // so always print it even if it's implicit.
450
+ //
451
+ // FIXME: Update PrintOptions::printQuickHelpDeclaration to print implicit
452
+ // decls by default. That causes issues due to newlines being printed before
453
+ // implicit OpaqueTypeDecls at time of writing.
454
+ PO. TreatAsExplicitDeclList . push_back (VD);
455
+
457
456
VD->print (Printer, PO);
458
457
}
459
458
0 commit comments