[all-commits] [llvm/llvm-project] cd1dc7: [AST] Replace assert with llvm_unreachable to sile...

mikaelholmen via All-commits all-commits at lists.llvm.org
Thu Mar 5 02:19:27 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cd1dc7f15d637b42067546e658574237cd0f0d46
      https://github.com/llvm/llvm-project/commit/cd1dc7f15d637b42067546e658574237cd0f0d46
  Author: Mikael Holmen <mikael.holmen at ericsson.com>
  Date:   2020-03-05 (Thu, 05 Mar 2020)

  Changed paths:
    M clang/lib/AST/TemplateName.cpp

  Log Message:
  -----------
  [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.




More information about the All-commits mailing list