[PATCH] D118976: clangd: Set a diagnostic on a code action resulting from a tweak

2022-02-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbd6c6974f5ea: clangd: Set a diagnostic on a code action resulting from a tweak (authored by ckandeler, committed by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D118976: clangd: Set a diagnostic on a code action resulting from a tweak

2022-02-07 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added a comment. It'd be great if you could merge this, as I don't have the necessary privileges. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118976/new/ https://reviews.llvm.org/D118976 ___

[PATCH] D118976: clangd: Set a diagnostic on a code action resulting from a tweak

2022-02-07 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler updated this revision to Diff 406359. ckandeler added a comment. Fixed Lint complaints Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118976/new/ https://reviews.llvm.org/D118976 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp Ind

[PATCH] D118976: clangd: Set a diagnostic on a code action resulting from a tweak

2022-02-04 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler updated this revision to Diff 405929. ckandeler added a comment. Simplified code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118976/new/ https://reviews.llvm.org/D118976 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp Index: c

[PATCH] D118976: clangd: Set a diagnostic on a code action resulting from a tweak

2022-02-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1011 // We never consider refactorings etc as preferred. CodeAction *OnlyFix = nullptr;

[PATCH] D118976: clangd: Set a diagnostic on a code action resulting from a tweak

2022-02-04 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1011 // We never consider refactorings etc as preferred. CodeAction *OnlyFix = nullptr; for (auto &Action : Actions) { sammccall wrote: > This loo

[PATCH] D118976: clangd: Set a diagnostic on a code action resulting from a tweak

2022-02-04 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler updated this revision to Diff 405911. ckandeler added a comment. Formatting & logic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118976/new/ https://reviews.llvm.org/D118976 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp Index

[PATCH] D118976: clangd: Set a diagnostic on a code action resulting from a tweak

2022-02-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. TL;DR: I think this makes sense to add, but we should make it slightly more restrictive. In D118976#3296182 , @ckandeler wrote: >> This is assuming a semantic connection that we don't know exists. >> Without any more specific

[PATCH] D118976: clangd: Set a diagnostic on a code action resulting from a tweak

2022-02-04 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added a comment. > This is assuming a semantic connection that we don't know exists. > Without any more specific reason to draw this connection, this seems like a > heuristic that could equally be applied by the client. The difference being that the client would have to poke around in

[PATCH] D118976: clangd: Set a diagnostic on a code action resulting from a tweak

2022-02-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This is assuming a semantic connection that we don't know exists. Without any more specific reason to draw this connection, this seems like a heuristic that could equally be applied by the client. Is there a particular action/diagnostic pair you want this for? Reposi

[PATCH] D118976: clangd: Set a diagnostic on a code action resulting from a tweak

2022-02-04 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler created this revision. ckandeler added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. ckandeler requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. ... if there is a