ahatanak added inline comments.
================ Comment at: lib/Sema/TreeTransform.h:8766-8767 NamedDecl *FirstQualifierInScope = nullptr; + DeclarationNameInfo MemberNameInfo = + getDerived().TransformDeclarationNameInfo(E->getMemberNameInfo()); ---------------- rsmith wrote: > Likewise here, you should return `ExprError()` if the transformed name is > null (please also add an assert that the name is not null before the > transform, as in that case a null transformed name would not indicate an > error has been diagnosed). I discovered that the name can be null when the member expression is a member of an anonymous union and therefore an assert would cause a few regression tests to fail. For example, the following code would assert: ``` struct T0 { union { void *m0; }; }; template <typename T> struct T1 : public T0 { void f0() { m0 = 0; } }; struct A : public T0 { }; void f1(T1<A> *S) { S->f0(); } ``` https://reviews.llvm.org/D24969 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits