class DeclFilterCCC
Declaration
template <class C>
class DeclFilterCCC : public CorrectionCandidateCallback { /* full declaration omitted */ };
Description
Simple template class for restricting typo correction candidates to ones having a single Decl* of the given type.
Declared at: clang/include/clang/Sema/TypoCorrection.h:366
Inherits from: CorrectionCandidateCallback
Templates
- C
Member Variables
Inherited from CorrectionCandidateCallback:
- public WantTypeSpecifiers = true
- public WantExpressionKeywords = true
- public WantCXXNamedCasts = true
- public WantFunctionLikeCasts = true
- public WantRemainingKeywords = true
- public WantObjCSuper = false
- public IsObjCIvarLookup = false
- public IsAddressOfOperand = false
- protected Typo
- protected TypoNNS
- public static InvalidDistance = TypoCorrection::InvalidDistance
Method Overview
- public bool ValidateCandidate(const clang::TypoCorrection & candidate)
- public std::unique_ptr<CorrectionCandidateCallback> clone()
Inherited from CorrectionCandidateCallback:
- protected MatchesTypo
- public RankCandidate
- public ValidateCandidate
- public clone
- public setTypoNNS
- public setTypoName
Methods
¶bool ValidateCandidate(
const clang::TypoCorrection& candidate)
bool ValidateCandidate(
const clang::TypoCorrection& candidate)
Description
Simple predicate used by the default RankCandidate to determine whether to return an edit distance of 0 or InvalidDistance. This can be overridden by validators that only need to determine if a candidate is viable, without ranking potentially viable candidates. Only ValidateCandidate or RankCandidate need to be overridden 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.
Declared at: clang/include/clang/Sema/TypoCorrection.h:368
Parameters
- const clang::TypoCorrection& candidate
¶std::unique_ptr<CorrectionCandidateCallback>
clone()
std::unique_ptr<CorrectionCandidateCallback>
clone()
Description
Clone this CorrectionCandidateCallback. CorrectionCandidateCallbacks are initially stack-allocated. However in case where delayed typo-correction is done we need to move the callback to storage with a longer lifetime. Every class deriving from CorrectionCandidateCallback must implement this method.
Declared at: clang/include/clang/Sema/TypoCorrection.h:371