================
@@ -643,6 +642,8 @@ bool Sema::CheckQualifiedMemberReference(Expr *BaseExpr,
       continue;
 
     CXXRecordDecl *MemberRecord = cast<CXXRecordDecl>(DC)->getCanonicalDecl();
+    if (!BaseRecord->hasDefinition() || !MemberRecord->hasDefinition())
+      return false;
----------------
Serosh-commits wrote:

> That's still checking if the record has a definition, so I am not sure what 
> was the point of piping the ASTContext to getBases then?
> 
> To be clear, the record has a definition, we just haven't created the 
> representation for it at this point.
> 
> It doesn't seem like an obviously correct thing to do here. I'd expect we can 
> either make the definition represented earlier, or have this user moved to 
> after we do.

just being paranoid removed that guard 
thanks @mizvekov i have applied the early representation approach

https://github.com/llvm/llvm-project/pull/199403
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to