diff --git a/sources/libClangSharp/ClangSharp.cpp b/sources/libClangSharp/ClangSharp.cpp index 02c76f2d..ca3e2b4c 100644 --- a/sources/libClangSharp/ClangSharp.cpp +++ b/sources/libClangSharp/ClangSharp.cpp @@ -993,6 +993,9 @@ CXCursor clangsharp_Cursor_getDefaultArg(CXCursor C) { } if (const ParmVarDecl* PVD = dyn_cast(D)) { + if (PVD->hasUninstantiatedDefaultArg()) { + return MakeCXCursor(PVD->getUninstantiatedDefaultArg(), PVD, getCursorTU(C)); + } return MakeCXCursor(PVD->getDefaultArg(), PVD, getCursorTU(C)); } }