This is an archive of the discontinued LLVM Phabricator instance.

Determine if there's a getDecl member function using less hacks
ClosedPublic

Authored by aaron.ballman on Feb 24 2016, 10:29 AM.

Details

Reviewers
klimek
sbenza
Summary

ASTMatchersInternal uses a custom type trait to determine the presence or absence of a getDecl member function. While the current implementation works, it requires compiler-specific hackery to work around some MSVC issues. This patch replaces the original implementation with one that requires less compiler-specific work.

Diff Detail

Event Timeline

aaron.ballman retitled this revision from to Determine if there's a getDecl member function using less hacks.
aaron.ballman updated this object.
aaron.ballman added reviewers: sbenza, klimek.
aaron.ballman added a subscriber: cfe-commits.
sbenza edited edge metadata.Feb 24 2016, 1:14 PM

I assume you checked that the new trait works on MSVC.
Aren't both the same type of expression SFINAE? Is somehow one supported but not the other?

sbenza accepted this revision.Feb 25 2016, 7:08 AM
sbenza edited edge metadata.
This revision is now accepted and ready to land.Feb 25 2016, 7:08 AM
aaron.ballman closed this revision.Feb 25 2016, 7:19 AM

Thanks! I've commit in r261872.