Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround some bugs in a few boolean returning interop methods #431

Merged
merged 1 commit into from
Mar 5, 2023

Conversation

tannergooding
Copy link
Member

This resolves #416

@tannergooding tannergooding merged commit 958dbac into dotnet:main Mar 5, 2023
@tdmowrer
Copy link

tdmowrer commented Mar 6, 2023

@tannergooding Is this the correct fix? It seems like the real problem is in native code, e.g., here, and this just reverses the logic at the C# callsite.

unsigned clangsharp_Cursor_getIsCopyOrMoveConstructor(CXCursor C) {
    if (isDeclOrTU(C.kind)) {
        const Decl* D = getCursorDecl(C);

        if (const CXXConstructorDecl* CXXCD = dyn_cast<CXXConstructorDecl>(D)) {
            return !CXXCD->isCopyOrMoveConstructor();
        }
    }

    return 0;
}

@tannergooding
Copy link
Member Author

tannergooding commented Mar 6, 2023

@tdmowrer, its a temporary fix to ensure the managed side is correct.

I'll be fixing the native side, reverting this managed fix, and getting new native packages up with v16.0.0 when that releases in the next month or so (building all native libraries for all supported targets is "very" expensive and takes several days).

@tdmowrer
Copy link

tdmowrer commented Mar 6, 2023

Makes sense; thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libClangSharp - some bool flags inverted
2 participants