UsingEnumDecl's expectedCursorKind
https://github.com/dotnet/ClangSharp/blob/d431b9098eda8cd0b7de12dcf449b7afad88c286/sources/ClangSharp/Cursors/Decls/UsingEnumDecl.cs#L14
As you can see here, the expectedCursorKind for UsingEnumDecl is CXCursor_UnexposedDecl, but when we run this code against a using enum XXX; statement in our codebase, the cursor.kind is CXCursor_EnumDecl, instead. This means that the UsingEnumDecl constructor (via it's most-base class Cursor) throws an exception because handle.kind is CXCursor_EnumDecl but expectedCursorKind is CXCursor_UnexposedDecl.
I believe this is a bug, and I've changed it locally to expect CXCursor_EnumDecl instead (and it constructs without error), but I think it goes a little bit deeper than that - namely, the usingEnumDecl.EnumDecl returns an EnumDecl via Handle.Definition, when for me Handle.Definition is actually an OverloadedDeclRef... so I'm not really sure what's going on here, but my enum is very boring, and my using enum XXX; is similarly very boring... this is just the first time we've used one in a part of our codebase that's under the purview of our ClangSharp-using tools.
I will note that we're currently only on ClangSharp 18.1.0.2 (upgrading for us is more involved than just the ClangSharp component so it's non-trivial work) but the code I referenced above is from the main branch and still looks the same (and I doubt that Clang itself has gone backwards back to CXCursor_UnexposedDecl for something like this?).
Any ideas?