This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Temporary fix for bad inference in Decision Forest.
AbandonedPublic

Authored by usaxena95 on Oct 7 2020, 10:25 AM.

Details

Reviewers
adamcz
Summary

Unreachable file distances are represented as
std::numeric_limits<unsigned>::max().
The dataset recorded the signals as signed int capturing this default
value as -1.
The dataset needs to regenerated and a new model is required that
interprets this unreachable as the intended value.

This temporarily fixes this by interpreting unreachable distance as -1
and would be removed once we have the correct model.

One can look of these occurrences by searching for -0.5 in
clang-tools-extra/clangd/quality/model/forest.json.

Diff Detail

Event Timeline

usaxena95 created this revision.Oct 7 2020, 10:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2020, 10:25 AM
usaxena95 requested review of this revision.Oct 7 2020, 10:25 AM
adamcz accepted this revision.Oct 7 2020, 10:30 AM

LG, but I'm not sure if we really need it. Up to you.

This revision is now accepted and ready to land.Oct 7 2020, 10:30 AM
usaxena95 abandoned this revision.Oct 7 2020, 10:41 AM

Yeah. Not very critical as of now. You can patch it if you want incase you want to try it.