class CanonicalDeclPtr
Declaration
template <typename decl_type>
class CanonicalDeclPtr { /* full declaration omitted */ };
Description
A wrapper class around a pointer that always points to its canonical declaration. CanonicalDeclPtr <decl _type> behaves just like decl_type*, except we call decl_type::getCanonicalDecl() on construction. This is useful for hashtables that you want to be keyed on a declaration's canonical decl -- if you use CanonicalDeclPtr as the key, you don't need to remember to call getCanonicalDecl() everywhere.
Declared at: clang/include/clang/AST/Redeclarable.h:349
Templates
- decl_type
Member Variables
- private decl_type* Ptr = nullptr
Method Overview
- public CanonicalDeclPtr<decl_type>()
- public CanonicalDeclPtr<decl_type>(decl_type * Ptr)
- public CanonicalDeclPtr<decl_type>(const CanonicalDeclPtr<decl_type> &)
- public const decl_type * operator const type-parameter-0-0 *() const
- public decl_type * operator type-parameter-0-0 *()
Methods
¶CanonicalDeclPtr<decl_type>()
CanonicalDeclPtr<decl_type>()
Declared at: clang/include/clang/AST/Redeclarable.h:351
¶CanonicalDeclPtr<decl_type>(decl_type* Ptr)
CanonicalDeclPtr<decl_type>(decl_type* Ptr)
Declared at: clang/include/clang/AST/Redeclarable.h:352
Parameters
- decl_type* Ptr
¶CanonicalDeclPtr<decl_type>(
const CanonicalDeclPtr<decl_type>&)
CanonicalDeclPtr<decl_type>(
const CanonicalDeclPtr<decl_type>&)
Declared at: clang/include/clang/AST/Redeclarable.h:354
Parameters
- const CanonicalDeclPtr<decl_type>&
¶const decl_type* operator const type - parameter -
0 - 0 *() const
const decl_type* operator const type - parameter -
0 - 0 *() const
Declared at: clang/include/clang/AST/Redeclarable.h:358
¶decl_type* operator type - parameter - 0 - 0 *()
decl_type* operator type - parameter - 0 - 0 *()
Declared at: clang/include/clang/AST/Redeclarable.h:357