libclang C API coding standards

I’m working on adding some matchers support to libclang however I’m quiet confused with the preferred naming conventions

Current function naming:

  • clang_<c_type>_ (e.g. clang_CXCursorSet_insert)
  • clang_<c++type>_ (e.g. upper: clang_Cursor_getArgument lower: clang_index_getClientEntity )
  • clang_get (e.g. clang_getDiagnosticInSet)

Dispose and create seems a little more consistent with prefix of clang_create/clang_dispose however there are some which use dispose/create suffix (e.g. clang_IndexAction_, clang_remap_)

Even variable names for functions are consistent:

  • No names at all (clang_remap_dispose(CXRemapping))
  • Underscore names (e.g. unsigned index_options)
  • Camel case upper (e.g. unsigned NumTokens)
  • Camel case lower (e.g. unsigned *isGenerated)

With all of these different alternatives what should be used for new code?