mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Vend the localization key found in documentation comments
If a documentation comment has a - LocalizationKey: field, strip it out of the documentation body and report it in cursor/doc info with the key "key.localization_key". rdar://problem/30383329
This commit is contained in:
@@ -378,6 +378,9 @@ static bool initDocEntityInfo(const Decl *D, const Decl *SynthesizedTarget,
|
||||
|
||||
initDocGenericParams(D, Info);
|
||||
|
||||
llvm::raw_svector_ostream LocalizationKeyOS(Info.LocalizationKey);
|
||||
ide::getLocalizationKey(D, LocalizationKeyOS);
|
||||
|
||||
if (auto *VD = dyn_cast<ValueDecl>(D)) {
|
||||
llvm::raw_svector_ostream OS(Info.FullyAnnotatedDecl);
|
||||
if (SynthesizedTarget)
|
||||
|
||||
Reference in New Issue
Block a user