Fix warnings introduced by r307434.

llvm-svn: 307455
This commit is contained in:
Richard Smith 2017-07-08 00:37:59 +00:00
parent f62080451c
commit af10ea2055
2 changed files with 5 additions and 1 deletions

View File

@ -7086,8 +7086,10 @@ CXLinkageKind clang_getCursorLinkage(CXCursor cursor) {
switch (ND->getLinkageInternal()) {
case NoLinkage:
case VisibleNoLinkage: return CXLinkage_NoLinkage;
case ModuleInternalLinkage:
case InternalLinkage: return CXLinkage_Internal;
case UniqueExternalLinkage: return CXLinkage_UniqueExternal;
case ModuleLinkage:
case ExternalLinkage: return CXLinkage_External;
};

View File

@ -423,11 +423,13 @@ bool CXIndexDataConsumer::isFunctionLocalDecl(const Decl *D) {
if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
switch (ND->getFormalLinkage()) {
case NoLinkage:
case VisibleNoLinkage:
case InternalLinkage:
return true;
case VisibleNoLinkage:
case ModuleInternalLinkage:
case UniqueExternalLinkage:
llvm_unreachable("Not a sema linkage");
case ModuleLinkage:
case ExternalLinkage:
return false;
}