[PATCH] D67825: [AST] Extract Decl::printQualifier helper from Decl::printQualifiedName

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 20 04:51:51 PDT 2019


aaron.ballman added a reviewer: aaron.ballman.
aaron.ballman added inline comments.


================
Comment at: clang/include/clang/AST/Decl.h:313
 
+  /// Returns only qualifier from printQualifiedName, including the :: at the
+  /// end. E.g.
----------------
This doesn't return anything, so I think a better way to phrase the comment is "Prints only the nested name specifier, including a trailing :: at the end. e.g., if printQualifiedName(D) prints "A::B::i", this function prints "A::B::".`


================
Comment at: clang/include/clang/AST/Decl.h:317-318
+  ///    this function returns "A::B::".
+  void printQualifier(raw_ostream &OS) const;
+  void printQualifier(raw_ostream &OS, const PrintingPolicy &Policy) const;
+
----------------
I'm not keen on "qualifier" here because types have qualifiers. How about `printNestedNameSpecifier()`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67825/new/

https://reviews.llvm.org/D67825





More information about the cfe-commits mailing list