[cfe-dev] RFC: YAML as an intermediate format for clang::tooling::Replacement data on disk

Konstantin Tokarev annulen at yandex.ru
Thu Aug 1 07:30:46 PDT 2013


01.08.2013, 17:59, "Manuel Klimek" <klimek at google.com>:
> On Thu, Aug 1, 2013 at 3:06 PM, Vane, Edwin <edwin.vane at intel.com> wrote:
>>> -----Original Message-----
>>> From: Alex Rosenberg [mailto:alexr at ohmantics.com]
>>> Sent: Thursday, August 01, 2013 1:32 AM
>>> To: Vane, Edwin
>>> Cc: Clang Dev List (cfe-dev at cs.uiuc.edu)
>>> Subject: Re: [cfe-dev] RFC: YAML as an intermediate format for
>>> clang::tooling::Replacement data on disk
>>
>> ...
>>
>>> I have wanted for some time for rewriter tools to use diff output that can be
>>> used with existing review tools. If a merge tool is created that generates diff, I'd
>>> probably be less concerned, but I'd still want a way to handle this self-contained
>>> in the LLVM/Clang frameworks without a separate merge process.
>>
>> This can still happen. What you're describing is orthogonal to this proposal about using YAML as an intermediate representation of serialized data between the migrator and replacement coalescing tool. I don't think anything here will block your desire from coming true.
>>
>> Speaking of JSON, this was suggested on IRC. It seems like it would be just as fine as YAML for this situation since there's no need for references or comments (yet, anyway). However, LLVM has no generic JSON parser, just a specific implementation for compilation databases. The YAML reader/writer that LLVM provides is completely generic and available right now even if it provides some features we don't need.
>
> Note that the compilation databases use the YAML parser. JSON is a subset of YAML. I'd also (slightly) prefer to use JSON over YAML for the intermediate representation.

Why? YAML has less syntactic overhead.

-- 
Regards,
Konstantin



More information about the cfe-dev mailing list