Browse Source

Fixed all warnings in our C++ part.

pull/1136/head 0.8.0
Dimitar Dobrev 8 years ago
parent
commit
dbb3182b44
  1. 292
      src/CppParser/AST.cpp
  2. 336
      src/CppParser/AST.h
  3. 656
      src/CppParser/Bindings/CLI/AST.cpp
  4. 52
      src/CppParser/Bindings/CLI/CppParser.cpp
  5. 152
      src/CppParser/Bindings/CLI/Target.cpp
  6. 30
      src/CppParser/Comments.cpp
  7. 34
      src/CppParser/CppParser.cpp
  8. 28
      src/CppParser/CppParser.h
  9. 872
      src/CppParser/Parser.cpp
  10. 18
      src/CppParser/Parser.h
  11. 58
      src/CppParser/Target.cpp
  12. 76
      src/CppParser/Target.h

292
src/CppParser/AST.cpp

@ -57,10 +57,10 @@ static std::vector<T> split(const T & str, const T & delimiters) { @@ -57,10 +57,10 @@ static std::vector<T> split(const T & str, const T & delimiters) {
namespace CppSharp { namespace CppParser { namespace AST {
Type::Type(TypeKind kind) : Kind(kind) {}
Type::Type(const Type& rhs) : Kind(rhs.Kind), IsDependent(rhs.IsDependent) {}
Type::Type(TypeKind kind) : 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) {}
@ -76,7 +76,7 @@ PointerType::PointerType() : Type(TypeKind::Pointer) {} @@ -76,7 +76,7 @@ PointerType::PointerType() : Type(TypeKind::Pointer) {}
MemberPointerType::MemberPointerType() : Type(TypeKind::MemberPointer) {}
TypedefType::TypedefType() : Type(TypeKind::Typedef), Declaration(0) {}
TypedefType::TypedefType() : Type(TypeKind::Typedef), declaration(0) {}
AttributedType::AttributedType() : Type(TypeKind::Attributed) {}
@ -85,9 +85,9 @@ DecayedType::DecayedType() : Type(TypeKind::Decayed) {} @@ -85,9 +85,9 @@ DecayedType::DecayedType() : Type(TypeKind::Decayed) {}
// Template
TemplateParameter::TemplateParameter(DeclarationKind kind)
: Declaration(kind)
, Depth(0)
, Index(0)
, IsParameterPack(false)
, depth(0)
, index(0)
, isParameterPack(false)
{
}
@ -97,9 +97,9 @@ TemplateParameter::~TemplateParameter() @@ -97,9 +97,9 @@ TemplateParameter::~TemplateParameter()
TemplateTemplateParameter::TemplateTemplateParameter()
: Template(DeclarationKind::TemplateTemplateParm)
, IsParameterPack(false)
, IsPackExpansion(false)
, IsExpandedParameterPack(false)
, isParameterPack(false)
, isPackExpansion(false)
, isExpandedParameterPack(false)
{
}
@ -114,8 +114,8 @@ TypeTemplateParameter::TypeTemplateParameter() @@ -114,8 +114,8 @@ TypeTemplateParameter::TypeTemplateParameter()
}
TypeTemplateParameter::TypeTemplateParameter(const TypeTemplateParameter& rhs)
: TemplateParameter(rhs.Kind)
, DefaultArgument(rhs.DefaultArgument)
: TemplateParameter(rhs.kind)
, defaultArgument(rhs.defaultArgument)
{
}
@ -123,32 +123,32 @@ TypeTemplateParameter::~TypeTemplateParameter() {} @@ -123,32 +123,32 @@ TypeTemplateParameter::~TypeTemplateParameter() {}
NonTypeTemplateParameter::NonTypeTemplateParameter()
: TemplateParameter(DeclarationKind::NonTypeTemplateParm)
, DefaultArgument(0)
, Position(0)
, IsPackExpansion(false)
, IsExpandedParameterPack(false)
, defaultArgument(0)
, position(0)
, isPackExpansion(false)
, isExpandedParameterPack(false)
{
}
NonTypeTemplateParameter::NonTypeTemplateParameter(const NonTypeTemplateParameter& rhs)
: TemplateParameter(rhs.Kind)
, DefaultArgument(rhs.DefaultArgument)
, Position(rhs.Position)
, IsPackExpansion(rhs.IsPackExpansion)
, IsExpandedParameterPack(rhs.IsExpandedParameterPack)
: TemplateParameter(rhs.kind)
, defaultArgument(rhs.defaultArgument)
, position(rhs.position)
, isPackExpansion(rhs.isPackExpansion)
, isExpandedParameterPack(rhs.isExpandedParameterPack)
{
}
NonTypeTemplateParameter::~NonTypeTemplateParameter() {}
TemplateArgument::TemplateArgument() : Declaration(0), Integral(0) {}
TemplateArgument::TemplateArgument() : declaration(0), integral(0) {}
TemplateSpecializationType::TemplateSpecializationType()
: Type(TypeKind::TemplateSpecialization), Template(0) {}
: Type(TypeKind::TemplateSpecialization), _template(0) {}
TemplateSpecializationType::TemplateSpecializationType(
const TemplateSpecializationType& rhs) : Type(rhs),
Arguments(rhs.Arguments), Template(rhs.Template), Desugared(rhs.Desugared) {}
Arguments(rhs.Arguments), _template(rhs._template), desugared(rhs.desugared) {}
TemplateSpecializationType::~TemplateSpecializationType() {}
@ -159,22 +159,22 @@ DependentTemplateSpecializationType::DependentTemplateSpecializationType() @@ -159,22 +159,22 @@ DependentTemplateSpecializationType::DependentTemplateSpecializationType()
DependentTemplateSpecializationType::DependentTemplateSpecializationType(
const DependentTemplateSpecializationType& rhs) : Type(rhs),
Arguments(rhs.Arguments), Desugared(rhs.Desugared) {}
Arguments(rhs.Arguments), desugared(rhs.desugared) {}
DependentTemplateSpecializationType::~DependentTemplateSpecializationType() {}
DEF_VECTOR(DependentTemplateSpecializationType, TemplateArgument, Arguments)
TemplateParameterType::TemplateParameterType() : Type(TypeKind::TemplateParameter), Parameter(0) {}
TemplateParameterType::TemplateParameterType() : Type(TypeKind::TemplateParameter), parameter(0) {}
TemplateParameterType::~TemplateParameterType() {}
TemplateParameterSubstitutionType::TemplateParameterSubstitutionType()
: Type(TypeKind::TemplateParameterSubstitution), ReplacedParameter(0) {}
: Type(TypeKind::TemplateParameterSubstitution), replacedParameter(0) {}
InjectedClassNameType::InjectedClassNameType()
: Type(TypeKind::InjectedClassName)
, Class(0)
, _class(0)
{
}
@ -184,11 +184,11 @@ PackExpansionType::PackExpansionType() : Type(TypeKind::PackExpansion) {} @@ -184,11 +184,11 @@ PackExpansionType::PackExpansionType() : Type(TypeKind::PackExpansion) {}
UnaryTransformType::UnaryTransformType() : Type(TypeKind::UnaryTransform) {}
VectorType::VectorType() : Type(TypeKind::Vector), NumElements(0) {}
VectorType::VectorType() : Type(TypeKind::Vector), numElements(0) {}
BuiltinType::BuiltinType() : CppSharp::CppParser::AST::Type(TypeKind::Builtin) {}
VTableComponent::VTableComponent() : Offset(0), Declaration(0) {}
VTableComponent::VTableComponent() : offset(0), declaration(0) {}
// VTableLayout
VTableLayout::VTableLayout() {}
@ -200,15 +200,15 @@ DEF_VECTOR(VTableLayout, VTableComponent, Components) @@ -200,15 +200,15 @@ DEF_VECTOR(VTableLayout, VTableComponent, Components)
VFTableInfo::VFTableInfo() : VBTableIndex(0), VFPtrOffset(0), VFPtrFullOffset(0) {}
VFTableInfo::VFTableInfo(const VFTableInfo& rhs) : VBTableIndex(rhs.VBTableIndex),
VFPtrOffset(rhs.VFPtrOffset), VFPtrFullOffset(rhs.VFPtrFullOffset),
Layout(rhs.Layout) {}
layout(rhs.layout) {}
LayoutField::LayoutField() : Offset(0), FieldPtr(0) {}
LayoutField::LayoutField() : offset(0), fieldPtr(0) {}
LayoutField::LayoutField(const LayoutField & other)
: Offset(other.Offset)
: offset(other.offset)
, Name(other.Name)
, QualifiedType(other.QualifiedType)
, FieldPtr(other.FieldPtr)
, qualifiedType(other.qualifiedType)
, fieldPtr(other.fieldPtr)
{
}
@ -216,14 +216,14 @@ LayoutField::~LayoutField() {} @@ -216,14 +216,14 @@ LayoutField::~LayoutField() {}
DEF_STRING(LayoutField, Name)
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() {}
ClassLayout::ClassLayout() : ABI(CppAbi::Itanium), HasOwnVFPtr(false),
VBPtrOffset(0), Alignment(0), Size(0), DataSize(0) {}
ClassLayout::ClassLayout() : ABI(CppAbi::Itanium), hasOwnVFPtr(false),
VBPtrOffset(0), alignment(0), size(0), dataSize(0) {}
DEF_VECTOR(ClassLayout, VFTableInfo, VFTables)
@ -232,39 +232,39 @@ DEF_VECTOR(ClassLayout, LayoutField, Fields) @@ -232,39 +232,39 @@ DEF_VECTOR(ClassLayout, LayoutField, Fields)
DEF_VECTOR(ClassLayout, LayoutBase, Bases)
Declaration::Declaration(DeclarationKind kind)
: Kind(kind)
, Access(AccessSpecifier::Public)
, _Namespace(0)
, Location(0)
, LineNumberStart(0)
, LineNumberEnd(0)
, Comment(0)
, IsIncomplete(false)
, IsDependent(false)
, IsImplicit(false)
, CompleteDeclaration(0)
, DefinitionOrder(0)
, OriginalPtr(0)
: kind(kind)
, access(AccessSpecifier::Public)
, _namespace(0)
, location(0)
, lineNumberStart(0)
, lineNumberEnd(0)
, comment(0)
, isIncomplete(false)
, isDependent(false)
, isImplicit(false)
, completeDeclaration(0)
, definitionOrder(0)
, originalPtr(0)
{
}
Declaration::Declaration(const Declaration& rhs)
: Kind(rhs.Kind)
, Access(rhs.Access)
, _Namespace(rhs._Namespace)
, Location(rhs.Location.ID)
, LineNumberStart(rhs.LineNumberStart)
, LineNumberEnd(rhs.LineNumberEnd)
: kind(rhs.kind)
, access(rhs.access)
, _namespace(rhs._namespace)
, location(rhs.location.ID)
, lineNumberStart(rhs.lineNumberStart)
, lineNumberEnd(rhs.lineNumberEnd)
, Name(rhs.Name)
, Comment(rhs.Comment)
, comment(rhs.comment)
, DebugText(rhs.DebugText)
, IsIncomplete(rhs.IsIncomplete)
, IsDependent(rhs.IsDependent)
, IsImplicit(rhs.IsImplicit)
, CompleteDeclaration(rhs.CompleteDeclaration)
, DefinitionOrder(rhs.DefinitionOrder)
, isIncomplete(rhs.isIncomplete)
, isDependent(rhs.isDependent)
, isImplicit(rhs.isImplicit)
, completeDeclaration(rhs.completeDeclaration)
, definitionOrder(rhs.definitionOrder)
, PreprocessedEntities(rhs.PreprocessedEntities)
, OriginalPtr(rhs.OriginalPtr)
, originalPtr(rhs.originalPtr)
{
}
@ -279,7 +279,7 @@ DEF_VECTOR(Declaration, PreprocessedEntity*, PreprocessedEntities) @@ -279,7 +279,7 @@ DEF_VECTOR(Declaration, PreprocessedEntity*, PreprocessedEntities)
DeclarationContext::DeclarationContext(DeclarationKind kind)
: Declaration(kind)
, IsAnonymous(false)
, isAnonymous(false)
{}
DEF_VECTOR(DeclarationContext, Namespace*, Namespaces)
@ -294,8 +294,8 @@ DEF_VECTOR(DeclarationContext, Friend*, Friends) @@ -294,8 +294,8 @@ DEF_VECTOR(DeclarationContext, Friend*, Friends)
Declaration* DeclarationContext::FindAnonymous(const std::string& key)
{
auto it = Anonymous.find(key);
return (it != Anonymous.end()) ? it->second : 0;
auto it = anonymous.find(key);
return (it != anonymous.end()) ? it->second : 0;
}
Namespace* DeclarationContext::FindNamespace(const std::string& Name)
@ -335,7 +335,7 @@ Namespace* DeclarationContext::FindCreateNamespace(const std::string& Name) @@ -335,7 +335,7 @@ Namespace* DeclarationContext::FindCreateNamespace(const std::string& Name)
{
_namespace = new Namespace();
_namespace->Name = Name;
_namespace->_Namespace = this;
_namespace->_namespace = this;
Namespaces.push_back(_namespace);
}
@ -353,7 +353,7 @@ Class* DeclarationContext::FindClass(const std::string& Name, bool IsComplete) @@ -353,7 +353,7 @@ Class* DeclarationContext::FindClass(const std::string& Name, bool IsComplete)
{
auto _class = std::find_if(Classes.begin(), Classes.end(),
[&](Class* klass) { return klass->Name == Name &&
(!klass->IsIncomplete || !IsComplete); });
(!klass->isIncomplete || !IsComplete); });
return _class != Classes.end() ? *_class : nullptr;
}
@ -374,8 +374,8 @@ Class* DeclarationContext::CreateClass(std::string Name, bool IsComplete) @@ -374,8 +374,8 @@ Class* DeclarationContext::CreateClass(std::string Name, bool IsComplete)
{
auto _class = new Class();
_class->Name = Name;
_class->_Namespace = this;
_class->IsIncomplete = !IsComplete;
_class->_namespace = this;
_class->isIncomplete = !IsComplete;
return _class;
}
@ -402,7 +402,7 @@ Class* DeclarationContext::FindClass(const std::string& Name, bool IsComplete, @@ -402,7 +402,7 @@ Class* DeclarationContext::FindClass(const std::string& Name, bool IsComplete,
Enumeration* DeclarationContext::FindEnum(const void* OriginalPtr)
{
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())
return *foundEnum;
@ -427,7 +427,7 @@ Enumeration* DeclarationContext::FindEnum(const std::string& Name, bool Create) @@ -427,7 +427,7 @@ Enumeration* DeclarationContext::FindEnum(const std::string& Name, bool Create)
auto _enum = new Enumeration();
_enum->Name = Name;
_enum->_Namespace = this;
_enum->_namespace = this;
Enums.push_back(_enum);
return _enum;
}
@ -495,7 +495,7 @@ TypedefDecl* DeclarationContext::FindTypedef(const std::string& Name, bool Creat @@ -495,7 +495,7 @@ TypedefDecl* DeclarationContext::FindTypedef(const std::string& Name, bool Creat
auto tdef = new TypedefDecl();
tdef->Name = Name;
tdef->_Namespace = this;
tdef->_namespace = this;
return tdef;
}
@ -513,7 +513,7 @@ TypeAlias* DeclarationContext::FindTypeAlias(const std::string& Name, bool Creat @@ -513,7 +513,7 @@ TypeAlias* DeclarationContext::FindTypeAlias(const std::string& Name, bool Creat
auto talias = new TypeAlias();
talias->Name = Name;
talias->_Namespace = this;
talias->_namespace = this;
return talias;
}
@ -548,17 +548,17 @@ TypedefDecl::TypedefDecl() : TypedefNameDecl(DeclarationKind::Typedef) {} @@ -548,17 +548,17 @@ TypedefDecl::TypedefDecl() : TypedefNameDecl(DeclarationKind::Typedef) {}
TypedefDecl::~TypedefDecl() {}
TypeAlias::TypeAlias() : TypedefNameDecl(DeclarationKind::TypeAlias), DescribedAliasTemplate(0) {}
TypeAlias::TypeAlias() : TypedefNameDecl(DeclarationKind::TypeAlias), describedAliasTemplate(0) {}
TypeAlias::~TypeAlias() {}
Friend::Friend() : CppSharp::CppParser::AST::Declaration(DeclarationKind::Friend), Declaration(0) {}
Friend::Friend() : CppSharp::CppParser::AST::Declaration(DeclarationKind::Friend), declaration(0) {}
Friend::~Friend() {}
DEF_STRING(Statement, String)
Statement::Statement(const std::string& str, StatementClass stmtClass, Declaration* decl) : String(str), Class(stmtClass), Decl(decl) {}
Statement::Statement(const std::string& str, StatementClass stmtClass, Declaration* decl) : String(str), _class(stmtClass), decl(decl) {}
Expression::Expression(const std::string& str, StatementClass stmtClass, Declaration* decl)
: Statement(str, stmtClass, decl) {}
@ -597,26 +597,26 @@ CXXConstructExpr::~CXXConstructExpr() @@ -597,26 +597,26 @@ CXXConstructExpr::~CXXConstructExpr()
DEF_VECTOR(CXXConstructExpr, Expression*, Arguments)
Parameter::Parameter() : Declaration(DeclarationKind::Parameter),
IsIndirect(false), HasDefaultValue(false), DefaultArgument(0) {}
isIndirect(false), hasDefaultValue(false), defaultArgument(0) {}
Parameter::~Parameter()
{
if (DefaultArgument)
if (defaultArgument)
{
// HACK: see https://github.com/mono/CppSharp/issues/598
switch (DefaultArgument->Class)
switch (defaultArgument->_class)
{
case StatementClass::BinaryOperator:
delete static_cast<BinaryOperator*>(DefaultArgument);
delete static_cast<BinaryOperator*>(defaultArgument);
break;
case StatementClass::CallExprClass:
delete static_cast<CallExpr*>(DefaultArgument);
delete static_cast<CallExpr*>(defaultArgument);
break;
case StatementClass::CXXConstructExprClass:
delete static_cast<CXXConstructExpr*>(DefaultArgument);
delete static_cast<CXXConstructExpr*>(defaultArgument);
break;
default:
delete DefaultArgument;
delete defaultArgument;
break;
}
}
@ -624,9 +624,9 @@ Parameter::~Parameter() @@ -624,9 +624,9 @@ Parameter::~Parameter()
Function::Function()
: Declaration(DeclarationKind::Function)
, IsReturnIndirect(false)
, SpecializationInfo(0)
, InstantiatedFrom(0)
, isReturnIndirect(false)
, specializationInfo(0)
, instantiatedFrom(0)
{
}
@ -638,17 +638,17 @@ DEF_VECTOR(Function, Parameter*, Parameters) @@ -638,17 +638,17 @@ DEF_VECTOR(Function, Parameter*, Parameters)
Method::Method()
: Function()
, IsVirtual(false)
, IsStatic(false)
, IsConst(false)
, IsExplicit(false)
, IsOverride(false)
, IsDefaultConstructor(false)
, IsCopyConstructor(false)
, IsMoveConstructor(false)
, RefQualifier(RefQualifierKind::None)
, isVirtual(false)
, isStatic(false)
, isConst(false)
, isExplicit(false)
, isOverride(false)
, isDefaultConstructor(false)
, isCopyConstructor(false)
, isMoveConstructor(false)
, refQualifier(RefQualifierKind::None)
{
Kind = DeclarationKind::Method;
kind = DeclarationKind::Method;
}
Method::~Method() {}
@ -656,7 +656,7 @@ Method::~Method() {} @@ -656,7 +656,7 @@ Method::~Method() {}
// Enumeration
Enumeration::Enumeration() : DeclarationContext(DeclarationKind::Enumeration),
Modifiers((EnumModifiers)0), Type(0), BuiltinType(0) {}
modifiers((EnumModifiers)0), type(0), builtinType(0) {}
Enumeration::~Enumeration() {}
@ -665,7 +665,7 @@ DEF_VECTOR(Enumeration, Enumeration::Item*, Items) @@ -665,7 +665,7 @@ DEF_VECTOR(Enumeration, Enumeration::Item*, Items)
Enumeration::Item::Item() : Declaration(DeclarationKind::EnumerationItem) {}
Enumeration::Item::Item(const Item& rhs) : Declaration(rhs),
Expression(rhs.Expression), Value(rhs.Value) {}
Expression(rhs.Expression), value(rhs.value) {}
Enumeration::Item::~Item() {}
@ -686,10 +686,10 @@ Variable::~Variable() {} @@ -686,10 +686,10 @@ Variable::~Variable() {}
DEF_STRING(Variable, Mangled)
BaseClassSpecifier::BaseClassSpecifier() : Type(0), Offset(0) {}
BaseClassSpecifier::BaseClassSpecifier() : type(0), offset(0) {}
Field::Field() : Declaration(DeclarationKind::Field), Class(0),
IsBitField(false), BitWidth(0) {}
Field::Field() : Declaration(DeclarationKind::Field), _class(0),
isBitField(false), bitWidth(0) {}
Field::~Field() {}
@ -700,23 +700,23 @@ AccessSpecifierDecl::~AccessSpecifierDecl() {} @@ -700,23 +700,23 @@ AccessSpecifierDecl::~AccessSpecifierDecl() {}
Class::Class()
: DeclarationContext(DeclarationKind::Class)
, IsPOD(false)
, IsAbstract(false)
, IsUnion(false)
, IsDynamic(false)
, IsPolymorphic(false)
, HasNonTrivialDefaultConstructor(false)
, HasNonTrivialCopyConstructor(false)
, HasNonTrivialDestructor(false)
, IsExternCContext(false)
, Layout(0)
, isPOD(false)
, isAbstract(false)
, isUnion(false)
, isDynamic(false)
, isPolymorphic(false)
, hasNonTrivialDefaultConstructor(false)
, hasNonTrivialCopyConstructor(false)
, hasNonTrivialDestructor(false)
, isExternCContext(false)
, layout(0)
{
}
Class::~Class()
{
if (Layout)
delete Layout;
if (layout)
delete layout;
}
DEF_VECTOR(Class, BaseClassSpecifier*, Bases)
@ -743,9 +743,9 @@ DEF_VECTOR(ClassTemplate, ClassTemplateSpecialization*, Specializations) @@ -743,9 +743,9 @@ DEF_VECTOR(ClassTemplate, ClassTemplateSpecialization*, Specializations)
ClassTemplateSpecialization::ClassTemplateSpecialization()
: Class()
, TemplatedDecl(0)
, templatedDecl(0)
{
Kind = DeclarationKind::ClassTemplateSpecialization;
kind = DeclarationKind::ClassTemplateSpecialization;
}
ClassTemplateSpecialization::~ClassTemplateSpecialization() {}
@ -755,7 +755,7 @@ DEF_VECTOR(ClassTemplateSpecialization, TemplateArgument, Arguments) @@ -755,7 +755,7 @@ DEF_VECTOR(ClassTemplateSpecialization, TemplateArgument, Arguments)
ClassTemplatePartialSpecialization::ClassTemplatePartialSpecialization()
: ClassTemplateSpecialization()
{
Kind = DeclarationKind::ClassTemplatePartialSpecialization;
kind = DeclarationKind::ClassTemplatePartialSpecialization;
}
ClassTemplatePartialSpecialization::~ClassTemplatePartialSpecialization() {}
@ -769,7 +769,7 @@ DEF_VECTOR(FunctionTemplate, FunctionTemplateSpecialization*, Specializations) @@ -769,7 +769,7 @@ DEF_VECTOR(FunctionTemplate, FunctionTemplateSpecialization*, Specializations)
FunctionTemplateSpecialization* FunctionTemplate::FindSpecialization(const std::string& usr)
{
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())
return static_cast<FunctionTemplateSpecialization*>(*foundSpec);
@ -778,8 +778,8 @@ FunctionTemplateSpecialization* FunctionTemplate::FindSpecialization(const std:: @@ -778,8 +778,8 @@ FunctionTemplateSpecialization* FunctionTemplate::FindSpecialization(const std::
}
FunctionTemplateSpecialization::FunctionTemplateSpecialization()
: Template(0)
, SpecializedFunction(0)
: _template(0)
, specializedFunction(0)
{
}
@ -816,9 +816,9 @@ VarTemplatePartialSpecialization* VarTemplate::FindPartialSpecialization(const s @@ -816,9 +816,9 @@ VarTemplatePartialSpecialization* VarTemplate::FindPartialSpecialization(const s
VarTemplateSpecialization::VarTemplateSpecialization()
: Variable()
, TemplatedDecl(0)
, templatedDecl(0)
{
Kind = DeclarationKind::VarTemplateSpecialization;
kind = DeclarationKind::VarTemplateSpecialization;
}
VarTemplateSpecialization::~VarTemplateSpecialization() {}
@ -828,7 +828,7 @@ DEF_VECTOR(VarTemplateSpecialization, TemplateArgument, Arguments) @@ -828,7 +828,7 @@ DEF_VECTOR(VarTemplateSpecialization, TemplateArgument, Arguments)
VarTemplatePartialSpecialization::VarTemplatePartialSpecialization()
: VarTemplateSpecialization()
{
Kind = DeclarationKind::VarTemplatePartialSpecialization;
kind = DeclarationKind::VarTemplatePartialSpecialization;
}
VarTemplatePartialSpecialization::~VarTemplatePartialSpecialization()
@ -837,32 +837,32 @@ VarTemplatePartialSpecialization::~VarTemplatePartialSpecialization() @@ -837,32 +837,32 @@ VarTemplatePartialSpecialization::~VarTemplatePartialSpecialization()
Namespace::Namespace()
: DeclarationContext(DeclarationKind::Namespace)
, IsInline(false)
, isInline(false)
{
}
Namespace::~Namespace() {}
PreprocessedEntity::PreprocessedEntity()
: MacroLocation(AST::MacroLocation::Unknown),
OriginalPtr(0), Kind(DeclarationKind::PreprocessedEntity) {}
: macroLocation(AST::MacroLocation::Unknown),
originalPtr(0), kind(DeclarationKind::PreprocessedEntity) {}
MacroDefinition::MacroDefinition()
: LineNumberStart(0), LineNumberEnd(0) { Kind = DeclarationKind::MacroDefinition; }
: lineNumberStart(0), lineNumberEnd(0) { kind = DeclarationKind::MacroDefinition; }
MacroDefinition::~MacroDefinition() {}
DEF_STRING(MacroDefinition, Name)
DEF_STRING(MacroDefinition, Expression)
MacroExpansion::MacroExpansion() : Definition(0) { Kind = DeclarationKind::MacroExpansion; }
MacroExpansion::MacroExpansion() : definition(0) { kind = DeclarationKind::MacroExpansion; }
MacroExpansion::~MacroExpansion() {}
DEF_STRING(MacroExpansion, Name)
DEF_STRING(MacroExpansion, Text)
TranslationUnit::TranslationUnit() { Kind = DeclarationKind::TranslationUnit; }
TranslationUnit::TranslationUnit() { kind = DeclarationKind::TranslationUnit; }
TranslationUnit::~TranslationUnit() {}
@ -870,7 +870,7 @@ DEF_STRING(TranslationUnit, FileName) @@ -870,7 +870,7 @@ DEF_STRING(TranslationUnit, FileName)
DEF_VECTOR(TranslationUnit, MacroDefinition*, Macros)
NativeLibrary::NativeLibrary()
: ArchType(AST::ArchType::UnknownArch)
: archType(AST::ArchType::UnknownArch)
{
}
@ -929,17 +929,17 @@ TranslationUnit* ASTContext::FindOrCreateModule(std::string File) @@ -929,17 +929,17 @@ TranslationUnit* ASTContext::FindOrCreateModule(std::string File)
}
// Comments
Comment::Comment(CommentKind kind) : Kind(kind) {}
Comment::Comment(CommentKind kind) : kind(kind) {}
DEF_STRING(RawComment, Text)
DEF_STRING(RawComment, BriefText)
RawComment::RawComment() : FullCommentBlock(0) {}
RawComment::RawComment() : fullCommentBlock(0) {}
RawComment::~RawComment()
{
if (FullCommentBlock)
delete FullCommentBlock;
if (fullCommentBlock)
delete fullCommentBlock;
}
FullComment::FullComment() : Comment(CommentKind::FullComment) {}
@ -949,7 +949,7 @@ FullComment::~FullComment() @@ -949,7 +949,7 @@ FullComment::~FullComment()
for (auto& block : Blocks)
{
// HACK: see https://github.com/mono/CppSharp/issues/599
switch (block->Kind)
switch (block->kind)
{
case CommentKind::BlockCommandComment:
delete static_cast<BlockCommandComment*>(block);
@ -988,18 +988,18 @@ BlockCommandComment::Argument::Argument(const Argument& rhs) : Text(rhs.Text) {} @@ -988,18 +988,18 @@ BlockCommandComment::Argument::Argument(const Argument& rhs) : Text(rhs.Text) {}
DEF_STRING(BlockCommandComment::Argument, Text)
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()
{
delete ParagraphComment;
delete paragraphComment;
}
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) {}
@ -1019,14 +1019,14 @@ VerbatimLineComment::VerbatimLineComment() : BlockCommandComment(CommentKind::Ve @@ -1019,14 +1019,14 @@ VerbatimLineComment::VerbatimLineComment() : BlockCommandComment(CommentKind::Ve
DEF_STRING(VerbatimLineComment, Text)
ParagraphComment::ParagraphComment() : BlockContentComment(CommentKind::ParagraphComment), IsWhitespace(false) {}
ParagraphComment::ParagraphComment() : BlockContentComment(CommentKind::ParagraphComment), isWhitespace(false) {}
ParagraphComment::~ParagraphComment()
{
for (auto& content : Content)
{
// HACK: see https://github.com/mono/CppSharp/issues/599
switch (content->Kind)
switch (content->kind)
{
case CommentKind::InlineCommandComment:
delete static_cast<InlineCommandComment*>(content);
@ -1074,9 +1074,9 @@ HTMLEndTagComment::HTMLEndTagComment() : HTMLTagComment(CommentKind::HTMLEndTagC @@ -1074,9 +1074,9 @@ HTMLEndTagComment::HTMLEndTagComment() : HTMLTagComment(CommentKind::HTMLEndTagC
DEF_STRING(HTMLEndTagComment, TagName)
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) {}
@ -1089,7 +1089,7 @@ InlineCommandComment::Argument::Argument(const Argument& rhs) : Text(rhs.Text) { @@ -1089,7 +1089,7 @@ InlineCommandComment::Argument::Argument(const Argument& rhs) : Text(rhs.Text) {
DEF_STRING(InlineCommandComment::Argument, Text)
InlineCommandComment::InlineCommandComment()
: InlineContentComment(CommentKind::InlineCommandComment), CommandId(0), CommentRenderKind(RenderNormal) {}
: InlineContentComment(CommentKind::InlineCommandComment), commandId(0), commentRenderKind(RenderNormal) {}
DEF_VECTOR(InlineCommandComment, InlineCommandComment::Argument, Arguments)

336
src/CppParser/AST.h

@ -46,22 +46,22 @@ public: @@ -46,22 +46,22 @@ public:
Type(TypeKind kind);
Type(const Type&);
TypeKind Kind;
bool IsDependent;
TypeKind kind;
bool isDependent;
};
struct CS_API TypeQualifiers
{
bool IsConst;
bool IsVolatile;
bool IsRestrict;
bool isConst;
bool isVolatile;
bool isRestrict;
};
struct CS_API QualifiedType
{
QualifiedType();
CppSharp::CppParser::AST::Type* Type;
TypeQualifiers Qualifiers;
Type* type;
TypeQualifiers qualifiers;
};
class Declaration;
@ -70,7 +70,7 @@ class CS_API TagType : public Type @@ -70,7 +70,7 @@ class CS_API TagType : public Type
{
public:
DECLARE_TYPE_KIND(Tag)
CppSharp::CppParser::AST::Declaration* Declaration;
Declaration* declaration;
};
class CS_API ArrayType : public Type
@ -85,10 +85,10 @@ public: @@ -85,10 +85,10 @@ public:
};
DECLARE_TYPE_KIND(Array)
CppSharp::CppParser::AST::QualifiedType QualifiedType;
ArraySize SizeType;
long Size;
long ElementSize;
QualifiedType qualifiedType;
ArraySize sizeType;
long size;
long elementSize;
};
class Parameter;
@ -108,8 +108,8 @@ class CS_API FunctionType : public Type @@ -108,8 +108,8 @@ class CS_API FunctionType : public Type
public:
~FunctionType();
DECLARE_TYPE_KIND(Function)
QualifiedType ReturnType;
CppSharp::CppParser::AST::CallingConvention CallingConvention;
QualifiedType returnType;
CallingConvention callingConvention;
VECTOR(Parameter*, Parameters)
};
@ -125,15 +125,15 @@ public: @@ -125,15 +125,15 @@ public:
};
DECLARE_TYPE_KIND(Pointer)
QualifiedType QualifiedPointee;
TypeModifier Modifier;
QualifiedType qualifiedPointee;
TypeModifier modifier;
};
class CS_API MemberPointerType : public Type
{
public:
DECLARE_TYPE_KIND(MemberPointer)
QualifiedType Pointee;
QualifiedType pointee;
};
class TypedefNameDecl;
@ -142,24 +142,24 @@ class CS_API TypedefType : public Type @@ -142,24 +142,24 @@ class CS_API TypedefType : public Type
{
public:
TypedefType();
TypedefNameDecl* Declaration;
TypedefNameDecl* declaration;
};
class CS_API AttributedType : public Type
{
public:
DECLARE_TYPE_KIND(Attributed)
QualifiedType Modified;
QualifiedType Equivalent;
QualifiedType modified;
QualifiedType equivalent;
};
class CS_API DecayedType : public Type
{
public:
DECLARE_TYPE_KIND(Decayed)
QualifiedType Decayed;
QualifiedType Original;
QualifiedType Pointee;
QualifiedType decayed;
QualifiedType original;
QualifiedType pointee;
};
struct CS_API TemplateArgument
@ -178,10 +178,10 @@ struct CS_API TemplateArgument @@ -178,10 +178,10 @@ struct CS_API TemplateArgument
Pack
};
ArgumentKind Kind;
QualifiedType Type;
CppSharp::CppParser::AST::Declaration* Declaration;
long Integral;
ArgumentKind kind;
QualifiedType type;
Declaration* declaration;
long integral;
};
class Template;
@ -194,8 +194,8 @@ public: @@ -194,8 +194,8 @@ public:
~TemplateSpecializationType();
VECTOR(TemplateArgument, Arguments)
CppSharp::CppParser::AST::Template* Template;
QualifiedType Desugared;
Template* _template;
QualifiedType desugared;
};
class CS_API DependentTemplateSpecializationType : public Type
@ -206,7 +206,7 @@ public: @@ -206,7 +206,7 @@ public:
~DependentTemplateSpecializationType();
VECTOR(TemplateArgument, Arguments)
QualifiedType Desugared;
QualifiedType desugared;
};
class TypeTemplateParameter;
@ -216,18 +216,18 @@ class CS_API TemplateParameterType : public Type @@ -216,18 +216,18 @@ class CS_API TemplateParameterType : public Type
public:
DECLARE_TYPE_KIND(TemplateParameter)
~TemplateParameterType();
TypeTemplateParameter* Parameter;
unsigned int Depth;
unsigned int Index;
bool IsParameterPack;
TypeTemplateParameter* parameter;
unsigned int depth;
unsigned int index;
bool isParameterPack;
};
class CS_API TemplateParameterSubstitutionType : public Type
{
public:
DECLARE_TYPE_KIND(TemplateParameterSubstitution)
QualifiedType Replacement;
TemplateParameterType* ReplacedParameter;
QualifiedType replacement;
TemplateParameterType* replacedParameter;
};
class Class;
@ -236,15 +236,15 @@ class CS_API InjectedClassNameType : public Type @@ -236,15 +236,15 @@ class CS_API InjectedClassNameType : public Type
{
public:
DECLARE_TYPE_KIND(InjectedClassName)
QualifiedType InjectedSpecializationType;
CppSharp::CppParser::AST::Class* Class;
QualifiedType injectedSpecializationType;
Class* _class;
};
class CS_API DependentNameType : public Type
{
public:
DECLARE_TYPE_KIND(DependentName)
QualifiedType Desugared;
QualifiedType desugared;
};
class CS_API PackExpansionType : public Type
@ -257,16 +257,16 @@ class CS_API UnaryTransformType : public Type @@ -257,16 +257,16 @@ class CS_API UnaryTransformType : public Type
{
public:
DECLARE_TYPE_KIND(UnaryTransform)
QualifiedType Desugared;
QualifiedType BaseType;
QualifiedType desugared;
QualifiedType baseType;
};
class CS_API VectorType : public Type
{
public:
DECLARE_TYPE_KIND(Vector)
QualifiedType ElementType;
unsigned NumElements;
QualifiedType elementType;
unsigned numElements;
};
enum class PrimitiveType
@ -301,7 +301,7 @@ class CS_API BuiltinType : public Type @@ -301,7 +301,7 @@ class CS_API BuiltinType : public Type
{
public:
DECLARE_TYPE_KIND(Builtin)
PrimitiveType Type;
PrimitiveType type;
};
#pragma endregion
@ -332,9 +332,9 @@ enum class VTableComponentKind @@ -332,9 +332,9 @@ enum class VTableComponentKind
struct CS_API VTableComponent
{
VTableComponent();
VTableComponentKind Kind;
unsigned Offset;
CppSharp::CppParser::AST::Declaration* Declaration;
VTableComponentKind kind;
unsigned offset;
Declaration* declaration;
};
struct CS_API VTableLayout
@ -352,7 +352,7 @@ struct CS_API VFTableInfo @@ -352,7 +352,7 @@ struct CS_API VFTableInfo
uint64_t VBTableIndex;
uint32_t VFPtrOffset;
uint32_t VFPtrFullOffset;
VTableLayout Layout;
VTableLayout layout;
};
class CS_API LayoutField
@ -361,10 +361,10 @@ public: @@ -361,10 +361,10 @@ public:
LayoutField();
LayoutField(const LayoutField& other);
~LayoutField();
unsigned Offset;
unsigned offset;
STRING(Name)
QualifiedType QualifiedType;
void* FieldPtr;
QualifiedType qualifiedType;
void* fieldPtr;
};
class Class;
@ -375,8 +375,8 @@ public: @@ -375,8 +375,8 @@ public:
LayoutBase();
LayoutBase(const LayoutBase& other);
~LayoutBase();
unsigned Offset;
Class* Class;
unsigned offset;
Class* _class;
};
struct CS_API ClassLayout
@ -384,12 +384,12 @@ struct CS_API ClassLayout @@ -384,12 +384,12 @@ struct CS_API ClassLayout
ClassLayout();
CppAbi ABI;
VECTOR(VFTableInfo, VFTables)
VTableLayout Layout;
bool HasOwnVFPtr;
VTableLayout layout;
bool hasOwnVFPtr;
long VBPtrOffset;
int Alignment;
int Size;
int DataSize;
int alignment;
int size;
int dataSize;
VECTOR(LayoutField, Fields)
VECTOR(LayoutBase, Bases)
};
@ -453,23 +453,23 @@ public: @@ -453,23 +453,23 @@ public:
Declaration(const Declaration&);
~Declaration();
DeclarationKind Kind;
AccessSpecifier Access;
DeclarationContext* _Namespace;
SourceLocation Location;
int LineNumberStart;
int LineNumberEnd;
DeclarationKind kind;
AccessSpecifier access;
DeclarationContext* _namespace;
SourceLocation location;
int lineNumberStart;
int lineNumberEnd;
STRING(Name)
STRING(USR)
STRING(DebugText)
bool IsIncomplete;
bool IsDependent;
bool IsImplicit;
Declaration* CompleteDeclaration;
unsigned DefinitionOrder;
bool isIncomplete;
bool isDependent;
bool isImplicit;
Declaration* completeDeclaration;
unsigned definitionOrder;
VECTOR(PreprocessedEntity*, PreprocessedEntities)
void* OriginalPtr;
RawComment* Comment;
void* originalPtr;
RawComment* comment;
};
class Class;
@ -492,9 +492,9 @@ public: @@ -492,9 +492,9 @@ public:
CS_IGNORE Declaration* FindAnonymous(const std::string& USR);
CS_IGNORE CppSharp::CppParser::AST::Namespace* FindNamespace(const std::string& Name);
CS_IGNORE CppSharp::CppParser::AST::Namespace* FindNamespace(const std::vector<std::string>&);
CS_IGNORE CppSharp::CppParser::AST::Namespace* FindCreateNamespace(const std::string& Name);
CS_IGNORE Namespace* FindNamespace(const std::string& Name);
CS_IGNORE Namespace* FindNamespace(const std::vector<std::string>&);
CS_IGNORE Namespace* FindCreateNamespace(const std::string& Name);
CS_IGNORE Class* CreateClass(std::string Name, bool IsComplete);
CS_IGNORE Class* FindClass(const std::string& Name, bool IsComplete);
@ -527,9 +527,9 @@ public: @@ -527,9 +527,9 @@ public:
VECTOR(Variable*, Variables)
VECTOR(Friend*, Friends)
std::map<std::string, Declaration*> Anonymous;
std::map<std::string, Declaration*> anonymous;
bool IsAnonymous;
bool isAnonymous;
};
class CS_API TypedefNameDecl : public Declaration
@ -537,7 +537,7 @@ class CS_API TypedefNameDecl : public Declaration @@ -537,7 +537,7 @@ class CS_API TypedefNameDecl : public Declaration
public:
TypedefNameDecl(DeclarationKind kind);
~TypedefNameDecl();
CppSharp::CppParser::AST::QualifiedType QualifiedType;
QualifiedType qualifiedType;
};
class CS_API TypedefDecl : public TypedefNameDecl
@ -552,7 +552,7 @@ class CS_API TypeAlias : public TypedefNameDecl @@ -552,7 +552,7 @@ class CS_API TypeAlias : public TypedefNameDecl
public:
TypeAlias();
~TypeAlias();
TypeAliasTemplate* DescribedAliasTemplate;
TypeAliasTemplate* describedAliasTemplate;
};
class CS_API Friend : public Declaration
@ -560,7 +560,7 @@ class CS_API Friend : public Declaration @@ -560,7 +560,7 @@ class CS_API Friend : public Declaration
public:
DECLARE_DECL_KIND(Friend, Friend)
~Friend();
CppSharp::CppParser::AST::Declaration* Declaration;
Declaration* declaration;
};
enum class StatementClass
@ -579,8 +579,8 @@ class CS_API Statement @@ -579,8 +579,8 @@ class CS_API Statement
{
public:
Statement(const std::string& str, StatementClass Class = StatementClass::Any, Declaration* decl = 0);
StatementClass Class;
Declaration* Decl;
StatementClass _class;
Declaration* decl;
STRING(String)
};
@ -622,11 +622,11 @@ public: @@ -622,11 +622,11 @@ public:
Parameter();
~Parameter();
CppSharp::CppParser::AST::QualifiedType QualifiedType;
bool IsIndirect;
bool HasDefaultValue;
unsigned int Index;
Expression* DefaultArgument;
QualifiedType qualifiedType;
bool isIndirect;
bool hasDefaultValue;
unsigned int index;
Expression* defaultArgument;
};
enum class CXXMethodKind
@ -696,21 +696,21 @@ public: @@ -696,21 +696,21 @@ public:
Function();
~Function();
QualifiedType ReturnType;
bool IsReturnIndirect;
bool HasThisReturn;
QualifiedType returnType;
bool isReturnIndirect;
bool hasThisReturn;
bool IsVariadic;
bool IsInline;
bool IsPure;
bool IsDeleted;
bool isVariadic;
bool isInline;
bool isPure;
bool isDeleted;
CXXOperatorKind OperatorKind;
STRING(Mangled)
STRING(Signature)
CppSharp::CppParser::AST::CallingConvention CallingConvention;
CallingConvention callingConvention;
VECTOR(Parameter*, Parameters)
FunctionTemplateSpecialization* SpecializationInfo;
Function* InstantiatedFrom;
FunctionTemplateSpecialization* specializationInfo;
Function* instantiatedFrom;
};
class AccessSpecifierDecl;
@ -728,20 +728,20 @@ public: @@ -728,20 +728,20 @@ public:
Method();
~Method();
bool IsVirtual;
bool IsStatic;
bool IsConst;
bool IsExplicit;
bool IsOverride;
bool isVirtual;
bool isStatic;
bool isConst;
bool isExplicit;
bool isOverride;
CXXMethodKind MethodKind;
CXXMethodKind methodKind;
bool IsDefaultConstructor;
bool IsCopyConstructor;
bool IsMoveConstructor;
bool isDefaultConstructor;
bool isCopyConstructor;
bool isMoveConstructor;
QualifiedType ConversionType;
RefQualifierKind RefQualifier;
QualifiedType conversionType;
RefQualifierKind refQualifier;
};
class CS_API Enumeration : public DeclarationContext
@ -758,7 +758,7 @@ public: @@ -758,7 +758,7 @@ public:
~Item();
STRING(Expression)
uint64_t Value;
uint64_t value;
};
enum class CS_FLAGS EnumModifiers
@ -768,9 +768,9 @@ public: @@ -768,9 +768,9 @@ public:
Flags = 1 << 2,
};
EnumModifiers Modifiers;
CppSharp::CppParser::AST::Type* Type;
CppSharp::CppParser::AST::BuiltinType* BuiltinType;
EnumModifiers modifiers;
Type* type;
BuiltinType* builtinType;
VECTOR(Item*, Items)
Item* FindItemByName(const std::string& Name);
@ -782,7 +782,7 @@ public: @@ -782,7 +782,7 @@ public:
DECLARE_DECL_KIND(Variable, Variable)
~Variable();
STRING(Mangled)
CppSharp::CppParser::AST::QualifiedType QualifiedType;
QualifiedType qualifiedType;
};
class PreprocessedEntity;
@ -790,10 +790,10 @@ class PreprocessedEntity; @@ -790,10 +790,10 @@ class PreprocessedEntity;
struct CS_API BaseClassSpecifier
{
BaseClassSpecifier();
AccessSpecifier Access;
bool IsVirtual;
CppSharp::CppParser::AST::Type* Type;
int Offset;
AccessSpecifier access;
bool isVirtual;
Type* type;
int offset;
};
class Class;
@ -803,10 +803,10 @@ class CS_API Field : public Declaration @@ -803,10 +803,10 @@ class CS_API Field : public Declaration
public:
DECLARE_DECL_KIND(Field, Field)
~Field();
CppSharp::CppParser::AST::QualifiedType QualifiedType;
CppSharp::CppParser::AST::Class* Class;
bool IsBitField;
unsigned BitWidth;
QualifiedType qualifiedType;
Class* _class;
bool isBitField;
unsigned bitWidth;
};
class CS_API AccessSpecifierDecl : public Declaration
@ -827,17 +827,17 @@ public: @@ -827,17 +827,17 @@ public:
VECTOR(Method*, Methods)
VECTOR(AccessSpecifierDecl*, Specifiers)
bool IsPOD;
bool IsAbstract;
bool IsUnion;
bool IsDynamic;
bool IsPolymorphic;
bool HasNonTrivialDefaultConstructor;
bool HasNonTrivialCopyConstructor;
bool HasNonTrivialDestructor;
bool IsExternCContext;
bool isPOD;
bool isAbstract;
bool isUnion;
bool isDynamic;
bool isPolymorphic;
bool hasNonTrivialDefaultConstructor;
bool hasNonTrivialCopyConstructor;
bool hasNonTrivialDestructor;
bool isExternCContext;
ClassLayout* Layout;
ClassLayout* layout;
};
class CS_API Template : public Declaration
@ -873,9 +873,9 @@ class CS_API TemplateParameter : public Declaration @@ -873,9 +873,9 @@ class CS_API TemplateParameter : public Declaration
public:
TemplateParameter(DeclarationKind kind);
~TemplateParameter();
unsigned int Depth;
unsigned int Index;
bool IsParameterPack;
unsigned int depth;
unsigned int index;
bool isParameterPack;
};
class CS_API TemplateTemplateParameter : public Template
@ -884,9 +884,9 @@ public: @@ -884,9 +884,9 @@ public:
TemplateTemplateParameter();
~TemplateTemplateParameter();
bool IsParameterPack;
bool IsPackExpansion;
bool IsExpandedParameterPack;
bool isParameterPack;
bool isPackExpansion;
bool isExpandedParameterPack;
};
class CS_API TypeTemplateParameter : public TemplateParameter
@ -896,7 +896,7 @@ public: @@ -896,7 +896,7 @@ public:
TypeTemplateParameter(const TypeTemplateParameter&);
~TypeTemplateParameter();
QualifiedType DefaultArgument;
QualifiedType defaultArgument;
};
class CS_API NonTypeTemplateParameter : public TemplateParameter
@ -906,10 +906,10 @@ public: @@ -906,10 +906,10 @@ public:
NonTypeTemplateParameter(const NonTypeTemplateParameter&);
~NonTypeTemplateParameter();
Expression* DefaultArgument;
unsigned int Position;
bool IsPackExpansion;
bool IsExpandedParameterPack;
Expression* defaultArgument;
unsigned int position;
bool isPackExpansion;
bool isExpandedParameterPack;
};
class ClassTemplateSpecialization;
@ -939,9 +939,9 @@ class CS_API ClassTemplateSpecialization : public Class @@ -939,9 +939,9 @@ class CS_API ClassTemplateSpecialization : public Class
public:
ClassTemplateSpecialization();
~ClassTemplateSpecialization();
ClassTemplate* TemplatedDecl;
ClassTemplate* templatedDecl;
VECTOR(TemplateArgument, Arguments)
TemplateSpecializationKind SpecializationKind;
TemplateSpecializationKind specializationKind;
};
class CS_API ClassTemplatePartialSpecialization : public ClassTemplateSpecialization
@ -965,10 +965,10 @@ class CS_API FunctionTemplateSpecialization @@ -965,10 +965,10 @@ class CS_API FunctionTemplateSpecialization
public:
FunctionTemplateSpecialization();
~FunctionTemplateSpecialization();
FunctionTemplate* Template;
FunctionTemplate* _template;
VECTOR(TemplateArgument, Arguments)
Function* SpecializedFunction;
TemplateSpecializationKind SpecializationKind;
Function* specializedFunction;
TemplateSpecializationKind specializationKind;
};
class VarTemplateSpecialization;
@ -989,9 +989,9 @@ class CS_API VarTemplateSpecialization : public Variable @@ -989,9 +989,9 @@ class CS_API VarTemplateSpecialization : public Variable
public:
VarTemplateSpecialization();
~VarTemplateSpecialization();
VarTemplate* TemplatedDecl;
VarTemplate* templatedDecl;
VECTOR(TemplateArgument, Arguments)
TemplateSpecializationKind SpecializationKind;
TemplateSpecializationKind specializationKind;
};
class CS_API VarTemplatePartialSpecialization : public VarTemplateSpecialization
@ -1006,7 +1006,7 @@ class CS_API Namespace : public DeclarationContext @@ -1006,7 +1006,7 @@ class CS_API Namespace : public DeclarationContext
public:
Namespace();
~Namespace();
bool IsInline;
bool isInline;
};
enum class MacroLocation
@ -1023,9 +1023,9 @@ class CS_API PreprocessedEntity @@ -1023,9 +1023,9 @@ class CS_API PreprocessedEntity
{
public:
PreprocessedEntity();
MacroLocation MacroLocation;
void* OriginalPtr;
DeclarationKind Kind;
MacroLocation macroLocation;
void* originalPtr;
DeclarationKind kind;
};
class CS_API MacroDefinition : public PreprocessedEntity
@ -1035,8 +1035,8 @@ public: @@ -1035,8 +1035,8 @@ public:
~MacroDefinition();
STRING(Name)
STRING(Expression)
int LineNumberStart;
int LineNumberEnd;
int lineNumberStart;
int lineNumberEnd;
};
class CS_API MacroExpansion : public PreprocessedEntity
@ -1046,7 +1046,7 @@ public: @@ -1046,7 +1046,7 @@ public:
~MacroExpansion();
STRING(Name)
STRING(Text)
MacroDefinition* Definition;
MacroDefinition* definition;
};
class CS_API TranslationUnit : public Namespace
@ -1055,7 +1055,7 @@ public: @@ -1055,7 +1055,7 @@ public:
TranslationUnit();
~TranslationUnit();
STRING(FileName)
bool IsSystemHeader;
bool isSystemHeader;
VECTOR(MacroDefinition*, Macros)
};
@ -1072,7 +1072,7 @@ public: @@ -1072,7 +1072,7 @@ public:
NativeLibrary();
~NativeLibrary();
STRING(FileName)
ArchType ArchType;
ArchType archType;
VECTOR_STRING(Symbols)
VECTOR_STRING(Dependencies)
};
@ -1113,7 +1113,7 @@ class CS_API CS_ABSTRACT Comment @@ -1113,7 +1113,7 @@ class CS_API CS_ABSTRACT Comment
{
public:
Comment(CommentKind kind);
CommentKind Kind;
CommentKind kind;
};
class CS_API BlockContentComment : public Comment
@ -1136,7 +1136,7 @@ class CS_API InlineContentComment : public Comment @@ -1136,7 +1136,7 @@ class CS_API InlineContentComment : public Comment
public:
InlineContentComment();
InlineContentComment(CommentKind Kind);
bool HasTrailingNewline;
bool hasTrailingNewline;
};
class CS_API ParagraphComment : public BlockContentComment
@ -1144,7 +1144,7 @@ class CS_API ParagraphComment : public BlockContentComment @@ -1144,7 +1144,7 @@ class CS_API ParagraphComment : public BlockContentComment
public:
ParagraphComment();
~ParagraphComment();
bool IsWhitespace;
bool isWhitespace;
VECTOR(InlineContentComment*, Content)
};
@ -1161,8 +1161,8 @@ public: @@ -1161,8 +1161,8 @@ public:
BlockCommandComment();
BlockCommandComment(CommentKind Kind);
~BlockCommandComment();
unsigned CommandId;
ParagraphComment* ParagraphComment;
unsigned commandId;
ParagraphComment* paragraphComment;
VECTOR(Argument, Arguments)
};
@ -1176,8 +1176,8 @@ public: @@ -1176,8 +1176,8 @@ public:
InOut
};
ParamCommandComment();
PassDirection Direction;
unsigned ParamIndex;
PassDirection direction;
unsigned paramIndex;
};
class CS_API TParamCommandComment : public BlockCommandComment
@ -1227,8 +1227,8 @@ public: @@ -1227,8 +1227,8 @@ public:
STRING(Text)
};
InlineCommandComment();
unsigned CommandId;
RenderKind CommentRenderKind;
unsigned commandId;
RenderKind commentRenderKind;
VECTOR(Argument, Arguments)
};
@ -1286,10 +1286,10 @@ class CS_API RawComment @@ -1286,10 +1286,10 @@ class CS_API RawComment
public:
RawComment();
~RawComment();
RawCommentKind Kind;
RawCommentKind kind;
STRING(Text)
STRING(BriefText)
FullComment* FullCommentBlock;
FullComment* fullCommentBlock;
};
#pragma region Commands

