mirror of
https://github.com/MaskRay/ccls.git
synced 2025-03-30 13:32:13 +00:00
Help Riatre
clang_getNumArgTypes may return -1 for unexposed types.
This commit is contained in:
parent
74be57c334
commit
1109c486c6
@ -72,10 +72,6 @@ ClangType ClangType::get_return_type() const {
|
|||||||
|
|
||||||
std::vector<ClangType> ClangType::get_arguments() const {
|
std::vector<ClangType> ClangType::get_arguments() const {
|
||||||
int size = clang_getNumArgTypes(cx_type);
|
int size = clang_getNumArgTypes(cx_type);
|
||||||
assert(size >= 0);
|
|
||||||
if (size < 0)
|
|
||||||
return std::vector<ClangType>();
|
|
||||||
|
|
||||||
std::vector<ClangType> types(size);
|
std::vector<ClangType> types(size);
|
||||||
for (int i = 0; i < size; ++i)
|
for (int i = 0; i < size; ++i)
|
||||||
types.emplace_back(clang_getArgType(cx_type, i));
|
types.emplace_back(clang_getArgType(cx_type, i));
|
||||||
|
Loading…
Reference in New Issue
Block a user