Suppress those diagnostics if lhs of a member expression contains
errors. Typo correction produces dependent expressions even in
non-template code, that led to spurious diagnostics before.
Also includes a small refactoring to improve code calling
ParseUnqualifiedId and ParseOptionalCXXScopeSpecifier in the common case
when ObjectType is null. This allows to avoid boiler plate required to
propagate whether lhs of a member expression had any errors in the
common code path.
previous:
/tmp/t.cpp:6:17: error: use 'template' keyword to treat 'f' as a dependent template name auto a = bilder.f<int>(); ^ template /tmp/t.cpp:6:10: error: use of undeclared identifier 'bilder'; did you mean 'builder'? auto a = bilder.f<int>(); ^~~~~~ builder
vs now:
/tmp/t.cpp:6:10: error: use of undeclared identifier 'bilder'; did you mean 'builder'? auto a = bilder.f<int>(); ^~~~~~ builder
I'd consider inlining these convenience overloads