Browse Source

Removed Method.AccessDecl because it doesn't map to Clang and was buggy.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/604/head
Dimitar Dobrev 10 years ago
parent
commit
b3a5b88433
  1. 3
      src/AST/Method.cs
  2. 1
      src/Core/Parser/ASTConverter.cs
  3. 1
      src/CppParser/AST.cpp
  4. 2
      src/CppParser/AST.h
  5. 10
      src/CppParser/Bindings/CLI/AST.cpp
  6. 6
      src/CppParser/Bindings/CLI/AST.h
  7. 49
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs
  8. 49
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs
  9. 49
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs
  10. 49
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs
  11. 9
      src/CppParser/Parser.cpp

3
src/AST/Method.cs

@ -83,7 +83,6 @@ namespace CppSharp.AST
: base(method) : base(method)
{ {
Access = method.Access; Access = method.Access;
AccessDecl = method.AccessDecl;
IsVirtual = method.IsVirtual; IsVirtual = method.IsVirtual;
IsConst = method.IsConst; IsConst = method.IsConst;
IsImplicit = method.IsImplicit; IsImplicit = method.IsImplicit;
@ -105,8 +104,6 @@ namespace CppSharp.AST
} }
public AccessSpecifierDecl AccessDecl { get; set; }
public bool IsVirtual { get; set; } public bool IsVirtual { get; set; }
public bool IsStatic { get; set; } public bool IsStatic { get; set; }
public bool IsConst { get; set; } public bool IsConst { get; set; }

1
src/Core/Parser/ASTConverter.cs

@ -1008,7 +1008,6 @@ namespace CppSharp
var _method = new AST.Method(); var _method = new AST.Method();
VisitFunction(decl, _method); VisitFunction(decl, _method);
_method.AccessDecl = Visit(decl.AccessDecl) as AST.AccessSpecifierDecl;
_method.IsVirtual = decl.IsVirtual; _method.IsVirtual = decl.IsVirtual;
_method.IsStatic = decl.IsStatic; _method.IsStatic = decl.IsStatic;
_method.IsConst = decl.IsConst; _method.IsConst = decl.IsConst;

1
src/CppParser/AST.cpp

@ -575,7 +575,6 @@ DEF_VECTOR(Function, Parameter*, Parameters)
Method::Method() Method::Method()
: Function() : Function()
, AccessDecl(0)
, IsVirtual(false) , IsVirtual(false)
, IsStatic(false) , IsStatic(false)
, IsConst(false) , IsConst(false)

2
src/CppParser/AST.h

@ -639,8 +639,6 @@ public:
Method(); Method();
~Method(); ~Method();
AccessSpecifierDecl* AccessDecl;
bool IsVirtual; bool IsVirtual;
bool IsStatic; bool IsStatic;
bool IsConst; bool IsConst;

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

