Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-34307

replace invariant(false) with MONGO_UNREACHABLE

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

      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@mongodb.com Benety Goh
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: