This is an archive of the discontinued LLVM Phabricator instance.

Follow-up to D6217
ClosedPublic

Authored by asl on Nov 13 2014, 3:20 PM.

Details

Summary

Ok, here is somewhat addition to D6217 aiming to preserve old darwin behavior wrt the typedefed types. The actual change to SemaChecking turned out to be pretty gross, in particular:

  1. We need to extract the typedef'ed type for proper diagnostics
  2. We need to walk over paren expressions as well

Diff Detail

Event Timeline

asl updated this revision to Diff 16185.Nov 13 2014, 3:20 PM
asl retitled this revision from to Follow-up to D6217.
asl updated this object.
asl edited the test plan for this revision. (Show Details)
asl added reviewers: rsmith, chandlerc.
asl set the repository for this revision to rL LLVM.
asl added a subscriber: Unknown Object (MLST).
rsmith accepted this revision.Nov 13 2014, 7:32 PM
rsmith edited edge metadata.

LGTM

lib/Sema/SemaChecking.cpp
3436–3444

I would be surprised if all our supported compilers cope with this syntax. Happily surprised, but surprised nonetheless.

test/CodeGen/complex.c
106–107

Please also add the same test but with the operands reversed.

This revision is now accepted and ready to land.Nov 13 2014, 7:32 PM
asl added inline comments.Nov 13 2014, 8:12 PM
lib/Sema/SemaChecking.cpp
3436–3444

If MSVC will have problems here, I will fall back to std::make_pair here surely.

asl closed this revision.Nov 14 2014, 1:41 PM