Skip to content

Commit 3f8b7d0

Browse files
committed
Don't force attrs to be implicit
SILGenNameAttr, CDeclAttr, and SemanticsAttr all override whether the attribute is implicit, specifying that they are always implicit when using the shortened constructors. From what I can tell, these constructors are mostly used by the deserialization process. While it doesn't seem to have a huge effect on the final results, it's probably a good idea to honor what the serialized form uses.
1 parent 8cc0760 commit 3f8b7d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/swift/AST/Attr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ class SILGenNameAttr : public DeclAttribute {
487487
Name(Name) {}
488488

489489
SILGenNameAttr(StringRef Name, bool Implicit)
490-
: SILGenNameAttr(Name, SourceLoc(), SourceRange(), /*Implicit=*/true) {}
490+
: SILGenNameAttr(Name, SourceLoc(), SourceRange(), Implicit) {}
491491

492492
/// The symbol name.
493493
const StringRef Name;
@@ -505,7 +505,7 @@ class CDeclAttr : public DeclAttribute {
505505
Name(Name) {}
506506

507507
CDeclAttr(StringRef Name, bool Implicit)
508-
: CDeclAttr(Name, SourceLoc(), SourceRange(), /*Implicit=*/true) {}
508+
: CDeclAttr(Name, SourceLoc(), SourceRange(), Implicit) {}
509509

510510
/// The symbol name.
511511
const StringRef Name;
@@ -524,7 +524,7 @@ class SemanticsAttr : public DeclAttribute {
524524
Value(Value) {}
525525

526526
SemanticsAttr(StringRef Value, bool Implicit)
527-
: SemanticsAttr(Value, SourceLoc(), SourceRange(), /*Implicit=*/true) {}
527+
: SemanticsAttr(Value, SourceLoc(), SourceRange(), Implicit) {}
528528

529529
/// The semantics tag value.
530530
const StringRef Value;

0 commit comments

Comments
 (0)