getInterfaceType() always returns a type

This commit is contained in:
Hamish Knight
2019-11-12 07:23:12 -08:00
parent 4d923ad585
commit ed77b86c24
10 changed files with 46 additions and 75 deletions

View File

@@ -778,12 +778,11 @@ static bool passCursorInfoForDecl(SourceFile* SF,
unsigned USREnd = SS.size();
unsigned TypenameBegin = SS.size();
if (auto vdType = VD->getInterfaceType()) {
llvm::raw_svector_ostream OS(SS);
PrintOptions Options;
Options.PrintTypeAliasUnderlyingType = true;
vdType.print(OS, Options);
}
llvm::raw_svector_ostream OS(SS);
PrintOptions Options;
Options.PrintTypeAliasUnderlyingType = true;
VD->getInterfaceType().print(OS, Options);
unsigned TypenameEnd = SS.size();
unsigned MangledTypeStart = SS.size();