Commit aadc93c8 authored by Fangrui Song's avatar Fangrui Song
Browse files

[Sema] Make typo correction slightly more efficient

edit_distance returns UpperBound+1 if the distance will exceed UpperBound. We can subtract 1 from UpperBound and change >= to > in the if condition. The threshold does not change but edit_distance will have more opportunity to bail out earlier.

llvm-svn: 341763
parent 6ebf218e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment