Skip to content

Commit b3a5b88

Browse files
committed
Removed Method.AccessDecl because it doesn't map to Clang and was buggy.
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent f6210f6 commit b3a5b88

File tree

11 files changed

+59
-169
lines changed

11 files changed

+59
-169
lines changed

src/AST/Method.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public Method(Method method)
8383
: base(method)
8484
{
8585
Access = method.Access;
86-
AccessDecl = method.AccessDecl;
8786
IsVirtual = method.IsVirtual;
8887
IsConst = method.IsConst;
8988
IsImplicit = method.IsImplicit;
@@ -105,8 +104,6 @@ public Method(Function function)
105104

106105
}
107106

108-
public AccessSpecifierDecl AccessDecl { get; set; }
109-
110107
public bool IsVirtual { get; set; }
111108
public bool IsStatic { get; set; }
112109
public bool IsConst { get; set; }

src/Core/Parser/ASTConverter.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,6 @@ public override AST.Declaration VisitMethod(Method decl)
10081008
var _method = new AST.Method();
10091009
VisitFunction(decl, _method);
10101010

1011-
_method.AccessDecl = Visit(decl.AccessDecl) as AST.AccessSpecifierDecl;
10121011
_method.IsVirtual = decl.IsVirtual;
10131012
_method.IsStatic = decl.IsStatic;
10141013
_method.IsConst = decl.IsConst;

src/CppParser/AST.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,6 @@ DEF_VECTOR(Function, Parameter*, Parameters)
575575

576576
Method::Method()
577577
: Function()
578-
, AccessDecl(0)
579578
, IsVirtual(false)
580579
, IsStatic(false)
581580
, IsConst(false)

src/CppParser/AST.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,6 @@ class CS_API Method : public Function
639639
Method();
640640
~Method();
641641

642-
AccessSpecifierDecl* AccessDecl;
643-
644642
bool IsVirtual;
645643
bool IsStatic;
646644
bool IsConst;

src/CppParser/Bindings/CLI/AST.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2669,16 +2669,6 @@ CppSharp::Parser::AST::Method::Method(CppSharp::Parser::AST::Method^ _0)
26692669
NativePtr = new ::CppSharp::CppParser::AST::Method(arg0);
26702670
}
26712671

