Skip to content

Commit f8fb6ac

Browse files
authored
Merge pull request #13208 from dcci/const-cast
[SourceKit] Make explicitly we're casting away a qualifier.
2 parents 67e5cd0 + cd80f83 commit f8fb6ac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/SourceKit/lib/SwiftLang/SwiftDocSupport.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,10 @@ static bool initDocEntityInfo(const Decl *D, const Decl *SynthesizedTarget,
391391
if (auto *VD = dyn_cast<ValueDecl>(D)) {
392392
llvm::raw_svector_ostream OS(Info.FullyAnnotatedDecl);
393393
if (SynthesizedTarget)
394-
SwiftLangSupport::printFullyAnnotatedSynthesizedDeclaration(VD,
395-
(NominalTypeDecl*)SynthesizedTarget, OS);
394+
SwiftLangSupport::printFullyAnnotatedSynthesizedDeclaration(
395+
VD, const_cast<NominalTypeDecl *>(
396+
static_cast<const NominalTypeDecl *>(SynthesizedTarget)),
397+
OS);
396398
else
397399
SwiftLangSupport::printFullyAnnotatedDeclaration(VD, Type(), OS);
398400
}

0 commit comments

Comments
 (0)