================
@@ -203,19 +203,6 @@ template <> struct
MappingTraits<FormatStyle::BraceWrappingFlags> {
}
};
-template <> struct ScalarEnumerationTraits<FormatStyle::BracketAlignmentStyle>
{
----------------
gedare wrote:
> I'd stick to the `bool` for the public API, and keep the `enum` only in the
> private part, i.e. `format.cpp` and parse the `enum` with all 6 possible
> values. And initialize from that the real options. For the output use the
> `bool`.
>
I don't know how to do this. It seems in order to make the
`AlignAfterOpenBracket` option parse out the enum values, it requires to use
`LLVM_YAML_STRONG_TYPEDEF(bool, BracketAlignmentStyle)`. So the API isn't
really a `bool` anyway. I don't know if that is desired.
I might imagine the `enum` could exist in `Format.cpp` although I'm not sure
where, and I don't how to store any context between the point of parsing the
configuration (e.g., in `enumeration` or `enumInput`) value of the
`AlignAfterOpenBracket`, and the point where the `Style` is fully parsed so we
can make comparisons between fields.
https://github.com/llvm/llvm-project/pull/108332
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits