[PATCH] D55070: Replace FullComment member being visited with parameter

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 29 12:32:54 PST 2018


aaron.ballman added a comment.

This is a really nice cleanup, thank you!



================
Comment at: lib/AST/ASTDumper.cpp:114-115
+        public ConstStmtVisitor<ASTDumper>,
+        public CommentVisitorBase<comments::make_const_ptr, ASTDumper, void,
+                                  const FullComment *>,
+        public TypeVisitor<ASTDumper> {
----------------
Why not inherit from `ConstCommentVisitor` instead?


================
Comment at: lib/AST/ASTDumper.cpp:2684
 
-void ASTDumper::VisitTextComment(const TextComment *C) {
+void ASTDumper::VisitTextComment(const TextComment *C, const FullComment *FC) {
   OS << " Text=\"" << C->getText() << "\"";
----------------
If the argument isn't used in the function, can you drop the identifier for it from the parameter declaration? (Same elsewhere.)


Repository:
  rC Clang

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

https://reviews.llvm.org/D55070





More information about the cfe-commits mailing list