rsmith added a comment.

In https://reviews.llvm.org/D30946#754103, @schroedersi wrote:

> As an alternative to the current solution, the above-mentioned member 
> functions could each be extended by a "PrintingContext" argument, which then 
> contains the variable states.


I'd be interested to see how much complexity that adds, if you're prepared to 
give it a try.

> And a bit of clarification: [...] there is already some kind of temporary 
> suppress scope functionality, but it is called SuppressScope.

Yes, I think that's right -- `SuppressScope` isn't really an externally useful 
"print without scopes" mechanism, it's an internal mechanism / implementation 
detail used for printing an "inner" AST node when we've already printed a scope 
for it based on outer sugar (eg, the entity is a type component of a nested 
name specifier, or the type inside an elaborated type specifier, or the class 
name in a destructor name). It's not really `SuppressScope`, it's 
`ScopeWasAlreadyPrintedForWhateverTopLevelThingIAskedYouToPrint` =)


https://reviews.llvm.org/D30946



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D30946: [... Richard Smith - zygoloid via Phabricator via cfe-commits

Reply via email to