Fix clang -Wcovered-switch-default after llvmorg-10-init-11484-g6626e5a06a9

We need to place llvm_unreachable after switch to work around the GCC
warning.
This commit is contained in:
Fangrui Song 2019-12-09 11:31:01 -08:00
parent 92f94b762a
commit ec71238916
1 changed files with 2 additions and 2 deletions

View File

@ -7103,7 +7103,6 @@ public:
ResultList Results; ResultList Results;
switch (DCK) { switch (DCK) {
default:
case DefaultedComparisonKind::None: case DefaultedComparisonKind::None:
llvm_unreachable("not a defaulted comparison"); llvm_unreachable("not a defaulted comparison");
@ -7118,6 +7117,7 @@ public:
ParamLvalType, getDerived().getCompleteObject())); ParamLvalType, getDerived().getCompleteObject()));
return Results; return Results;
} }
llvm_unreachable("");
} }
protected: protected:
@ -7593,7 +7593,6 @@ private:
return StmtError(); return StmtError();
switch (DCK) { switch (DCK) {
default:
case DefaultedComparisonKind::None: case DefaultedComparisonKind::None:
llvm_unreachable("not a defaulted comparison"); llvm_unreachable("not a defaulted comparison");
@ -7660,6 +7659,7 @@ private:
// Otherwise, the operator function yields x @ y. // Otherwise, the operator function yields x @ y.
return Op.get(); return Op.get();
} }
llvm_unreachable("");
} }
/// Build "static_cast<R>(E)". /// Build "static_cast<R>(E)".