[llvm] r180851 - get rid of windows warning:

David Blaikie dblaikie at gmail.com
Wed May 1 08:12:52 PDT 2013


On May 1, 2013 8:01 AM, "Peng Cheng" <gm4cheng at gmail.com> wrote:
>
> Author: chp
> Date: Wed May  1 10:00:07 2013
> New Revision: 180851
>
> URL: http://llvm.org/viewvc/llvm-project?rev=180851&view=rev
> Log:
> get rid of windows warning:
>
> warning C4800: forcing value to bool 'true' or 'false' (performance
warning)

This warning is, in my opinion/experience, particularly unhelpful. Can we
just disable it instead?

>
> Modified:
>     llvm/trunk/include/llvm/IR/DerivedTypes.h
>
> Modified: llvm/trunk/include/llvm/IR/DerivedTypes.h
> URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DerivedTypes.h?rev=180851&r1=180850&r2=180851&view=diff
>
==============================================================================
> --- llvm/trunk/include/llvm/IR/DerivedTypes.h (original)
> +++ llvm/trunk/include/llvm/IR/DerivedTypes.h Wed May  1 10:00:07 2013
> @@ -117,7 +117,7 @@ public:
>    /// argument type.
>    static bool isValidArgumentType(Type *ArgTy);
>
> -  bool isVarArg() const { return getSubclassData(); }
> +  bool isVarArg() const { return getSubclassData()!=0; }
>    Type *getReturnType() const { return ContainedTys[0]; }
>
>    typedef Type::subtype_iterator param_iterator;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130501/970f9eab/attachment.html>


More information about the llvm-commits mailing list