r256472 - Constify NestedNameSpecifier::dump and add a no-argument dump function suitable for calling from a debugger.

Yaron Keren via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 27 06:34:24 PST 2015


Author: yrnkrn
Date: Sun Dec 27 08:34:22 2015
New Revision: 256472

URL: http://llvm.org/viewvc/llvm-project?rev=256472&view=rev
Log:
Constify NestedNameSpecifier::dump and add a no-argument dump function suitable for calling from a debugger.


Modified:
    cfe/trunk/include/clang/AST/NestedNameSpecifier.h
    cfe/trunk/lib/AST/NestedNameSpecifier.cpp

Modified: cfe/trunk/include/clang/AST/NestedNameSpecifier.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/NestedNameSpecifier.h?rev=256472&r1=256471&r2=256472&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/NestedNameSpecifier.h (original)
+++ cfe/trunk/include/clang/AST/NestedNameSpecifier.h Sun Dec 27 08:34:22 2015
@@ -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

Modified: cfe/trunk/lib/AST/NestedNameSpecifier.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/NestedNameSpecifier.cpp?rev=256472&r1=256471&r2=256472&view=diff
==============================================================================
--- cfe/trunk/lib/AST/NestedNameSpecifier.cpp (original)
+++ cfe/trunk/lib/AST/NestedNameSpecifier.cpp Sun Dec 27 08:34:22 2015
@@ -318,7 +318,12 @@ NestedNameSpecifier::print(raw_ostream &
   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));
 }
 




More information about the cfe-commits mailing list