[PATCH] D127695: WIP: clang: Implement Template Specialization Resugaring
David Rector via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 10 06:28:14 PDT 2022
davrec added inline comments.
================
Comment at: clang/test/Sema/Resugar/resugar-expr.cpp:244
+// N-error at -2 {{with an rvalue of type 'int'}}
+} // namespace t21
----------------
Compositions of MemberExprs/CXXMemberCallExprs have an issue:
```
template <class A1> struct A {
struct Inner {
A1 m;
A1 f();
} inner;
Inner g();
};
Z x1 = A<Int>().inner.m; //No resugar
Z x2 = A<Int>().inner.f(); //No resugar
Z x3 = A<Int>().g().m; //No resugar
Z x4 = A<Int>().g().f(); //No resugar
Z x5 = A<Int>::Inner().m; //ok
```
Composed `CallExprs` seem to work but probably warrant a test, e.g.
```
template <class B1> B1 h(B1);
Z x6 = h(Int());
Z x7 = h(h(Int()));
```
https://godbolt.org/z/cszrsvh8d
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127695/new/
https://reviews.llvm.org/D127695
More information about the cfe-commits
mailing list