<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/139226>139226</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Duplicate lookup errors
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ilya-biryukov
</td>
</tr>
</table>
<pre>
See https://gcc.godbolt.org/z/jo8Mv6838
```cpp
struct Foo {
template<class T>
void LookupWithID();
};
void test(Foo *f) {
f->LookupWithId<Info>(); // Note: ID is misspelled as Id
}
```
Expected: one lookup error about LookupWithId.
Actual: two duplicate errors `no template named 'LookupWithId' in 'Foo'; did you mean 'LookupWithID'?`
Could this be happening because we parse tentatively twice and report the errors both times?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxcU82OozgQfpriUkrk2OHvwIHuNFKk3b3sSns2dgXcbTDCRXoyTz8iSWcyLSFh2fX9uco6RteNRBWkL5AeEr1wH-bK-YvetG6-LB_hnLTBXqp_ibBnniKoGmQDsumM2XbBtsHzNswdyOYnyOY9FH-fs0IVIGrIxO0z0wSijjwvhrEJASF_AVEjIjINk9dMoF6N1zHif6De7mfn4Cz-FcLHMv3vuD8eQBYgS1ArGPLDfSHqayFTZJDFlV7WJ5Dll8xpA-rticeCej2Op7AqfTHiLRT-E1YvNR4P6CIOLsaJvCeLOuLR3nWfot0MvP2YyDDZFRlGQn8VQ5rnMKNuw8LPOewWRF0bXrRfAfwZ0C6Td0Yz3TARIRNjeNwOjnogiyDzP2LIHN247jYhgMzXGNZZvIQFB9Ljt_rDtaR5mH4Ni7fIvYvYEvZ6mmh0Y4ctGb1Ewk_CSc-RkGlkze5M_oL86QyhHi3ONIWZkfuH5zZwj-wGiqCaxFbKlqrUCVW7fJ_lxU6mMumrVmUnrXNhZWpL2u-Lk9GqKNLdLtsrXZjEVVLIVKSiFKUQqdye8jLdkdAqNToT-xL2ggbt_Nb787DOXuJiXKjaqVLKLPG6JR-vIy2l8XrsQNWnOYxMowUp10GfqxW7aZcuwl54Fzn-ZmPHnqrDoyXP3YzJMvvq20tw3C_t1oQBZLOy3H-baQ7vZBhkczUYQTZ3j-dK_goAAP__LzQX8w">