[cfe-commits] [PATCH] Add support for Decl::print() with AccessSpecDecl instance

Will Wilson will at indefiant.com
Fri Aug 24 09:58:28 PDT 2012


Hi All,

A very minor one here, but potentially useful for those that run into it.
Calling print() on an AccessSpecDecl currently results in nothing being
printed. The attached patch rectifies this omission in DeclPrinter.cpp.

Note: AccessSpecDecl's printed as part of a CXXRecordDecl are printed as
they're handled as a special case in DeclPrinter::VisitDeclContext() -
probably due to the unusual indentation convention used by these
declarations.

No test cases I'm afraid as I couldn't find an obvious way of adding one -
unless I've missed something. Anyhow, the change should be safe enough.

- Will.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120824/f9346f00/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: print_AccessSpecDecl.diff
Type: application/octet-stream
Size: 772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120824/f9346f00/attachment.obj>


More information about the cfe-commits mailing list