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

Bruno De Fraine via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 15 00:35:35 PDT 2021


brunodf added a comment.

In D111639#3065241 <https://reviews.llvm.org/D111639#3065241>, @rnk wrote:

> There are some invariants about what family of APIs TreeTransform methods should call, and I've forgotten what they are, so I'm hesitant to approve this. Test case looks good, though.

I am only aware of this paragraph from https://clang.llvm.org/docs/InternalsManual.html :

> Semantic analysis should always involve two functions: an `ActOnXXX` function that will be called directly from the parser, and a `BuildXXX` function that performs the actual semantic analysis and will (eventually!) build the AST node. It’s fairly common for the `ActOnCXX` function to do very little (often just some minor translation from the parser’s representation to Sema’s representation of the same thing), but the separation is still important: C++ template instantiation, for example, should always call the `BuildXXX` variant.

I noticed that e.g. `TreeTransform::RebuildBinaryOperator` is also calling `BuildBinOp`, in line with the above description that C++ template instantiation should call the `BuildXXX` functions


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111639



More information about the cfe-commits mailing list