carlosgalvezp added inline comments.

================
Comment at: 
clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp:31
+    : ClangTidyCheck(Name, Context) {
+  std::optional<StringRef> HeaderFileExtensionsOption =
+      Options.get("HeaderFileExtensions");
----------------
Eugene.Zelenko wrote:
> Will be good idea to make function in `utils` instead of code duplication. 
I thought about that, but found it quite difficult due to the dependencies to 
Options and diag(), which are only available in ClangTidyCheck. This is 
probably why there was duplication to begin with.

I could add a helper function in ClangTidyCheck, but I find it out of place and 
I see risk in people using it as if it were a solid function meant to stay. 
Since this code is temporary I think the duplication is a small price to pay 
for keeping backwards compatibility. It will all be gone when we remove the 
local options.

I might have missed something, if you have some concrete suggestion that could 
work I'm happy to use it!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142655

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

Reply via email to