This is an archive of the discontinued LLVM Phabricator instance.

[Bugfix] Make type deduction work more nicely with unaddressable functions
ClosedPublic

Authored by george.burgess.iv on Dec 16 2015, 2:48 PM.

Details

Summary

Given:

void foo(int i) __attribute__((enable_if(i < 0, "")));
void foo(double d);

auto fooToCall = foo;

...We currently can't determine the type of fooToCall, so this fails to compile. This patch lets us infer fooToCall to be `void (*)(double);

Diff Detail

Repository
rL LLVM

Event Timeline

george.burgess.iv retitled this revision from to [Bugfix] Make type deduction work more nicely with unaddressable functions.
george.burgess.iv updated this object.
george.burgess.iv added a reviewer: rsmith.
george.burgess.iv added a subscriber: cfe-commits.
  • Rebased
  • Added tests for template type inference
  • Updated to use machinery introduced by D17701
rsmith accepted this revision.Mar 18 2016, 11:23 AM
rsmith edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 18 2016, 11:23 AM
This revision was automatically updated to reflect the committed changes.