[clang] [Clang] Don't ditch typo-corrected lookup result (PR #139374)

via cfe-commits cfe-commits at lists.llvm.org
Sat May 10 04:39:31 PDT 2025


================
@@ -523,6 +523,9 @@ bool Sema::LookupTemplateName(LookupResult &Found, Scope *S, CXXScopeSpec &SS,
       if (Found.isAmbiguous()) {
         Found.clear();
       } else if (!Found.empty()) {
+        // Do not erase the typo-corrected result to avoid duplicating the typo
+        // correction in future.
----------------
cor3ntin wrote:

```suggestion
        // Do not erase the typo-corrected result to avoid duplicated diagnostics.
```

https://github.com/llvm/llvm-project/pull/139374


More information about the cfe-commits mailing list