[clang-format] Use an enum for context types. NFC
authorsstwcw <f0gukp2nk@protonmail.com>
Mon, 21 Mar 2022 21:47:51 +0000 (21:47 +0000)
committersstwcw <f0gukp2nk@protonmail.com>
Mon, 21 Mar 2022 21:58:17 +0000 (21:58 +0000)
commit8c31b68f4876ca81fa2038b5b2990b3d7b53a77c
tree4d4cc4afff4f3f87db8ba2d4a924c3daf913180b
parentd4aeb5000ff49933be64a7c5423e8760b70d4cbd
[clang-format] Use an enum for context types. NFC

We currently have all those fields in AnnotatingParser::Context.  They
are not inherited from the Context object for the parent scope.  They
are exclusive.  Now they are replaced with an enum.

`InCpp11AttributeSpecifier` and `InCSharpAttributeSpecifier` are not
handled like the rest in ContextType because they are not exclusive.

Reviewed By: curdeius, MyDeveloperDay, HazardyKnusperkeks, owenpan

Differential Revision: https://reviews.llvm.org/D121907
clang/lib/Format/TokenAnnotator.cpp