summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-08-21 17:36:32 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-08-21 17:36:32 +0000
commita93a7e8d5e72fde260eaaf77c996a35b3a463e16 (patch)
tree05002b64a070e70001599250fcbbb4115dd8acc0
parent4ee038421bbf6c35e3c88c92b4c1e17169e1bb64 (diff)
downloadbcm5719-llvm-a93a7e8d5e72fde260eaaf77c996a35b3a463e16.tar.gz
bcm5719-llvm-a93a7e8d5e72fde260eaaf77c996a35b3a463e16.zip
Rename PrintingPolicy::DontRecurseInDeclContext to PrintingPolicy::TerseOutput
to reflect the intention, not the implementation. llvm-svn: 162293
-rw-r--r--clang/include/clang/AST/PrettyPrinter.h7
-rw-r--r--clang/lib/AST/DeclPrinter.cpp2
-rw-r--r--clang/unittests/AST/DeclPrinterTest.cpp2
3 files changed, 5 insertions, 6 deletions
diff --git a/clang/include/clang/AST/PrettyPrinter.h b/clang/include/clang/AST/PrettyPrinter.h
index 31be46f98a5..e0b1d329d5c 100644
--- a/clang/include/clang/AST/PrettyPrinter.h
+++ b/clang/include/clang/AST/PrettyPrinter.h
@@ -39,7 +39,7 @@ struct PrintingPolicy {
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 @@ struct PrintingPolicy {
/// 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
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index 303031cd649..d96b6e57c6c 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -220,7 +220,7 @@ void DeclPrinter::Print(AccessSpecifier AS) {
//----------------------------------------------------------------------------
void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) {
- if (Policy.DontRecurseInDeclContext)
+ if (Policy.TerseOutput)
return;
if (Indent)
diff --git a/clang/unittests/AST/DeclPrinterTest.cpp b/clang/unittests/AST/DeclPrinterTest.cpp
index c86ec2d44aa..02924992252 100644
--- a/clang/unittests/AST/DeclPrinterTest.cpp
+++ b/clang/unittests/AST/DeclPrinterTest.cpp
@@ -32,7 +32,7 @@ namespace {
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);
}
OpenPOWER on IntegriCloud