This is an archive of the discontinued LLVM Phabricator instance.

libclang: Generalize clang_getNumTemplateArguments and clang_getTemplateArgumentAsType to other kind of specializations.
ClosedPublic

Authored by emilio on Nov 15 2016, 2:54 AM.

Details

Reviewers
akyrtzi
EricWF
Summary

This allows me to stop hacking around the fact that template arguments for type aliases aren't inspectionable.

Diff Detail

Repository
rL LLVM

Event Timeline

emilio updated this revision to Diff 77965.Nov 15 2016, 2:54 AM
emilio retitled this revision from to libclang: Generalize clang_getNumTemplateArguments and clang_getTemplateArgumentAsType to other kind of specializations..
emilio updated this object.
emilio added a reviewer: akyrtzi.
emilio set the repository for this revision to rL LLVM.
emilio added a project: Restricted Project.
emilio updated this revision to Diff 77967.Nov 15 2016, 2:59 AM
emilio edited edge metadata.

Updated to use LLVM's coding style (with the star to the right), and also to reflect that template argument packs are now inspectionable.

akyrtzi accepted this revision.Nov 15 2016, 1:01 PM
akyrtzi edited edge metadata.

LGTM, thanks! Committed in r287024.

This revision is now accepted and ready to land.Nov 15 2016, 1:01 PM
akyrtzi closed this revision.Nov 15 2016, 1:02 PM

This breaks functionality of clang_getNumTemplateArguments/clang_getTemplateArgumentAsType in some case.

See my patch that fixes it: https://reviews.llvm.org/D27384

emilio added a comment.Dec 3 2016, 7:58 AM

@skalinichev Yeah, I noticed that and published https://reviews.llvm.org/D26907 a while ago, it hasn't been accepted yet though.

I'm happy with any of both patches to be fair.

Ah, sorry I didn't notice that review, let's keep to your version of the patch then.