[PATCH] Added function to retrieve storage class in libclang.

Argyrios Kyrtzidis akyrtzi at gmail.com
Mon Oct 6 22:45:07 PDT 2014


Hi, sorry for the delay!

+  /**
+   * \brief The storage class for functions and variables.
+   *
+   */
+  CXCursor_StorageClass                  = 51,
+

This doesn't need a new cursor kind, and I don't see this kind getting set for a cursor in your patch.

+CINDEX_LINKAGE enum CX_StorageClass clang_getStorageClass(CXCursor);

I suggest renaming to clang_Cursor_getStorageClass

Some style issues the make the code inconsistent with the rest of the codebase:

+  Decl const * D = getCursorDecl(C);
Change to "const Decl *D = .."
Same for similar cases later on.

+  if(D){
Space after 'if' and before the brace

+  }else{
Spaces between the braces.

+  switch(sc){
+    case SC_None	:
Space after 'switch' and before brace, and 'case' should have same indentation as 'switch'.

http://reviews.llvm.org/D5538






More information about the cfe-commits mailing list