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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 20 05:28:36 PDT 2019


aaron.ballman accepted this revision.
aaron.ballman added a comment.

LGTM!



================
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;
+
----------------
ilya-biryukov wrote:
> aaron.ballman wrote:
> > I'm not keen on "qualifier" here because types have qualifiers. How about `printNestedNameSpecifier()`?
> Now I understand why we clang uses 'nested name specifier' everywhere!
> Renamed per your suggestions.
> FWIW, I would rather use `NameQualifier` and `TypeQualifier` to disambiguate between the two.
> `NestedNameSpecifier` is a bit too long for my taste. But happy to stick with the conventions in the codebase.
I think it'd be a pretty large undertaking to hit all of the places where we talk about qualifiers to get to the point where that distinction makes sense. I think we should just stick with nested name specifier, as that's a term of art from the standard for this concept.


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