[cfe-commits] r162293 - in /cfe/trunk: include/clang/AST/PrettyPrinter.h lib/AST/DeclPrinter.cpp unittests/AST/DeclPrinterTest.cpp

Dmitri Gribenko gribozavr at gmail.com
Tue Aug 21 10:36:32 PDT 2012


Author: gribozavr
Date: Tue Aug 21 12:36:32 2012
New Revision: 162293

URL: http://llvm.org/viewvc/llvm-project?rev=162293&view=rev
Log:
Rename PrintingPolicy::DontRecurseInDeclContext to PrintingPolicy::TerseOutput
to reflect the intention, not the implementation.

Modified:
    cfe/trunk/include/clang/AST/PrettyPrinter.h
    cfe/trunk/lib/AST/DeclPrinter.cpp
    cfe/trunk/unittests/AST/DeclPrinterTest.cpp

Modified: cfe/trunk/include/clang/AST/PrettyPrinter.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/PrettyPrinter.h?rev=162293&r1=162292&r2=162293&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/PrettyPrinter.h (original)
+++ cfe/trunk/include/clang/AST/PrettyPrinter.h Tue Aug 21 12:36:32 2012
@@ -39,7 +39,7 @@
       SuppressUnwrittenScope(false), SuppressInitializers(false),
       ConstantArraySizeAsWritten(false), AnonymousTagLocations(true),
       SuppressStrongLifetime(false), Bool(LO.Bool),
-      DontRecurseInDeclContext(false), DumpSourceManager(0) { }
+      TerseOutput(false), DumpSourceManager(0) { }
 
   /// \brief What language we're printing.
   LangOptions LangOpts;
@@ -134,13 +134,12 @@
   /// doesn't actually have 'bool' (because, e.g., it is defined as a macro).
   unsigned Bool : 1;
 
-  /// \brief Don't print contents of DeclContexts.  Used to provide a 'terse'
-  /// output.
+  /// \brief Provide a 'terse' output.
   ///
   /// For example, in this mode we don't print function bodies, class members,
   /// declarations inside namespaces etc.  Effectively, this should print
   /// only the requested declaration.
-  unsigned DontRecurseInDeclContext : 1;
+  unsigned TerseOutput : 1;
 
   /// \brief If we are "dumping" rather than "pretty-printing", this points to
   /// a SourceManager which will be used to dump SourceLocations. Dumping

Modified: cfe/trunk/lib/AST/DeclPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclPrinter.cpp?rev=162293&r1=162292&r2=162293&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclPrinter.cpp (original)
+++ cfe/trunk/lib/AST/DeclPrinter.cpp Tue Aug 21 12:36:32 2012
@@ -220,7 +220,7 @@
 //----------------------------------------------------------------------------
 
 void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) {
-  if (Policy.DontRecurseInDeclContext)
+  if (Policy.TerseOutput)
     return;
 
   if (Indent)

Modified: cfe/trunk/unittests/AST/DeclPrinterTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/DeclPrinterTest.cpp?rev=162293&r1=162292&r2=162293&view=diff
==============================================================================
--- cfe/trunk/unittests/AST/DeclPrinterTest.cpp (original)
+++ cfe/trunk/unittests/AST/DeclPrinterTest.cpp Tue Aug 21 12:36:32 2012
@@ -32,7 +32,7 @@
 
 void PrintDecl(raw_ostream &Out, const ASTContext *Context, const Decl *D) {
   PrintingPolicy Policy = Context->getPrintingPolicy();
-  Policy.DontRecurseInDeclContext = true;
+  Policy.TerseOutput = true;
   D->print(Out, Policy, /*Indentation*/ 0, /*PrintInstantiation*/ false);
 }
 





More information about the cfe-commits mailing list