Skip to content

Commit

Permalink
Merge pull request #97 from zombieyang/fn_del
Browse files Browse the repository at this point in the history
add deleted in cppFunctionFlag
  • Loading branch information
xoofx authored Apr 7, 2024
2 parents d26914c + ec89ad2 commit bb0f83a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CppAst/CppFunctionFlags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,10 @@ public enum CppFunctionFlags
/// This is a function template (has template params in function)
/// </summary>
FunctionTemplate = 1 << 9,

/// <summary>
/// This is a deleted function
/// </summary>
Deleted = 1 << 10,
}
}
4 changes: 4 additions & 0 deletions src/CppAst/CppModelBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,10 @@ private CppFunction VisitFunctionDecl(CXCursor cursor, CXCursor parent, void* da
{
cppFunction.Flags |= CppFunctionFlags.Pure | CppFunctionFlags.Virtual;
}
if (clang.CXXMethod_isDeleted(cursor) != 0)
{
cppFunction.Flags |= CppFunctionFlags.Deleted;
}

// Gets the return type
var returnType = GetCppType(cursor.ResultType.Declaration, cursor.ResultType, cursor, data);
Expand Down

0 comments on commit bb0f83a

Please sign in to comment.