This is an archive of the discontinued LLVM Phabricator instance.

Rename arguments in include/cmath to work around Newlib macro implementation using these particular names
ClosedPublic

Authored by jroelofs on Aug 26 2014, 3:01 PM.

Details

Reviewers
danalbert
EricWF
Summary

This is a careful, mechanical renaming.

Diff Detail

Event Timeline

jroelofs updated this revision to Diff 12972.Aug 26 2014, 3:01 PM
jroelofs retitled this revision from to Rename arguments in include/cmath to work around Newlib macro implementation using these particular names.
jroelofs updated this object.
jroelofs edited the test plan for this revision. (Show Details)
jroelofs added a reviewer: danalbert.
jroelofs added a subscriber: Unknown Object (MLST).
jroelofs added a comment.EditedAug 26 2014, 3:09 PM

Here's one of many examples from Newlib's <math.h> that motivated this:

#define isgreater(x,y) (__extension__ ({__typeof__(x) __x = (x); __typeof__(y) __y = (y); !isunordered(__x,__y) && (__x > __y);}))
EricWF added a subscriber: EricWF.

I'll take a look at this tonight. If all it does is rename stuff It should be a very easy review.

EricWF accepted this revision.Aug 26 2014, 4:40 PM
EricWF edited edge metadata.

LGTM. I think we should change __z but I realize that if it doesn't cause any problems now it probably never will.

include/cmath
873–875

Take it or leave it but maybe we should change __e as well.

1213–1216

Lets do it for __z just to be consistent.

This revision is now accepted and ready to land.Aug 26 2014, 4:40 PM

For consistency, I agree, I think s/__[ez]/_lcpp_\1/ is appropriate. Didn't see them before.

jroelofs updated this revision to Diff 12989.Aug 27 2014, 7:13 AM
jroelofs edited edge metadata.

Also rename instances of e and z for consistency.

jroelofs closed this revision.Aug 27 2014, 7:15 AM

r216548