replace invariant(false) with MONGO_UNREACHABLE

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Trivial - P5
    • 3.7.4
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • Repl 2018-04-09
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      We use invariant(false) a lot in the codebase when we really mean MONGO_UNREACHABLE. Using the MONGO_UNREACHABLE macro also sends a signal to the compiler that execution will not proceed past that location in the code (See SERVER-29780 for example).

            Assignee:
            Benety Goh
            Reporter:
            Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: