[PATCH] D30946: [ScopePrinting] Added support to print full scopes of types and declarations.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 27 14:04:49 PDT 2017


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





More information about the cfe-commits mailing list