kadircet added inline comments.

================
Comment at: clang-tools-extra/clangd/ConfigCompile.cpp:438
+                         .map("Experiment",
+                              Config::IncludesPolicy::Strict) // for backward
+                                                              // compatibility
----------------
i think we should at least be emitting a diagnostics to encourage people for 
moving back to strict, so what about something like:
```
if (F.UnusuedIncludes) {
  auto Val = compileEnum....; // only for Strict and None
  if (!Val && **F.UnusedIncludes == "Experiment") {
       diag(Warning, "Experiment is deprecated for UnusedIncludes, use Strict 
instead.", F.UnusedIncludes.Range);
       Val = Config::IncludesPolicy::Strict;
  }
}
```


================
Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:769
-      Cfg.Diagnostics.UnusedIncludes == Config::IncludesPolicy::Strict
-          ? computeUnusedIncludes(AST)
-          : Findings.UnusedIncludes,
----------------
can you also delete `computeUnusedIncludes` and its friends (also from the 
tests)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145773

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

Reply via email to