r304663 - Fixed warning: enum constant in boolean context.

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 5 10:17:10 PDT 2017


I followed up on the original commit (r299921) to request that as well.

On Sat, Jun 3, 2017 at 1:26 PM Richard Smith via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Can we get a testcase for this bug? Seems like we can't have any coverage
> for the case where IsArmArch is supposed to be false.
>
>
> On 3 Jun 2017 9:47 am, "Galina Kistanova via cfe-commits" <
> cfe-commits at lists.llvm.org> wrote:
>
> Author: gkistanova
> Date: Sat Jun  3 11:47:06 2017
> New Revision: 304663
>
> URL: http://llvm.org/viewvc/llvm-project?rev=304663&view=rev
> Log:
> Fixed warning: enum constant in boolean context.
>
> Modified:
>     cfe/trunk/lib/Driver/ToolChains/Linux.cpp
>
> Modified: cfe/trunk/lib/Driver/ToolChains/Linux.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Linux.cpp?rev=304663&r1=304662&r2=304663&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Driver/ToolChains/Linux.cpp (original)
> +++ cfe/trunk/lib/Driver/ToolChains/Linux.cpp Sat Jun  3 11:47:06 2017
> @@ -822,8 +822,9 @@ SanitizerMask Linux::getSupportedSanitiz
>    const bool IsAArch64 = getTriple().getArch() == llvm::Triple::aarch64 ||
>                           getTriple().getArch() ==
> llvm::Triple::aarch64_be;
>    const bool IsArmArch = getTriple().getArch() == llvm::Triple::arm ||
> -                         llvm::Triple::thumb || llvm::Triple::armeb ||
> -                         llvm::Triple::thumbeb;
> +                         getTriple().getArch() == llvm::Triple::thumb ||
> +                         getTriple().getArch() == llvm::Triple::armeb ||
> +                         getTriple().getArch() == llvm::Triple::thumbeb;
>    SanitizerMask Res = ToolChain::getSupportedSanitizers();
>    Res |= SanitizerKind::Address;
>    Res |= SanitizerKind::Fuzzer;
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170605/12553a54/attachment.html>


More information about the cfe-commits mailing list