From: Stephen Kelly Date: Thu, 4 Oct 2018 19:22:00 +0000 (+0000) Subject: [NestedNameSpecifier] Add missing stream-specific dump methods X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78d4305bef3e0b18b6a207c6ca39b5a9492796cf;p=clang [NestedNameSpecifier] Add missing stream-specific dump methods Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52870 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343807 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/NestedNameSpecifier.h b/include/clang/AST/NestedNameSpecifier.h index 3a7b45767d..fa98cfd976 100644 --- a/include/clang/AST/NestedNameSpecifier.h +++ b/include/clang/AST/NestedNameSpecifier.h @@ -225,6 +225,8 @@ public: /// in debugging. void dump(const LangOptions &LO) const; void dump() const; + void dump(llvm::raw_ostream &OS) const; + void dump(llvm::raw_ostream &OS, const LangOptions &LO) const; }; /// A C++ nested-name-specifier augmented with source location diff --git a/lib/AST/NestedNameSpecifier.cpp b/lib/AST/NestedNameSpecifier.cpp index df23972af2..097c3ae42a 100644 --- a/lib/AST/NestedNameSpecifier.cpp +++ b/lib/AST/NestedNameSpecifier.cpp @@ -339,13 +339,20 @@ NestedNameSpecifier::print(raw_ostream &OS, OS << "::"; } -void NestedNameSpecifier::dump(const LangOptions &LO) const { - print(llvm::errs(), PrintingPolicy(LO)); +LLVM_DUMP_METHOD void NestedNameSpecifier::dump(const LangOptions &LO) const { + dump(llvm::errs(), LO); } -LLVM_DUMP_METHOD void NestedNameSpecifier::dump() const { +LLVM_DUMP_METHOD void NestedNameSpecifier::dump() const { dump(llvm::errs()); } + +LLVM_DUMP_METHOD void NestedNameSpecifier::dump(llvm::raw_ostream &OS) const { LangOptions LO; - print(llvm::errs(), PrintingPolicy(LO)); + dump(OS, LO); +} + +LLVM_DUMP_METHOD void NestedNameSpecifier::dump(llvm::raw_ostream &OS, + const LangOptions &LO) const { + print(OS, PrintingPolicy(LO)); } unsigned