[PATCH] D15528: Teach clang-tidy how to -Werror checks.

Jon Roelofs via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 13 06:42:40 PDT 2020


Oh, yeah, that should probably
be clamped.

I didn’t have a specific use case in mind, but in general I find that tools
that emit “richer” information can be used for more things, hence returning
the count, and not some fixed value.

On Sat, Jun 13, 2020 at 12:58 AM Nathan James via Phabricator <
reviews at reviews.llvm.org> wrote:

> njames93 added inline comments.
> Herald added a subscriber: arphaman.
>
>
> ================
> Comment at: clang-tidy/tool/ClangTidyMain.cpp:362
> +                 << Plural << "\n";
> +    return WErrorCount;
> +  }
> ----------------
> Was there any specific reason for returning the error count instead of
> returning 1. It results in undefined behaviour on POSIX shells if a value
> is returned outside the range of 0<=n<=255. See
> https://bugs.llvm.org/show_bug.cgi?id=46305
>
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D15528/new/
>
> https://reviews.llvm.org/D15528
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200613/9b6ab1dc/attachment-0001.html>


More information about the cfe-commits mailing list