From: David Majnemer Date: Tue, 29 Dec 2015 22:02:10 +0000 (+0000) Subject: [MS ABI] Mark an unreachable path appropriately X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1b172487b43bfe3c9207e63e02fbe290be2aa94;p=clang [MS ABI] Mark an unreachable path appropriately No functional change is intended, just a small cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256582 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp index 1f3ba15a5b..4b15365c76 100644 --- a/lib/AST/MicrosoftMangle.cpp +++ b/lib/AST/MicrosoftMangle.cpp @@ -395,14 +395,8 @@ void MicrosoftCXXNameMangler::mangle(const NamedDecl *D, StringRef Prefix) { mangleFunctionEncoding(FD, Context.shouldMangleDeclName(FD)); else if (const VarDecl *VD = dyn_cast(D)) mangleVariableEncoding(VD); - else { - // TODO: Fields? Can MSVC even mangle them? - // Issue a diagnostic for now. - DiagnosticsEngine &Diags = Context.getDiags(); - unsigned DiagID = Diags.getCustomDiagID( - DiagnosticsEngine::Error, "cannot mangle this declaration yet"); - Diags.Report(D->getLocation(), DiagID) << D->getSourceRange(); - } + else + llvm_unreachable("Tried to mangle unexpected NamedDecl!"); } void MicrosoftCXXNameMangler::mangleFunctionEncoding(const FunctionDecl *FD,