diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-10-15 17:05:31 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-10-15 17:05:31 +0000 |
commit | 4e0854f23c9b084c4fbfd02e304c28c292588f1a (patch) | |
tree | ca6b7f75dfeea1dc3b86b2180ab9ecf6c42e26a6 /clang/include/clang-c | |
parent | 7f637a9b4807e07e646b12df5750e25396bcfa72 (diff) | |
download | bcm5719-llvm-4e0854f23c9b084c4fbfd02e304c28c292588f1a.tar.gz bcm5719-llvm-4e0854f23c9b084c4fbfd02e304c28c292588f1a.zip |
[libclang] Add function to retrieve storage class in libclang.
Patch by guibufolo!
llvm-svn: 219809
Diffstat (limited to 'clang/include/clang-c')
-rw-r--r-- | clang/include/clang-c/Index.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index 3e64718edbd..38929490462 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -32,7 +32,7 @@ * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable. */ #define CINDEX_VERSION_MAJOR 0 -#define CINDEX_VERSION_MINOR 28 +#define CINDEX_VERSION_MINOR 29 #define CINDEX_VERSION_ENCODE(major, minor) ( \ ((major) * 10000) \ @@ -3343,6 +3343,29 @@ enum CX_CXXAccessSpecifier { CINDEX_LINKAGE enum CX_CXXAccessSpecifier clang_getCXXAccessSpecifier(CXCursor); /** + * \brief Represents the storage classes as declared in the source. CX_SC_Invalid + * was added for the clase that the passed cursor in not a declaration. + */ +enum CX_StorageClass { + CX_SC_Invalid, + CX_SC_None, + CX_SC_Extern, + CX_SC_Static, + CX_SC_PrivateExtern, + CX_SC_OpenCLWorkGroupLocal, + CX_SC_Auto, + CX_SC_Register +}; + +/** + * \brief Returns the storage class for a function or variable declaration. + * + * If the passed in Cursor is not a function or variable declaration, + * CX_SC_Invalid is returned else the storage class. + */ +CINDEX_LINKAGE enum CX_StorageClass clang_Cursor_getStorageClass(CXCursor); + +/** * \brief Determine the number of overloaded declarations referenced by a * \c CXCursor_OverloadedDeclRef cursor. * |