[PATCH] D99893: [WIP] Replace std::forward & std::move by cast expressions during Sema

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 6 01:58:13 PDT 2021


cor3ntin added a comment.

> Treating a namespace-`std` function template as a builtin isn't entirely novel; we already do this for MSVC's `std::_GetExceptionInfo` (though we don't actually handle that properly: we're missing the "namespace `std`" check, at least). Treating the builtin definition as overriding an inline library definition might be novel, though that doesn't seem like a huge problem.

This was my initial approach, I found some issues

- I struggled getting a built in forward to return a reference
- I had no clue how to inject them in namespace `std` (knowing about `std::_GetExceptionInfo` will certainly help, thanks!
- I really didn't want to modify standard headers and wasn't sure how to override the declaration.

But overall, I agree with all of you, it's a better design if we can make it work. Back to the drawing board, and thanks for the feedbacks :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99893



More information about the cfe-commits mailing list