class ASTNodeKind
Declaration
class ASTNodeKind { /* full declaration omitted */ };
Description
Kind identifier. It can be constructed from any node kind and allows for runtime type hierarchy checks. Use getFromNodeKind <T >() to construct them.
Declared at: clang/include/clang/AST/ASTTypeTraits.h:51
Member Variables
- private clang::ASTNodeKind::NodeKindId KindId
- private static const clang::ASTNodeKind::KindInfo[918] AllKindInfo
Method Overview
- public ASTNodeKind()
- private ASTNodeKind(clang::ASTNodeKind::NodeKindId KindId)
- public llvm::StringRef asStringRef() const
- public clang::ASTNodeKind getCladeKind() const
- public static clang::ASTNodeKind getFromNode(const clang::Decl & D)
- public static clang::ASTNodeKind getFromNode(const clang::Stmt & S)
- public static clang::ASTNodeKind getFromNode(const clang::Type & T)
- public static clang::ASTNodeKind getFromNode(const clang::TypeLoc & T)
- public static clang::ASTNodeKind getFromNode(const clang::LambdaCapture & L)
- public static clang::ASTNodeKind getFromNode(const clang::OMPClause & C)
- public static clang::ASTNodeKind getFromNode(const clang::Attr & A)
- public template <class T>static clang::ASTNodeKind getFromNodeKind()
- public static clang::ASTNodeKind getMostDerivedCommonAncestor(clang::ASTNodeKind Kind1, clang::ASTNodeKind Kind2)
- public static clang::ASTNodeKind getMostDerivedType(clang::ASTNodeKind Kind1, clang::ASTNodeKind Kind2)
- public bool hasPointerIdentity() const
- public bool isBaseOf(clang::ASTNodeKind Other, unsigned int * Distance = nullptr) const
- private static bool isBaseOf(clang::ASTNodeKind::NodeKindId Base, clang::ASTNodeKind::NodeKindId Derived, unsigned int * Distance)
- public bool isNone() const
- public bool isSame(clang::ASTNodeKind Other) const
Methods
¶ASTNodeKind()
ASTNodeKind()
Description
Empty identifier. It matches nothing.
Declared at: clang/include/clang/AST/ASTTypeTraits.h:54
¶ASTNodeKind(clang::ASTNodeKind::NodeKindId KindId)
ASTNodeKind(clang::ASTNodeKind::NodeKindId KindId)
Description
Use getFromNodeKind <T >() to construct the kind.
Declared at: clang/include/clang/AST/ASTTypeTraits.h:168
Parameters
- clang::ASTNodeKind::NodeKindId KindId
¶llvm::StringRef asStringRef() const
llvm::StringRef asStringRef() const
Description
String representation of the kind.
Declared at: clang/include/clang/AST/ASTTypeTraits.h:87
¶clang::ASTNodeKind getCladeKind() const
clang::ASTNodeKind getCladeKind() const
Declared at: clang/include/clang/AST/ASTTypeTraits.h:105
¶static clang::ASTNodeKind getFromNode(
const clang::Decl& D)
static clang::ASTNodeKind getFromNode(
const clang::Decl& D)
Description
\ { Construct an identifier for the dynamic type of the node
Declared at: clang/include/clang/AST/ASTTypeTraits.h:64
Parameters
- const clang::Decl& D
¶static clang::ASTNodeKind getFromNode(
const clang::Stmt& S)
static clang::ASTNodeKind getFromNode(
const clang::Stmt& S)
Declared at: clang/include/clang/AST/ASTTypeTraits.h:65
Parameters
- const clang::Stmt& S
¶static clang::ASTNodeKind getFromNode(
const clang::Type& T)
static clang::ASTNodeKind getFromNode(
const clang::Type& T)
Declared at: clang/include/clang/AST/ASTTypeTraits.h:66
Parameters
- const clang::Type& T
¶static clang::ASTNodeKind getFromNode(
const clang::TypeLoc& T)
static clang::ASTNodeKind getFromNode(
const clang::TypeLoc& T)
Declared at: clang/include/clang/AST/ASTTypeTraits.h:67
Parameters
- const clang::TypeLoc& T
¶static clang::ASTNodeKind getFromNode(
const clang::LambdaCapture& L)
static clang::ASTNodeKind getFromNode(
const clang::LambdaCapture& L)
Declared at: clang/include/clang/AST/ASTTypeTraits.h:68
Parameters
- const clang::LambdaCapture& L
¶static clang::ASTNodeKind getFromNode(
const clang::OMPClause& C)
static clang::ASTNodeKind getFromNode(
const clang::OMPClause& C)
Declared at: clang/include/clang/AST/ASTTypeTraits.h:69
Parameters
- const clang::OMPClause& C
¶static clang::ASTNodeKind getFromNode(
const clang::Attr& A)
static clang::ASTNodeKind getFromNode(
const clang::Attr& A)
Declared at: clang/include/clang/AST/ASTTypeTraits.h:70
Parameters
- const clang::Attr& A
¶template <class T>
static clang::ASTNodeKind getFromNodeKind()
template <class T>
static clang::ASTNodeKind getFromNodeKind()
Description
Construct an identifier for T.
Declared at: clang/include/clang/AST/ASTTypeTraits.h:58
Templates
- T
¶static clang::ASTNodeKind
getMostDerivedCommonAncestor(
clang::ASTNodeKind Kind1,
clang::ASTNodeKind Kind2)
static clang::ASTNodeKind
getMostDerivedCommonAncestor(
clang::ASTNodeKind Kind1,
clang::ASTNodeKind Kind2)
Description
Return the most derived common ancestor between Kind1 and Kind2. Return ASTNodeKind() if they are not related.
Declared at: clang/include/clang/AST/ASTTypeTraits.h:102
Parameters
- clang::ASTNodeKind Kind1
- clang::ASTNodeKind Kind2
¶static clang::ASTNodeKind getMostDerivedType(
clang::ASTNodeKind Kind1,
clang::ASTNodeKind Kind2)
static clang::ASTNodeKind getMostDerivedType(
clang::ASTNodeKind Kind1,
clang::ASTNodeKind Kind2)
Description
Return the most derived type between \p Kind1 and \p Kind2. Return ASTNodeKind() if they are not related.
Declared at: clang/include/clang/AST/ASTTypeTraits.h:97
Parameters
- clang::ASTNodeKind Kind1
- clang::ASTNodeKind Kind2
¶bool hasPointerIdentity() const
bool hasPointerIdentity() const
Description
Check if the given ASTNodeKind identifies a type that offers pointer identity. This is useful for the fast path in DynTypedNode.
Declared at: clang/include/clang/AST/ASTTypeTraits.h:124
¶bool isBaseOf(
clang::ASTNodeKind Other,
unsigned int* Distance = nullptr) const
bool isBaseOf(
clang::ASTNodeKind Other,
unsigned int* Distance = nullptr) const
Description
Returns \c true if \c this is a base kind of (or same as) \c Other.
Declared at: clang/include/clang/AST/ASTTypeTraits.h:84
Parameters
- clang::ASTNodeKind Other
- unsigned int* Distance = nullptr
- If non-null, used to return the distance between \c this and \c Other in the class hierarchy.
¶static bool isBaseOf(
clang::ASTNodeKind::NodeKindId Base,
clang::ASTNodeKind::NodeKindId Derived,
unsigned int* Distance)
static bool isBaseOf(
clang::ASTNodeKind::NodeKindId Base,
clang::ASTNodeKind::NodeKindId Derived,
unsigned int* Distance)
Description
Returns \c true if \c Base is a base kind of (or same as) \c Derived.
Declared at: clang/include/clang/AST/ASTTypeTraits.h:174
Parameters
- clang::ASTNodeKind::NodeKindId Base
- clang::ASTNodeKind::NodeKindId Derived
- unsigned int* Distance
- If non-null, used to return the distance between \c Base and \c Derived in the class hierarchy.
¶bool isNone() const
bool isNone() const
Description
Returns \c true only for the default \c ASTNodeKind()
Declared at: clang/include/clang/AST/ASTTypeTraits.h:79
¶bool isSame(clang::ASTNodeKind Other) const
bool isSame(clang::ASTNodeKind Other) const
Description
Returns \c true if \c this and \c Other represent the same kind.
Declared at: clang/include/clang/AST/ASTTypeTraits.h:74
Parameters
- clang::ASTNodeKind Other