Fznamznon added a comment.

In D151553#4380667 <https://reviews.llvm.org/D151553#4380667>, @erichkeane 
wrote:

> Like @cor3ntin I'm concerned about removing the transform call.  I'm just as 
> concerned that it caused no regressions...
>
> If we have to transform the arguments, then this can be a dependent thing, 
> which means the callee should be possible to be dependent, right? Thus needs 
> to be transformed somewhere?

Oh, I didn't get @cor3ntin 's question in the first place! The question was 
where it the callee instantiated, right? The callee is instantiated when the 
whole operator call expr is rebuilt in Sema::RebuildCXXOperatorCallExpr. From 
what I see, `Sema::RebuildCXXOperatorCallExpr` doesn't really care which callee 
is passed there. It checks which operation it represents and performs lookup 
depending on the arguments. This triggers instantiation.

Please see the test I'm adding. There is several cases where the operator 
callee is dependent. They work fine with the change. I also see the 
instantiated function decl in the AST, just the same as before the change.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151553/new/

https://reviews.llvm.org/D151553

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to