[all-commits] [llvm/llvm-project] 4778e4: Clarify use of llvm_unreachable in the coding stan...

AaronBallman via All-commits all-commits at lists.llvm.org
Thu Mar 26 05:08:51 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4778e409de112dc4b70933f3e3f502d6c747ed5a
      https://github.com/llvm/llvm-project/commit/4778e409de112dc4b70933f3e3f502d6c747ed5a
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2020-03-26 (Thu, 26 Mar 2020)

  Changed paths:
    M llvm/docs/CodingStandards.rst

  Log Message:
  -----------
  Clarify use of llvm_unreachable in the coding standard.

There has been some ongoing confusion regarding when to use `llvm_unreachable`
which this patch attempts to address. Specifically, the confusion has been
around whether `llvm_unreachable` is intended to mark only unreachable code
paths that the compiler cannot determine itself or to mark a code path which is
unconditionally a bug to reach. Based on email and IRC discussions, it sounds
like "unconditional bug to reach" is the consensus.




More information about the All-commits mailing list