[PATCH] D111639: [PR51855] check PseudoObject when rebuilding CXXOperatorCallExpr in template instantiation

Bruno De Fraine via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 12 06:26:43 PDT 2021


brunodf created this revision.
brunodf added a reviewer: jeroen.dobbelaere.
brunodf added a project: clang.
brunodf requested review of this revision.
Herald added a subscriber: cfe-commits.

The invocation of a unary or binary operator for type-dependent expressions is represented as a CXXOperatorCallExpr. Upon template instantiation, TreeTransform::RebuildCXXOperatorCallExpr checks for the case of an overloaded operator, but not for a PseudoObject, and will directly create a UnaryOperator or BinaryOperator.

By invoking BuildUnaryOp or BuildBinaryOp instead, we also cover the case of PseudoObjects.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111639

Files:
  clang/lib/Sema/TreeTransform.h
  clang/test/SemaCXX/PR51855.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111639.378999.patch
Type: text/x-patch
Size: 2901 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211012/b1b516f4/attachment.bin>


More information about the cfe-commits mailing list