@ -2669,16 +2669,6 @@ CppSharp::Parser::AST::Method::Method(CppSharp::Parser::AST::Method^ _0)
NativePtr = new ::CppSharp::CppParser::AST::Method(arg0); NativePtr = new ::CppSharp::CppParser::AST::Method(arg0);
} }
CppSharp::Parser::AST::AccessSpecifierDecl^ CppSharp::Parser::AST::Method::AccessDecl::get()
{
return (((::CppSharp::CppParser::AST::Method*)NativePtr)->AccessDecl == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::AccessSpecifierDecl((::CppSharp::CppParser::AST::AccessSpecifierDecl*)((::CppSharp::CppParser::AST::Method*)NativePtr)->AccessDecl);
}
void CppSharp::Parser::AST::Method::AccessDecl::set(CppSharp::Parser::AST::AccessSpecifierDecl^ value)
{
((::CppSharp::CppParser::AST::Method*)NativePtr)->AccessDecl = (::CppSharp::CppParser::AST::AccessSpecifierDecl*)value->NativePtr;
}
bool CppSharp::Parser::AST::Method::IsVirtual::get() bool CppSharp::Parser::AST::Method::IsVirtual::get()
{ {
return ((::CppSharp::CppParser::AST::Method*)NativePtr)->IsVirtual; return ((::CppSharp::CppParser::AST::Method*)NativePtr)->IsVirtual;

6
src/CppParser/Bindings/CLI/AST.h

@ -1672,12 +1672,6 @@ namespace CppSharp
~Method(); ~Method();
property CppSharp::Parser::AST::AccessSpecifierDecl^ AccessDecl
{
CppSharp::Parser::AST::AccessSpecifierDecl^ get();
void set(CppSharp::Parser::AST::AccessSpecifierDecl^);
}
property bool IsVirtual property bool IsVirtual
{ {
bool get(); bool get();

49
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs

@ -5879,7 +5879,7 @@ namespace CppSharp
public unsafe partial class Method : CppSharp.Parser.AST.Function, IDisposable public unsafe partial class Method : CppSharp.Parser.AST.Function, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 184)] [StructLayout(LayoutKind.Explicit, Size = 180)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -5949,39 +5949,36 @@ namespace CppSharp
public global::System.IntPtr SpecializationInfo; public global::System.IntPtr SpecializationInfo;
[FieldOffset(156)] [FieldOffset(156)]
public global::System.IntPtr AccessDecl;
[FieldOffset(160)]
public byte IsVirtual; public byte IsVirtual;
[FieldOffset(161)] [FieldOffset(157)]
public byte IsStatic; public byte IsStatic;
[FieldOffset(162)] [FieldOffset(158)]
public byte IsConst; public byte IsConst;
[FieldOffset(163)] [FieldOffset(159)]
public byte IsImplicit; public byte IsImplicit;
[FieldOffset(164)] [FieldOffset(160)]
public byte IsExplicit; public byte IsExplicit;
[FieldOffset(165)] [FieldOffset(161)]
public byte IsOverride; public byte IsOverride;
[FieldOffset(168)] [FieldOffset(164)]
public CppSharp.Parser.AST.CXXMethodKind MethodKind; public CppSharp.Parser.AST.CXXMethodKind MethodKind;
[FieldOffset(172)] [FieldOffset(168)]
public byte IsDefaultConstructor; public byte IsDefaultConstructor;
[FieldOffset(173)] [FieldOffset(169)]
public byte IsCopyConstructor; public byte IsCopyConstructor;
[FieldOffset(174)] [FieldOffset(170)]
public byte IsMoveConstructor; public byte IsMoveConstructor;
[FieldOffset(176)] [FieldOffset(172)]
public CppSharp.Parser.AST.QualifiedType.Internal ConversionType; public CppSharp.Parser.AST.QualifiedType.Internal ConversionType;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -6012,7 +6009,7 @@ namespace CppSharp
private static Method.Internal* __CopyValue(Method.Internal native) private static Method.Internal* __CopyValue(Method.Internal native)
{ {
var ret = Marshal.AllocHGlobal(184); var ret = Marshal.AllocHGlobal(180);
CppSharp.Parser.AST.Method.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Method.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (Method.Internal*) ret; return (Method.Internal*) ret;
} }
@ -6036,7 +6033,7 @@ namespace CppSharp
public Method() public Method()
: this((Internal*) null) : this((Internal*) null)
{ {
__Instance = Marshal.AllocHGlobal(184); __Instance = Marshal.AllocHGlobal(180);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -6045,7 +6042,7 @@ namespace CppSharp
public Method(CppSharp.Parser.AST.Method _0) public Method(CppSharp.Parser.AST.Method _0)
: this((Internal*) null) : this((Internal*) null)
{ {
__Instance = Marshal.AllocHGlobal(184); __Instance = Marshal.AllocHGlobal(180);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -6063,24 +6060,6 @@ namespace CppSharp
Marshal.FreeHGlobal(__Instance); Marshal.FreeHGlobal(__Instance);
} }
public CppSharp.Parser.AST.AccessSpecifierDecl AccessDecl
{
get
{
CppSharp.Parser.AST.AccessSpecifierDecl __result0;
if (((Internal*) __Instance)->AccessDecl == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->AccessDecl))
__result0 = (CppSharp.Parser.AST.AccessSpecifierDecl) CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap[((Internal*) __Instance)->AccessDecl];
else __result0 = CppSharp.Parser.AST.AccessSpecifierDecl.__CreateInstance(((Internal*) __Instance)->AccessDecl);
return __result0;
}
set
{
((Internal*) __Instance)->AccessDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public bool IsVirtual public bool IsVirtual
{ {
get get

49
src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs

@ -5879,7 +5879,7 @@ namespace CppSharp
public unsafe partial class Method : CppSharp.Parser.AST.Function, IDisposable public unsafe partial class Method : CppSharp.Parser.AST.Function, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 244)] [StructLayout(LayoutKind.Explicit, Size = 240)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -5949,39 +5949,36 @@ namespace CppSharp
public global::System.IntPtr SpecializationInfo; public global::System.IntPtr SpecializationInfo;
[FieldOffset(216)] [FieldOffset(216)]
public global::System.IntPtr AccessDecl;
[FieldOffset(220)]
public byte IsVirtual; public byte IsVirtual;
[FieldOffset(221)] [FieldOffset(217)]
public byte IsStatic; public byte IsStatic;
[FieldOffset(222)] [FieldOffset(218)]
public byte IsConst; public byte IsConst;
[FieldOffset(223)] [FieldOffset(219)]
public byte IsImplicit; public byte IsImplicit;
[FieldOffset(224)] [FieldOffset(220)]
public byte IsExplicit; public byte IsExplicit;
[FieldOffset(225)] [FieldOffset(221)]
public byte IsOverride; public byte IsOverride;
[FieldOffset(228)] [FieldOffset(224)]
public CppSharp.Parser.AST.CXXMethodKind MethodKind; public CppSharp.Parser.AST.CXXMethodKind MethodKind;
[FieldOffset(232)] [FieldOffset(228)]
public byte IsDefaultConstructor; public byte IsDefaultConstructor;
[FieldOffset(233)] [FieldOffset(229)]
public byte IsCopyConstructor; public byte IsCopyConstructor;
[FieldOffset(234)] [FieldOffset(230)]
public byte IsMoveConstructor; public byte IsMoveConstructor;
[FieldOffset(236)] [FieldOffset(232)]
public CppSharp.Parser.AST.QualifiedType.Internal ConversionType; public CppSharp.Parser.AST.QualifiedType.Internal ConversionType;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -6012,7 +6009,7 @@ namespace CppSharp
private static Method.Internal* __CopyValue(Method.Internal native) private static Method.Internal* __CopyValue(Method.Internal native)
{ {
var ret = Marshal.AllocHGlobal(244); var ret = Marshal.AllocHGlobal(240);
CppSharp.Parser.AST.Method.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Method.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (Method.Internal*) ret; return (Method.Internal*) ret;
} }
@ -6036,7 +6033,7 @@ namespace CppSharp
public Method() public Method()
: this((Internal*) null) : this((Internal*) null)
{ {
__Instance = Marshal.AllocHGlobal(244); __Instance = Marshal.AllocHGlobal(240);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -6045,7 +6042,7 @@ namespace CppSharp
public Method(CppSharp.Parser.AST.Method _0) public Method(CppSharp.Parser.AST.Method _0)
: this((Internal*) null) : this((Internal*) null)
{ {
__Instance = Marshal.AllocHGlobal(244); __Instance = Marshal.AllocHGlobal(240);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -6063,24 +6060,6 @@ namespace CppSharp
Marshal.FreeHGlobal(__Instance); Marshal.FreeHGlobal(__Instance);
} }
public CppSharp.Parser.AST.AccessSpecifierDecl AccessDecl
{
get
{
CppSharp.Parser.AST.AccessSpecifierDecl __result0;
if (((Internal*) __Instance)->AccessDecl == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->AccessDecl))
__result0 = (CppSharp.Parser.AST.AccessSpecifierDecl) CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap[((Internal*) __Instance)->AccessDecl];
else __result0 = CppSharp.Parser.AST.AccessSpecifierDecl.__CreateInstance(((Internal*) __Instance)->AccessDecl);
return __result0;
}
set
{
((Internal*) __Instance)->AccessDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public bool IsVirtual public bool IsVirtual
{ {
get get

49
src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs

@ -5878,7 +5878,7 @@ namespace CppSharp
public unsafe partial class Method : CppSharp.Parser.AST.Function, IDisposable public unsafe partial class Method : CppSharp.Parser.AST.Function, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 328)] [StructLayout(LayoutKind.Explicit, Size = 320)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -5948,39 +5948,36 @@ namespace CppSharp
public global::System.IntPtr SpecializationInfo; public global::System.IntPtr SpecializationInfo;
[FieldOffset(288)] [FieldOffset(288)]
public global::System.IntPtr AccessDecl;
[FieldOffset(296)]
public byte IsVirtual; public byte IsVirtual;
[FieldOffset(297)] [FieldOffset(289)]
public byte IsStatic; public byte IsStatic;
[FieldOffset(298)] [FieldOffset(290)]
public byte IsConst; public byte IsConst;
[FieldOffset(299)] [FieldOffset(291)]
public byte IsImplicit; public byte IsImplicit;
[FieldOffset(300)] [FieldOffset(292)]
public byte IsExplicit; public byte IsExplicit;
[FieldOffset(301)] [FieldOffset(293)]
public byte IsOverride; public byte IsOverride;
[FieldOffset(304)] [FieldOffset(296)]
public CppSharp.Parser.AST.CXXMethodKind MethodKind; public CppSharp.Parser.AST.CXXMethodKind MethodKind;
[FieldOffset(308)] [FieldOffset(300)]
public byte IsDefaultConstructor; public byte IsDefaultConstructor;
[FieldOffset(309)] [FieldOffset(301)]
public byte IsCopyConstructor; public byte IsCopyConstructor;
[FieldOffset(310)] [FieldOffset(302)]
public byte IsMoveConstructor; public byte IsMoveConstructor;
[FieldOffset(312)] [FieldOffset(304)]
public CppSharp.Parser.AST.QualifiedType.Internal ConversionType; public CppSharp.Parser.AST.QualifiedType.Internal ConversionType;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -6011,7 +6008,7 @@ namespace CppSharp
private static Method.Internal* __CopyValue(Method.Internal native) private static Method.Internal* __CopyValue(Method.Internal native)
{ {
var ret = Marshal.AllocHGlobal(328); var ret = Marshal.AllocHGlobal(320);
CppSharp.Parser.AST.Method.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Method.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (Method.Internal*) ret; return (Method.Internal*) ret;
} }
@ -6035,7 +6032,7 @@ namespace CppSharp
public Method() public Method()
: this((Internal*) null) : this((Internal*) null)
{ {
__Instance = Marshal.AllocHGlobal(328); __Instance = Marshal.AllocHGlobal(320);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -6044,7 +6041,7 @@ namespace CppSharp
public Method(CppSharp.Parser.AST.Method _0) public Method(CppSharp.Parser.AST.Method _0)
: this((Internal*) null) : this((Internal*) null)
{ {
__Instance = Marshal.AllocHGlobal(328); __Instance = Marshal.AllocHGlobal(320);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -6062,24 +6059,6 @@ namespace CppSharp
Marshal.FreeHGlobal(__Instance); Marshal.FreeHGlobal(__Instance);
} }
public CppSharp.Parser.AST.AccessSpecifierDecl AccessDecl
{
get
{
CppSharp.Parser.AST.AccessSpecifierDecl __result0;
if (((Internal*) __Instance)->AccessDecl == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->AccessDecl))
__result0 = (CppSharp.Parser.AST.AccessSpecifierDecl) CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap[((Internal*) __Instance)->AccessDecl];
else __result0 = CppSharp.Parser.AST.AccessSpecifierDecl.__CreateInstance(((Internal*) __Instance)->AccessDecl);
return __result0;
}
set
{
((Internal*) __Instance)->AccessDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public bool IsVirtual public bool IsVirtual
{ {
get get

49
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs

@ -5878,7 +5878,7 @@ namespace CppSharp
public unsafe partial class Method : CppSharp.Parser.AST.Function, IDisposable public unsafe partial class Method : CppSharp.Parser.AST.Function, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 248)] [StructLayout(LayoutKind.Explicit, Size = 240)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -5948,39 +5948,36 @@ namespace CppSharp
public global::System.IntPtr SpecializationInfo; public global::System.IntPtr SpecializationInfo;
[FieldOffset(208)] [FieldOffset(208)]
public global::System.IntPtr AccessDecl;
[FieldOffset(216)]
public byte IsVirtual; public byte IsVirtual;
[FieldOffset(217)] [FieldOffset(209)]
public byte IsStatic; public byte IsStatic;
[FieldOffset(218)] [FieldOffset(210)]
public byte IsConst; public byte IsConst;
[FieldOffset(219)] [FieldOffset(211)]
public byte IsImplicit; public byte IsImplicit;
[FieldOffset(220)] [FieldOffset(212)]
public byte IsExplicit; public byte IsExplicit;
[FieldOffset(221)] [FieldOffset(213)]
public byte IsOverride; public byte IsOverride;
[FieldOffset(224)] [FieldOffset(216)]
public CppSharp.Parser.AST.CXXMethodKind MethodKind; public CppSharp.Parser.AST.CXXMethodKind MethodKind;
[FieldOffset(228)] [FieldOffset(220)]
public byte IsDefaultConstructor; public byte IsDefaultConstructor;
[FieldOffset(229)] [FieldOffset(221)]
public byte IsCopyConstructor; public byte IsCopyConstructor;
[FieldOffset(230)] [FieldOffset(222)]
public byte IsMoveConstructor; public byte IsMoveConstructor;
[FieldOffset(232)] [FieldOffset(224)]
public CppSharp.Parser.AST.QualifiedType.Internal ConversionType; public CppSharp.Parser.AST.QualifiedType.Internal ConversionType;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -6011,7 +6008,7 @@ namespace CppSharp
private static Method.Internal* __CopyValue(Method.Internal native) private static Method.Internal* __CopyValue(Method.Internal native)
{ {
var ret = Marshal.AllocHGlobal(248); var ret = Marshal.AllocHGlobal(240);
CppSharp.Parser.AST.Method.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Method.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (Method.Internal*) ret; return (Method.Internal*) ret;
} }
@ -6035,7 +6032,7 @@ namespace CppSharp
public Method() public Method()
: this((Internal*) null) : this((Internal*) null)
{ {
__Instance = Marshal.AllocHGlobal(248); __Instance = Marshal.AllocHGlobal(240);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -6044,7 +6041,7 @@ namespace CppSharp
public Method(CppSharp.Parser.AST.Method _0) public Method(CppSharp.Parser.AST.Method _0)
: this((Internal*) null) : this((Internal*) null)
{ {
__Instance = Marshal.AllocHGlobal(248); __Instance = Marshal.AllocHGlobal(240);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -6062,24 +6059,6 @@ namespace CppSharp
Marshal.FreeHGlobal(__Instance); Marshal.FreeHGlobal(__Instance);
} }
public CppSharp.Parser.AST.AccessSpecifierDecl AccessDecl
{
get
{
CppSharp.Parser.AST.AccessSpecifierDecl __result0;
if (((Internal*) __Instance)->AccessDecl == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->AccessDecl))
__result0 = (CppSharp.Parser.AST.AccessSpecifierDecl) CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap[((Internal*) __Instance)->AccessDecl];
else __result0 = CppSharp.Parser.AST.AccessSpecifierDecl.__CreateInstance(((Internal*) __Instance)->AccessDecl);
return __result0;
}
set
{
((Internal*) __Instance)->AccessDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public bool IsVirtual public bool IsVirtual
{ {
get get

9
src/CppParser/Parser.cpp

@ -730,8 +730,6 @@ void Parser::WalkRecord(clang::RecordDecl* Record, Class* RC)
RC->Layout->DataSize = (int)Layout->getDataSize().getQuantity(); RC->Layout->DataSize = (int)Layout->getDataSize().getQuantity();
} }
AccessSpecifierDecl* AccessDecl = nullptr;
for(auto it = Record->decls_begin(); it != Record->decls_end(); ++it) for(auto it = Record->decls_begin(); it != Record->decls_end(); ++it)
{ {
auto D = *it; auto D = *it;
@ -744,8 +742,7 @@ void Parser::WalkRecord(clang::RecordDecl* Record, Class* RC)
case Decl::CXXMethod: case Decl::CXXMethod:
{ {
auto MD = cast<CXXMethodDecl>(D); auto MD = cast<CXXMethodDecl>(D);
auto Method = WalkMethodCXX(MD); WalkMethodCXX(MD);
Method->AccessDecl = AccessDecl;
break; break;
} }
case Decl::Field: case Decl::Field:
@ -762,7 +759,7 @@ void Parser::WalkRecord(clang::RecordDecl* Record, Class* RC)
{ {
AccessSpecDecl* AS = cast<AccessSpecDecl>(D); AccessSpecDecl* AS = cast<AccessSpecDecl>(D);
AccessDecl = new AccessSpecifierDecl(); auto AccessDecl = new AccessSpecifierDecl();
HandleDeclaration(AS, AccessDecl); HandleDeclaration(AS, AccessDecl);
AccessDecl->Access = ConvertToAccess(AS->getAccess()); AccessDecl->Access = ConvertToAccess(AS->getAccess());
@ -775,7 +772,7 @@ void Parser::WalkRecord(clang::RecordDecl* Record, Class* RC)
break; break;
default: default:
{ {
auto Decl = WalkDeclaration(D); WalkDeclaration(D);
break; break;
} } } }
} }

Loading…
Cancel
Save