656
src/CppParser/Bindings/CLI/AST.cpp

File diff suppressed because it is too large Load Diff

52
src/CppParser/Bindings/CLI/CppParser.cpp

@ -191,82 +191,82 @@ void CppSharp::Parser::CppParserOptions::ASTContext::set(CppSharp::Parser::AST:: @@ -191,82 +191,82 @@ void CppSharp::Parser::CppParserOptions::ASTContext::set(CppSharp::Parser::AST::
int CppSharp::Parser::CppParserOptions::ToolSetToUse::get()
{
return ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->ToolSetToUse;
return ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->toolSetToUse;
}
void CppSharp::Parser::CppParserOptions::ToolSetToUse::set(int value)
{
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->ToolSetToUse = value;
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->toolSetToUse = value;
}
CppSharp::Parser::AST::CppAbi CppSharp::Parser::CppParserOptions::Abi::get()
{
return (CppSharp::Parser::AST::CppAbi)((::CppSharp::CppParser::CppParserOptions*)NativePtr)->Abi;
return (CppSharp::Parser::AST::CppAbi)((::CppSharp::CppParser::CppParserOptions*)NativePtr)->abi;
}
void CppSharp::Parser::CppParserOptions::Abi::set(CppSharp::Parser::AST::CppAbi value)
{
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->Abi = (::CppSharp::CppParser::AST::CppAbi)value;
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->abi = (::CppSharp::CppParser::AST::CppAbi)value;
}
bool CppSharp::Parser::CppParserOptions::NoStandardIncludes::get()
{
return ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->NoStandardIncludes;
return ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->noStandardIncludes;
}
void CppSharp::Parser::CppParserOptions::NoStandardIncludes::set(bool value)
{
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->NoStandardIncludes = value;
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->noStandardIncludes = value;
}
bool CppSharp::Parser::CppParserOptions::NoBuiltinIncludes::get()
{
return ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->NoBuiltinIncludes;
return ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->noBuiltinIncludes;
}
void CppSharp::Parser::CppParserOptions::NoBuiltinIncludes::set(bool value)
{
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->NoBuiltinIncludes = value;
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->noBuiltinIncludes = value;
}
bool CppSharp::Parser::CppParserOptions::MicrosoftMode::get()
{
return ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->MicrosoftMode;
return ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->microsoftMode;
}
void CppSharp::Parser::CppParserOptions::MicrosoftMode::set(bool value)
{
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->MicrosoftMode = value;
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->microsoftMode = value;
}
bool CppSharp::Parser::CppParserOptions::Verbose::get()
{
return ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->Verbose;
return ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->verbose;
}
void CppSharp::Parser::CppParserOptions::Verbose::set(bool value)
{
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->Verbose = value;
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->verbose = value;
}
CppSharp::Parser::LanguageVersion CppSharp::Parser::CppParserOptions::LanguageVersion::get()
{
return (CppSharp::Parser::LanguageVersion)((::CppSharp::CppParser::CppParserOptions*)NativePtr)->LanguageVersion;
return (CppSharp::Parser::LanguageVersion)((::CppSharp::CppParser::CppParserOptions*)NativePtr)->languageVersion;
}
void CppSharp::Parser::CppParserOptions::LanguageVersion::set(CppSharp::Parser::LanguageVersion value)
{
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->LanguageVersion = (::CppSharp::CppParser::LanguageVersion)value;
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->languageVersion = (::CppSharp::CppParser::LanguageVersion)value;
}
CppSharp::Parser::ParserTargetInfo^ CppSharp::Parser::CppParserOptions::TargetInfo::get()
{
return (((::CppSharp::CppParser::CppParserOptions*)NativePtr)->TargetInfo == nullptr) ? nullptr : gcnew CppSharp::Parser::ParserTargetInfo((::CppSharp::CppParser::ParserTargetInfo*)((::CppSharp::CppParser::CppParserOptions*)NativePtr)->TargetInfo);
return (((::CppSharp::CppParser::CppParserOptions*)NativePtr)->targetInfo == nullptr) ? nullptr : gcnew CppSharp::Parser::ParserTargetInfo((::CppSharp::CppParser::ParserTargetInfo*)((::CppSharp::CppParser::CppParserOptions*)NativePtr)->targetInfo);
}
void CppSharp::Parser::CppParserOptions::TargetInfo::set(CppSharp::Parser::ParserTargetInfo^ value)
{
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->TargetInfo = (::CppSharp::CppParser::ParserTargetInfo*)value->NativePtr;
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->targetInfo = (::CppSharp::CppParser::ParserTargetInfo*)value->NativePtr;
}
System::String^ CppSharp::Parser::CppParserOptions::LibraryFile::get()
@ -382,32 +382,32 @@ void CppSharp::Parser::ParserDiagnostic::__Instance::set(System::IntPtr object) @@ -382,32 +382,32 @@ void CppSharp::Parser::ParserDiagnostic::__Instance::set(System::IntPtr object)
CppSharp::Parser::ParserDiagnosticLevel CppSharp::Parser::ParserDiagnostic::Level::get()
{
return (CppSharp::Parser::ParserDiagnosticLevel)((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->Level;
return (CppSharp::Parser::ParserDiagnosticLevel)((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->level;
}
void CppSharp::Parser::ParserDiagnostic::Level::set(CppSharp::Parser::ParserDiagnosticLevel value)
{
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->Level = (::CppSharp::CppParser::ParserDiagnosticLevel)value;
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->level = (::CppSharp::CppParser::ParserDiagnosticLevel)value;
}
int CppSharp::Parser::ParserDiagnostic::LineNumber::get()
{
return ((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->LineNumber;
return ((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->lineNumber;
}
void CppSharp::Parser::ParserDiagnostic::LineNumber::set(int value)
{
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->LineNumber = value;
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->lineNumber = value;
}
int CppSharp::Parser::ParserDiagnostic::ColumnNumber::get()
{
return ((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->ColumnNumber;
return ((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->columnNumber;
}
void CppSharp::Parser::ParserDiagnostic::ColumnNumber::set(int value)
{
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->ColumnNumber = value;
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->columnNumber = value;
}
System::String^ CppSharp::Parser::ParserDiagnostic::FileName::get()
@ -501,12 +501,12 @@ void CppSharp::Parser::ParserResult::__Instance::set(System::IntPtr object) @@ -501,12 +501,12 @@ void CppSharp::Parser::ParserResult::__Instance::set(System::IntPtr object)
CppSharp::Parser::ParserResultKind CppSharp::Parser::ParserResult::Kind::get()
{
return (CppSharp::Parser::ParserResultKind)((::CppSharp::CppParser::ParserResult*)NativePtr)->Kind;
return (CppSharp::Parser::ParserResultKind)((::CppSharp::CppParser::ParserResult*)NativePtr)->kind;
}
void CppSharp::Parser::ParserResult::Kind::set(CppSharp::Parser::ParserResultKind value)
{
((::CppSharp::CppParser::ParserResult*)NativePtr)->Kind = (::CppSharp::CppParser::ParserResultKind)value;
((::CppSharp::CppParser::ParserResult*)NativePtr)->kind = (::CppSharp::CppParser::ParserResultKind)value;
}
CppSharp::Parser::AST::ASTContext^ CppSharp::Parser::ParserResult::ASTContext::get()
@ -521,12 +521,12 @@ void CppSharp::Parser::ParserResult::ASTContext::set(CppSharp::Parser::AST::ASTC @@ -521,12 +521,12 @@ void CppSharp::Parser::ParserResult::ASTContext::set(CppSharp::Parser::AST::ASTC
CppSharp::Parser::AST::NativeLibrary^ CppSharp::Parser::ParserResult::Library::get()
{
return (((::CppSharp::CppParser::ParserResult*)NativePtr)->Library == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::NativeLibrary((::CppSharp::CppParser::AST::NativeLibrary*)((::CppSharp::CppParser::ParserResult*)NativePtr)->Library);
return (((::CppSharp::CppParser::ParserResult*)NativePtr)->library == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::NativeLibrary((::CppSharp::CppParser::AST::NativeLibrary*)((::CppSharp::CppParser::ParserResult*)NativePtr)->library);
}
void CppSharp::Parser::ParserResult::Library::set(CppSharp::Parser::AST::NativeLibrary^ value)
{
((::CppSharp::CppParser::ParserResult*)NativePtr)->Library = (::CppSharp::CppParser::AST::NativeLibrary*)value->NativePtr;
((::CppSharp::CppParser::ParserResult*)NativePtr)->library = (::CppSharp::CppParser::AST::NativeLibrary*)value->NativePtr;
}
unsigned int CppSharp::Parser::ParserResult::DiagnosticsCount::get()

152
src/CppParser/Bindings/CLI/Target.cpp

@ -46,382 +46,382 @@ void CppSharp::Parser::ParserTargetInfo::__Instance::set(System::IntPtr object) @@ -46,382 +46,382 @@ void CppSharp::Parser::ParserTargetInfo::__Instance::set(System::IntPtr object)
CppSharp::Parser::ParserIntType CppSharp::Parser::ParserTargetInfo::Char16Type::get()
{
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Char16Type;
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->char16Type;
}
void CppSharp::Parser::ParserTargetInfo::Char16Type::set(CppSharp::Parser::ParserIntType value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Char16Type = (::CppSharp::CppParser::ParserIntType)value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->char16Type = (::CppSharp::CppParser::ParserIntType)value;
}
CppSharp::Parser::ParserIntType CppSharp::Parser::ParserTargetInfo::Char32Type::get()
{
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Char32Type;
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->char32Type;
}
void CppSharp::Parser::ParserTargetInfo::Char32Type::set(CppSharp::Parser::ParserIntType value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Char32Type = (::CppSharp::CppParser::ParserIntType)value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->char32Type = (::CppSharp::CppParser::ParserIntType)value;
}
CppSharp::Parser::ParserIntType CppSharp::Parser::ParserTargetInfo::Int64Type::get()
{
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Int64Type;
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->int64Type;
}
void CppSharp::Parser::ParserTargetInfo::Int64Type::set(CppSharp::Parser::ParserIntType value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Int64Type = (::CppSharp::CppParser::ParserIntType)value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->int64Type = (::CppSharp::CppParser::ParserIntType)value;
}
CppSharp::Parser::ParserIntType CppSharp::Parser::ParserTargetInfo::IntMaxType::get()
{
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->IntMaxType;
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->intMaxType;
}
void CppSharp::Parser::ParserTargetInfo::IntMaxType::set(CppSharp::Parser::ParserIntType value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->IntMaxType = (::CppSharp::CppParser::ParserIntType)value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->intMaxType = (::CppSharp::CppParser::ParserIntType)value;
}
CppSharp::Parser::ParserIntType CppSharp::Parser::ParserTargetInfo::IntPtrType::get()
{
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->IntPtrType;
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->intPtrType;
}
void CppSharp::Parser::ParserTargetInfo::IntPtrType::set(CppSharp::Parser::ParserIntType value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->IntPtrType = (::CppSharp::CppParser::ParserIntType)value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->intPtrType = (::CppSharp::CppParser::ParserIntType)value;
}
CppSharp::Parser::ParserIntType CppSharp::Parser::ParserTargetInfo::SizeType::get()
{
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->SizeType;
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->sizeType;
}
void CppSharp::Parser::ParserTargetInfo::SizeType::set(CppSharp::Parser::ParserIntType value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->SizeType = (::CppSharp::CppParser::ParserIntType)value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->sizeType = (::CppSharp::CppParser::ParserIntType)value;
}
CppSharp::Parser::ParserIntType CppSharp::Parser::ParserTargetInfo::UIntMaxType::get()
{
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->UIntMaxType;
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->uIntMaxType;
}
void CppSharp::Parser::ParserTargetInfo::UIntMaxType::set(CppSharp::Parser::ParserIntType value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->UIntMaxType = (::CppSharp::CppParser::ParserIntType)value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->uIntMaxType = (::CppSharp::CppParser::ParserIntType)value;
}
CppSharp::Parser::ParserIntType CppSharp::Parser::ParserTargetInfo::WCharType::get()
{
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->WCharType;
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->wCharType;
}
void CppSharp::Parser::ParserTargetInfo::WCharType::set(CppSharp::Parser::ParserIntType value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->WCharType = (::CppSharp::CppParser::ParserIntType)value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->wCharType = (::CppSharp::CppParser::ParserIntType)value;
}
CppSharp::Parser::ParserIntType CppSharp::Parser::ParserTargetInfo::WIntType::get()
{
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->WIntType;
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->wIntType;
}
void CppSharp::Parser::ParserTargetInfo::WIntType::set(CppSharp::Parser::ParserIntType value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->WIntType = (::CppSharp::CppParser::ParserIntType)value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->wIntType = (::CppSharp::CppParser::ParserIntType)value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::BoolAlign::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->BoolAlign;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->boolAlign;
}
void CppSharp::Parser::ParserTargetInfo::BoolAlign::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->BoolAlign = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->boolAlign = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::BoolWidth::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->BoolWidth;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->boolWidth;
}
void CppSharp::Parser::ParserTargetInfo::BoolWidth::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->BoolWidth = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->boolWidth = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::CharAlign::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->CharAlign;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->charAlign;
}
void CppSharp::Parser::ParserTargetInfo::CharAlign::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->CharAlign = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->charAlign = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::CharWidth::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->CharWidth;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->charWidth;
}
void CppSharp::Parser::ParserTargetInfo::CharWidth::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->CharWidth = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->charWidth = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::Char16Align::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Char16Align;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->char16Align;
}
void CppSharp::Parser::ParserTargetInfo::Char16Align::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Char16Align = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->char16Align = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::Char16Width::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Char16Width;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->char16Width;
}
void CppSharp::Parser::ParserTargetInfo::Char16Width::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Char16Width = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->char16Width = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::Char32Align::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Char32Align;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->char32Align;
}
void CppSharp::Parser::ParserTargetInfo::Char32Align::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Char32Align = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->char32Align = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::Char32Width::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Char32Width;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->char32Width;
}
void CppSharp::Parser::ParserTargetInfo::Char32Width::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->Char32Width = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->char32Width = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::HalfAlign::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->HalfAlign;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->halfAlign;
}
void CppSharp::Parser::ParserTargetInfo::HalfAlign::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->HalfAlign = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->halfAlign = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::HalfWidth::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->HalfWidth;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->halfWidth;
}
void CppSharp::Parser::ParserTargetInfo::HalfWidth::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->HalfWidth = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->halfWidth = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::FloatAlign::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->FloatAlign;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->floatAlign;
}
void CppSharp::Parser::ParserTargetInfo::FloatAlign::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->FloatAlign = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->floatAlign = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::FloatWidth::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->FloatWidth;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->floatWidth;
}
void CppSharp::Parser::ParserTargetInfo::FloatWidth::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->FloatWidth = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->floatWidth = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::DoubleAlign::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->DoubleAlign;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->doubleAlign;
}
void CppSharp::Parser::ParserTargetInfo::DoubleAlign::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->DoubleAlign = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->doubleAlign = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::DoubleWidth::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->DoubleWidth;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->doubleWidth;
}
void CppSharp::Parser::ParserTargetInfo::DoubleWidth::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->DoubleWidth = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->doubleWidth = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::ShortAlign::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->ShortAlign;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->shortAlign;
}
void CppSharp::Parser::ParserTargetInfo::ShortAlign::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->ShortAlign = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->shortAlign = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::ShortWidth::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->ShortWidth;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->shortWidth;
}
void CppSharp::Parser::ParserTargetInfo::ShortWidth::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->ShortWidth = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->shortWidth = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::IntAlign::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->IntAlign;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->intAlign;
}
void CppSharp::Parser::ParserTargetInfo::IntAlign::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->IntAlign = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->intAlign = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::IntWidth::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->IntWidth;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->intWidth;
}
void CppSharp::Parser::ParserTargetInfo::IntWidth::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->IntWidth = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->intWidth = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::IntMaxTWidth::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->IntMaxTWidth;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->intMaxTWidth;
}
void CppSharp::Parser::ParserTargetInfo::IntMaxTWidth::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->IntMaxTWidth = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->intMaxTWidth = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::LongAlign::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->LongAlign;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->longAlign;
}
void CppSharp::Parser::ParserTargetInfo::LongAlign::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->LongAlign = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->longAlign = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::LongWidth::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->LongWidth;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->longWidth;
}
void CppSharp::Parser::ParserTargetInfo::LongWidth::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->LongWidth = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->longWidth = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::LongDoubleAlign::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->LongDoubleAlign;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->longDoubleAlign;
}
void CppSharp::Parser::ParserTargetInfo::LongDoubleAlign::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->LongDoubleAlign = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->longDoubleAlign = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::LongDoubleWidth::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->LongDoubleWidth;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->longDoubleWidth;
}
void CppSharp::Parser::ParserTargetInfo::LongDoubleWidth::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->LongDoubleWidth = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->longDoubleWidth = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::LongLongAlign::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->LongLongAlign;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->longLongAlign;
}
void CppSharp::Parser::ParserTargetInfo::LongLongAlign::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->LongLongAlign = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->longLongAlign = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::LongLongWidth::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->LongLongWidth;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->longLongWidth;
}
void CppSharp::Parser::ParserTargetInfo::LongLongWidth::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->LongLongWidth = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->longLongWidth = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::PointerAlign::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->PointerAlign;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->pointerAlign;
}
void CppSharp::Parser::ParserTargetInfo::PointerAlign::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->PointerAlign = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->pointerAlign = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::PointerWidth::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->PointerWidth;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->pointerWidth;
}
void CppSharp::Parser::ParserTargetInfo::PointerWidth::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->PointerWidth = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->pointerWidth = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::WCharAlign::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->WCharAlign;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->wCharAlign;
}
void CppSharp::Parser::ParserTargetInfo::WCharAlign::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->WCharAlign = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->wCharAlign = value;
}
unsigned int CppSharp::Parser::ParserTargetInfo::WCharWidth::get()
{
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->WCharWidth;
return ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->wCharWidth;
}
void CppSharp::Parser::ParserTargetInfo::WCharWidth::set(unsigned int value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->WCharWidth = value;
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->wCharWidth = value;
}
System::String^ CppSharp::Parser::ParserTargetInfo::ABI::get()

30
src/CppParser/Comments.cpp

@ -38,9 +38,9 @@ RawComment* Parser::WalkRawComment(const clang::RawComment* RC) @@ -38,9 +38,9 @@ RawComment* Parser::WalkRawComment(const clang::RawComment* RC)
{
using namespace clang;
auto& SM = C->getSourceManager();
auto& SM = c->getSourceManager();
auto Comment = new RawComment();
Comment->Kind = ConvertRawCommentKind(RC->getKind());
Comment->kind = ConvertRawCommentKind(RC->getKind());
Comment->Text = RC->getRawText(SM);
Comment->BriefText = RC->getBriefText(*AST);
@ -84,13 +84,13 @@ ConvertParamPassDirection(clang::comments::ParamCommandComment::PassDirection Di @@ -84,13 +84,13 @@ ConvertParamPassDirection(clang::comments::ParamCommandComment::PassDirection Di
static void HandleInlineContent(const clang::comments::InlineContentComment *CK,
InlineContentComment* IC)
{
IC->HasTrailingNewline = CK->hasTrailingNewline();
IC->hasTrailingNewline = CK->hasTrailingNewline();
}
static void HandleBlockCommand(const clang::comments::BlockCommandComment *CK,
BlockCommandComment* BC)
{
BC->CommandId = CK->getCommandID();
BC->commandId = CK->getCommandID();
for (unsigned I = 0, E = CK->getNumArgs(); I != E; ++I)
{
auto Arg = BlockCommandComment::Argument();
@ -127,7 +127,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -127,7 +127,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto BC = new BlockCommandComment();
_Comment = BC;
HandleBlockCommand(CK, BC);
BC->ParagraphComment = static_cast<ParagraphComment*>(ConvertCommentBlock(CK->getParagraph()));
BC->paragraphComment = static_cast<ParagraphComment*>(ConvertCommentBlock(CK->getParagraph()));
break;
}
case Comment::ParamCommandCommentKind:
@ -136,10 +136,10 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -136,10 +136,10 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto PC = new ParamCommandComment();
_Comment = PC;
HandleBlockCommand(CK, PC);
PC->Direction = ConvertParamPassDirection(CK->getDirection());
PC->direction = ConvertParamPassDirection(CK->getDirection());
if (CK->isParamIndexValid() && !CK->isVarArgParam())
PC->ParamIndex = CK->getParamIndex();
PC->ParagraphComment = static_cast<ParagraphComment*>(ConvertCommentBlock(CK->getParagraph()));
PC->paramIndex = CK->getParamIndex();
PC->paragraphComment = static_cast<ParagraphComment*>(ConvertCommentBlock(CK->getParagraph()));
break;
}
case Comment::TParamCommandCommentKind:
@ -152,7 +152,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -152,7 +152,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
if (CK->isPositionValid())
for (unsigned I = 0, E = CK->getDepth(); I != E; ++I)
TC->Position.push_back(CK->getIndex(I));
TC->ParagraphComment = static_cast<ParagraphComment*>(ConvertCommentBlock(CK->getParagraph()));
TC->paragraphComment = static_cast<ParagraphComment*>(ConvertCommentBlock(CK->getParagraph()));
break;
}
case Comment::VerbatimBlockCommentKind:
@ -185,7 +185,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -185,7 +185,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto Content = ConvertCommentBlock(*I);
PC->Content.push_back(static_cast<InlineContentComment*>(Content));
}
PC->IsWhitespace = CK->isWhitespace();
PC->isWhitespace = CK->isWhitespace();
break;
}
case Comment::HTMLStartTagCommentKind:
@ -229,8 +229,8 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -229,8 +229,8 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto IC = new InlineCommandComment();
_Comment = IC;
HandleInlineContent(CK, IC);
IC->CommandId = CK->getCommandID();
IC->CommentRenderKind = ConvertRenderKind(CK->getRenderKind());
IC->commandId = CK->getCommandID();
IC->commentRenderKind = ConvertRenderKind(CK->getRenderKind());
for (unsigned I = 0, E = CK->getNumArgs(); I != E; ++I)
{
auto Arg = InlineCommandComment::Argument();
@ -265,11 +265,11 @@ void Parser::HandleComments(const clang::Decl* D, Declaration* Decl) @@ -265,11 +265,11 @@ void Parser::HandleComments(const clang::Decl* D, Declaration* Decl)
return;
auto RawComment = WalkRawComment(RC);
Decl->Comment = RawComment;
Decl->comment = RawComment;
if (clang::comments::FullComment* FC = RC->parse(*AST, &C->getPreprocessor(), D))
if (clang::comments::FullComment* FC = RC->parse(*AST, &c->getPreprocessor(), D))
{
auto CB = static_cast<FullComment*>(ConvertCommentBlock(FC));
RawComment->FullCommentBlock = CB;
RawComment->fullCommentBlock = CB;
}
}

34
src/CppParser/CppParser.cpp

@ -12,14 +12,14 @@ namespace CppSharp { namespace CppParser { @@ -12,14 +12,14 @@ namespace CppSharp { namespace CppParser {
CppParserOptions::CppParserOptions()
: ASTContext(0)
, ToolSetToUse(0)
, Abi(CppAbi::Itanium)
, NoStandardIncludes(false)
, NoBuiltinIncludes(false)
, MicrosoftMode(false)
, Verbose(false)
, LanguageVersion(CppParser::LanguageVersion::GNUPlusPlus11)
, TargetInfo(0)
, toolSetToUse(0)
, abi(CppAbi::Itanium)
, noStandardIncludes(false)
, noBuiltinIncludes(false)
, microsoftMode(false)
, verbose(false)
, languageVersion(CppParser::LanguageVersion::GNUPlusPlus11)
, targetInfo(0)
{
}
@ -36,22 +36,22 @@ DEF_STRING(ParserTargetInfo, ABI) @@ -36,22 +36,22 @@ DEF_STRING(ParserTargetInfo, ABI)
ParserResult::ParserResult()
: ASTContext(0)
, Library(0)
, CodeParser(0)
, library(0)
, codeParser(0)
{
}
ParserResult::ParserResult(const ParserResult& rhs)
: Kind(rhs.Kind)
: kind(rhs.kind)
, Diagnostics(rhs.Diagnostics)
, ASTContext(rhs.ASTContext)
, Library(rhs.Library)
, CodeParser(rhs.CodeParser)
, library(rhs.library)
, codeParser(rhs.codeParser)
{}
ParserResult::~ParserResult()
{
delete CodeParser;
delete codeParser;
}
ParserDiagnostic::ParserDiagnostic() {}
@ -59,9 +59,9 @@ ParserDiagnostic::ParserDiagnostic() {} @@ -59,9 +59,9 @@ ParserDiagnostic::ParserDiagnostic() {}
ParserDiagnostic::ParserDiagnostic(const ParserDiagnostic& rhs)
: FileName(rhs.FileName)
, Message(rhs.Message)
, Level(rhs.Level)
, LineNumber(rhs.LineNumber)
, ColumnNumber(rhs.ColumnNumber)
, level(rhs.level)
, lineNumber(rhs.lineNumber)
, columnNumber(rhs.columnNumber)
{}
DEF_STRING(ParserDiagnostic, FileName)

28
src/CppParser/CppParser.h

@ -62,17 +62,17 @@ struct CS_API CppParserOptions @@ -62,17 +62,17 @@ struct CS_API CppParserOptions
CppSharp::CppParser::AST::ASTContext* ASTContext;
int ToolSetToUse;
int toolSetToUse;
STRING(TargetTriple)
CppAbi Abi;
CppAbi abi;
bool NoStandardIncludes;
bool NoBuiltinIncludes;
bool MicrosoftMode;
bool Verbose;
LanguageVersion LanguageVersion;
bool noStandardIncludes;
bool noBuiltinIncludes;
bool microsoftMode;
bool verbose;
LanguageVersion languageVersion;
ParserTargetInfo* TargetInfo;
ParserTargetInfo* targetInfo;
};
enum class ParserDiagnosticLevel
@ -91,9 +91,9 @@ struct CS_API ParserDiagnostic @@ -91,9 +91,9 @@ struct CS_API ParserDiagnostic
STRING(FileName)
STRING(Message)
ParserDiagnosticLevel Level;
int LineNumber;
int ColumnNumber;
ParserDiagnosticLevel level;
int lineNumber;
int columnNumber;
};
enum class ParserResultKind
@ -111,12 +111,12 @@ struct CS_API ParserResult @@ -111,12 +111,12 @@ struct CS_API ParserResult
ParserResult(const ParserResult&);
~ParserResult();
ParserResultKind Kind;
ParserResultKind kind;
VECTOR(ParserDiagnostic, Diagnostics)
CppSharp::CppParser::AST::ASTContext* ASTContext;
CppSharp::CppParser::AST::NativeLibrary* Library;
Parser* CodeParser;
NativeLibrary* library;
Parser* codeParser;
};
enum class SourceLocationKind

872
src/CppParser/Parser.cpp

File diff suppressed because it is too large Load Diff

18
src/CppParser/Parser.h

@ -138,16 +138,16 @@ private: @@ -138,16 +138,16 @@ private:
void HandleComments(const clang::Decl* D, Declaration* Decl);
void HandleDiagnostics(ParserResult* res);
int Index;
ASTContext* Lib;
CppParserOptions* Opts;
std::unique_ptr<clang::CompilerInstance> C;
int index;
CppSharp::CppParser::AST::ASTContext* lib;
CppParserOptions* opts;
std::unique_ptr<clang::CompilerInstance> c;
clang::ASTContext* AST;
clang::TargetCXXABI::Kind TargetABI;
clang::CodeGen::CodeGenTypes* CodeGenTypes;
std::unordered_map<const clang::TemplateTypeParmDecl*, TypeTemplateParameter*> WalkedTypeTemplateParameters;
std::unordered_map<const clang::TemplateTemplateParmDecl*, TemplateTemplateParameter*> WalkedTemplateTemplateParameters;
std::unordered_map<const clang::NonTypeTemplateParmDecl*, NonTypeTemplateParameter*> WalkedNonTypeTemplateParameters;
clang::TargetCXXABI::Kind targetABI;
clang::CodeGen::CodeGenTypes* codeGenTypes;
std::unordered_map<const clang::TemplateTypeParmDecl*, TypeTemplateParameter*> walkedTypeTemplateParameters;
std::unordered_map<const clang::TemplateTemplateParmDecl*, TemplateTemplateParameter*> walkedTemplateTemplateParameters;
std::unordered_map<const clang::NonTypeTemplateParmDecl*, NonTypeTemplateParameter*> walkedNonTypeTemplateParameters;
ParserResultKind ReadSymbols(llvm::StringRef File,
llvm::object::basic_symbol_iterator Begin,

58
src/CppParser/Target.cpp

@ -10,35 +10,35 @@ @@ -10,35 +10,35 @@
namespace CppSharp { namespace CppParser {
ParserTargetInfo::ParserTargetInfo() :
BoolAlign(0),
BoolWidth(0),
CharAlign(0),
CharWidth(0),
Char16Align(0),
Char16Width(0),
Char32Align(0),
Char32Width(0),
HalfAlign(0),
HalfWidth(0),
FloatAlign(0),
FloatWidth(0),
DoubleAlign(0),
DoubleWidth(0),
ShortAlign(0),
ShortWidth(0),
IntAlign(0),
IntWidth(0),
IntMaxTWidth(0),
LongAlign(0),
LongWidth(0),
LongDoubleAlign(0),
LongDoubleWidth(0),
LongLongAlign(0),
LongLongWidth(0),
PointerAlign(0),
PointerWidth(0),
WCharAlign(0),
WCharWidth(0)
boolAlign(0),
boolWidth(0),
charAlign(0),
charWidth(0),
char16Align(0),
char16Width(0),
char32Align(0),
char32Width(0),
halfAlign(0),
halfWidth(0),
floatAlign(0),
floatWidth(0),
doubleAlign(0),
doubleWidth(0),
shortAlign(0),
shortWidth(0),
intAlign(0),
intWidth(0),
intMaxTWidth(0),
longAlign(0),
longWidth(0),
longDoubleAlign(0),
longDoubleWidth(0),
longLongAlign(0),
longLongWidth(0),
pointerAlign(0),
pointerWidth(0),
wCharAlign(0),
wCharWidth(0)
{
}

76
src/CppParser/Target.h

@ -33,45 +33,45 @@ struct CS_API ParserTargetInfo @@ -33,45 +33,45 @@ struct CS_API ParserTargetInfo
STRING(ABI);
ParserIntType Char16Type;
ParserIntType Char32Type;
ParserIntType Int64Type;
ParserIntType IntMaxType;
ParserIntType IntPtrType;
ParserIntType SizeType;
ParserIntType UIntMaxType;
ParserIntType WCharType;
ParserIntType WIntType;
ParserIntType char16Type;
ParserIntType char32Type;
ParserIntType int64Type;
ParserIntType intMaxType;
ParserIntType intPtrType;
ParserIntType sizeType;
ParserIntType uIntMaxType;
ParserIntType wCharType;
ParserIntType wIntType;
unsigned int BoolAlign;
unsigned int BoolWidth;
unsigned int CharAlign;
unsigned int CharWidth;
unsigned int Char16Align;
unsigned int Char16Width;
unsigned int Char32Align;
unsigned int Char32Width;
unsigned int HalfAlign;
unsigned int HalfWidth;
unsigned int FloatAlign;
unsigned int FloatWidth;
unsigned int DoubleAlign;
unsigned int DoubleWidth;
unsigned int ShortAlign;
unsigned int ShortWidth;
unsigned int IntAlign;
unsigned int IntWidth;
unsigned int IntMaxTWidth;
unsigned int LongAlign;
unsigned int LongWidth;
unsigned int LongDoubleAlign;
unsigned int LongDoubleWidth;
unsigned int LongLongAlign;
unsigned int LongLongWidth;
unsigned int PointerAlign;
unsigned int PointerWidth;
unsigned int WCharAlign;
unsigned int WCharWidth;
unsigned int boolAlign;
unsigned int boolWidth;
unsigned int charAlign;
unsigned int charWidth;
unsigned int char16Align;
unsigned int char16Width;
unsigned int char32Align;
unsigned int char32Width;
unsigned int halfAlign;
unsigned int halfWidth;
unsigned int floatAlign;
unsigned int floatWidth;
unsigned int doubleAlign;
unsigned int doubleWidth;
unsigned int shortAlign;
unsigned int shortWidth;
unsigned int intAlign;
unsigned int intWidth;
unsigned int intMaxTWidth;
unsigned int longAlign;
unsigned int longWidth;
unsigned int longDoubleAlign;
unsigned int longDoubleWidth;
unsigned int longLongAlign;
unsigned int longLongWidth;
unsigned int pointerAlign;
unsigned int pointerWidth;
unsigned int wCharAlign;
unsigned int wCharWidth;
};
} }
Loading…
Cancel
Save