class VariantValue

Declaration

class VariantValue { /* full declaration omitted */ };

Description

- \c unsigned - \c llvm::StringRef - \c VariantMatcher (\c DynTypedMatcher / \c Matcher<T>)

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:254

Member Variables

private clang::ast_matchers::dynamic::VariantValue:: ValueType Type
private clang::ast_matchers::dynamic::VariantValue:: AllValues Value

Method Overview

Methods

VariantValue(const clang::ast_matchers::dynamic::
                 VariantValue& Other)

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:258

Parameters

const clang::ast_matchers::dynamic::VariantValue& Other

VariantValue()

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:256

VariantValue(bool Boolean)

Description

Specific constructors for each supported type.

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:263

Parameters

bool Boolean

VariantValue(double Double)

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:264

Parameters

double Double

VariantValue(unsigned int Unsigned)

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:265

Parameters

unsigned int Unsigned

VariantValue(llvm::StringRef String)

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:266

Parameters

llvm::StringRef String

VariantValue(clang::ASTNodeKind NodeKind)

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:267

Parameters

clang::ASTNodeKind NodeKind

VariantValue(const clang::ast_matchers::dynamic::
                 VariantMatcher& Matchers)

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:268

Parameters

const clang::ast_matchers::dynamic:: VariantMatcher& Matchers

VariantValue(int Signed)

Description

Constructs an \c unsigned value (disambiguation from bool).

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:271

Parameters

int Signed

bool getBoolean() const

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:279

double getDouble() const

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:284

const clang::ast_matchers::dynamic::
    VariantMatcher&
    getMatcher() const

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:303

const clang::ASTNodeKind& getNodeKind() const

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:298

const std::string& getString() const

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:294

std::string getTypeAsString() const

Description

String representation of the type of the value.

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:325

unsigned int getUnsigned() const

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:289

bool hasValue() const

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:275

bool isBoolean() const

Description

Boolean value functions.

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:278

bool isConvertibleTo(
    ArrayRef<
        clang::ast_matchers::dynamic::ArgKind>
        Kinds,
    unsigned int* Specificity) const

Description

Determines if the contained value can be converted to any kind in \p Kinds.

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:322

Parameters

ArrayRef<clang::ast_matchers::dynamic::ArgKind> Kinds
the requested destination types.
unsigned int* Specificity
value corresponding to the "specificity" of the conversion. It is the maximum specificity of all the possible conversions.

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

Description

Determines if the contained value can be converted to \p Kind.

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:312

Parameters

clang::ast_matchers::dynamic::ArgKind Kind
the requested destination type.
unsigned int* Specificity
value corresponding to the "specificity" of the conversion.

bool isDouble() const

Description

Double value functions.

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:283

bool isMatcher() const

Description

Matcher value functions.

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:302

bool isNodeKind() const

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:297

bool isString() const

Description

String value functions.

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:293

bool isUnsigned() const

Description

Unsigned value functions.

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:288

bool operator bool() const

Description

Returns true iff this is not an empty value.

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:274

void reset()

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:328

void setBoolean(bool Boolean)

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:280

Parameters

bool Boolean

void setDouble(double Double)

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:285

Parameters

double Double

void setMatcher(
    const clang::ast_matchers::dynamic::
        VariantMatcher& Matcher)

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:304

Parameters

const clang::ast_matchers::dynamic:: VariantMatcher& Matcher

void setNodeKind(clang::ASTNodeKind NodeKind)

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:299

Parameters

clang::ASTNodeKind NodeKind

void setString(llvm::StringRef String)

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:295

Parameters

llvm::StringRef String

void setUnsigned(unsigned int Unsigned)

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:290

Parameters

unsigned int Unsigned

~VariantValue()

Declared at: clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:259