clang  12.0.0git
Public Types | 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_Boolean, AK_Double, AK_Unsigned,

Public Member Functions

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

Detailed Description

Kind identifier.

It supports all types that VariantValue can contain.

Definition at line 34 of file VariantValue.h.

Member Enumeration Documentation

◆ Kind


Definition at line 36 of file VariantValue.h.

Constructor & Destructor Documentation

◆ ArgKind() [1/2]

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

Constructor for non-matcher types.

Definition at line 44 of file VariantValue.h.

References AK_Matcher.

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

◆ ArgKind() [2/2]

clang::ast_matchers::dynamic::ArgKind::ArgKind ( ASTNodeKind  MatcherKind)

Constructor for matcher types.

Definition at line 47 of file VariantValue.h.

Member Function Documentation

◆ asString()

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

String representation of the type.

Definition at line 22 of file VariantValue.cpp.

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

Referenced by operator<().

◆ getArgKind()

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

◆ getMatcherKind()

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

◆ isConvertibleTo()

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

Determines if this type can be converted to To.

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

Definition at line 38 of file VariantValue.cpp.

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

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

◆ operator<()

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

Definition at line 63 of file VariantValue.h.

References AK_Matcher, and asString().

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