[PATCH] D39836: [clangd] Drop impossible completions (unavailable or inaccessible)
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 23 03:44:03 PST 2017
sammccall added inline comments.
================
Comment at: clangd/tool/ClangdMain.cpp:169
+ clangd::CodeCompleteOptions CCOpts;
+ CCOpts.EnableSnippets = EnableSnippets;
+ CCOpts.IncludeIneligibleResults = IncludeIneligibleResults;
----------------
ilya-biryukov wrote:
> We should also set `IncludeCodePatterns = EnableSnippets` here. May be worth adding a test that they are in the completion results.
Good catch!
Unfortunately our previous attempt this failed because static_cast is not a code pattern (probably it should be).
- Added a test to completion-items-kinds.
- Added documentation to the flag to indicate it does this
- Changed the CodePatterns default to true (equivalent to setting it here, and keeps the defaults in one place)
- set flag defaults based on CompleteOption defaults so they're in one place
https://reviews.llvm.org/D39836
More information about the cfe-commits
mailing list