rsmith added inline comments.

================
Comment at: lib/Sema/TreeTransform.h:6802
+  return getDerived().RebuildDependentCoawaitExpr(
+      E->getKeywordLoc(), Result.get(), E->getOperatorCoawaitLookup());
+}
----------------
EricWF wrote:
> rsmith wrote:
> > You need to transform the UnresolvedLookupExpr here too. (Example: we might 
> > have a function-local declaration of `operator co_await` that needs to be 
> > transformed into the version in the instantiated function.)
> Ack. Fixed.
> 
> Do you have an example that doesn't use a function-local definition? Since 
> `operator co_await` cannot be defined locally.
It can't be defined locally, but it can be *declared* locally. Example:

```
template<typename T> future<void> f(T t) {
  future<void> operator co_await(T);
  co_await t;
}
struct X {};
auto x = f(X{});
```

... which would require that `future<void> operator co_await(X)` is defined 
somewhere in the program.


https://reviews.llvm.org/D26057



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

Reply via email to