]> granicus.if.org Git - clang/commit
Use several weighted factors to determine typo candidate viablity.
authorKaelyn Uhrain <rikka@google.com>
Tue, 14 Feb 2012 18:56:48 +0000 (18:56 +0000)
committerKaelyn Uhrain <rikka@google.com>
Tue, 14 Feb 2012 18:56:48 +0000 (18:56 +0000)
commit63aae82bb12bbbe9028e597fb77e40fa8d348c12
tree2e945cc45d660e343f4ee31364a3e451156a853d
parent9d665044b8887dd96dbc3bf5b50d8ebcc93505c6
Use several weighted factors to determine typo candidate viablity.

Replace the simple Levenshtein edit distance for typo correction
candidates--and the hacky way adding namespace qualifiers would affect
the edit distance--with a synthetic "edit distance" comprised of several
factors and their relative weights. This also allows the typo correction
callback object to convey more information about the viability of a
correction candidate than simply viable or not viable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150495 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/TypoCorrection.h
lib/Sema/SemaLookup.cpp
test/SemaCXX/missing-namespace-qualifier-typo-corrections.cpp