Skip to content

Commit 7eb68ba

Browse files
Merge pull request #546 from dpaoliello/uninst
Add wrappers for `ParmVarDecl::hasUnparsedDefaultArg` and `ParmVarDecl::hasUninstantiatedDefaultArg`
2 parents 8297e2e + 4979f44 commit 7eb68ba

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

sources/libClangSharp/ClangSharp.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,30 @@ unsigned clangsharp_Cursor_getHasDefaultArg(CXCursor C) {
14581458
return 0;
14591459
}
14601460

1461+
unsigned clangsharp_Cursor_getHasUnparsedDefaultArg(CXCursor C) {
1462+
if (isDeclOrTU(C.kind)) {
1463+
const Decl* D = getCursorDecl(C);
1464+
1465+
if (const ParmVarDecl* PVD = dyn_cast<ParmVarDecl>(D)) {
1466+
return PVD->hasUnparsedDefaultArg();
1467+
}
1468+
}
1469+
1470+
return 0;
1471+
}
1472+
1473+
unsigned clangsharp_Cursor_getHasUninstantiatedDefaultArg(CXCursor C) {
1474+
if (isDeclOrTU(C.kind)) {
1475+
const Decl* D = getCursorDecl(C);
1476+
1477+
if (const ParmVarDecl* PVD = dyn_cast<ParmVarDecl>(D)) {
1478+
return PVD->hasUninstantiatedDefaultArg();
1479+
}
1480+
}
1481+
1482+
return 0;
1483+
}
1484+
14611485
unsigned clangsharp_Cursor_getHasElseStorage(CXCursor C) {
14621486
if (isStmtOrExpr(C.kind)) {
14631487
const Stmt* S = getCursorStmt(C);

0 commit comments

Comments
 (0)