[PATCH] D128204: [clangd] Add fix-it for inserting IWYU pragma: keep

2022-07-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. > A specific example i encountered is clang/Tooling/DiagnosticsYaml.h Which > defines template specializations for inputting/outputting yaml io. That file > must be included if you ever want to emit diagnostics as YAML, but the > typical use case is to just use the ope

[PATCH] D128204: [clangd] Add fix-it for inserting IWYU pragma: keep

2022-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D128204#3600973 , @kadircet wrote: >> One of the main issues I have is due to templates not being instantiated >> which can result in symbols that are actually used not being picked up as >> the template instantiation that u

[PATCH] D128204: [clangd] Add fix-it for inserting IWYU pragma: keep

2022-06-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. > I had another idea about offering the export pragma when in a header file but > I don't know if that's going too far There are definitely cases where this is conceptually "right" fix, but it's hard to guess that in clangd (well at least without having some codebase w

[PATCH] D128204: [clangd] Add fix-it for inserting IWYU pragma: keep

2022-06-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I had another idea about offering the export pragma when in a header file but I don't know if that's going too far In D128204#3599286 , @kadircet wrote: > Hence i'd like to hear a little bit more about what kind of false positi

[PATCH] D128204: [clangd] Add fix-it for inserting IWYU pragma: keep

2022-06-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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

[PATCH] D128204: [clangd] Add fix-it for inserting IWYU pragma: keep

2022-06-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This is a bit tricky - we'd like to offer more fixes in several scenarios (e.g. replace a header with the transitive includes you're relying on), but some of those require more complex implementation. On one hand, presenting only one automated fix will bias users towa

[PATCH] D128204: [clangd] Add fix-it for inserting IWYU pragma: keep

2022-06-20 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet, kbobyrev. Herald added subscribers: usaxena95, arphaman. Herald added a project: All. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: cla