Avoid the hard-coded limit on the number of typo corrections attempted.
authorKaelyn Uhrain <rikka@google.com>
Fri, 27 Sep 2013 19:40:12 +0000 (19:40 +0000)
committerKaelyn Uhrain <rikka@google.com>
Fri, 27 Sep 2013 19:40:12 +0000 (19:40 +0000)
commit3dfff19658961fdd5296aa5709ccb70a6f2a9fa6
tree31529262c639a0ba932164b7b33acaa1aae51c97
parent0e23844f57753a243832e70f1423703e1d67ce1d
Avoid the hard-coded limit on the number of typo corrections attempted.

Move some tests from typo-correction.cpp to typo-correction-pt2.cpp
because they were running afoul of the hard-coded limit of 20 typos
corrected. Some of the tests after it were still working due to the
limit not applying to cached corrections and in cases where a non-NULL
MemberContext is passed in to Sema::CorrectTypo.  Most of the moved tests
still passed after being moved, but the test involving "data_struct" had
only been passing because the test had exceeded that limit so a fix for
it is also included (most of the changes to ParseStmt.cpp are shared with
and originated from another typo correction impovement that was split
into a separate commit).

llvm-svn: 191544
clang/lib/Parse/ParseStmt.cpp
clang/test/SemaCXX/typo-correction-pt2.cpp
clang/test/SemaCXX/typo-correction.cpp