SV: [clang-tools-extra] r260225 - [clang-tidy] Add -target in misc-misplaced-widening-cast test so it will work on various bots

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 10 03:23:59 PST 2016


Makes sense. I wonder though whether the check should attempt to be
platform-independent and warn regardless of whether int and long have the
same bit width. What do you think?
On Feb 10, 2016 9:35 AM, "Daniel Marjamäki" <Daniel.Marjamaki at evidente.se>
wrote:

>
> Hello!
>
> > I'm not sure this is a good fix. What was the specific issue (and on
> which buildbots)?
>
> Ok.
>
> The buildbots said:
>
> FileCheck error:
> '/home/linaro/buildbot/clang-cmake-thumbv7-a15/stage1/tools/clang/tools/extra/test/clang-tidy/Output/misc-misplaced-widening-cast.cpp.tmp.cpp.msg'
> is empty.
>
> My check only warns when there is a widening cast. If
> sizeof(int)==sizeof(long) then there is no warning for a int=>long
> conversion. In my testcases I tested various int=>long conversions.
>
> These are the failed builds:
>
> http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt/builds/187
> http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/6265
> http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/9641
> http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15/builds/9691
>
> Best regards,
> Daniel Marjamäki
>
>
> ..................................................................................................................
> Daniel Marjamäki Senior Engineer
> Evidente ES East AB  Warfvinges väg 34  SE-112 51 Stockholm  Sweden
>
> Mobile:                 +46 (0)709 12 42 62
> E-mail:                 Daniel.Marjamaki at evidente.se
>
> www.evidente.se
>
> ________________________________________
> Från: Alexander Kornienko [alexfh at google.com]
> Skickat: den 9 februari 2016 17:41
> Till: Daniel Marjamäki
> Kopia: cfe-commits
> Ämne: Re: [clang-tools-extra] r260225 - [clang-tidy] Add -target in
> misc-misplaced-widening-cast test so it will work on various bots
>
> I'm not sure this is a good fix. What was the specific issue (and on which
> buildbots)?
>
> On Tue, Feb 9, 2016 at 4:43 PM, Daniel Marjamaki via cfe-commits <
> cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>> wrote:
> Author: danielmarjamaki
> Date: Tue Feb  9 09:43:05 2016
> New Revision: 260225
>
> URL: http://llvm.org/viewvc/llvm-project?rev=260225&view=rev
> Log:
> [clang-tidy] Add -target in misc-misplaced-widening-cast test so it will
> work on various bots
>
> Modified:
>
> clang-tools-extra/trunk/test/clang-tidy/misc-misplaced-widening-cast.cpp
>
> Modified:
> clang-tools-extra/trunk/test/clang-tidy/misc-misplaced-widening-cast.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-misplaced-widening-cast.cpp?rev=260225&r1=260224&r2=260225&view=diff
>
> ==============================================================================
> ---
> clang-tools-extra/trunk/test/clang-tidy/misc-misplaced-widening-cast.cpp
> (original)
> +++
> clang-tools-extra/trunk/test/clang-tidy/misc-misplaced-widening-cast.cpp
> Tue Feb  9 09:43:05 2016
> @@ -1,4 +1,4 @@
> -// RUN: %check_clang_tidy %s misc-misplaced-widening-cast %t
> +// RUN: %check_clang_tidy %s misc-misplaced-widening-cast %t -- --
> -target x86_64-unknown-unknown
>
>  void assign(int a, int b) {
>    long l;
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org<mailto: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/20160210/d7e6f222/attachment.html>


More information about the cfe-commits mailing list