njames93 accepted this revision.
njames93 added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:129-141
+ // Special case for reading from YAML
+ // Must support reading from both a string or a list
+ Input &I = reinterpret_cast<Input &>(IO);
+ if (isa<ScalarNode>(I.getCurrentNode()) ||
+ isa<BlockScalarNode>(I.getCurrentNode())) {
+ Checks.AsString = std::string();
+ yamlize(IO, *Checks.AsString, true, Ctx);
----------------
carlosgalvezp wrote:
> carlosgalvezp wrote:
> > njames93 wrote:
> > > All this code can just be inlined into the function below and this
> > > function can just be removed
> > Can you elaborate on how to do it? I cannot call `mapOptional("Checks"`
> > twice, one for string and one for vector, since it will print an error
> > message on either case.
> >
> > The function `yamlize` does not exp
> ... The function `yamlize` does not allow one to specify the `Checks` key as
> far as I can tell either.
I think you're right, I was getting confused with a different serialisation
library that does support that kind of logic
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147876/new/
https://reviews.llvm.org/D147876
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits