Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Next Next commit
Revert "Workaround some bugs in a few boolean returning interop methods"
This reverts commit d0d8b2f.
  • Loading branch information
tannergooding committed Jun 21, 2023
commit f579e83f3f837bd4a2eed9ca687824856f58f4ff
10 changes: 5 additions & 5 deletions sources/ClangSharp.Interop/Extensions/CXCursor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ public string DeclKindSpelling

public bool IsConversionFromLambda => clangsharp.Cursor_getIsConversionFromLambda(this) != 0;

public bool IsCopyOrMoveConstructor => clangsharp.Cursor_getIsCopyOrMoveConstructor(this) == 0;
public bool IsCopyOrMoveConstructor => clangsharp.Cursor_getIsCopyOrMoveConstructor(this) != 0;

public bool IsCXXTry => clangsharp.Cursor_getIsCXXTry(this) != 0;

Expand All @@ -922,17 +922,17 @@ public string DeclKindSpelling

public bool IsDefinition => clang.isCursorDefinition(this) != 0;

public bool IsDelegatingConstructor => clangsharp.Cursor_getIsDelegatingConstructor(this) == 0;
public bool IsDelegatingConstructor => clangsharp.Cursor_getIsDelegatingConstructor(this) != 0;

public bool IsDeleted => clangsharp.Cursor_getIsDeleted(this) == 0;
public bool IsDeleted => clangsharp.Cursor_getIsDeleted(this) != 0;

public bool IsDeprecated => clangsharp.Cursor_getIsDeprecated(this) != 0;

public bool IsDynamicCall => clang.Cursor_isDynamicCall(this) != 0;

public bool IsElidable => clangsharp.Cursor_getIsElidable(this) != 0;

public bool IsExplicitlyDefaulted => clangsharp.Cursor_getIsExplicitlyDefaulted(this) == 0;
public bool IsExplicitlyDefaulted => clangsharp.Cursor_getIsExplicitlyDefaulted(this) != 0;

public bool IsExpression => clang.isExpression(Kind) != 0;

Expand All @@ -956,7 +956,7 @@ public string DeclKindSpelling

public bool IsIncomplete => clangsharp.Cursor_getIsIncomplete(this) != 0;

public bool IsInheritingConstructor => clangsharp.Cursor_getIsInheritingConstructor(this) == 0;
public bool IsInheritingConstructor => clangsharp.Cursor_getIsInheritingConstructor(this) != 0;

public bool IsInvalid => clang.isInvalid(Kind) != 0;

Expand Down
10 changes: 5 additions & 5 deletions sources/libClangSharp/ClangSharp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2041,7 +2041,7 @@ unsigned clangsharp_Cursor_getIsCopyOrMoveConstructor(CXCursor C) {
const Decl* D = getCursorDecl(C);

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

Expand Down Expand Up @@ -2077,7 +2077,7 @@ unsigned clangsharp_Cursor_getIsDelegatingConstructor(CXCursor C) {
const Decl* D = getCursorDecl(C);

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

Expand All @@ -2089,7 +2089,7 @@ unsigned clangsharp_Cursor_getIsDeleted(CXCursor C) {
const Decl* D = getCursorDecl(C);

if (const FunctionDecl* FD = dyn_cast<FunctionDecl>(D)) {
return !FD->isDeleted();
return FD->isDeleted();
}
}

Expand Down Expand Up @@ -2122,7 +2122,7 @@ unsigned clangsharp_Cursor_getIsExplicitlyDefaulted(CXCursor C) {
const Decl* D = getCursorDecl(C);

if (const FunctionDecl* FD = dyn_cast<FunctionDecl>(D)) {
return !FD->isExplicitlyDefaulted();
return FD->isExplicitlyDefaulted();
}
}

Expand Down Expand Up @@ -2287,7 +2287,7 @@ unsigned clangsharp_Cursor_getIsInheritingConstructor(CXCursor C) {
const Decl* D = getCursorDecl(C);

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

Expand Down