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

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 3 15:06:42 PDT 2021


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm

Sorry for the delay



================
Comment at: clang/lib/Sema/TreeTransform.h:14576
         !Second->getType()->isOverloadableType())
       return getSema().CreateBuiltinArraySubscriptExpr(
           First, Callee->getBeginLoc(), Second, OpLoc);
----------------
rnk wrote:
> Can we come here to subscript pointer types? Something like:
> 
> ```
> struct Foo {
>   void putM(int* rhs) { _m = rhs; }
>   int* getM() { return _m; }
>   __declspec(property(get = getM, put = putM)) int* theData;
> };
> void bar(Foo *p, int idx) {
>   p->theData[idx] = 42;
> }
> ```
I would still like to see a test for subscripts, but it's not a blocking issue.


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