The "no member" diagnostic is likely bogus.
- Group Reviewers
- rGbf890dcb0f5e: [clang] Don't emit "no member" diagnostic if the lookup fails on an invalid…
This seems like fixing a fairly specific case of a general problem: if the base class is invalid I would expect to see similar problems in other places (e.g. unqualified lookup from inside the class).
But it fixes a diagnostic the libc++ folks think is important...
I found the wording of this example a bit hard to follow.
What about "e.g. if a class is invalid because it's derived from an invalid base class, then missing members were likely supposed to be inherited".
I'm actually not convinced this is merely an example - is there any other reason for invalidity other than invalid base class where this logic applies?
nit: will fails -> will fail
this is a fairly general check, but the reasoning really only applies to invalid bases.
Fix a comment.
I suppose there are other examples, but failed to find one.
we don't record that the base specifier is not attached due to the invalidity, we could introduce a bit to do that, not sure it is worth for this particular case, might be worth to reconsider if we see large regressions (currently, we don't have any regressions in existing tests).