[SourceKit] Make explicitly we're casting away a qualifier.

This fixes a clang warning introduced with this code. NFCI.
This commit is contained in:
Davide Italiano
2017-12-01 13:19:45 -08:00
parent 9cd54c45f6
commit cd80f8369a

View File

@@ -391,8 +391,10 @@ static bool initDocEntityInfo(const Decl *D, const Decl *SynthesizedTarget,
if (auto *VD = dyn_cast<ValueDecl>(D)) {
llvm::raw_svector_ostream OS(Info.FullyAnnotatedDecl);
if (SynthesizedTarget)
SwiftLangSupport::printFullyAnnotatedSynthesizedDeclaration(VD,
(NominalTypeDecl*)SynthesizedTarget, OS);
SwiftLangSupport::printFullyAnnotatedSynthesizedDeclaration(
VD, const_cast<NominalTypeDecl *>(
static_cast<const NominalTypeDecl *>(SynthesizedTarget)),
OS);
else
SwiftLangSupport::printFullyAnnotatedDeclaration(VD, Type(), OS);
}