balazske added inline comments.

================
Comment at: clang/lib/AST/ASTImporter.cpp:8133
+  Error VisitTypedefTypeLoc(TypedefTypeLoc From) {
+    return VisitTypeSpecTypeLoc(From);
+  }
----------------
teemperor wrote:
> I know the ASTImporter is doing these reimplementation of the default visitor 
> behavior quite often, but I feel in this case it would be much more readable 
> to omit all these default implementations and just let the TypeLocVisitor do 
> the dispatch to parent class logic. Especially since from what I understand 
> it's unlikely that we need custom logic for all these TypeLoc subclasses in 
> the future? It would also make this code less fragile in case the inheritance 
> hierarchy every gets another intermediate class that might require special 
> handling.
It is really better to remove these redundant visit branches.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71018



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to