aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorKadir Cetinkaya <kadircet@google.com>2021-01-15 11:12:11 +0100
committerKadir Cetinkaya <kadircet@google.com>2021-01-20 12:50:25 +0100
commita1d4649a5b176bf826685cac5cc4416b6498bdf9 (patch)
tree8711addec797fec5fa4ef734251f09101b620f40 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentf07403eb1a5f781b1bcc2b0c18ef7f632e1a0fdc (diff)
downloadllvm-a1d4649a5b176bf826685cac5cc4416b6498bdf9.zip
llvm-a1d4649a5b176bf826685cac5cc4416b6498bdf9.tar.gz
llvm-a1d4649a5b176bf826685cac5cc4416b6498bdf9.tar.bz2
[clangd] Fix division by zero when computing scores
NameMatch could be a float close to zero, in such cases we were dividing by zero and moreover propogating a "NaN" to clients, which is invalid per JSON. This fixes the issue by only using Quality scores whenever the NameMatch is low, as we do in CodeCompletion ranking. Fixes https://github.com/clangd/clangd/issues/648. Differential Revision: https://reviews.llvm.org/D94755
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions