mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-19 03:55:49 +00:00
Fix crash in ClangCursor::get_arguments
This commit is contained in:
parent
72e654ffed
commit
aae6f456de
@ -94,6 +94,8 @@ ClangType ClangType::get_return_type() const {
|
||||
|
||||
std::vector<ClangType> ClangType::get_arguments() const {
|
||||
int size = clang_getNumArgTypes(cx_type);
|
||||
if (size < 0)
|
||||
return {};
|
||||
std::vector<ClangType> types(size);
|
||||
for (int i = 0; i < size; ++i)
|
||||
types.emplace_back(clang_getArgType(cx_type, i));
|
||||
|
Loading…
Reference in New Issue
Block a user