These codepaths would generate warnings with GCC on linux even though the switch
was covered. Add llvm_unreachable markers to indicate that the switch should be
covered. NFC.
llvm-svn: 260865
case SymbolKind::CXXTypeAlias: return "type-alias";
case SymbolKind::CXXInterface: return "c++-__interface";
}
+ llvm_unreachable("invalid symbol kind");
}
StringRef index::getTemplateKindStr(SymbolCXXTemplateKind TK) {
case SymbolCXXTemplateKind::TemplatePartialSpecialization : return "TPS";
case SymbolCXXTemplateKind::TemplateSpecialization: return "TS";
}
+ llvm_unreachable("invalid template kind");
}
StringRef index::getSymbolLanguageString(SymbolLanguage K) {
case SymbolLanguage::ObjC: return "ObjC";
case SymbolLanguage::CXX: return "C++";
}
+ llvm_unreachable("invalid symbol language kind");
}
case TSK_ExplicitInstantiationDefinition:
return true;
}
+ llvm_unreachable("invalid TemplateSpecializationKind");
}
bool IndexingContext::shouldIgnoreIfImplicit(const Decl *D) {
case SymbolKind::CXXTypeAlias: return CXIdxEntity_CXXTypeAlias;
case SymbolKind::CXXInterface: return CXIdxEntity_CXXInterface;
}
+ llvm_unreachable("invalid symbol kind");
}
static CXIdxEntityCXXTemplateKind
case SymbolCXXTemplateKind::TemplateSpecialization:
return CXIdxEntity_TemplateSpecialization;
}
+ llvm_unreachable("invalid template kind");
}
static CXIdxEntityLanguage getEntityLangFromSymbolLang(SymbolLanguage L) {
case SymbolLanguage::ObjC: return CXIdxEntityLang_ObjC;
case SymbolLanguage::CXX: return CXIdxEntityLang_CXX;
}
+ llvm_unreachable("invalid symbol language");
}