Since StringRef::empty can be used in constexpr context, it seems reasonable that SMLoc::isValid should be too. The default-ctor and operator== are made constexpr for consistency.
In particular, the constexpr keyword is needed for silencing warnings on Windows (whereas Linux allows constexpr usage without the keyword).