[PATCH] Bug 15109: Implement -Wdouble-promotion for clang
Hi folks, I had need of this warning, so I cobbled something together. Can someone please check it out and let me know if it's reasonable? I'm certainly no expert at this stuff. Patch attached for review, thanks! -- Carl double-promotion.patch Description: Binary data ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] Bug 15109: Implement -Wdouble-promotion for clang
> On Oct 28, 2015, at 4:37 PM, George Burgess IV > wrote: > > Thanks for this patch! :) Just a few small nits: > - Is there a reason that test/SemaCXX/warn-double-promotion.cpp can't be at > test/Sema/warn-double-promotion.c instead? No reason; I just found warn-float-conversion.c in there and this code is similar. Can move easily. > - Can we make the warning message a bit more specific? Maybe something like > "implicit conversion increases floating-point precision: %0 to %1"? Sure thing. > - Please get rid of the empty line after `else if (TargetBT->getKind() > > SourceBT->getKind()) {` NP. Will send a patch shortly. > After those are fixed, LGTM -- will you need me to commit this for you? I think so yes. -- Carl > On Tue, Oct 27, 2015 at 9:45 PM, Carl Norum via cfe-commits > wrote: > Hi folks, > > I had need of this warning, so I cobbled something together. Can someone > please check it out and let me know if it's reasonable? I'm certainly no > expert at this stuff. Patch attached for review, thanks! > > -- Carl > > > ___ > cfe-commits mailing list > cfe-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] Bug 15109: Implement -Wdouble-promotion for clang
OK, here you go! -- Carl double-promotion-2.patch Description: Binary data > On Oct 28, 2015, at 4:53 PM, Carl Norum wrote: > > >> On Oct 28, 2015, at 4:37 PM, George Burgess IV >> wrote: >> >> Thanks for this patch! :) Just a few small nits: >> - Is there a reason that test/SemaCXX/warn-double-promotion.cpp can't be at >> test/Sema/warn-double-promotion.c instead? > > No reason; I just found warn-float-conversion.c in there and this code is > similar. Can move easily. > >> - Can we make the warning message a bit more specific? Maybe something like >> "implicit conversion increases floating-point precision: %0 to %1"? > > Sure thing. > >> - Please get rid of the empty line after `else if (TargetBT->getKind() > >> SourceBT->getKind()) {` > > NP. Will send a patch shortly. > >> After those are fixed, LGTM -- will you need me to commit this for you? > > I think so yes. > > -- Carl > > >> On Tue, Oct 27, 2015 at 9:45 PM, Carl Norum via cfe-commits >> wrote: >> Hi folks, >> >> I had need of this warning, so I cobbled something together. Can someone >> please check it out and let me know if it's reasonable? I'm certainly no >> expert at this stuff. Patch attached for review, thanks! >> >> -- Carl >> >> >> ___ >> cfe-commits mailing list >> cfe-commits@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >> >> > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] Bug 15109: Implement -Wdouble-promotion for clang
Oh, that's fine. Sorry about that! -- Carl Thanks for committing. > On Oct 28, 2015, at 5:32 PM, George Burgess IV > wrote: > > Committed as r251588 -- thanks again! > > FYI: I'm assuming that you meant to change the test to > warn-double-promotion.c instead of leaving it as warn-double-promotion.cpp, > so I made that fix for you prior to committing. If this is isn't something > you wanted, please let me know. :) > > 2015-10-28 17:02 GMT-07:00 Carl Norum : > OK, here you go! > > -- Carl > > > > > > On Oct 28, 2015, at 4:53 PM, Carl Norum wrote: > > > > > >> On Oct 28, 2015, at 4:37 PM, George Burgess IV > >> wrote: > >> > >> Thanks for this patch! :) Just a few small nits: > >> - Is there a reason that test/SemaCXX/warn-double-promotion.cpp can't be > >> at test/Sema/warn-double-promotion.c instead? > > > > No reason; I just found warn-float-conversion.c in there and this code is > > similar. Can move easily. > > > >> - Can we make the warning message a bit more specific? Maybe something > >> like "implicit conversion increases floating-point precision: %0 to %1"? > > > > Sure thing. > > > >> - Please get rid of the empty line after `else if (TargetBT->getKind() > > >> SourceBT->getKind()) {` > > > > NP. Will send a patch shortly. > > > >> After those are fixed, LGTM -- will you need me to commit this for you? > > > > I think so yes. > > > > -- Carl > > > > > >> On Tue, Oct 27, 2015 at 9:45 PM, Carl Norum via cfe-commits > >> wrote: > >> Hi folks, > >> > >> I had need of this warning, so I cobbled something together. Can someone > >> please check it out and let me know if it's reasonable? I'm certainly no > >> expert at this stuff. Patch attached for review, thanks! > >> > >> -- Carl > >> > >> > >> ___ > >> cfe-commits mailing list > >> cfe-commits@lists.llvm.org > >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > >> > >> > > > > > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits