clang
3.7.0
|
#include <TypoCorrection.h>
Public Member Functions | |
FunctionCallFilterCCC (Sema &SemaRef, unsigned NumArgs, bool HasExplicitTemplateArgs, MemberExpr *ME=nullptr) | |
bool | ValidateCandidate (const TypoCorrection &candidate) override |
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. 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. More... | |
![]() | |
CorrectionCandidateCallback (IdentifierInfo *Typo=nullptr, NestedNameSpecifier *TypoNNS=nullptr) | |
virtual | ~CorrectionCandidateCallback () |
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. More... | |
void | setTypoName (IdentifierInfo *II) |
void | setTypoNNS (NestedNameSpecifier *NNS) |
Additional Inherited Members | |
![]() | |
bool | WantTypeSpecifiers |
bool | WantExpressionKeywords |
bool | WantCXXNamedCasts |
bool | WantFunctionLikeCasts |
bool | WantRemainingKeywords |
bool | WantObjCSuper |
bool | IsObjCIvarLookup |
bool | IsAddressOfOperand |
![]() | |
static const unsigned | InvalidDistance = TypoCorrection::InvalidDistance |
![]() | |
bool | MatchesTypo (const TypoCorrection &candidate) |
![]() | |
IdentifierInfo * | Typo |
NestedNameSpecifier * | TypoNNS |
Definition at line 327 of file TypoCorrection.h.
FunctionCallFilterCCC::FunctionCallFilterCCC | ( | Sema & | SemaRef, |
unsigned | NumArgs, | ||
bool | HasExplicitTemplateArgs, | ||
MemberExpr * | ME = nullptr |
||
) |
|
overridevirtual |
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. 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.
Reimplemented from clang::CorrectionCandidateCallback.
Definition at line 4603 of file SemaLookup.cpp.
References AttributeLangSupport::C, clang::Type::getAs(), clang::CXXRecordDecl::getCanonicalDecl(), clang::TypoCorrection::getCorrectionDecl(), clang::MemberExpr::getMemberDecl(), clang::FunctionDecl::getMinRequiredArguments(), clang::FunctionDecl::getNumParams(), clang::DeclContext::getParent(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::Type::isAnyPointerType(), clang::CXXRecordDecl::isDerivedFrom(), clang::TypoCorrection::isKeyword(), and clang::Type::isReferenceType().