Fix various minor issues find via unreachable code warnings, from
Ahmed Charles! llvm-svn: 143569
This commit is contained in:
parent
42a4463091
commit
07216d174e
|
@ -1774,8 +1774,8 @@ ASTNodeImporter::ImportDeclarationNameLoc(const DeclarationNameInfo &From,
|
|||
To.setNamedTypeInfo(Importer.Import(FromTInfo));
|
||||
return;
|
||||
}
|
||||
llvm_unreachable("Unknown name kind.");
|
||||
}
|
||||
llvm_unreachable("Unknown name kind.");
|
||||
}
|
||||
|
||||
void ASTNodeImporter::ImportDeclContext(DeclContext *FromDC, bool ForceImport) {
|
||||
|
|
|
@ -3077,6 +3077,8 @@ public:
|
|||
TargetInfo::ConstraintInfo &Info) const {
|
||||
switch (*Name) {
|
||||
default:
|
||||
return false;
|
||||
|
||||
case 'r': // CPU registers.
|
||||
case 'd': // Equivalent to "r" unless generating MIPS16 code.
|
||||
case 'y': // Equivalent to "r", backwards compatibility only.
|
||||
|
|
|
@ -690,11 +690,12 @@ static void LangOptsToArgs(const LangOptions &Opts,
|
|||
case LangOptions::SOB_Undefined: break;
|
||||
case LangOptions::SOB_Defined: Res.push_back("-fwrapv"); break;
|
||||
case LangOptions::SOB_Trapping:
|
||||
Res.push_back("-ftrapv"); break;
|
||||
Res.push_back("-ftrapv");
|
||||
if (!Opts.OverflowHandler.empty()) {
|
||||
Res.push_back("-ftrapv-handler");
|
||||
Res.push_back(Opts.OverflowHandler);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (Opts.HeinousExtensions)
|
||||
Res.push_back("-fheinous-gnu-extensions");
|
||||
|
|
|
@ -6632,10 +6632,6 @@ Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword,
|
|||
Referenced = Result.getFoundDecl();
|
||||
break;
|
||||
|
||||
|
||||
llvm_unreachable("unresolved using decl in non-dependent context");
|
||||
return QualType();
|
||||
|
||||
case LookupResult::FoundOverloaded:
|
||||
DiagID = diag::err_typename_nested_not_type;
|
||||
Referenced = *Result.begin();
|
||||
|
|
|
@ -193,9 +193,6 @@ PathDiagnosticLocation
|
|||
}
|
||||
|
||||
return PathDiagnosticLocation(S, SMng, P.getLocationContext());
|
||||
|
||||
if (!S)
|
||||
return PathDiagnosticLocation();
|
||||
}
|
||||
|
||||
PathDiagnosticLocation
|
||||
|
|
Loading…
Reference in New Issue