* name of template class now also contains type information on the template parameters (e.g. typename, class, bool, const std::string&, etc.) * implemented handling of non-type template parameters and template template parameters. * implemented lots of tests for these features.
28 lines
912 B
C++
28 lines
912 B
C++
#ifndef UTILITY_CLANG_H
|
|
#define UTILITY_CLANG_H
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "clang/AST/Type.h"
|
|
#include "clang/AST/Decl.h"
|
|
#include "clang/AST/DeclTemplate.h"
|
|
|
|
class DataType;
|
|
|
|
namespace utility
|
|
{
|
|
DataType qualTypeToDataType(clang::QualType qualType);
|
|
|
|
std::vector<std::string> getDeclNameHierarchy(const clang::Decl* declaration);
|
|
std::vector<std::string> getContextNameHierarchy(const clang::DeclContext* declaration);
|
|
std::string getDeclName(const clang::NamedDecl* declaration);
|
|
std::vector<std::string> getTemplateSpecializationParentNameHierarchy(clang::ClassTemplateSpecializationDecl* declaration);
|
|
DataType templateArgumentToDataType(const clang::TemplateArgument& argument);
|
|
std::string getTemplateParameterString(const clang::NamedDecl* parameter);
|
|
std::string getTemplateArgumentName(const clang::TemplateArgument& argument);
|
|
}
|
|
|
|
#endif // UTILITY_CLANG_H
|