clang API Documentation
Base class for callback objects used by Sema::CorrectTypo to check the validity of a potential typo correction. More...
#include <TypoCorrection.h>


Public Member Functions | |
| CorrectionCandidateCallback () | |
| virtual | ~CorrectionCandidateCallback () |
| virtual bool | ValidateCandidate (const TypoCorrection &candidate) |
| Simple predicate used by the default RankCandidate to determine whether to return an edit distance of 0 or InvalidDistance. This can be overrided by validators that only need to determine if a 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 unsigned | RankCandidate (const TypoCorrection &candidate) |
| Method used by Sema::CorrectTypo to assign an "edit distance" rank to a candidate (where a lower value represents a better candidate), or returning InvalidDistance if the candidate is not at all viable. For validation callbacks that only need to determine if a candidate is viable, the default RankCandidate returns either 0 or InvalidDistance depending whether ValidateCandidate returns true or false. | |
Public Attributes | |
| bool | WantTypeSpecifiers |
| bool | WantExpressionKeywords |
| bool | WantCXXNamedCasts |
| bool | WantRemainingKeywords |
| bool | WantObjCSuper |
| bool | IsObjCIvarLookup |
Static Public Attributes | |
| static const unsigned | InvalidDistance = TypoCorrection::InvalidDistance |
Base class for callback objects used by Sema::CorrectTypo to check the validity of a potential typo correction.
Definition at line 200 of file TypoCorrection.h.
| clang::CorrectionCandidateCallback::CorrectionCandidateCallback | ( | ) | [inline] |
Definition at line 204 of file TypoCorrection.h.
| virtual clang::CorrectionCandidateCallback::~CorrectionCandidateCallback | ( | ) | [inline, virtual] |
Definition at line 210 of file TypoCorrection.h.
| virtual unsigned clang::CorrectionCandidateCallback::RankCandidate | ( | const TypoCorrection & | candidate | ) | [inline, virtual] |
Method used by Sema::CorrectTypo to assign an "edit distance" rank to a candidate (where a lower value represents a better candidate), or returning InvalidDistance if the candidate is not at all viable. For validation callbacks that only need to determine if a candidate is viable, the default RankCandidate returns either 0 or InvalidDistance depending whether ValidateCandidate returns true or false.
Definition at line 228 of file TypoCorrection.h.
References InvalidDistance, and ValidateCandidate().
Referenced by isCandidateViable().
| virtual bool clang::CorrectionCandidateCallback::ValidateCandidate | ( | const TypoCorrection & | candidate | ) | [inline, virtual] |
Simple predicate used by the default RankCandidate to determine whether to return an edit distance of 0 or InvalidDistance. This can be overrided by validators that only need to determine if a 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.
Reimplemented in clang::DeclFilterCCC< C >.
Definition at line 218 of file TypoCorrection.h.
Referenced by RankCandidate().
const unsigned clang::CorrectionCandidateCallback::InvalidDistance = TypoCorrection::InvalidDistance [static] |
Definition at line 202 of file TypoCorrection.h.
Referenced by RankCandidate().
Definition at line 241 of file TypoCorrection.h.
Referenced by clang::Sema::CorrectTypo(), and clang::Sema::LookupMemberExpr().
Definition at line 236 of file TypoCorrection.h.
Referenced by AddKeywordsToConsumer(), and clang::Sema::LookupTemplateName().
Definition at line 235 of file TypoCorrection.h.
Referenced by AddKeywordsToConsumer(), and clang::Sema::LookupTemplateName().
Definition at line 238 of file TypoCorrection.h.
Referenced by AddKeywordsToConsumer(), and clang::Sema::CorrectTypo().
Definition at line 237 of file TypoCorrection.h.
Referenced by AddKeywordsToConsumer(), clang::Sema::CorrectTypo(), and clang::Sema::LookupTemplateName().
Definition at line 234 of file TypoCorrection.h.
Referenced by AddKeywordsToConsumer(), and clang::Sema::LookupTemplateName().