Duplicate lookup errors (original) (raw)

See https://gcc.godbolt.org/z/jo8Mv6838

struct Foo { template void LookupWithID(); };

void test(Foo *f) { f->LookupWithId(); // 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?