mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #80074 from dylansturg/objc_enum_refs
The Error enum synthesized declarations, e.g. the struct and its static accessors, should generally appear to be identical to the underlying Clang definitions. There are some specific use cases where the synthesized declarations are necessary though. I've added an option for USR generation to override the Clang node and emit the USR of the synthesized Swift declaration. This is used by SwiftDocSupport so that the USRs of the synthesized declarations are emitted. Fixes 79912
This commit is contained in:
@@ -898,8 +898,9 @@ bool SwiftLangSupport::printDisplayName(const swift::ValueDecl *D,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SwiftLangSupport::printUSR(const ValueDecl *D, llvm::raw_ostream &OS) {
|
||||
return ide::printValueDeclUSR(D, OS);
|
||||
bool SwiftLangSupport::printUSR(const ValueDecl *D, llvm::raw_ostream &OS,
|
||||
bool distinguishSynthesizedDecls) {
|
||||
return ide::printValueDeclUSR(D, OS, distinguishSynthesizedDecls);
|
||||
}
|
||||
|
||||
bool SwiftLangSupport::printDeclTypeUSR(const ValueDecl *D, llvm::raw_ostream &OS) {
|
||||
|
||||
Reference in New Issue
Block a user