Home | History | Annotate | Download | only in Sema

Lines Matching refs:Typo

3136 // Typo correction
3148 /// \brief The name written that is a typo in the source.
3149 StringRef Typo;
3152 /// found (so far) with the typo name.
3161 explicit TypoCorrectionConsumer(Sema &SemaRef, IdentifierInfo *Typo)
3162 : Typo(Typo->getName()),
3203 // Don't consider hidden names for typo correction.
3220 unsigned MinED = abs((int)Name.size() - (int)Typo.size());
3221 if (MinED && Typo.size() / MinED < 3)
3226 unsigned UpperBound = (Typo.size() + 2) / 3;
3228 // Compute the edit distance between the typo and the name of this
3230 addName(Name, NULL, Typo.edit_distance(Name, true, UpperBound));
3234 // Compute the edit distance between the typo and this keyword,
3236 addName(Keyword, NULL, Typo.edit_distance(Keyword), NULL, true);
3473 /// \brief Perform name lookup for a possible result for typo correction.
3524 /// \brief Add keywords to the consumer as possible typo corrections.
3674 /// \brief Try to "correct" a typo in the source code by finding
3689 /// validation of typo correction candidates. It also provides flags for
3701 /// \returns a \c TypoCorrection containing the corrected name if the typo
3715 // In Microsoft mode, don't perform typo correction in a template member
3723 IdentifierInfo *Typo = TypoName.getName().getAsIdentifierInfo();
3724 if (!Typo)
3738 if (S && S->isInObjcMethodScope() && Typo == getSuperIdentifier())
3750 TypoCorrectionConsumer Consumer(*this, Typo);
3752 // If a callback object considers an empty typo correction candidate to be
3786 = UnqualifiedTyposCorrected.find(Typo);
3817 bool AllowOnlyNNSChanges = Typo->getName().size() < 3;
3849 (void)UnqualifiedTyposCorrected[Typo];
3855 // is not more that about a third of the length of the typo's identifier.
3857 if (ED > 0 && Typo->getName().size() / ED < 3) {
3860 (void)UnqualifiedTyposCorrected[Typo];
3896 // corrections that have a different base identifier from the typo.
3898 I->second.front().getCorrectionAsIdentifierInfo() != Typo) {
4046 if (!AllowOnlyNNSChanges && ED > 0 && Typo->getName().size() / ED < 3) {
4051 (void)UnqualifiedTyposCorrected[Typo];
4062 // Don't correct to a keyword that's the same as the typo; the keyword
4068 UnqualifiedTyposCorrected[Typo] = Result;
4084 // Don't correct to a keyword that's the same as the typo; the keyword
4090 UnqualifiedTyposCorrected[Typo] = BestResults["super"].front();
4100 (void)UnqualifiedTyposCorrected[Typo];