clang 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
clang::ast_matchers::dynamic::ArgKind Class Reference

Kind identifier. More...

#include "clang/ASTMatchers/Dynamic/VariantValue.h"

Public Types

enum  Kind {
  AK_Matcher , AK_Node , AK_Boolean , AK_Double ,
  AK_Unsigned , AK_String
}
 

Public Member Functions

 ArgKind (Kind K)
 Constructor for non-matcher types.
 
Kind getArgKind () const
 
ASTNodeKind getMatcherKind () const
 
ASTNodeKind getNodeKind () const
 
bool isConvertibleTo (ArgKind To, unsigned *Specificity) const
 Determines if this type can be converted to To.
 
bool operator< (const ArgKind &Other) const
 
std::string asString () const
 String representation of the type.
 

Static Public Member Functions

static ArgKind MakeMatcherArg (ASTNodeKind MatcherKind)
 Constructor for matcher types.
 
static ArgKind MakeNodeArg (ASTNodeKind MatcherKind)
 

Detailed Description

Kind identifier.

It supports all types that VariantValue can contain.

Definition at line 34 of file VariantValue.h.

Member Enumeration Documentation

◆ Kind

Enumerator
AK_Matcher 
AK_Node 
AK_Boolean 
AK_Double 
AK_Unsigned 
AK_String 

Definition at line 36 of file VariantValue.h.

Constructor & Destructor Documentation

◆ ArgKind()

clang::ast_matchers::dynamic::ArgKind::ArgKind ( Kind  K)
inline

Constructor for non-matcher types.

Definition at line 45 of file VariantValue.h.

References AK_Matcher.

Member Function Documentation

◆ asString()

std::string clang::ast_matchers::dynamic::ArgKind::asString ( ) const

String representation of the type.

Definition at line 23 of file VariantValue.cpp.

References AK_Boolean, AK_Double, AK_Matcher, AK_Node, AK_String, AK_Unsigned, clang::ASTNodeKind::asStringRef(), and getArgKind().

◆ getArgKind()

Kind clang::ast_matchers::dynamic::ArgKind::getArgKind ( ) const
inline

Definition at line 56 of file VariantValue.h.

Referenced by asString().

◆ getMatcherKind()

ASTNodeKind clang::ast_matchers::dynamic::ArgKind::getMatcherKind ( ) const
inline

Definition at line 57 of file VariantValue.h.

References AK_Matcher.

◆ getNodeKind()

ASTNodeKind clang::ast_matchers::dynamic::ArgKind::getNodeKind ( ) const
inline

Definition at line 61 of file VariantValue.h.

References AK_Node.

◆ isConvertibleTo()

bool clang::ast_matchers::dynamic::ArgKind::isConvertibleTo ( ArgKind  To,
unsigned Specificity 
) const

Determines if this type can be converted to To.

Parameters
Tothe requested destination type.
Specificityvalue corresponding to the "specificity" of the conversion.

Definition at line 41 of file VariantValue.cpp.

References AK_Matcher, AK_Node, and clang::ASTNodeKind::isBaseOf().

Referenced by clang::ast_matchers::dynamic::VariantMatcher::SinglePayload::isConvertibleTo(), and clang::ast_matchers::dynamic::VariantMatcher::PolymorphicPayload::isConvertibleTo().

◆ MakeMatcherArg()

static ArgKind clang::ast_matchers::dynamic::ArgKind::MakeMatcherArg ( ASTNodeKind  MatcherKind)
inlinestatic

◆ MakeNodeArg()

static ArgKind clang::ast_matchers::dynamic::ArgKind::MakeNodeArg ( ASTNodeKind  MatcherKind)
inlinestatic

◆ operator<()

bool clang::ast_matchers::dynamic::ArgKind::operator< ( const ArgKind Other) const
inline

Definition at line 74 of file VariantValue.h.

References AK_Matcher, AK_Node, and clang::Other.


The documentation for this class was generated from the following files: