kadircet added inline comments.

================
Comment at: clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp:54
+    "ignore-headers",
+    cl::desc("A comma-separated list of headers to ignore."),
+    cl::init(""),
----------------
`A comma-separated list of regexes to match against suffix of a header, and 
disable analysis if matched.`


================
Comment at: clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp:139
+                                      HeaderPattern, RegexError);
+        return;
+      }
----------------
erroring out only after we performed all of our analysis and build a TU feels 
unfortunate. can we build these regexes and verify them at main and pass onto 
action instead? (in case the action is run on multiple files at once, we 
shouldn't compile/verify regexes over and over again)


================
Comment at: clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp:160
     auto Results =
         analyze(AST.Roots, PP.MacroReferences, PP.Includes, &PI, SM, HS);
     if (!Insert)
----------------
we actually want to perform filtering inside `analyze`. it's not enough to 
filter only when printing, we should also filter before applying fixes :D. but 
we should also be applying filtering to absolute paths in all cases, for 
missing includes this is being applied to spelling instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153340

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

Reply via email to