|
|
@ -12,12 +12,14 @@ |
|
|
|
#include <llvm/Support/Path.h> |
|
|
|
#include <llvm/Support/Path.h> |
|
|
|
|
|
|
|
|
|
|
|
// copy from widenPath ('llvm/lib/Support/Windows/Path.inc')
|
|
|
|
// copy from widenPath ('llvm/lib/Support/Windows/Path.inc')
|
|
|
|
static std::string normalizePath(const std::string & File) { |
|
|
|
static std::string normalizePath(const std::string& File) |
|
|
|
|
|
|
|
{ |
|
|
|
llvm::SmallString<2 * 128> Result; |
|
|
|
llvm::SmallString<2 * 128> Result; |
|
|
|
|
|
|
|
|
|
|
|
for (llvm::sys::path::const_iterator I = llvm::sys::path::begin(File), |
|
|
|
for (llvm::sys::path::const_iterator I = llvm::sys::path::begin(File), |
|
|
|
E = llvm::sys::path::end(File); |
|
|
|
E = llvm::sys::path::end(File); |
|
|
|
I != E; ++I) { |
|
|
|
I != E; ++I) |
|
|
|
|
|
|
|
{ |
|
|
|
if (I->size() == 1 && *I == ".") |
|
|
|
if (I->size() == 1 && *I == ".") |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
if (I->size() == 2 && *I == "..") |
|
|
|
if (I->size() == 2 && *I == "..") |
|
|
@ -35,15 +37,18 @@ static std::string normalizePath(const std::string & File) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template <typename T> |
|
|
|
template <typename T> |
|
|
|
static std::vector<T> split(const T & str, const T & delimiters) { |
|
|
|
static std::vector<T> split(const T& str, const T& delimiters) |
|
|
|
|
|
|
|
{ |
|
|
|
std::vector<T> v; |
|
|
|
std::vector<T> v; |
|
|
|
if (str.length() == 0) { |
|
|
|
if (str.length() == 0) |
|
|
|
|
|
|
|
{ |
|
|
|
v.push_back(str); |
|
|
|
v.push_back(str); |
|
|
|
return v; |
|
|
|
return v; |
|
|
|
} |
|
|
|
} |
|
|
|
typename T::size_type start = 0; |
|
|
|
typename T::size_type start = 0; |
|
|
|
auto pos = str.find_first_of(delimiters, start); |
|
|
|
auto pos = str.find_first_of(delimiters, start); |
|
|
|
while(pos != T::npos) { |
|
|
|
while (pos != T::npos) |
|
|
|
|
|
|
|
{ |
|
|
|
if (pos != start) // ignore empty tokens
|
|
|
|
if (pos != start) // ignore empty tokens
|
|
|
|
v.emplace_back(str, start, pos - start); |
|
|
|
v.emplace_back(str, start, pos - start); |
|
|
|
start = pos + 1; |
|
|
|
start = pos + 1; |
|
|
@ -80,14 +85,32 @@ static void deleteExpression(ExpressionObsolete* expression) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Type::Type(TypeKind kind) : kind(kind) {} |
|
|
|
Type::Type(TypeKind kind) |
|
|
|
Type::Type(const Type& rhs) : kind(rhs.kind), isDependent(rhs.isDependent) {} |
|
|
|
: kind(kind) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Type::Type(const Type& rhs) |
|
|
|
|
|
|
|
: kind(rhs.kind) |
|
|
|
|
|
|
|
, isDependent(rhs.isDependent) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
QualifiedType::QualifiedType() : type(0) {} |
|
|
|
QualifiedType::QualifiedType() |
|
|
|
|
|
|
|
: type(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TagType::TagType() : Type(TypeKind::Tag) {} |
|
|
|
TagType::TagType() |
|
|
|
|
|
|
|
: Type(TypeKind::Tag) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ArrayType::ArrayType() : Type(TypeKind::Array), size(0), elementSize(0) {} |
|
|
|
ArrayType::ArrayType() |
|
|
|
|
|
|
|
: Type(TypeKind::Array) |
|
|
|
|
|
|
|
, size(0) |
|
|
|
|
|
|
|
, elementSize(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FunctionType::FunctionType() |
|
|
|
FunctionType::FunctionType() |
|
|
|
: Type(TypeKind::Function) |
|
|
|
: Type(TypeKind::Function) |
|
|
@ -100,15 +123,31 @@ FunctionType::~FunctionType() {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(FunctionType, Parameter*, Parameters) |
|
|
|
DEF_VECTOR(FunctionType, Parameter*, Parameters) |
|
|
|
|
|
|
|
|
|
|
|
PointerType::PointerType() : Type(TypeKind::Pointer) {} |
|
|
|
PointerType::PointerType() |
|
|
|
|
|
|
|
: Type(TypeKind::Pointer) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
MemberPointerType::MemberPointerType() : Type(TypeKind::MemberPointer) {} |
|
|
|
MemberPointerType::MemberPointerType() |
|
|
|
|
|
|
|
: Type(TypeKind::MemberPointer) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TypedefType::TypedefType() : Type(TypeKind::Typedef), declaration(0) {} |
|
|
|
TypedefType::TypedefType() |
|
|
|
|
|
|
|
: Type(TypeKind::Typedef) |
|
|
|
|
|
|
|
, declaration(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
AttributedType::AttributedType() : Type(TypeKind::Attributed) {} |
|
|
|
AttributedType::AttributedType() |
|
|
|
|
|
|
|
: Type(TypeKind::Attributed) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DecayedType::DecayedType() : Type(TypeKind::Decayed) {} |
|
|
|
DecayedType::DecayedType() |
|
|
|
|
|
|
|
: Type(TypeKind::Decayed) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Template
|
|
|
|
// Template
|
|
|
|
TemplateParameter::TemplateParameter(DeclarationKind kind) |
|
|
|
TemplateParameter::TemplateParameter(DeclarationKind kind) |
|
|
@ -173,36 +212,61 @@ NonTypeTemplateParameter::~NonTypeTemplateParameter() |
|
|
|
deleteExpression(defaultArgument); |
|
|
|
deleteExpression(defaultArgument); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TemplateArgument::TemplateArgument() : declaration(0), integral(0) {} |
|
|
|
TemplateArgument::TemplateArgument() |
|
|
|
|
|
|
|
: declaration(0) |
|
|
|
|
|
|
|
, integral(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TemplateSpecializationType::TemplateSpecializationType() |
|
|
|
TemplateSpecializationType::TemplateSpecializationType() |
|
|
|
: Type(TypeKind::TemplateSpecialization), _template(0) {} |
|
|
|
: Type(TypeKind::TemplateSpecialization) |
|
|
|
|
|
|
|
, _template(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TemplateSpecializationType::TemplateSpecializationType( |
|
|
|
TemplateSpecializationType::TemplateSpecializationType( |
|
|
|
const TemplateSpecializationType& rhs) : Type(rhs), |
|
|
|
const TemplateSpecializationType& rhs) |
|
|
|
Arguments(rhs.Arguments), _template(rhs._template), desugared(rhs.desugared) {} |
|
|
|
: Type(rhs) |
|
|
|
|
|
|
|
, Arguments(rhs.Arguments) |
|
|
|
|
|
|
|
, _template(rhs._template) |
|
|
|
|
|
|
|
, desugared(rhs.desugared) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TemplateSpecializationType::~TemplateSpecializationType() {} |
|
|
|
TemplateSpecializationType::~TemplateSpecializationType() {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(TemplateSpecializationType, TemplateArgument, Arguments) |
|
|
|
DEF_VECTOR(TemplateSpecializationType, TemplateArgument, Arguments) |
|
|
|
|
|
|
|
|
|
|
|
DependentTemplateSpecializationType::DependentTemplateSpecializationType() |
|
|
|
DependentTemplateSpecializationType::DependentTemplateSpecializationType() |
|
|
|
: Type(TypeKind::DependentTemplateSpecialization) {} |
|
|
|
: Type(TypeKind::DependentTemplateSpecialization) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DependentTemplateSpecializationType::DependentTemplateSpecializationType( |
|
|
|
DependentTemplateSpecializationType::DependentTemplateSpecializationType( |
|
|
|
const DependentTemplateSpecializationType& rhs) : Type(rhs), |
|
|
|
const DependentTemplateSpecializationType& rhs) |
|
|
|
Arguments(rhs.Arguments), desugared(rhs.desugared) {} |
|
|
|
: Type(rhs) |
|
|
|
|
|
|
|
, Arguments(rhs.Arguments) |
|
|
|
|
|
|
|
, desugared(rhs.desugared) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DependentTemplateSpecializationType::~DependentTemplateSpecializationType() {} |
|
|
|
DependentTemplateSpecializationType::~DependentTemplateSpecializationType() {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(DependentTemplateSpecializationType, TemplateArgument, Arguments) |
|
|
|
DEF_VECTOR(DependentTemplateSpecializationType, TemplateArgument, Arguments) |
|
|
|
|
|
|
|
|
|
|
|
TemplateParameterType::TemplateParameterType() : Type(TypeKind::TemplateParameter), parameter(0) {} |
|
|
|
TemplateParameterType::TemplateParameterType() |
|
|
|
|
|
|
|
: Type(TypeKind::TemplateParameter) |
|
|
|
|
|
|
|
, parameter(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TemplateParameterType::~TemplateParameterType() {} |
|
|
|
TemplateParameterType::~TemplateParameterType() {} |
|
|
|
|
|
|
|
|
|
|
|
TemplateParameterSubstitutionType::TemplateParameterSubstitutionType() |
|
|
|
TemplateParameterSubstitutionType::TemplateParameterSubstitutionType() |
|
|
|
: Type(TypeKind::TemplateParameterSubstitution), replacedParameter(0) {} |
|
|
|
: Type(TypeKind::TemplateParameterSubstitution) |
|
|
|
|
|
|
|
, replacedParameter(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
InjectedClassNameType::InjectedClassNameType() |
|
|
|
InjectedClassNameType::InjectedClassNameType() |
|
|
|
: Type(TypeKind::InjectedClassName) |
|
|
|
: Type(TypeKind::InjectedClassName) |
|
|
@ -210,35 +274,74 @@ InjectedClassNameType::InjectedClassNameType() |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DependentNameType::DependentNameType() : Type(TypeKind::DependentName) {} |
|
|
|
DependentNameType::DependentNameType() |
|
|
|
|
|
|
|
: Type(TypeKind::DependentName) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DependentNameType::~DependentNameType() {} |
|
|
|
DependentNameType::~DependentNameType() {} |
|
|
|
|
|
|
|
|
|
|
|
PackExpansionType::PackExpansionType() : Type(TypeKind::PackExpansion) {} |
|
|
|
PackExpansionType::PackExpansionType() |
|
|
|
|
|
|
|
: Type(TypeKind::PackExpansion) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UnaryTransformType::UnaryTransformType() : Type(TypeKind::UnaryTransform) {} |
|
|
|
UnaryTransformType::UnaryTransformType() |
|
|
|
|
|
|
|
: Type(TypeKind::UnaryTransform) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UnresolvedUsingType::UnresolvedUsingType() : Type(TypeKind::UnresolvedUsing) {} |
|
|
|
UnresolvedUsingType::UnresolvedUsingType() |
|
|
|
|
|
|
|
: Type(TypeKind::UnresolvedUsing) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
VectorType::VectorType() : Type(TypeKind::Vector), numElements(0) {} |
|
|
|
VectorType::VectorType() |
|
|
|
|
|
|
|
: Type(TypeKind::Vector) |
|
|
|
|
|
|
|
, numElements(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BuiltinType::BuiltinType() : CppSharp::CppParser::AST::Type(TypeKind::Builtin) {} |
|
|
|
BuiltinType::BuiltinType() |
|
|
|
|
|
|
|
: CppSharp::CppParser::AST::Type(TypeKind::Builtin) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
VTableComponent::VTableComponent() : offset(0), declaration(0) {} |
|
|
|
VTableComponent::VTableComponent() |
|
|
|
|
|
|
|
: offset(0) |
|
|
|
|
|
|
|
, declaration(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// VTableLayout
|
|
|
|
// VTableLayout
|
|
|
|
VTableLayout::VTableLayout() {} |
|
|
|
VTableLayout::VTableLayout() {} |
|
|
|
VTableLayout::VTableLayout(const VTableLayout& rhs) : Components(rhs.Components) {} |
|
|
|
VTableLayout::VTableLayout(const VTableLayout& rhs) |
|
|
|
|
|
|
|
: Components(rhs.Components) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
VTableLayout::~VTableLayout() {} |
|
|
|
VTableLayout::~VTableLayout() {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(VTableLayout, VTableComponent, Components) |
|
|
|
DEF_VECTOR(VTableLayout, VTableComponent, Components) |
|
|
|
|
|
|
|
|
|
|
|
VFTableInfo::VFTableInfo() : VBTableIndex(0), VFPtrOffset(0), VFPtrFullOffset(0) {} |
|
|
|
VFTableInfo::VFTableInfo() |
|
|
|
VFTableInfo::VFTableInfo(const VFTableInfo& rhs) : VBTableIndex(rhs.VBTableIndex), |
|
|
|
: VBTableIndex(0) |
|
|
|
VFPtrOffset(rhs.VFPtrOffset), VFPtrFullOffset(rhs.VFPtrFullOffset), |
|
|
|
, VFPtrOffset(0) |
|
|
|
layout(rhs.layout) {} |
|
|
|
, VFPtrFullOffset(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
VFTableInfo::VFTableInfo(const VFTableInfo& rhs) |
|
|
|
|
|
|
|
: VBTableIndex(rhs.VBTableIndex) |
|
|
|
|
|
|
|
, VFPtrOffset(rhs.VFPtrOffset) |
|
|
|
|
|
|
|
, VFPtrFullOffset(rhs.VFPtrFullOffset) |
|
|
|
|
|
|
|
, layout(rhs.layout) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
LayoutField::LayoutField() : offset(0), fieldPtr(0) {} |
|
|
|
LayoutField::LayoutField() |
|
|
|
|
|
|
|
: offset(0) |
|
|
|
|
|
|
|
, fieldPtr(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
LayoutField::LayoutField(const LayoutField& other) |
|
|
|
LayoutField::LayoutField(const LayoutField& other) |
|
|
|
: offset(other.offset) |
|
|
|
: offset(other.offset) |
|
|
@ -250,14 +353,30 @@ LayoutField::LayoutField(const LayoutField & other) |
|
|
|
|
|
|
|
|
|
|
|
LayoutField::~LayoutField() {} |
|
|
|
LayoutField::~LayoutField() {} |
|
|
|
|
|
|
|
|
|
|
|
LayoutBase::LayoutBase() : offset(0), _class(0) {} |
|
|
|
LayoutBase::LayoutBase() |
|
|
|
|
|
|
|
: offset(0) |
|
|
|
|
|
|
|
, _class(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
LayoutBase::LayoutBase(const LayoutBase& other) : offset(other.offset), _class(other._class) {} |
|
|
|
LayoutBase::LayoutBase(const LayoutBase& other) |
|
|
|
|
|
|
|
: offset(other.offset) |
|
|
|
|
|
|
|
, _class(other._class) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
LayoutBase::~LayoutBase() {} |
|
|
|
LayoutBase::~LayoutBase() {} |
|
|
|
|
|
|
|
|
|
|
|
ClassLayout::ClassLayout() : ABI(CppAbi::Itanium), argABI(RecordArgABI::Default), |
|
|
|
ClassLayout::ClassLayout() |
|
|
|
hasOwnVFPtr(false), VBPtrOffset(0), alignment(0), size(0), dataSize(0) {} |
|
|
|
: ABI(CppAbi::Itanium) |
|
|
|
|
|
|
|
, argABI(RecordArgABI::Default) |
|
|
|
|
|
|
|
, hasOwnVFPtr(false) |
|
|
|
|
|
|
|
, VBPtrOffset(0) |
|
|
|
|
|
|
|
, alignment(0) |
|
|
|
|
|
|
|
, size(0) |
|
|
|
|
|
|
|
, dataSize(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(ClassLayout, VFTableInfo, VFTables) |
|
|
|
DEF_VECTOR(ClassLayout, VFTableInfo, VFTables) |
|
|
|
|
|
|
|
|
|
|
@ -318,7 +437,8 @@ DEF_VECTOR(Declaration, Declaration*, Redeclarations) |
|
|
|
DeclarationContext::DeclarationContext(DeclarationKind kind) |
|
|
|
DeclarationContext::DeclarationContext(DeclarationKind kind) |
|
|
|
: Declaration(kind) |
|
|
|
: Declaration(kind) |
|
|
|
, isAnonymous(false) |
|
|
|
, isAnonymous(false) |
|
|
|
{} |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(DeclarationContext, Namespace*, Namespaces) |
|
|
|
DEF_VECTOR(DeclarationContext, Namespace*, Namespaces) |
|
|
|
DEF_VECTOR(DeclarationContext, Enumeration*, Enums) |
|
|
|
DEF_VECTOR(DeclarationContext, Enumeration*, Enums) |
|
|
@ -352,7 +472,8 @@ DeclarationContext::FindNamespace(const std::vector<std::string>& Namespaces) |
|
|
|
|
|
|
|
|
|
|
|
auto childNamespace = std::find_if(currentNamespace->Namespaces.begin(), |
|
|
|
auto childNamespace = std::find_if(currentNamespace->Namespaces.begin(), |
|
|
|
currentNamespace->Namespaces.end(), |
|
|
|
currentNamespace->Namespaces.end(), |
|
|
|
[&](CppSharp::CppParser::AST::Namespace* ns) { |
|
|
|
[&](CppSharp::CppParser::AST::Namespace* ns) |
|
|
|
|
|
|
|
{ |
|
|
|
return ns->name == _namespace; |
|
|
|
return ns->name == _namespace; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -382,18 +503,22 @@ Namespace* DeclarationContext::FindCreateNamespace(const std::string& Name) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Class* DeclarationContext::FindClass(const void* OriginalPtr, |
|
|
|
Class* DeclarationContext::FindClass(const void* OriginalPtr, |
|
|
|
const std::string& Name, bool IsComplete) |
|
|
|
const std::string& Name, |
|
|
|
|
|
|
|
bool IsComplete) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (Name.empty()) return nullptr; |
|
|
|
if (Name.empty()) |
|
|
|
|
|
|
|
return nullptr; |
|
|
|
|
|
|
|
|
|
|
|
auto entries = split<std::string>(Name, "::"); |
|
|
|
auto entries = split<std::string>(Name, "::"); |
|
|
|
|
|
|
|
|
|
|
|
if (entries.size() == 1) |
|
|
|
if (entries.size() == 1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto _class = std::find_if(Classes.begin(), Classes.end(), |
|
|
|
auto _class = std::find_if(Classes.begin(), Classes.end(), |
|
|
|
[OriginalPtr, Name, IsComplete](Class* klass) { |
|
|
|
[OriginalPtr, Name, IsComplete](Class* klass) |
|
|
|
|
|
|
|
{ |
|
|
|
return (OriginalPtr && klass->originalPtr == OriginalPtr) || |
|
|
|
return (OriginalPtr && klass->originalPtr == OriginalPtr) || |
|
|
|
(klass->name == Name && klass->isIncomplete == !IsComplete); }); |
|
|
|
(klass->name == Name && klass->isIncomplete == !IsComplete); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return _class != Classes.end() ? *_class : nullptr; |
|
|
|
return _class != Classes.end() ? *_class : nullptr; |
|
|
|
} |
|
|
|
} |
|
|
@ -421,7 +546,9 @@ Class* DeclarationContext::CreateClass(const std::string& Name, bool IsComplete) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Class* DeclarationContext::FindClass(const void* OriginalPtr, |
|
|
|
Class* DeclarationContext::FindClass(const void* OriginalPtr, |
|
|
|
const std::string& Name, bool IsComplete, bool Create) |
|
|
|
const std::string& Name, |
|
|
|
|
|
|
|
bool IsComplete, |
|
|
|
|
|
|
|
bool Create) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto _class = FindClass(OriginalPtr, Name, IsComplete); |
|
|
|
auto _class = FindClass(OriginalPtr, Name, IsComplete); |
|
|
|
|
|
|
|
|
|
|
@ -442,7 +569,10 @@ Class* DeclarationContext::FindClass(const void* OriginalPtr, |
|
|
|
Enumeration* DeclarationContext::FindEnum(const void* OriginalPtr) |
|
|
|
Enumeration* DeclarationContext::FindEnum(const void* OriginalPtr) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto foundEnum = std::find_if(Enums.begin(), Enums.end(), |
|
|
|
auto foundEnum = std::find_if(Enums.begin(), Enums.end(), |
|
|
|
[&](Enumeration* enumeration) { return enumeration->originalPtr == OriginalPtr; }); |
|
|
|
[&](Enumeration* enumeration) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return enumeration->originalPtr == OriginalPtr; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (foundEnum != Enums.end()) |
|
|
|
if (foundEnum != Enums.end()) |
|
|
|
return *foundEnum; |
|
|
|
return *foundEnum; |
|
|
@ -457,7 +587,10 @@ Enumeration* DeclarationContext::FindEnum(const std::string& Name, bool Create) |
|
|
|
if (entries.size() == 1) |
|
|
|
if (entries.size() == 1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto foundEnum = std::find_if(Enums.begin(), Enums.end(), |
|
|
|
auto foundEnum = std::find_if(Enums.begin(), Enums.end(), |
|
|
|
[&](Enumeration* _enum) { return _enum->name == Name; }); |
|
|
|
[&](Enumeration* _enum) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return _enum->name == Name; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (foundEnum != Enums.end()) |
|
|
|
if (foundEnum != Enums.end()) |
|
|
|
return *foundEnum; |
|
|
|
return *foundEnum; |
|
|
@ -487,7 +620,10 @@ Enumeration* DeclarationContext::FindEnum(const std::string& Name, bool Create) |
|
|
|
Enumeration* DeclarationContext::FindEnumWithItem(const std::string& Name) |
|
|
|
Enumeration* DeclarationContext::FindEnumWithItem(const std::string& Name) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto foundEnumIt = std::find_if(Enums.begin(), Enums.end(), |
|
|
|
auto foundEnumIt = std::find_if(Enums.begin(), Enums.end(), |
|
|
|
[&](Enumeration* _enum) { return _enum->FindItemByName(Name) != nullptr; }); |
|
|
|
[&](Enumeration* _enum) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return _enum->FindItemByName(Name) != nullptr; |
|
|
|
|
|
|
|
}); |
|
|
|
if (foundEnumIt != Enums.end()) |
|
|
|
if (foundEnumIt != Enums.end()) |
|
|
|
return *foundEnumIt; |
|
|
|
return *foundEnumIt; |
|
|
|
for (auto it = Namespaces.begin(); it != Namespaces.end(); ++it) |
|
|
|
for (auto it = Namespaces.begin(); it != Namespaces.end(); ++it) |
|
|
@ -508,13 +644,19 @@ Enumeration* DeclarationContext::FindEnumWithItem(const std::string& Name) |
|
|
|
Function* DeclarationContext::FindFunction(const std::string& USR) |
|
|
|
Function* DeclarationContext::FindFunction(const std::string& USR) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto foundFunction = std::find_if(Functions.begin(), Functions.end(), |
|
|
|
auto foundFunction = std::find_if(Functions.begin(), Functions.end(), |
|
|
|
[&](Function* func) { return func->USR == USR; }); |
|
|
|
[&](Function* func) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return func->USR == USR; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (foundFunction != Functions.end()) |
|
|
|
if (foundFunction != Functions.end()) |
|
|
|
return *foundFunction; |
|
|
|
return *foundFunction; |
|
|
|
|
|
|
|
|
|
|
|
auto foundTemplate = std::find_if(Templates.begin(), Templates.end(), |
|
|
|
auto foundTemplate = std::find_if(Templates.begin(), Templates.end(), |
|
|
|
[&](Template* t) { return t->TemplatedDecl && t->TemplatedDecl->USR == USR; }); |
|
|
|
[&](Template* t) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return t->TemplatedDecl && t->TemplatedDecl->USR == USR; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (foundTemplate != Templates.end()) |
|
|
|
if (foundTemplate != Templates.end()) |
|
|
|
return static_cast<Function*>((*foundTemplate)->TemplatedDecl); |
|
|
|
return static_cast<Function*>((*foundTemplate)->TemplatedDecl); |
|
|
@ -525,7 +667,10 @@ Function* DeclarationContext::FindFunction(const std::string& USR) |
|
|
|
TypedefDecl* DeclarationContext::FindTypedef(const std::string& Name, bool Create) |
|
|
|
TypedefDecl* DeclarationContext::FindTypedef(const std::string& Name, bool Create) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto foundTypedef = std::find_if(Typedefs.begin(), Typedefs.end(), |
|
|
|
auto foundTypedef = std::find_if(Typedefs.begin(), Typedefs.end(), |
|
|
|
[&](TypedefDecl* tdef) { return tdef->name == Name; }); |
|
|
|
[&](TypedefDecl* tdef) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return tdef->name == Name; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (foundTypedef != Typedefs.end()) |
|
|
|
if (foundTypedef != Typedefs.end()) |
|
|
|
return *foundTypedef; |
|
|
|
return *foundTypedef; |
|
|
@ -543,7 +688,10 @@ TypedefDecl* DeclarationContext::FindTypedef(const std::string& Name, bool Creat |
|
|
|
TypeAlias* DeclarationContext::FindTypeAlias(const std::string& Name, bool Create) |
|
|
|
TypeAlias* DeclarationContext::FindTypeAlias(const std::string& Name, bool Create) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto foundTypeAlias = std::find_if(TypeAliases.begin(), TypeAliases.end(), |
|
|
|
auto foundTypeAlias = std::find_if(TypeAliases.begin(), TypeAliases.end(), |
|
|
|
[&](TypeAlias* talias) { return talias->name == Name; }); |
|
|
|
[&](TypeAlias* talias) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return talias->name == Name; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (foundTypeAlias != TypeAliases.end()) |
|
|
|
if (foundTypeAlias != TypeAliases.end()) |
|
|
|
return *foundTypeAlias; |
|
|
|
return *foundTypeAlias; |
|
|
@ -561,7 +709,10 @@ TypeAlias* DeclarationContext::FindTypeAlias(const std::string& Name, bool Creat |
|
|
|
Variable* DeclarationContext::FindVariable(const std::string& USR) |
|
|
|
Variable* DeclarationContext::FindVariable(const std::string& USR) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto found = std::find_if(Variables.begin(), Variables.end(), |
|
|
|
auto found = std::find_if(Variables.begin(), Variables.end(), |
|
|
|
[&](Variable* var) { return var->USR == USR; }); |
|
|
|
[&](Variable* var) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return var->USR == USR; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (found != Variables.end()) |
|
|
|
if (found != Variables.end()) |
|
|
|
return *found; |
|
|
|
return *found; |
|
|
@ -572,7 +723,10 @@ Variable* DeclarationContext::FindVariable(const std::string& USR) |
|
|
|
Friend* DeclarationContext::FindFriend(const std::string& USR) |
|
|
|
Friend* DeclarationContext::FindFriend(const std::string& USR) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto found = std::find_if(Friends.begin(), Friends.end(), |
|
|
|
auto found = std::find_if(Friends.begin(), Friends.end(), |
|
|
|
[&](Friend* var) { return var->USR == USR; }); |
|
|
|
[&](Friend* var) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return var->USR == USR; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (found != Friends.end()) |
|
|
|
if (found != Friends.end()) |
|
|
|
return *found; |
|
|
|
return *found; |
|
|
@ -580,29 +734,55 @@ Friend* DeclarationContext::FindFriend(const std::string& USR) |
|
|
|
return nullptr; |
|
|
|
return nullptr; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TypedefNameDecl::TypedefNameDecl(DeclarationKind Kind) : Declaration(Kind) {} |
|
|
|
TypedefNameDecl::TypedefNameDecl(DeclarationKind Kind) |
|
|
|
|
|
|
|
: Declaration(Kind) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TypedefNameDecl::~TypedefNameDecl() {} |
|
|
|
TypedefNameDecl::~TypedefNameDecl() {} |
|
|
|
|
|
|
|
|
|
|
|
TypedefDecl::TypedefDecl() : TypedefNameDecl(DeclarationKind::Typedef) {} |
|
|
|
TypedefDecl::TypedefDecl() |
|
|
|
|
|
|
|
: TypedefNameDecl(DeclarationKind::Typedef) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TypedefDecl::~TypedefDecl() {} |
|
|
|
TypedefDecl::~TypedefDecl() {} |
|
|
|
|
|
|
|
|
|
|
|
TypeAlias::TypeAlias() : TypedefNameDecl(DeclarationKind::TypeAlias), describedAliasTemplate(0) {} |
|
|
|
TypeAlias::TypeAlias() |
|
|
|
|
|
|
|
: TypedefNameDecl(DeclarationKind::TypeAlias) |
|
|
|
|
|
|
|
, describedAliasTemplate(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TypeAlias::~TypeAlias() {} |
|
|
|
TypeAlias::~TypeAlias() {} |
|
|
|
|
|
|
|
|
|
|
|
Friend::Friend() : CppSharp::CppParser::AST::Declaration(DeclarationKind::Friend), declaration(0) {} |
|
|
|
Friend::Friend() |
|
|
|
|
|
|
|
: CppSharp::CppParser::AST::Declaration(DeclarationKind::Friend) |
|
|
|
|
|
|
|
, declaration(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Friend::~Friend() {} |
|
|
|
Friend::~Friend() {} |
|
|
|
|
|
|
|
|
|
|
|
StatementObsolete::StatementObsolete(const std::string& str, StatementClassObsolete stmtClass, Declaration* decl) : string(str), _class(stmtClass), decl(decl) {} |
|
|
|
StatementObsolete::StatementObsolete(const std::string& str, StatementClassObsolete stmtClass, Declaration* decl) |
|
|
|
|
|
|
|
: string(str) |
|
|
|
|
|
|
|
, _class(stmtClass) |
|
|
|
|
|
|
|
, decl(decl) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ExpressionObsolete::ExpressionObsolete(const std::string& str, StatementClassObsolete stmtClass, Declaration* decl) |
|
|
|
ExpressionObsolete::ExpressionObsolete(const std::string& str, StatementClassObsolete stmtClass, Declaration* decl) |
|
|
|
: StatementObsolete(str, stmtClass, decl) {} |
|
|
|
: StatementObsolete(str, stmtClass, decl) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BinaryOperatorObsolete::BinaryOperatorObsolete(const std::string& str, ExpressionObsolete* lhs, ExpressionObsolete* rhs, const std::string& opcodeStr) |
|
|
|
BinaryOperatorObsolete::BinaryOperatorObsolete(const std::string& str, ExpressionObsolete* lhs, ExpressionObsolete* rhs, const std::string& opcodeStr) |
|
|
|
: ExpressionObsolete(str, StatementClassObsolete::BinaryOperator), LHS(lhs), RHS(rhs), opcodeStr(opcodeStr) {} |
|
|
|
: ExpressionObsolete(str, StatementClassObsolete::BinaryOperator) |
|
|
|
|
|
|
|
, LHS(lhs) |
|
|
|
|
|
|
|
, RHS(rhs) |
|
|
|
|
|
|
|
, opcodeStr(opcodeStr) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BinaryOperatorObsolete::~BinaryOperatorObsolete() |
|
|
|
BinaryOperatorObsolete::~BinaryOperatorObsolete() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -612,7 +792,9 @@ BinaryOperatorObsolete::~BinaryOperatorObsolete() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CallExprObsolete::CallExprObsolete(const std::string& str, Declaration* decl) |
|
|
|
CallExprObsolete::CallExprObsolete(const std::string& str, Declaration* decl) |
|
|
|
: ExpressionObsolete(str, StatementClassObsolete::CallExprClass, decl) {} |
|
|
|
: ExpressionObsolete(str, StatementClassObsolete::CallExprClass, decl) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
CallExprObsolete::~CallExprObsolete() |
|
|
|
CallExprObsolete::~CallExprObsolete() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -623,7 +805,9 @@ CallExprObsolete::~CallExprObsolete() |
|
|
|
DEF_VECTOR(CallExprObsolete, ExpressionObsolete*, Arguments) |
|
|
|
DEF_VECTOR(CallExprObsolete, ExpressionObsolete*, Arguments) |
|
|
|
|
|
|
|
|
|
|
|
CXXConstructExprObsolete::CXXConstructExprObsolete(const std::string& str, Declaration* decl) |
|
|
|
CXXConstructExprObsolete::CXXConstructExprObsolete(const std::string& str, Declaration* decl) |
|
|
|
: ExpressionObsolete(str, StatementClassObsolete::CXXConstructExprClass, decl) {} |
|
|
|
: ExpressionObsolete(str, StatementClassObsolete::CXXConstructExprClass, decl) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
CXXConstructExprObsolete::~CXXConstructExprObsolete() |
|
|
|
CXXConstructExprObsolete::~CXXConstructExprObsolete() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -689,43 +873,73 @@ DEF_VECTOR(Method, Method*, OverriddenMethods) |
|
|
|
|
|
|
|
|
|
|
|
// Enumeration
|
|
|
|
// Enumeration
|
|
|
|
|
|
|
|
|
|
|
|
Enumeration::Enumeration() : DeclarationContext(DeclarationKind::Enumeration), |
|
|
|
Enumeration::Enumeration() |
|
|
|
modifiers((EnumModifiers)0), type(0), builtinType(0) {} |
|
|
|
: DeclarationContext(DeclarationKind::Enumeration) |
|
|
|
|
|
|
|
, modifiers((EnumModifiers)0) |
|
|
|
|
|
|
|
, type(0) |
|
|
|
|
|
|
|
, builtinType(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Enumeration::~Enumeration() {} |
|
|
|
Enumeration::~Enumeration() {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(Enumeration, Enumeration::Item*, Items) |
|
|
|
DEF_VECTOR(Enumeration, Enumeration::Item*, Items) |
|
|
|
|
|
|
|
|
|
|
|
Enumeration::Item::Item() : Declaration(DeclarationKind::EnumerationItem) {} |
|
|
|
Enumeration::Item::Item() |
|
|
|
|
|
|
|
: Declaration(DeclarationKind::EnumerationItem) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Enumeration::Item::Item(const Item& rhs) : Declaration(rhs), |
|
|
|
Enumeration::Item::Item(const Item& rhs) |
|
|
|
expression(rhs.expression), value(rhs.value) {} |
|
|
|
: Declaration(rhs) |
|
|
|
|
|
|
|
, expression(rhs.expression) |
|
|
|
|
|
|
|
, value(rhs.value) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Enumeration::Item::~Item() {} |
|
|
|
Enumeration::Item::~Item() {} |
|
|
|
|
|
|
|
|
|
|
|
Enumeration::Item* Enumeration::FindItemByName(const std::string& Name) |
|
|
|
Enumeration::Item* Enumeration::FindItemByName(const std::string& Name) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto foundEnumItem = std::find_if(Items.begin(), Items.end(), |
|
|
|
auto foundEnumItem = std::find_if(Items.begin(), Items.end(), |
|
|
|
[&](Item* _item) { return _item->name == Name; }); |
|
|
|
[&](Item* _item) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return _item->name == Name; |
|
|
|
|
|
|
|
}); |
|
|
|
if (foundEnumItem != Items.end()) |
|
|
|
if (foundEnumItem != Items.end()) |
|
|
|
return *foundEnumItem; |
|
|
|
return *foundEnumItem; |
|
|
|
return nullptr; |
|
|
|
return nullptr; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Variable::Variable() : Declaration(DeclarationKind::Variable), |
|
|
|
Variable::Variable() |
|
|
|
isConstExpr(false), initializer(0) {} |
|
|
|
: Declaration(DeclarationKind::Variable) |
|
|
|
|
|
|
|
, isConstExpr(false) |
|
|
|
|
|
|
|
, initializer(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Variable::~Variable() {} |
|
|
|
Variable::~Variable() {} |
|
|
|
|
|
|
|
|
|
|
|
BaseClassSpecifier::BaseClassSpecifier() : type(0), offset(0) {} |
|
|
|
BaseClassSpecifier::BaseClassSpecifier() |
|
|
|
|
|
|
|
: type(0) |
|
|
|
|
|
|
|
, offset(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Field::Field() : Declaration(DeclarationKind::Field), _class(0), |
|
|
|
Field::Field() |
|
|
|
isBitField(false), bitWidth(0) {} |
|
|
|
: Declaration(DeclarationKind::Field) |
|
|
|
|
|
|
|
, _class(0) |
|
|
|
|
|
|
|
, isBitField(false) |
|
|
|
|
|
|
|
, bitWidth(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Field::~Field() {} |
|
|
|
Field::~Field() {} |
|
|
|
|
|
|
|
|
|
|
|
AccessSpecifierDecl::AccessSpecifierDecl() |
|
|
|
AccessSpecifierDecl::AccessSpecifierDecl() |
|
|
|
: Declaration(DeclarationKind::AccessSpecifier) {} |
|
|
|
: Declaration(DeclarationKind::AccessSpecifier) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
AccessSpecifierDecl::~AccessSpecifierDecl() {} |
|
|
|
AccessSpecifierDecl::~AccessSpecifierDecl() {} |
|
|
|
|
|
|
|
|
|
|
@ -757,18 +971,31 @@ DEF_VECTOR(Class, Field*, Fields) |
|
|
|
DEF_VECTOR(Class, Method*, Methods) |
|
|
|
DEF_VECTOR(Class, Method*, Methods) |
|
|
|
DEF_VECTOR(Class, AccessSpecifierDecl*, Specifiers) |
|
|
|
DEF_VECTOR(Class, AccessSpecifierDecl*, Specifiers) |
|
|
|
|
|
|
|
|
|
|
|
Template::Template() : Declaration(DeclarationKind::Template), |
|
|
|
Template::Template() |
|
|
|
TemplatedDecl(0) {} |
|
|
|
: Declaration(DeclarationKind::Template) |
|
|
|
|
|
|
|
, TemplatedDecl(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Template::Template(DeclarationKind kind) : Declaration(kind), TemplatedDecl(0) {} |
|
|
|
Template::Template(DeclarationKind kind) |
|
|
|
|
|
|
|
: Declaration(kind) |
|
|
|
|
|
|
|
, TemplatedDecl(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(Template, Declaration*, Parameters) |
|
|
|
DEF_VECTOR(Template, Declaration*, Parameters) |
|
|
|
|
|
|
|
|
|
|
|
TypeAliasTemplate::TypeAliasTemplate() : Template(DeclarationKind::TypeAliasTemplate) {} |
|
|
|
TypeAliasTemplate::TypeAliasTemplate() |
|
|
|
|
|
|
|
: Template(DeclarationKind::TypeAliasTemplate) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TypeAliasTemplate::~TypeAliasTemplate() {} |
|
|
|
TypeAliasTemplate::~TypeAliasTemplate() {} |
|
|
|
|
|
|
|
|
|
|
|
ClassTemplate::ClassTemplate() : Template(DeclarationKind::ClassTemplate) {} |
|
|
|
ClassTemplate::ClassTemplate() |
|
|
|
|
|
|
|
: Template(DeclarationKind::ClassTemplate) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ClassTemplate::~ClassTemplate() {} |
|
|
|
ClassTemplate::~ClassTemplate() {} |
|
|
|
|
|
|
|
|
|
|
@ -795,7 +1022,10 @@ ClassTemplatePartialSpecialization::~ClassTemplatePartialSpecialization() {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(ClassTemplatePartialSpecialization, Declaration*, Parameters) |
|
|
|
DEF_VECTOR(ClassTemplatePartialSpecialization, Declaration*, Parameters) |
|
|
|
|
|
|
|
|
|
|
|
FunctionTemplate::FunctionTemplate() : Template(DeclarationKind::FunctionTemplate) {} |
|
|
|
FunctionTemplate::FunctionTemplate() |
|
|
|
|
|
|
|
: Template(DeclarationKind::FunctionTemplate) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FunctionTemplate::~FunctionTemplate() {} |
|
|
|
FunctionTemplate::~FunctionTemplate() {} |
|
|
|
|
|
|
|
|
|
|
@ -804,7 +1034,10 @@ DEF_VECTOR(FunctionTemplate, FunctionTemplateSpecialization*, Specializations) |
|
|
|
FunctionTemplateSpecialization* FunctionTemplate::FindSpecialization(const std::string& usr) |
|
|
|
FunctionTemplateSpecialization* FunctionTemplate::FindSpecialization(const std::string& usr) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto foundSpec = std::find_if(Specializations.begin(), Specializations.end(), |
|
|
|
auto foundSpec = std::find_if(Specializations.begin(), Specializations.end(), |
|
|
|
[&](FunctionTemplateSpecialization* cts) { return cts->specializedFunction->USR == usr; }); |
|
|
|
[&](FunctionTemplateSpecialization* cts) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return cts->specializedFunction->USR == usr; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (foundSpec != Specializations.end()) |
|
|
|
if (foundSpec != Specializations.end()) |
|
|
|
return static_cast<FunctionTemplateSpecialization*>(*foundSpec); |
|
|
|
return static_cast<FunctionTemplateSpecialization*>(*foundSpec); |
|
|
@ -824,7 +1057,10 @@ FunctionTemplateSpecialization::~FunctionTemplateSpecialization() |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(FunctionTemplateSpecialization, TemplateArgument, Arguments) |
|
|
|
DEF_VECTOR(FunctionTemplateSpecialization, TemplateArgument, Arguments) |
|
|
|
|
|
|
|
|
|
|
|
VarTemplate::VarTemplate() : Template(DeclarationKind::VarTemplate) {} |
|
|
|
VarTemplate::VarTemplate() |
|
|
|
|
|
|
|
: Template(DeclarationKind::VarTemplate) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
VarTemplate::~VarTemplate() {} |
|
|
|
VarTemplate::~VarTemplate() {} |
|
|
|
|
|
|
|
|
|
|
@ -833,7 +1069,10 @@ DEF_VECTOR(VarTemplate, VarTemplateSpecialization*, Specializations) |
|
|
|
VarTemplateSpecialization* VarTemplate::FindSpecialization(const std::string& usr) |
|
|
|
VarTemplateSpecialization* VarTemplate::FindSpecialization(const std::string& usr) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto foundSpec = std::find_if(Specializations.begin(), Specializations.end(), |
|
|
|
auto foundSpec = std::find_if(Specializations.begin(), Specializations.end(), |
|
|
|
[&](VarTemplateSpecialization* cts) { return cts->USR == usr; }); |
|
|
|
[&](VarTemplateSpecialization* cts) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return cts->USR == usr; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (foundSpec != Specializations.end()) |
|
|
|
if (foundSpec != Specializations.end()) |
|
|
|
return static_cast<VarTemplateSpecialization*>(*foundSpec); |
|
|
|
return static_cast<VarTemplateSpecialization*>(*foundSpec); |
|
|
@ -870,7 +1109,10 @@ VarTemplatePartialSpecialization::~VarTemplatePartialSpecialization() |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UnresolvedUsingTypename::UnresolvedUsingTypename() : Declaration(DeclarationKind::UnresolvedUsingTypename) {} |
|
|
|
UnresolvedUsingTypename::UnresolvedUsingTypename() |
|
|
|
|
|
|
|
: Declaration(DeclarationKind::UnresolvedUsingTypename) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UnresolvedUsingTypename::~UnresolvedUsingTypename() {} |
|
|
|
UnresolvedUsingTypename::~UnresolvedUsingTypename() {} |
|
|
|
|
|
|
|
|
|
|
@ -883,25 +1125,41 @@ Namespace::Namespace() |
|
|
|
Namespace::~Namespace() {} |
|
|
|
Namespace::~Namespace() {} |
|
|
|
|
|
|
|
|
|
|
|
PreprocessedEntity::PreprocessedEntity() |
|
|
|
PreprocessedEntity::PreprocessedEntity() |
|
|
|
: macroLocation(AST::MacroLocation::Unknown), |
|
|
|
: macroLocation(AST::MacroLocation::Unknown) |
|
|
|
originalPtr(0), kind(DeclarationKind::PreprocessedEntity) {} |
|
|
|
, originalPtr(0) |
|
|
|
|
|
|
|
, kind(DeclarationKind::PreprocessedEntity) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
MacroDefinition::MacroDefinition() |
|
|
|
MacroDefinition::MacroDefinition() |
|
|
|
: lineNumberStart(0), lineNumberEnd(0) { kind = DeclarationKind::MacroDefinition; } |
|
|
|
: lineNumberStart(0) |
|
|
|
|
|
|
|
, lineNumberEnd(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
kind = DeclarationKind::MacroDefinition; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
MacroDefinition::~MacroDefinition() {} |
|
|
|
MacroDefinition::~MacroDefinition() {} |
|
|
|
|
|
|
|
|
|
|
|
MacroExpansion::MacroExpansion() : definition(0) { kind = DeclarationKind::MacroExpansion; } |
|
|
|
MacroExpansion::MacroExpansion() |
|
|
|
|
|
|
|
: definition(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
kind = DeclarationKind::MacroExpansion; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
MacroExpansion::~MacroExpansion() {} |
|
|
|
MacroExpansion::~MacroExpansion() {} |
|
|
|
|
|
|
|
|
|
|
|
TranslationUnit::TranslationUnit() { kind = DeclarationKind::TranslationUnit; } |
|
|
|
TranslationUnit::TranslationUnit() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
kind = DeclarationKind::TranslationUnit; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TranslationUnit::~TranslationUnit() {} |
|
|
|
TranslationUnit::~TranslationUnit() {} |
|
|
|
DEF_VECTOR(TranslationUnit, MacroDefinition*, Macros) |
|
|
|
DEF_VECTOR(TranslationUnit, MacroDefinition*, Macros) |
|
|
|
|
|
|
|
|
|
|
|
NativeLibrary::NativeLibrary() |
|
|
|
NativeLibrary::NativeLibrary() |
|
|
|
: archType(AST::ArchType::UnknownArch) {} |
|
|
|
: archType(AST::ArchType::UnknownArch) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
NativeLibrary::~NativeLibrary() {} |
|
|
|
NativeLibrary::~NativeLibrary() {} |
|
|
|
|
|
|
|
|
|
|
@ -915,7 +1173,10 @@ DEF_VECTOR(ASTContext, TranslationUnit*, TranslationUnits) |
|
|
|
ClassTemplateSpecialization* ClassTemplate::FindSpecialization(const std::string& usr) |
|
|
|
ClassTemplateSpecialization* ClassTemplate::FindSpecialization(const std::string& usr) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto foundSpec = std::find_if(Specializations.begin(), Specializations.end(), |
|
|
|
auto foundSpec = std::find_if(Specializations.begin(), Specializations.end(), |
|
|
|
[&](ClassTemplateSpecialization* cts) { return cts->USR == usr; }); |
|
|
|
[&](ClassTemplateSpecialization* cts) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return cts->USR == usr; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (foundSpec != Specializations.end()) |
|
|
|
if (foundSpec != Specializations.end()) |
|
|
|
return static_cast<ClassTemplateSpecialization*>(*foundSpec); |
|
|
|
return static_cast<ClassTemplateSpecialization*>(*foundSpec); |
|
|
@ -940,7 +1201,8 @@ TranslationUnit* ASTContext::FindOrCreateModule(const std::string& File) |
|
|
|
auto normalizedFile = normalizePath(File); |
|
|
|
auto normalizedFile = normalizePath(File); |
|
|
|
|
|
|
|
|
|
|
|
auto existingUnit = std::find_if(TranslationUnits.begin(), |
|
|
|
auto existingUnit = std::find_if(TranslationUnits.begin(), |
|
|
|
TranslationUnits.end(), [&](TranslationUnit* unit) { |
|
|
|
TranslationUnits.end(), [&](TranslationUnit* unit) |
|
|
|
|
|
|
|
{ |
|
|
|
return unit && unit->fileName == normalizedFile; |
|
|
|
return unit && unit->fileName == normalizedFile; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -955,9 +1217,15 @@ TranslationUnit* ASTContext::FindOrCreateModule(const std::string& File) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Comments
|
|
|
|
// Comments
|
|
|
|
Comment::Comment(CommentKind kind) : kind(kind) {} |
|
|
|
Comment::Comment(CommentKind kind) |
|
|
|
|
|
|
|
: kind(kind) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
RawComment::RawComment() : fullCommentBlock(0) {} |
|
|
|
RawComment::RawComment() |
|
|
|
|
|
|
|
: fullCommentBlock(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
RawComment::~RawComment() |
|
|
|
RawComment::~RawComment() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -965,7 +1233,10 @@ RawComment::~RawComment() |
|
|
|
delete fullCommentBlock; |
|
|
|
delete fullCommentBlock; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FullComment::FullComment() : Comment(CommentKind::FullComment) {} |
|
|
|
FullComment::FullComment() |
|
|
|
|
|
|
|
: Comment(CommentKind::FullComment) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FullComment::~FullComment() |
|
|
|
FullComment::~FullComment() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1001,19 +1272,38 @@ FullComment::~FullComment() |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(FullComment, BlockContentComment*, Blocks) |
|
|
|
DEF_VECTOR(FullComment, BlockContentComment*, Blocks) |
|
|
|
|
|
|
|
|
|
|
|
BlockContentComment::BlockContentComment() : Comment(CommentKind::BlockContentComment) {} |
|
|
|
BlockContentComment::BlockContentComment() |
|
|
|
|
|
|
|
: Comment(CommentKind::BlockContentComment) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BlockContentComment::BlockContentComment(CommentKind Kind) : Comment(Kind) {} |
|
|
|
BlockContentComment::BlockContentComment(CommentKind Kind) |
|
|
|
|
|
|
|
: Comment(Kind) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BlockCommandComment::Argument::Argument() {} |
|
|
|
BlockCommandComment::Argument::Argument() {} |
|
|
|
|
|
|
|
|
|
|
|
BlockCommandComment::Argument::Argument(const Argument& rhs) : text(rhs.text) {} |
|
|
|
BlockCommandComment::Argument::Argument(const Argument& rhs) |
|
|
|
|
|
|
|
: text(rhs.text) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BlockCommandComment::Argument::~Argument() {} |
|
|
|
BlockCommandComment::Argument::~Argument() {} |
|
|
|
|
|
|
|
|
|
|
|
BlockCommandComment::BlockCommandComment() : BlockContentComment(CommentKind::BlockCommandComment), commandId(0), paragraphComment(0) {} |
|
|
|
BlockCommandComment::BlockCommandComment() |
|
|
|
|
|
|
|
: BlockContentComment(CommentKind::BlockCommandComment) |
|
|
|
|
|
|
|
, commandId(0) |
|
|
|
|
|
|
|
, paragraphComment(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BlockCommandComment::BlockCommandComment(CommentKind Kind) : BlockContentComment(Kind), commandId(0), paragraphComment(0) {} |
|
|
|
BlockCommandComment::BlockCommandComment(CommentKind Kind) |
|
|
|
|
|
|
|
: BlockContentComment(Kind) |
|
|
|
|
|
|
|
, commandId(0) |
|
|
|
|
|
|
|
, paragraphComment(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BlockCommandComment::~BlockCommandComment() |
|
|
|
BlockCommandComment::~BlockCommandComment() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1022,13 +1312,24 @@ BlockCommandComment::~BlockCommandComment() |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(BlockCommandComment, BlockCommandComment::Argument, Arguments) |
|
|
|
DEF_VECTOR(BlockCommandComment, BlockCommandComment::Argument, Arguments) |
|
|
|
|
|
|
|
|
|
|
|
ParamCommandComment::ParamCommandComment() : BlockCommandComment(CommentKind::ParamCommandComment), direction(PassDirection::In), paramIndex(0) {} |
|
|
|
ParamCommandComment::ParamCommandComment() |
|
|
|
|
|
|
|
: BlockCommandComment(CommentKind::ParamCommandComment) |
|
|
|
|
|
|
|
, direction(PassDirection::In) |
|
|
|
|
|
|
|
, paramIndex(0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TParamCommandComment::TParamCommandComment() : BlockCommandComment(CommentKind::TParamCommandComment) {} |
|
|
|
TParamCommandComment::TParamCommandComment() |
|
|
|
|
|
|
|
: BlockCommandComment(CommentKind::TParamCommandComment) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(TParamCommandComment, unsigned, Position) |
|
|
|
DEF_VECTOR(TParamCommandComment, unsigned, Position) |
|
|
|
|
|
|
|
|
|
|
|
VerbatimBlockComment::VerbatimBlockComment() : BlockCommandComment(CommentKind::VerbatimBlockComment) {} |
|
|
|
VerbatimBlockComment::VerbatimBlockComment() |
|
|
|
|
|
|
|
: BlockCommandComment(CommentKind::VerbatimBlockComment) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
VerbatimBlockComment::~VerbatimBlockComment() |
|
|
|
VerbatimBlockComment::~VerbatimBlockComment() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1038,9 +1339,16 @@ VerbatimBlockComment::~VerbatimBlockComment() |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(VerbatimBlockComment, VerbatimBlockLineComment*, Lines) |
|
|
|
DEF_VECTOR(VerbatimBlockComment, VerbatimBlockLineComment*, Lines) |
|
|
|
|
|
|
|
|
|
|
|
VerbatimLineComment::VerbatimLineComment() : BlockCommandComment(CommentKind::VerbatimLineComment) {} |
|
|
|
VerbatimLineComment::VerbatimLineComment() |
|
|
|
|
|
|
|
: BlockCommandComment(CommentKind::VerbatimLineComment) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ParagraphComment::ParagraphComment() : BlockContentComment(CommentKind::ParagraphComment), isWhitespace(false) {} |
|
|
|
ParagraphComment::ParagraphComment() |
|
|
|
|
|
|
|
: BlockContentComment(CommentKind::ParagraphComment) |
|
|
|
|
|
|
|
, isWhitespace(false) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ParagraphComment::~ParagraphComment() |
|
|
|
ParagraphComment::~ParagraphComment() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1073,39 +1381,76 @@ ParagraphComment::~ParagraphComment() |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(ParagraphComment, InlineContentComment*, Content) |
|
|
|
DEF_VECTOR(ParagraphComment, InlineContentComment*, Content) |
|
|
|
|
|
|
|
|
|
|
|
HTMLTagComment::HTMLTagComment() : InlineContentComment(CommentKind::HTMLTagComment) {} |
|
|
|
HTMLTagComment::HTMLTagComment() |
|
|
|
|
|
|
|
: InlineContentComment(CommentKind::HTMLTagComment) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
HTMLTagComment::HTMLTagComment(CommentKind Kind) : InlineContentComment(Kind) {} |
|
|
|
HTMLTagComment::HTMLTagComment(CommentKind Kind) |
|
|
|
|
|
|
|
: InlineContentComment(Kind) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
HTMLStartTagComment::Attribute::Attribute() {} |
|
|
|
HTMLStartTagComment::Attribute::Attribute() {} |
|
|
|
|
|
|
|
|
|
|
|
HTMLStartTagComment::Attribute::Attribute(const Attribute& rhs) : name(rhs.name), value(rhs.value) {} |
|
|
|
HTMLStartTagComment::Attribute::Attribute(const Attribute& rhs) |
|
|
|
|
|
|
|
: name(rhs.name) |
|
|
|
|
|
|
|
, value(rhs.value) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
HTMLStartTagComment::Attribute::~Attribute() {} |
|
|
|
HTMLStartTagComment::Attribute::~Attribute() {} |
|
|
|
|
|
|
|
|
|
|
|
HTMLStartTagComment::HTMLStartTagComment() : HTMLTagComment(CommentKind::HTMLStartTagComment) {} |
|
|
|
HTMLStartTagComment::HTMLStartTagComment() |
|
|
|
|
|
|
|
: HTMLTagComment(CommentKind::HTMLStartTagComment) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(HTMLStartTagComment, HTMLStartTagComment::Attribute, Attributes) |
|
|
|
DEF_VECTOR(HTMLStartTagComment, HTMLStartTagComment::Attribute, Attributes) |
|
|
|
|
|
|
|
|
|
|
|
HTMLEndTagComment::HTMLEndTagComment() : HTMLTagComment(CommentKind::HTMLEndTagComment) {} |
|
|
|
HTMLEndTagComment::HTMLEndTagComment() |
|
|
|
|
|
|
|
: HTMLTagComment(CommentKind::HTMLEndTagComment) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
InlineContentComment::InlineContentComment() : Comment(CommentKind::InlineContentComment), hasTrailingNewline(false) {} |
|
|
|
InlineContentComment::InlineContentComment() |
|
|
|
|
|
|
|
: Comment(CommentKind::InlineContentComment) |
|
|
|
|
|
|
|
, hasTrailingNewline(false) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
InlineContentComment::InlineContentComment(CommentKind Kind) : Comment(Kind), hasTrailingNewline(false) {} |
|
|
|
InlineContentComment::InlineContentComment(CommentKind Kind) |
|
|
|
|
|
|
|
: Comment(Kind) |
|
|
|
|
|
|
|
, hasTrailingNewline(false) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TextComment::TextComment() : InlineContentComment(CommentKind::TextComment) {} |
|
|
|
TextComment::TextComment() |
|
|
|
|
|
|
|
: InlineContentComment(CommentKind::TextComment) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
InlineCommandComment::Argument::Argument() {} |
|
|
|
InlineCommandComment::Argument::Argument() {} |
|
|
|
|
|
|
|
|
|
|
|
InlineCommandComment::Argument::Argument(const Argument& rhs) : text(rhs.text) {} |
|
|
|
InlineCommandComment::Argument::Argument(const Argument& rhs) |
|
|
|
|
|
|
|
: text(rhs.text) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
InlineCommandComment::Argument::~Argument() {} |
|
|
|
InlineCommandComment::Argument::~Argument() {} |
|
|
|
|
|
|
|
|
|
|
|
InlineCommandComment::InlineCommandComment() |
|
|
|
InlineCommandComment::InlineCommandComment() |
|
|
|
: InlineContentComment(CommentKind::InlineCommandComment), commandId(0), commentRenderKind(RenderNormal) {} |
|
|
|
: InlineContentComment(CommentKind::InlineCommandComment) |
|
|
|
|
|
|
|
, commandId(0) |
|
|
|
|
|
|
|
, commentRenderKind(RenderNormal) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(InlineCommandComment, InlineCommandComment::Argument, Arguments) |
|
|
|
DEF_VECTOR(InlineCommandComment, InlineCommandComment::Argument, Arguments) |
|
|
|
|
|
|
|
|
|
|
|
VerbatimBlockLineComment::VerbatimBlockLineComment() : Comment(CommentKind::VerbatimBlockLineComment) {} |
|
|
|
VerbatimBlockLineComment::VerbatimBlockLineComment() |
|
|
|
|
|
|
|
: Comment(CommentKind::VerbatimBlockLineComment) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} } } |
|
|
|
}}} // namespace CppSharp::CppParser::AST
|