This is an archive of the discontinued LLVM Phabricator instance.

Revert rL301328 and add tests for the regressions introduced.
ClosedPublic

Authored by emilio on Apr 26 2017, 3:43 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

emilio created this revision.Apr 26 2017, 3:43 PM
rsmith edited edge metadata.Apr 27 2017, 12:31 AM

I'm OK with this from a mechanical perspective. But there's also a libclang design question here: what should the libclang methods to query template arguments for a type cursor representing an alias template specialization actually do? Should there be some way for a libclang user to choose what result they get?

One way we could make the behavior fully consistent (and more backwards-compatible with pre-clang-4.0) would be to revert both this and D26663, and provide the information that D26663 wanted to expose by another set of interface functions. What do other people with an interest in the libclang interface think?

I'm personally fine with this behavior in particular, given you can check the cursor you're querying to know if it's a typedef or alias specialization. Of course I'm not the only one using libclang, though, so I'd be interested in hearing other people's opinion.

I think that we should try to prevent this _third_ different behavior to stay in tree in the meantime, though, what do you think?

rsmith accepted this revision.Apr 28 2017, 4:55 PM

Yes, let's first revert back to the clang 4.0 behavior, then please mail cfe-dev to discuss what the right behavior should be.

This revision is now accepted and ready to land.Apr 28 2017, 4:55 PM
This revision was automatically updated to reflect the committed changes.