[cfe-dev] Removal of the AST XML printer (r127141)

Douglas Gregor dgregor at apple.com
Fri Mar 11 09:49:17 PST 2011


On Mar 11, 2011, at 6:28 AM, Anton Lokhmotov wrote:

>> Whenever a feature in this state is removed, there are always a few
>> complaints that "it works for me". That may be an argument for those
>> individuals, but it's not good enough for the project as a whole.
> 
> How about the proposed alternatives?
> 
>>> If the problem is that a potential user can be let down by its
>>> incompleteness or instability, I can propose two alternatives.
>>> First, remove the XML printer from the Clang driver but otherwise 
>>> leave it in the library (with a number of caveats).  

It was never exposed in the Clang driver; only in clang -cc1, and yet it still caused confusion. 

>>> Second, 
>>> allow us to come up with a cut-down version of the XML printer
>>> that will only be able, say, to  output info for declarations.  
>>> This will be easier to maintain, while not set up user 
>>> expectations too high.


The AST XML printer was still rather incomplete, even when looking just at declarations, so this doesn't actually solve the completeness problem unless it's accompanied by patches to add the missing declarations.

Plus, by doing this, you run the risk of receiving exactly the same complaintfrom some other user out there for whom the current statement and expression printing "works for me". This isn't a viable course.

As I said before, the solution is the same as it always is in the LLVM community: contribute patches to bring this feature up to a level of quality that we can be proud of. 

	- Doug



More information about the cfe-dev mailing list