]> granicus.if.org Git - clang/commit
[AST] Add CanonicalDeclPtr<T>.
authorJustin Lebar <jlebar@google.com>
Wed, 19 Oct 2016 21:03:42 +0000 (21:03 +0000)
committerJustin Lebar <jlebar@google.com>
Wed, 19 Oct 2016 21:03:42 +0000 (21:03 +0000)
commitf161d98e32e300b0473df474951be8cb0c8bda25
tree9ae256a91a64c537fa38a66a50042742c5e9cef1
parentf74e91e17369bbc076e875da6e20d45764ec0f7e
[AST] Add CanonicalDeclPtr<T>.

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.

Reviewers: rnk

Subscribers: cfe-commits, tra

Differential Revision: https://reviews.llvm.org/D25703

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284644 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Redeclarable.h