zequanwu added a comment.

In D87425#2265523 <https://reviews.llvm.org/D87425#2265523>, @hans wrote:

> I'm not sure that changing isPotentiallyEvaluated() is the right thing to do. 
> The meaning of that corresponds to text in the standard: 
> https://eel.is/c++draft/expr.typeid#3 so changing it to something that 
> doesn't match the standard exactly seems wrong.

If the type of the operand is already most derived, we could just emit the 
typeinfo of the type. This would match the standard: 
https://eel.is/c++draft/expr.typeid#2

> I think it would be safer to do the change purely as an optimization in 
> codegen (maybe we could add a new helper method that could also be used by 
> the warning).

For "optimization in codegen", do you mean optimization after the IR is 
generated or like I did in `CodeGenFunction::EmitCXXTypeidExpr`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87425

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

Reply via email to