This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Don't assert when completing a lambda variable inside the lambda.
ClosedPublic

Authored by sammccall on Feb 4 2020, 5:42 AM.

Details

Summary

This is a fairly ugly hack - we back off several features for any variable
whose type isn't deduced, to avoid computing/caching linkage.
Better suggestions welcome.

Diff Detail

Event Timeline

sammccall created this revision.Feb 4 2020, 5:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2020, 5:42 AM

Unit tests: pass. 62439 tests passed, 0 failed and 845 were skipped.

clang-tidy: fail. clang-tidy found 0 errors and 1 warnings. 1 of them are added as review comments below (why?).

clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

kadircet accepted this revision.Feb 4 2020, 7:37 AM

thanks, lgtm!

clang-tools-extra/clangd/CodeComplete.cpp
1007

nit: maybe decrease # of Candidate.getFunctions via

if(!doc.empty())
  return Result;
if(const auto *FD = Candidate->getFunction()) {
....
}
This revision is now accepted and ready to land.Feb 4 2020, 7:37 AM
This revision was automatically updated to reflect the committed changes.
sammccall marked an inline comment as done.