Skip to content

Commit cd80f83

Browse files
committed
[SourceKit] Make explicitly we're casting away a qualifier.
This fixes a clang warning introduced with this code. NFCI.
1 parent 9cd54c4 commit cd80f83

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)