This is an archive of the discontinued LLVM Phabricator instance.

Improve test coverage of -Wdouble-promotion
ClosedPublic

Authored by rob.lougher on Jan 18 2016, 10:06 AM.

Details

Summary

The -Wdouble-promotion warning was added to clang in r251588 (fixing PR15109). The added test, however, only covered a subset of the cases where implicit conversion can occur (assignment and function return). This patch extends the coverage to include argument passing and a binary operator (multiply).

The patch also includes coverage for *= and the conditional (ternary) operator. However, warnings are not produced for all the *= cases, and no warnings are generated for the conditional operator. These have been marked as FIXME and I will raise bugs for these separately.

Note, I've added George Burgess IV as reviewer as he committed the original change and Carl Norum (the author) doesn't seem to be registered.

Diff Detail

Repository
rL LLVM

Event Timeline

rob.lougher retitled this revision from to Improve test coverage of -Wdouble-promotion.
rob.lougher updated this object.
rob.lougher added a reviewer: gbiv.
rob.lougher added a subscriber: cfe-commits.

Ping. Just test changes - OK to commit?

Ping. Please can somebody review this? Thanks!

Hey -- I'm really sorry about the latency on this; I recently (within the last month) discovered that I don't actually receive an email for reviews sent to gbiv, so I had to make a filter specifically to catch things like this. As a result, this is the first time I'm seeing that I'm a reviewer for this. :(

Sorry again, and LGTM.

This revision is now accepted and ready to land.Apr 28 2016, 11:20 AM

No problem. Thanks for the code review.

This revision was automatically updated to reflect the committed changes.