[PATCH] Take into account PrintingPolicy::SuppressUnwrittenScope in NamedDecl::printQualifiedName.

Volodymyr Sapsai vsapsai at gmail.com
Tue May 27 07:38:41 PDT 2014


Hi doug.gregor,

This patch makes NamedDecl::printQualifiedName more like TypePrinter::AppendScope.  I.e. it ignores anonymous and inline namespaces if PrintingPolicy::SuppressUnwrittenScope is true.

The actual change is simple and small.  I have doubts about the added test.  Don't know if it should be a unit test or a lit test.  I've created unit test AST/NamedDeclPrinterTest.cpp based on AST/DeclPrinterTest.cpp and AST/StmtPrinterTest.cpp.  I'll be glad to rework test to a more appropriate shape.

I've added Douglas Gregor as a reviewer because he has introduced SuppressUnwrittenScope flag in r143599.  If it's a wrong decision, please, direct me to the right person.

Corresponding discussion on cfe-def mailing list can be found at http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-May/037029.html

http://reviews.llvm.org/D3922

Files:
  lib/AST/Decl.cpp
  unittests/AST/CMakeLists.txt
  unittests/AST/NamedDeclPrinterTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3922.9836.patch
Type: text/x-patch
Size: 5749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140527/b31918b7/attachment.bin>


More information about the cfe-commits mailing list