I have been writing a C++ AST parser using the excellent C interface libclang (http://clang.llvm.org/doxygen/group__CINDEX.html). Unfortunately there appears to be no disambiguation between C++ 11 scoped enums and old fashioned enums: both have a cursor kind of CXCursor_EnumDecl and a type of CXType_Enum I.e. identical.
I have tried visiting the children to see if their parent type is different - sadly no. I have tried asking for the underlying type, I get back an integer for both. I have examined all items declared after the Enum to see if maybe for old fashioned Enums a bind or typedef might appear, again no difference is obvious.
I am beginning to think I must be missing something. Do I have to use the code completion API to figure out which kind of Enum it is or something?