This is an archive of the discontinued LLVM Phabricator instance.

[AST] Add CanonicalDeclPtr<T>.
ClosedPublic

Authored by jlebar on Oct 17 2016, 3:03 PM.

Details

Summary

CanonicalDeclPtr<T> is just like a T*, except it calls
T::getCanonicalDecl() on construction.

This is useful as the key in a "set of canonical Decls" -- it's much
less error-prone than calling getCanonicalDecl() every time you touch
the set.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 74911.Oct 17 2016, 3:03 PM
jlebar retitled this revision from to [AST] Add CanonicalDeclPtr<T>..
jlebar updated this object.
jlebar added a reviewer: rnk.
jlebar added subscribers: tra, cfe-commits.
rnk accepted this revision.Oct 19 2016, 9:23 AM
rnk edited edge metadata.

lgtm

This revision is now accepted and ready to land.Oct 19 2016, 9:23 AM
This revision was automatically updated to reflect the committed changes.