[cfe-dev] Two patches

Olaf Krzikalla Olaf.Krzikalla at tu-dresden.de
Tue Nov 16 02:12:15 PST 2010


Hi @clang,

Am 15.11.2010 22:03, schrieb Ted Kremenek:
> I've applied the ParentMap patch here:
>
>    http://llvm.org/viewvc/llvm-project?view=rev&revision=119181
Thank you, Ted.


> For the second patch, I really don't think we should be adding these fields to LangOptions.
Yeah, actually that's my opinion too.

> If we need a new context object, maybe we should do that, or possibly add these to ASTContext.
Well, we could use the PrintingPolicy itself furthermore. Things I don't 
like with this approach:
- PrintingPolicy mixes constant properties (e.g. Dump is set 
programmatically), parametric properties (e.g. Intendation)  and 
variable properties (e.g. SuppressSpecifiers). Hmm, that's how things 
are already now. Hence I actually can live with that. But I still don't 
like it.
- The parameters have to be transported from the CompilerInvocation to 
the PrintingPolicy through the construction of the ASTContext. This 
means another argument in the ASTContext c'tor. I would prefer 
FrontendOpts. The only other way is the introduction of a new unit 
(RewriteOpts or something like this) in CompilerInvocation. This in turn 
means either an extended PrintingPolicy ctor or 
"initialization-by-assignment" in the ASTContext ctor. Extending the
PrintingPolicy ctor (which I'm generally not disinclined) raises the 
question how we deal with the related FIXME remarks in CFG and GRExprEngine.


Any other suggestions?
Best Olaf



More information about the cfe-dev mailing list