[PATCH] D135338: [clang] adds move-assignable type-trait builtins

Christopher Di Bella via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 5 18:14:09 PDT 2022


cjdb created this revision.
cjdb added reviewers: aaron.ballman, shafik, erichkeane.
Herald added a project: All.
cjdb requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

- `__is_move_assignable`
- `__is_nothrow_move_assignable`
- `__is_trivially_move_assignable`

This is information that the compiler already has, and should be exposed
so that the library doesn't need to reimplement the exact same
functionality.

Similarly to `__is_move_construcitble`, etc., these traits can't be
implemented using `__is_assignable`, etc., because we can't form
references to void, and references are a fundamental part of move
assignment.

This was originally a part of D116280 <https://reviews.llvm.org/D116280>.

Depends on D135240 <https://reviews.llvm.org/D135240>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135338

Files:
  clang/include/clang/Basic/TokenKinds.def
  clang/lib/Parse/ParseDeclCXX.cpp
  clang/lib/Parse/ParseExpr.cpp
  clang/lib/Sema/SemaExprCXX.cpp
  clang/test/SemaCXX/deprecated-builtins.cpp
  clang/test/SemaCXX/type-traits.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135338.465635.patch
Type: text/x-patch
Size: 46072 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221006/46f9130c/attachment-0001.bin>


More information about the cfe-commits mailing list