Preparatory change for D65043.
We current use !=LS_Cpp03 to enable language standards 11,14,17, and
2a. >=LS_Cpp11 is better if we decide to add new LanguageStandard in
the future.
Differential D65183
[Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCI MaskRay on Jul 23 2019, 7:21 PM. Authored by
Details
Preparatory change for D65043. We current use !=LS_Cpp03 to enable language standards 11,14,17, and
Diff Detail
Event TimelineComment Actions LGTM, but I don't actively work in this codebase so I really can't say. I'll wait to hear from some other more active clang-format reviewers.
Comment Actions I haven't really understood D65043 yet, but I think this is a good change either way.
|
Looking at this more, this is pretty subtle: Style *can* be LS_Auto here. So we're relying on the fact that Auto is the max value in the enum.
It's probably worth making this more explicit, e.g.
(a comment would also be fine, but I think the code is at least as clear here)