riccibruno added a comment.

In D57649#1382453 <https://reviews.llvm.org/D57649#1382453>, @steveire wrote:

> I have no objection to this, but I wonder whether all state accessible from 
> all nodes should be part of the AST dump. Where do you think the line is? Is 
> there anything else missing currently from other nodes?


I think that this depends on the specific node. It seem that there should be a 
distinction between state that is "generally useful" (whatever that means) to 
the average clang developer/user and internal state which is there for a narrow 
specific purpose. For example (looking at the statement/expression hierarchy):

`NullStmt` has a flag `HasLeadingEmptyMacro` => probably not useful to expose.
`SwitchStmt` has a flag `AllEnumCasesCovered` which is used for diagnostics => 
probably not useful to expose.

Additionally some flags are there only to remember which trailing objects are 
there. I don't think that exposing these is useful (as long as the AST dump 
output is unambiguous).

Though it is a subjective distinction and in the end if someone need a flag it 
is going to be added I guess.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57649/new/

https://reviews.llvm.org/D57649



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to