Page MenuHomePhabricator

Fix for bug 41747: AST Printer doesn't print nested name specifier for out of scope record definitions

Authored by dyatkovskiy on May 5 2019, 6:42 AM.



This fix adds out of scope member classes definitions support for AST Printer.

Diff Detail

Event Timeline

dyatkovskiy created this revision.May 5 2019, 6:42 AM
jdenny accepted this revision.May 7 2019, 8:13 AM
jdenny added reviewers: rsmith, aaron.ballman.

LGTM except for nits in the tests. I'm not close to C++ support in Clang, so please give other reviewers a few days to comment just in case. I've added a couple who have reviewed my patches in this area in the past.

Thanks for the fix!


This comment should stay next to DeclGroupInMemberList because they're both about tag decl groups in member lists.


To make this easier to read (especially in editors without highlighting), I suggest putting all FileCheck directives for the definition of each of struct DeclEnclosing and struct DeclEnclosing::DeclMember before that definition.

This revision is now accepted and ready to land.May 7 2019, 8:13 AM
aaron.ballman added inline comments.May 7 2019, 9:05 AM

Don't use auto here as the type is not explicitly spelled out in the initialization. If possible, const-qualify the pointer type as well.

Patch updates per review remarks