[llvm] Allow SMLoc to be used in constexpr context
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). Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D154741
Loading
Please sign in to comment