erichkeane wrote: > @erichkeane PR updated. > > When we encounter a class member access expression with a > nested-name-specifier that is invalid, should we simply ignore it and instead > use the type of the object expression as the lookup context? This is the > current behavior, but it leads to lots of duplicate diagnostics. For example: > > ```c++ > struct A > { > using I = int; > }; > > void f(A* x) > { > x->I::z; // error: 'A::I' (aka 'int') is not a class, namespace, or > enumeration > // error: no member named 'z' in 'A' > } > ``` > > IMO we should just return `ExprError` from `BuildMemberReferenceExpr` and > thus not emit the second error.
Sorry, I'm not really getting the question here. Obviously that 2nd error is invalid and we shouldn't be emitting it, and doing the `::z` lookup inside of `A` seems wrong to me. But I'm not sure I get the issue. https://github.com/llvm/llvm-project/pull/84050 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits