mantognini added a comment.

In D52879#1311177 <https://reviews.llvm.org/D52879#1311177>, @riccibruno wrote:

> And moreover I believe this change is subtly incorrect for the following 
> reason:
>  The type that is passed into the constructor of the call expression is the 
> type
>  of the call expression, and not the return type.
>
> The difference between the return type and the type of the call expression is 
> that
>  1.) References are dropped, and
>  2.) For C++: The cv-qualifiers of non class pr-values are dropped,
>  3.) For C: The cv-qualifiers are dropped.
>
> ( as can be seen in `FunctionType::getCallResultType` )


Could you clarify one thing for me: If I understood what you were saying, the 
type passed to CallExpr should not be ref-cv-qualified, is that right?

In that case, couldn't we "simply" remove the ref + CV-qualifiers from 
ReturnTy? (`getNonReferenceType().withoutLocalFastQualifiers()`)

Note: I cannot revert this //and// keep the test because the new ones will fail.


Repository:
  rC Clang

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

https://reviews.llvm.org/D52879



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

Reply via email to