2672-
CppSharp::Parser::AST::AccessSpecifierDecl^ CppSharp::Parser::AST::Method::AccessDecl::get()
2673-
{
2674-
return (((::CppSharp::CppParser::AST::Method*)NativePtr)->AccessDecl == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::AccessSpecifierDecl((::CppSharp::CppParser::AST::AccessSpecifierDecl*)((::CppSharp::CppParser::AST::Method*)NativePtr)->AccessDecl);
2675-
}
2676-
2677-
void CppSharp::Parser::AST::Method::AccessDecl::set(CppSharp::Parser::AST::AccessSpecifierDecl^ value)
2678-
{
2679-
((::CppSharp::CppParser::AST::Method*)NativePtr)->AccessDecl = (::CppSharp::CppParser::AST::AccessSpecifierDecl*)value->NativePtr;
2680-
}
2681-
26822672
bool CppSharp::Parser::AST::Method::IsVirtual::get()
26832673
{
26842674
return ((::CppSharp::CppParser::AST::Method*)NativePtr)->IsVirtual;

src/CppParser/Bindings/CLI/AST.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,12 +1672,6 @@ namespace CppSharp
16721672

16731673
~Method();
16741674

1675-
property CppSharp::Parser::AST::AccessSpecifierDecl^ AccessDecl
1676-
{
1677-
CppSharp::Parser::AST::AccessSpecifierDecl^ get();
1678-
void set(CppSharp::Parser::AST::AccessSpecifierDecl^);
1679-
}
1680-
16811675
property bool IsVirtual
16821676
{
16831677
bool get();

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

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5879,7 +5879,7 @@ public CppSharp.Parser.AST.FunctionTemplateSpecialization SpecializationInfo
58795879

58805880
public unsafe partial class Method : CppSharp.Parser.AST.Function, IDisposable
58815881
{
5882-
[StructLayout(LayoutKind.Explicit, Size = 184)]
5882+
[StructLayout(LayoutKind.Explicit, Size = 180)]
58835883
public new partial struct Internal
58845884
{
58855885
[FieldOffset(0)]
@@ -5949,39 +5949,36 @@ public unsafe partial class Method : CppSharp.Parser.AST.Function, IDisposable
59495949
public global::System.IntPtr SpecializationInfo;
59505950

59515951
[FieldOffset(156)]
5952-
public global::System.IntPtr AccessDecl;
5953-
5954-
[FieldOffset(160)]
59555952
public byte IsVirtual;
59565953

5957-
[FieldOffset(161)]
5954+
[FieldOffset(157)]
59585955
public byte IsStatic;
59595956

5960-
[FieldOffset(162)]
5957+
[FieldOffset(158)]
59615958
public byte IsConst;
59625959

5963-
[FieldOffset(163)]
5960+
[FieldOffset(159)]
59645961
public byte IsImplicit;
59655962

5966-
[FieldOffset(164)]
5963+
[FieldOffset(160)]
59675964
public byte IsExplicit;
59685965

5969-
[FieldOffset(165)]
5966+
[FieldOffset(161)]
59705967
public byte IsOverride;
59715968

5972-
[FieldOffset(168)]
5969+
[FieldOffset(164)]
59735970
public CppSharp.Parser.AST.CXXMethodKind MethodKind;
59745971

5975-
[FieldOffset(172)]
5972+
[FieldOffset(168)]
59765973
public byte IsDefaultConstructor;
59775974

5978-
[FieldOffset(173)]
5975+
[FieldOffset(169)]
59795976
public byte IsCopyConstructor;
59805977

5981-
[FieldOffset(174)]
5978+
[FieldOffset(170)]
59825979
public byte IsMoveConstructor;
59835980

5984-
[FieldOffset(176)]
5981+
[FieldOffset(172)]
59855982
public CppSharp.Parser.AST.QualifiedType.Internal ConversionType;
59865983

59875984
[SuppressUnmanagedCodeSecurity]
@@ -6012,7 +6009,7 @@ public static Method __CreateInstance(Method.Internal native, bool skipVTables =
60126009

60136010
private static Method.Internal* __CopyValue(Method.Internal native)
60146011
{
6015-
var ret = Marshal.AllocHGlobal(184);
6012+
var ret = Marshal.AllocHGlobal(180);
60166013
CppSharp.Parser.AST.Method.Internal.cctor_1(ret, new global::System.IntPtr(&native));
60176014
return (Method.Internal*) ret;
60186015
}
@@ -6036,7 +6033,7 @@ protected Method(Method.Internal* native, bool skipVTables = false)
60366033
public Method()
60376034
: this((Internal*) null)
60386035
{
6039-
__Instance = Marshal.AllocHGlobal(184);
6036+
__Instance = Marshal.AllocHGlobal(180);
60406037
__ownsNativeInstance = true;
60416038
NativeToManagedMap[__Instance] = this;
60426039
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -6045,7 +6042,7 @@ public Method()
60456042
public Method(CppSharp.Parser.AST.Method _0)
60466043
: this((Internal*) null)
60476044
{
6048-
__Instance = Marshal.AllocHGlobal(184);
6045+
__Instance = Marshal.AllocHGlobal(180);
60496046
__ownsNativeInstance = true;
60506047
NativeToManagedMap[__Instance] = this;
60516048
if (ReferenceEquals(_0, null))
@@ -6063,24 +6060,6 @@ protected override void Dispose(bool disposing)
60636060
Marshal.FreeHGlobal(__Instance);
60646061
}
60656062

6066-
public CppSharp.Parser.AST.AccessSpecifierDecl AccessDecl
6067-
{
6068-
get
6069-
{
6070-
CppSharp.Parser.AST.AccessSpecifierDecl __result0;
6071-
if (((Internal*) __Instance)->AccessDecl == IntPtr.Zero) __result0 = null;
6072-
else if (CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->AccessDecl))
6073-
__result0 = (CppSharp.Parser.AST.AccessSpecifierDecl) CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap[((Internal*) __Instance)->AccessDecl];
6074-
else __result0 = CppSharp.Parser.AST.AccessSpecifierDecl.__CreateInstance(((Internal*) __Instance)->AccessDecl);
6075-
return __result0;
6076-
}
6077-
6078-
set
6079-
{
6080-
((Internal*) __Instance)->AccessDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
6081-
}
6082-
}
6083-
60846063
public bool IsVirtual
60856064
{
60866065
get

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

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5879,7 +5879,7 @@ public CppSharp.Parser.AST.FunctionTemplateSpecialization SpecializationInfo
58795879

58805880
public unsafe partial class Method : CppSharp.Parser.AST.Function, IDisposable
58815881
{
5882-
[StructLayout(LayoutKind.Explicit, Size = 244)]
5882+
[StructLayout(LayoutKind.Explicit, Size = 240)]
58835883
public new partial struct Internal
58845884
{
58855885
[FieldOffset(0)]
@@ -5949,39 +5949,36 @@ public unsafe partial class Method : CppSharp.Parser.AST.Function, IDisposable
59495949
public global::System.IntPtr SpecializationInfo;
59505950

59515951
[FieldOffset(216)]
5952-
public global::System.IntPtr AccessDecl;
5953-
5954-
[FieldOffset(220)]
59555952
public byte IsVirtual;
59565953

5957-
[FieldOffset(221)]
5954+
[FieldOffset(217)]
59585955
public byte IsStatic;
59595956

5960-
[FieldOffset(222)]
5957+
[FieldOffset(218)]
59615958
public byte IsConst;
59625959

5963-
[FieldOffset(223)]
5960+
[FieldOffset(219)]
59645961
public byte IsImplicit;
59655962

5966-
[FieldOffset(224)]
5963+
[FieldOffset(220)]
59675964
public byte IsExplicit;
59685965

5969-
[FieldOffset(225)]
5966+
[FieldOffset(221)]
59705967
public byte IsOverride;
59715968

5972-
[FieldOffset(228)]
5969+
[FieldOffset(224)]
59735970
public CppSharp.Parser.AST.CXXMethodKind MethodKind;
59745971

5975-
[FieldOffset(232)]
5972+
[FieldOffset(228)]
59765973
public byte IsDefaultConstructor;
59775974

5978-
[FieldOffset(233)]
5975+
[FieldOffset(229)]
59795976
public byte IsCopyConstructor;
59805977

5981-
[FieldOffset(234)]
5978+
[FieldOffset(230)]
59825979
public byte IsMoveConstructor;
59835980

5984-
[FieldOffset(236)]
5981+
[FieldOffset(232)]
59855982
public CppSharp.Parser.AST.QualifiedType.Internal ConversionType;
59865983

59875984
[SuppressUnmanagedCodeSecurity]
@@ -6012,7 +6009,7 @@ public static Method __CreateInstance(Method.Internal native, bool skipVTables =
60126009

60136010
private static Method.Internal* __CopyValue(Method.Internal native)
60146011
{
6015-
var ret = Marshal.AllocHGlobal(244);
6012+
var ret = Marshal.AllocHGlobal(240);
60166013
CppSharp.Parser.AST.Method.Internal.cctor_1(ret, new global::System.IntPtr(&native));
60176014
return (Method.Internal*) ret;
60186015
}
@@ -6036,7 +6033,7 @@ protected Method(Method.Internal* native, bool skipVTables = false)
60366033
public Method()
60376034
: this((Internal*) null)
60386035
{
6039-
__Instance = Marshal.AllocHGlobal(244);
6036+
__Instance = Marshal.AllocHGlobal(240);
60406037
__ownsNativeInstance = true;
60416038
NativeToManagedMap[__Instance] = this;
60426039
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -6045,7 +6042,7 @@ public Method()
60456042
public Method(CppSharp.Parser.AST.Method _0)
60466043
: this((Internal*) null)
60476044
{
6048-
__Instance = Marshal.AllocHGlobal(244);
6045+
__Instance = Marshal.AllocHGlobal(240);
60496046
__ownsNativeInstance = true;
60506047
NativeToManagedMap[__Instance] = this;
60516048
if (ReferenceEquals(_0, null))
@@ -6063,24 +6060,6 @@ protected override void Dispose(bool disposing)
60636060
Marshal.FreeHGlobal(__Instance);
60646061
}
60656062

6066-
public CppSharp.Parser.AST.AccessSpecifierDecl AccessDecl
6067-
{
6068-
get
6069-
{
6070-
CppSharp.Parser.AST.AccessSpecifierDecl __result0;
6071-
if (((Internal*) __Instance)->AccessDecl == IntPtr.Zero) __result0 = null;
6072-
else if (CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->AccessDecl))
6073-
__result0 = (CppSharp.Parser.AST.AccessSpecifierDecl) CppSharp.Parser.AST.AccessSpecifierDecl.NativeToManagedMap[((Internal*) __Instance)->AccessDecl];
6074-
else __result0 = CppSharp.Parser.AST.AccessSpecifierDecl.__CreateInstance(((Internal*) __Instance)->AccessDecl);
6075-
return __result0;
6076-
}
6077-
6078-
set
6079-
{
6080-
((Internal*) __Instance)->AccessDecl = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
6081-
}
6082-
}
6083-
60846063
public bool IsVirtual
60856064
{
60866065
get

0 commit comments

Comments
 (0)