aaron.ballman added a comment.

In D74463#1889187 <https://reviews.llvm.org/D74463#1889187>, @vingeldal wrote:

> In D74463#1889157 <https://reviews.llvm.org/D74463#1889157>, @vingeldal wrote:
>
> > > - how do we either not warn on this by default or how does the user tell 
> > > us to not warn on it (without requiring them to jump through hoops like 
> > > changing the types of the arguments)?
> >
> > -I'v used comments in the source code to tell the tool to ignore cases that 
> > I'v identified as false positives. That has worked without any issues for 
> > me and I wouldn't say it's a hassle. Is that no longer supported in clang 
> > tidy or was I using another tool and just projected that memory on 
> > clang-tidy?
> >  I'm confident that clang-format atleast has a means of locally suppressing 
> > rules.
>
>
> Found what I was thinking of: "// 
> NOLINT(cppcoreguidelines-avoid-adjacent-parameters-of-the-same-type)"
>  Do you think this is too much jumping through hoops or would that suffice as 
> a means to get rid of false positives?


We do support `NOLINT` comments in clang-tidy, but those tend to only be 
appropriate for code the user has control over and less appropriate for things 
the user often doesn't have control over. Given that this functionality is 
diagnosing function declarations, my concern is that a lot of the diagnostics 
will be in code the user cannot touch to add the markings (like system or 
third-party headers). Seeing how chatty the diagnostic is in practice will help 
determine what approach to take (maybe we need the ability to specify header 
files to disable the check for, maybe we need to ignore all system headers, 
etc).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74463



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to