clang 8.0.0

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, AK_String }

## Public Member Functions
| ArgKind (Kind K)
| Constructor for non-matcher types. More...
| ArgKind (ast_type_traits::ASTNodeKind MatcherKind)
| Constructor for matcher types. More...
Kind | getArgKind () const
ast_type_traits::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

enum clang::ast_matchers::dynamic::ArgKind::Kind

Enumerator
AK_Matcher |
AK_Boolean |
AK_Double |
AK_Unsigned |
AK_String |

Definition at line 36 of file VariantValue.h.

## Constructor & Destructor Documentation

## ◆ ArgKind() [1/2]

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

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 | ( | ast_type_traits::ASTNodeKind | MatcherKind | ) |
| inline

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 23 of file VariantValue.cpp.

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

Referenced by operator<().

## ◆ getArgKind()

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

Definition at line 50 of file VariantValue.h.

Referenced by asString(), and clang::ast_matchers::dynamic::VariantValue::isConvertibleTo().

## ◆ getMatcherKind()

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

Definition at line 51 of file VariantValue.h.

References AK_Matcher, and isConvertibleTo().

Referenced by clang::ast_matchers::dynamic::VariantValue::isConvertibleTo().

## ◆ isConvertibleTo()

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

Determines if this type can be converted to `To`.

Parameters

  To | the requested destination type.
  Specificity | value corresponding to the "specificity" of the conversion.

Definition at line 39 of file VariantValue.cpp.

References AK_Matcher, and clang::ast_type_traits::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
| inline

Definition at line 64 of file VariantValue.h.

References AK_Matcher, and asString().

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

- include/clang/ASTMatchers/Dynamic/VariantValue.h
- lib/ASTMatchers/Dynamic/VariantValue.cpp