<div dir="ltr">+clangd-dev<br><div><br></div><div>The issue here is that the warned construct <span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;white-space:pre">(CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)</span> is inside a macro. clangd checks for the NOLINT comment only where the code is spelled (on the macro definition), clang-tidy checks both the spelling location and the expansion location (curl_global_init call).</div><div><br></div><div>The inconsistency is a bug: filed <a href="https://github.com/clangd/clangd/issues/266">https://github.com/clangd/clangd/issues/266</a><br></div><div><br></div><div>Cheers, Sam</div><div><br></div><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 26, 2020 at 10:15 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">+Sam in case he's got some thoughts or can rope in others who might.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 26, 2020 at 1:03 PM tastytea via cfe-users <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
I recently started using clangd (9.0.1) with --clang-tidy. I noticed<br>
that suppressing diagnostics only sometimes works.<br>
<br>
For example:<br>
    using std::array; // NOLINT(misc-unused-using-decls)<br>
works with clang-tidy and clangd, but<br>
    curl_global_init(CURL_GLOBAL_ALL); // NOLINT(hicpp-signed-bitwise)<br>
works only with clang-tidy, not with clangd.<br>
<br>
I found the review[1] of the feature when it was introduced but I don't<br>
really understand what's going on there…<br>
<br>
Is this a bug or can some warnings not be suppressed?<br>
<br>
Kind regards, tastytea<br>
<br>
[1] <<a href="https://reviews.llvm.org/D60953" rel="noreferrer" target="_blank">https://reviews.llvm.org/D60953</a>><br>
_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
</blockquote></div>
</blockquote></div>