[PATCH] D128379: [clangd] Change the url for clang-tidy check documentation

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 23 10:58:01 PDT 2022


njames93 added inline comments.


================
Comment at: clang-tools-extra/clangd/Diagnostics.cpp:928
+    std::tie(Module, Check) = Name.split('-');
+    assert(!Module.empty() && !Check.empty());
+    return {("https://clang.llvm.org/extra/clang-tidy/checks/" + Module + "/" +
----------------
sammccall wrote:
> I don't think we should assert on this, how clang-tidy checks are named isn't something clangd can reasonably control.
> 
> Instead I'd suggest only returning a value if the condition is met.
The logic behind the assert was that it wouldn't cause any issues on release, but if someone added a check not to the convention it would break debug builds.
But it's not an issue that's expected anyway so can be safely removed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128379



More information about the cfe-commits mailing list