clang  6.0.0svn
Public Member Functions | List of all members
clang::DeclFilterCCC< C > Class Template Reference

Simple template class for restricting typo correction candidates to ones having a single Decl* of the given type. More...

#include "clang/Sema/TypoCorrection.h"

Inheritance diagram for clang::DeclFilterCCC< C >:
Inheritance graph
[legend]
Collaboration diagram for clang::DeclFilterCCC< C >:
Collaboration graph
[legend]

Public Member Functions

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. More...
 
- Public Member Functions inherited from clang::CorrectionCandidateCallback
 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. More...
 
void setTypoName (IdentifierInfo *II)
 
void setTypoNNS (NestedNameSpecifier *NNS)
 

Additional Inherited Members

- Public Attributes inherited from clang::CorrectionCandidateCallback
bool WantTypeSpecifiers
 
bool WantExpressionKeywords
 
bool WantCXXNamedCasts
 
bool WantFunctionLikeCasts
 
bool WantRemainingKeywords
 
bool WantObjCSuper
 
bool IsObjCIvarLookup
 
bool IsAddressOfOperand
 
- Static Public Attributes inherited from clang::CorrectionCandidateCallback
static const unsigned InvalidDistance = TypoCorrection::InvalidDistance
 
- Protected Member Functions inherited from clang::CorrectionCandidateCallback
bool MatchesTypo (const TypoCorrection &candidate)
 
- Protected Attributes inherited from clang::CorrectionCandidateCallback
IdentifierInfoTypo
 
NestedNameSpecifierTypoNNS
 

Detailed Description

template<class C>
class clang::DeclFilterCCC< C >

Simple template class for restricting typo correction candidates to ones having a single Decl* of the given type.

Definition at line 334 of file TypoCorrection.h.

Member Function Documentation

◆ ValidateCandidate()

template<class C >
bool clang::DeclFilterCCC< C >::ValidateCandidate ( const TypoCorrection candidate)
inlineoverridevirtual

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 336 of file TypoCorrection.h.

References clang::C, and clang::TypoCorrection::getCorrectionDeclAs().


The documentation for this class was generated from the following file: