Skip to content

Commit 53b60a1

Browse files
committed
[MS ABI] Mark an unreachable path appropriately
No functional change is intended, just a small cleanup. llvm-svn: 256582
1 parent d1d9db5 commit 53b60a1

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

clang/lib/AST/MicrosoftMangle.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -395,14 +395,8 @@ void MicrosoftCXXNameMangler::mangle(const NamedDecl *D, StringRef Prefix) {
395395
mangleFunctionEncoding(FD, Context.shouldMangleDeclName(FD));
396396
else if (const VarDecl *VD = dyn_cast<VarDecl>(D))
397397
mangleVariableEncoding(VD);
398-
else {
399-
// TODO: Fields? Can MSVC even mangle them?
400-
// Issue a diagnostic for now.
401-
DiagnosticsEngine &Diags = Context.getDiags();
402-
unsigned DiagID = Diags.getCustomDiagID(
403-
DiagnosticsEngine::Error, "cannot mangle this declaration yet");
404-
Diags.Report(D->getLocation(), DiagID) << D->getSourceRange();
405-
}
398+
else
399+
llvm_unreachable("Tried to mangle unexpected NamedDecl!");
406400
}
407401

408402
void MicrosoftCXXNameMangler::mangleFunctionEncoding(const FunctionDecl *FD,

0 commit comments

Comments
 (0)