You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the introductory patch for a larger work which
intends to solve the long standing C++ issue with losing
type sugar when acessing template specializations.
The well known example here is specializing a template
with `std::string`, but getting diagnostics related to
`std::basic_string<char>` instead.
This implements a transform which, upon member access,
propagates type sugar from the naming context into the
accessed entity.
It also implements a single use of this transform,
resugaring access to TypeDecls.
For more details and discussion see:
https://discourse.llvm.org/t/rfc-improving-diagnostics-with-template-specialization-resugaring/64294
This is ready for review, although maybe not finished and
there is some more stuff that could be done either here
or in follow ups.
* Its worth exploring if a global resugaring cache is
worthwhile, besides the current operational cache.
A global cache would be more expensive to index, so there
is a tradeoff, and maybe should be used of the whole
result of the operation, while keeping the existing
cache for sub-results.
* It would be ideal if the transform could live in ASTContext
instead of Sema. There are a few dependencies that would
have to be tackled.
* Template arguments deduced for partial specializations.
* Some kinds of type adjustments currently require Sema.
Differential Revision: https://reviews.llvm.org/D127695
0 commit comments