[AST] Replace assert with llvm_unreachable to silence compiler warning
authorMikael Holmen <mikael.holmen@ericsson.com>
Thu, 5 Mar 2020 08:29:55 +0000 (09:29 +0100)
committerMikael Holmen <mikael.holmen@ericsson.com>
Thu, 5 Mar 2020 10:07:54 +0000 (11:07 +0100)
commitcd1dc7f15d637b42067546e658574237cd0f0d46
treed5463a8369b50b0ec533809303e79900459498bd
parentc6a38957a7e5e2ec837470a62aff25abfbf6d397
[AST] Replace assert with llvm_unreachable to silence compiler warning

New code added in ec3060c72de6 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.
clang/lib/AST/TemplateName.cpp