Lines Matching full:typo
2979 // Typo correction
2990 /// \brief The name written that is a typo in the source.
2991 llvm::StringRef Typo;
2994 /// found (so far) with the typo name.
3006 explicit TypoCorrectionConsumer(Sema &SemaRef, IdentifierInfo *Typo)
3007 : Typo(Typo->getName()),
3051 // Don't consider hidden names for typo correction.
3068 unsigned MinED = abs((int)Name.size() - (int)Typo.size());
3069 if (MinED > MaxEditDistance || (MinED && Typo.size() / MinED < 3))
3075 std::min(unsigned((Typo.size() + 2) / 3), MaxEditDistance);
3077 // Compute the edit distance between the typo and the name of this
3080 unsigned ED = Typo.edit_distance(Name, true, UpperBound);
3092 // Compute the edit distance between the typo and this keyword.
3095 unsigned ED = Typo.edit_distance(Keyword);
3246 /// \brief Perform name lookup for a possible result for typo correction.
3297 /// \brief Add keywords to the consumer as possible typo corrections.
3476 /// \brief Try to "correct" a typo in the source code by finding
3496 /// \param CTC The context in which typo correction occurs, which impacts the
3502 /// \returns a \c TypoCorrection containing the corrected name if the typo
3517 IdentifierInfo *Typo = TypoName.getName().getAsIdentifierInfo();
3518 if (!Typo)
3533 TypoCorrectionConsumer Consumer(*this, Typo);
3563 Typo);
3607 (void)UnqualifiedTyposCorrected[Typo];
3615 if (ED > 0 && Typo->getName().size() / ED < 3) {
3618 (void)UnqualifiedTyposCorrected[Typo];
3744 if (ED > 0 && Typo->getName().size() / ED < 3) {
3747 (void)UnqualifiedTyposCorrected[Typo];
3773 // Don't correct to a keyword that's the same as the typo; the keyword
3779 UnqualifiedTyposCorrected[Typo] = Result;
3788 // Don't correct to a keyword that's the same as the typo; the keyword
3794 UnqualifiedTyposCorrected[Typo] = BestResults["super"];
3800 (void)UnqualifiedTyposCorrected[Typo];