diff options
Diffstat (limited to 'include/clang/Sema/TypoCorrection.h')
-rw-r--r-- | include/clang/Sema/TypoCorrection.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/clang/Sema/TypoCorrection.h b/include/clang/Sema/TypoCorrection.h index 0b897b55cc..cdd71c8fa9 100644 --- a/include/clang/Sema/TypoCorrection.h +++ b/include/clang/Sema/TypoCorrection.h @@ -228,9 +228,11 @@ class CorrectionCandidateCallback { /// candidate is viable, without ranking potentially viable candidates. /// Only ValidateCandidate or RankCandidate need to be overriden by a /// callback wishing to check the viability of correction candidates. - virtual bool ValidateCandidate(const TypoCorrection &candidate) { - return true; - } + /// The default predicate always returns true if the candidate is not a type + /// name or keyword, true for types if WantTypeSpecifiers is true, and true + /// for keywords if WantTypeSpecifiers, WantExpressionKeywords, + /// WantCXXNamedCasts, WantRemainingKeywords, or WantObjCSuper is true. + virtual bool ValidateCandidate(const TypoCorrection &candidate); /// \brief Method used by Sema::CorrectTypo to assign an "edit distance" rank /// to a candidate (where a lower value represents a better candidate), or |