Lines Matching refs:Typo
3162 // Typo correction
3173 /// \brief The name written that is a typo in the source.
3174 StringRef Typo;
3177 /// found (so far) with the typo name.
3186 explicit TypoCorrectionConsumer(Sema &SemaRef, IdentifierInfo *Typo)
3187 : Typo(Typo->getName()),
3223 // Don't consider hidden names for typo correction.
3240 unsigned MinED = abs((int)Name.size() - (int)Typo.size());
3241 if (MinED && Typo.size() / MinED < 3)
3246 unsigned UpperBound = (Typo.size() + 2) / 3;
3248 // Compute the edit distance between the typo and the name of this
3250 addName(Name, NULL, Typo.edit_distance(Name, true, UpperBound));
3254 // Compute the edit distance between the typo and this keyword,
3256 addName(Keyword, NULL, Typo.edit_distance(Keyword), NULL, true);
3481 /// \brief Perform name lookup for a possible result for typo correction.
3532 /// \brief Add keywords to the consumer as possible typo corrections.
3667 /// \brief Try to "correct" a typo in the source code by finding
3682 /// validation of typo correction candidates. It also provides flags for
3694 /// \returns a \c TypoCorrection containing the corrected name if the typo
3708 // In Microsoft mode, don't perform typo correction in a template member
3716 IdentifierInfo *Typo = TypoName.getName().getAsIdentifierInfo();
3717 if (!Typo)
3732 TypoCorrectionConsumer Consumer(*this, Typo);
3734 // If a callback object considers an empty typo correction candidate to be
3768 = UnqualifiedTyposCorrected.find(Typo);
3828 (void)UnqualifiedTyposCorrected[Typo];
3836 if (ED > 0 && Typo->getName().size() / ED < 3) {
3839 (void)UnqualifiedTyposCorrected[Typo];
4001 if (ED > 0 && Typo->getName().size() / ED < 3) {
4006 (void)UnqualifiedTyposCorrected[Typo];
4016 // Don't correct to a keyword that's the same as the typo; the keyword
4022 UnqualifiedTyposCorrected[Typo] = Result;
4036 // Don't correct to a keyword that's the same as the typo; the keyword
4042 UnqualifiedTyposCorrected[Typo] = BestResults["super"];
4050 (void)UnqualifiedTyposCorrected[Typo];