kadircet added a comment. as discussed offline I agree that we should have this, as no matter how hard we try there are going to be cases that we can't get right due to ADL/template instantiations or depending on 3rd party code that cannot be edited and also doesn't have relevant pragmas inside.
my hesitation about having them at this stage is, we won't be able to: - get feedback around most of these issues as people will just put a pragma and be done with it. - fix them going forward, even after implementation gets better, we won't be able to diagnose these headers and "falsely" issued pragmas will keep includes around. Hence i'd like to hear a little bit more about what kind of false positives you're facing often enough to need this as an automated fix at this stage, to see if there's something we can do to improve the implementation first. ================ Comment at: clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp:1795 Annotations Test(R"cpp( -$fix[[ $diag[[#include "unused.h"]] +$fix[[ $diag[[#include "unused.h"]]$insert[[]] ]] ---------------- can you also have a test with an include that already has a trailing comment? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128204/new/ https://reviews.llvm.org/D128204 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits