From: Yaron Keren Date: Sun, 27 Dec 2015 14:34:22 +0000 (+0000) Subject: Constify NestedNameSpecifier::dump and add a no-argument dump function suitable for... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db7c3ac534888f5d7a0972fea6d7753ac6be9bee;p=clang Constify NestedNameSpecifier::dump and add a no-argument dump function suitable for calling from a debugger. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256472 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/NestedNameSpecifier.h b/include/clang/AST/NestedNameSpecifier.h index 4da17b0c07..b1ff9bdff5 100644 --- a/include/clang/AST/NestedNameSpecifier.h +++ b/include/clang/AST/NestedNameSpecifier.h @@ -217,7 +217,8 @@ public: /// \brief Dump the nested name specifier to standard output to aid /// in debugging. - void dump(const LangOptions &LO); + void dump(const LangOptions &LO) const; + void dump() const; }; /// \brief A C++ nested-name-specifier augmented with source location diff --git a/lib/AST/NestedNameSpecifier.cpp b/lib/AST/NestedNameSpecifier.cpp index 97425d001d..d2370c88b9 100644 --- a/lib/AST/NestedNameSpecifier.cpp +++ b/lib/AST/NestedNameSpecifier.cpp @@ -318,7 +318,12 @@ NestedNameSpecifier::print(raw_ostream &OS, OS << "::"; } -void NestedNameSpecifier::dump(const LangOptions &LO) { +void NestedNameSpecifier::dump(const LangOptions &LO) const { + print(llvm::errs(), PrintingPolicy(LO)); +} + +void NestedNameSpecifier::dump() const { + LangOptions LO; print(llvm::errs(), PrintingPolicy(LO)); }