diff options
author | Stephen Kelly <steveire@gmail.com> | 2018-10-04 19:22:00 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2018-10-04 19:22:00 +0000 |
commit | c2074a2865993b348b12dc7f83a4ae8e9f385cbc (patch) | |
tree | 18c00c4d83e9c9f201e66f45c8732648d18b7409 | |
parent | f1121eb941668d65f33b6641f5f2aa9c8571a83c (diff) |
[NestedNameSpecifier] Add missing stream-specific dump methods
Reviewers: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D52870
-rw-r--r-- | clang/include/clang/AST/NestedNameSpecifier.h | 2 | ||||
-rw-r--r-- | clang/lib/AST/NestedNameSpecifier.cpp | 15 |
2 files changed, 13 insertions, 4 deletions
diff --git a/clang/include/clang/AST/NestedNameSpecifier.h b/clang/include/clang/AST/NestedNameSpecifier.h index 3a7b45767da..fa98cfd976a 100644 --- a/clang/include/clang/AST/NestedNameSpecifier.h +++ b/clang/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/clang/lib/AST/NestedNameSpecifier.cpp b/clang/lib/AST/NestedNameSpecifier.cpp index df23972af2d..097c3ae42a8 100644 --- a/clang/lib/AST/NestedNameSpecifier.cpp +++ b/clang/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 |