This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Add bool return type to Index::refs API.
ClosedPublic

Authored by hokein on Nov 12 2019, 12:36 PM.

Details

Summary

Similar to fuzzyFind, the bool indicates whether there are more xref
results.

Diff Detail

Event Timeline

hokein created this revision.Nov 12 2019, 12:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 12 2019, 12:36 PM

Build result: pass - 59972 tests passed, 0 failed and 763 were skipped.
Log files: console-log.txt, CMakeCache.txt

NIT: we could probably add LLVM_NODISCARD attribute to ensure the return value is always consumed?
Another NIT: maybe do this for all methods in the index that have the limit in their request (pretty much all of them, I guess)?

ilya-biryukov accepted this revision.Nov 13 2019, 12:43 AM
This revision is now accepted and ready to land.Nov 13 2019, 12:43 AM

NIT: we could probably add LLVM_NODISCARD attribute to ensure the return value is always consumed?
Another NIT: maybe do this for all methods in the index that have the limit in their request (pretty much all of them, I guess)?

This restriction seems too strong (every caller has to handle this return value), I'd keep as it-is (consistent with the fuzzyFind API).

This revision was automatically updated to reflect the committed changes.