njames93 marked an inline comment as done.
njames93 added inline comments.

================
Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.h:44
 
+  virtual void storeCheckOptions(ClangTidyOptions::OptionMap &Opts) {}
+
----------------
aaron.ballman wrote:
> I'd appreciate some comments here explaining when this should be overridden. 
> I'd also like to understand why we need `storeOptions` and 
> `storeCheckOptions` because the two names are so similar to one another.
I'm still unsure what the best approach here is. 
`RenamerClangTidyCheck::storeOptions` needs to be called to store the 
`AggressiveDependentMemberLookup` Option (as well as any other renaming 
specific option that may be added down the line). However derived classes need 
to also store their respective options at the same time. Due to how c++ works 
there isn't a nice way to ensure base methods are called at the same time as 
derived methods.
Anyway that's the reason the names are similar they do a very similar job only 
one is meant for the `RenamerClangTidyCheck` class and the other for derived 
classes.
I agree a comment is needed to explain why so I'll add that in for now


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73052



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

Reply via email to