Commit cd1dc7f1 authored by Mikael Holmen's avatar Mikael Holmen
Browse files

[AST] Replace assert with llvm_unreachable to silence compiler warning

New code added in ec3060c7 looked like

+  case TemplateName::NameKind::OverloadedTemplate:
+    assert(false && "overloaded templates shouldn't survive to here.");
+  default:

If compiling without asserts we then got a warning about unannotated
fallthrough from the case into the default.

Change the assert into an llvm_unreachable to silence the warning.
parent c6a38957
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ TemplateNameDependence TemplateName::getDependence() const {
    D |= TemplateNameDependence::UnexpandedPack;
    break;
  case TemplateName::NameKind::OverloadedTemplate:
    assert(false && "overloaded templates shouldn't survive to here.");
    llvm_unreachable("overloaded templates shouldn't survive to here.");
  default:
    break;
  }