[clangd-dev] [cfe-users] clangd --clang-tidy: // NOLINT only works sometimes
Sam McCall via clangd-dev
clangd-dev at lists.llvm.org
Tue Jan 28 02:35:02 PST 2020
The issue here is that the warned construct
(CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) 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).
The inconsistency is a bug: filed
On Sun, Jan 26, 2020 at 10:15 PM David Blaikie <dblaikie at gmail.com> wrote:
> +Sam in case he's got some thoughts or can rope in others who might.
> On Sun, Jan 26, 2020 at 1:03 PM tastytea via cfe-users <
> cfe-users at lists.llvm.org> wrote:
>> I recently started using clangd (9.0.1) with --clang-tidy. I noticed
>> that suppressing diagnostics only sometimes works.
>> For example:
>> using std::array; // NOLINT(misc-unused-using-decls)
>> works with clang-tidy and clangd, but
>> curl_global_init(CURL_GLOBAL_ALL); // NOLINT(hicpp-signed-bitwise)
>> works only with clang-tidy, not with clangd.
>> I found the review of the feature when it was introduced but I don't
>> really understand what's going on there…
>> Is this a bug or can some warnings not be suppressed?
>> Kind regards, tastytea
>>  <https://reviews.llvm.org/D60953>
>> cfe-users mailing list
>> cfe-users at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the clangd-dev