]> granicus.if.org Git - clang/commitdiff
Constify NestedNameSpecifier::dump and add a no-argument dump function suitable for...
authorYaron Keren <yaron.keren@gmail.com>
Sun, 27 Dec 2015 14:34:22 +0000 (14:34 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Sun, 27 Dec 2015 14:34:22 +0000 (14:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256472 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/NestedNameSpecifier.h
lib/AST/NestedNameSpecifier.cpp

index 4da17b0c0779a45f3718a54dd7d73a1839dda9ab..b1ff9bdff589101cc2cf6d1b0c4da06e8d293f48 100644 (file)
@@ -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
index 97425d001de0921ef30f5a4d44bb75b2071789fd..d2370c88b9c586e2bcfe634378c2dcf13fb6126c 100644 (file)
@@ -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));
 }