diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-04-11 19:32:19 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-04-11 19:32:19 +0000 |
commit | d98ef9ae48ab4090d4d5d703ce65cfac62807fda (patch) | |
tree | 10f93d77fa3dec4dc2bef3c008d440205485da6b /tools/libclang/CXType.cpp | |
parent | eba8cd5967e47592285590360bde73063c9c226f (diff) |
[libclang] Introduce a couple of functions to make it convenient
to get at the parameters (and their types) of a function or objc method cursor.
int clang_Cursor_getNumArguments(CXCursor C);
CXCursor clang_Cursor_getArgument(CXCursor C, unsigned i);
rdar://11201527
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154523 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/CXType.cpp')
-rw-r--r-- | tools/libclang/CXType.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/libclang/CXType.cpp b/tools/libclang/CXType.cpp index 0d4a5195ab..850fac129e 100644 --- a/tools/libclang/CXType.cpp +++ b/tools/libclang/CXType.cpp @@ -455,10 +455,10 @@ CXCallingConv clang_getFunctionTypeCallingConv(CXType X) { return CXCallingConv_Invalid; } -unsigned clang_getNumArgTypes(CXType X) { +int clang_getNumArgTypes(CXType X) { QualType T = GetQualType(X); if (T.isNull()) - return UINT_MAX; + return -1; if (const FunctionProtoType *FD = T->getAs<FunctionProtoType>()) { return FD->getNumArgs(); @@ -468,7 +468,7 @@ unsigned clang_getNumArgTypes(CXType X) { return 0; } - return UINT_MAX; + return -1; } CXType clang_getArgType(CXType X, unsigned i) { |