clang 8.0.0

Functions
clang::data_collection Namespace Reference

## Functions
std::string | getMacroStack (SourceLocation Loc, ASTContext &Context)
| Returns a string that represents all macro expansions that expanded into the given SourceLocation. More...
template<class T >
void | addDataToConsumer (T &DataConsumer, llvm::StringRef Str)
| Utility functions for implementing addData() for a consumer that has a method update(StringRef) More...
template<class T >
void | addDataToConsumer (T &DataConsumer, const QualType &QT)
template<class T , class Type >
std::enable_if< std::is_integral< Type >::value||std::is_enum< Type >::value||std::is_convertible< Type, size_t >::value >::type | addDataToConsumer (T &DataConsumer, Type Data)
static void | printMacroName (llvm::raw_string_ostream &MacroStack, ASTContext &Context, SourceLocation Loc)
| Prints the macro name that contains the given SourceLocation into the given raw_string_ostream. More...

## Function Documentation

## ◆ addDataToConsumer() [1/3]

template<class T >

void clang::data_collection::addDataToConsumer | ( | T & | DataConsumer,
|  | llvm::StringRef | Str
| ) |  |

Utility functions for implementing addData() for a consumer that has a method update(StringRef)

Definition at line 45 of file DataCollection.h.

Referenced by addDataToConsumer().

## ◆ addDataToConsumer() [2/3]

template<class T >

void clang::data_collection::addDataToConsumer | ( | T & | DataConsumer,
|  | const QualType & | QT
| ) |  |

Definition at line 49 of file DataCollection.h.

References addDataToConsumer(), and clang::QualType::getAsString().

## ◆ addDataToConsumer() [3/3]

template<class T , class Type >

std::enable_if< std::is_integral<Type>::value || std::is_enum<Type>::value || std::is_convertible<Type, size_t>::value >::type clang::data_collection::addDataToConsumer | ( | T & | DataConsumer,
|  | Type | Data
| ) |  |

Definition at line 58 of file DataCollection.h.

## ◆ getMacroStack()

std::string clang::data_collection::getMacroStack | ( | SourceLocation | Loc,
|  | ASTContext & | Context
| ) |  |

Returns a string that represents all macro expansions that expanded into the given SourceLocation.

If 'getMacroStack(A) == getMacroStack(B)' is true, then the SourceLocations A and B are expanded from the same macros in the same order.

Definition at line 34 of file DataCollection.cpp.

## ◆ printMacroName()

static void clang::data_collection::printMacroName | ( | llvm::raw_string_ostream & | MacroStack,
|  | ASTContext & | Context,
|  | SourceLocation | Loc
| ) |  |
| static

Prints the macro name that contains the given SourceLocation into the given raw_string_ostream.

Definition at line 19 of file DataCollection.cpp.