[PATCH] Added function to retrieve storage class in libclang.
Argyrios Kyrtzidis
akyrtzi at gmail.com
Mon Oct 6 22:44:44 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'.
On Oct 1, 2014, at 6:22 AM, guibufolo+llvm at gmail.com wrote:
> Added check for if getCursorDecl returns a valid object.
>
> http://reviews.llvm.org/D5538
>
> Files:
> bindings/python/clang/cindex.py
> include/clang-c/Index.h
> tools/libclang/CIndex.cpp
> tools/libclang/libclang.exports
> <D5538.14279.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list