[PATCH] D51860: [clangd] NFC: Use uint32_t for FuzzyFindRequest limits
Eric Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 10 08:56:26 PDT 2018
ioeric added inline comments.
================
Comment at: clang-tools-extra/clangd/index/Index.cpp:186
+ O.map("ProximityPaths", Request.ProximityPaths);
+ if (OK)
+ Request.MaxCandidateCount = MaxCandidateCount;
----------------
I think we should not set `Request.MaxCandidateCount` if `MaxCandidateCount` is greater than `std::numeric_limits<int32_t>::max()`?
================
Comment at: clang-tools-extra/clangd/index/Index.h:440
/// return more than this, e.g. if it doesn't know which candidates are best.
- size_t MaxCandidateCount = std::numeric_limits<size_t>::max();
+ uint32_t MaxCandidateCount = std::numeric_limits<uint32_t>::max();
/// If set to true, only symbols for completion support will be considered.
----------------
Or use `unsigned`?
https://reviews.llvm.org/D51860
More information about the cfe-commits
mailing list