[PATCH] D20492: Clang support for __is_assignable intrinsic

Dave Bartolomeo via cfe-commits cfe-commits at lists.llvm.org
Fri May 20 14:21:55 PDT 2016


DaveBartolomeo created this revision.
DaveBartolomeo added a reviewer: rnk.
DaveBartolomeo added a subscriber: cfe-commits.

MSVC now supports the __is_assignable type trait intrinsic, to enable easier and more efficient implementation of the Standard Library's is_assignable trait. As of Visual Studio 2015 Update 3, the VC Standard Library implementation uses the new intrinsic unconditionally. We had already implemented this trait for Clang/C2, so we're upstreaming the change so that mainline Clang can handle the new intrinsic as well.

The implementation is pretty straightforward, due to the previously existing __is_nothrow_assignable and __is_trivially_assignable. We handle __is_assignable via the same code as the other two, except that we skip the extra checks for nothrow or triviality.

http://reviews.llvm.org/D20492

Files:
  docs/LanguageExtensions.rst
  include/clang/Basic/TokenKinds.def
  include/clang/Basic/TypeTraits.h
  lib/Parse/ParseDeclCXX.cpp
  lib/Parse/ParseExpr.cpp
  lib/Sema/SemaExprCXX.cpp
  test/PCH/cxx-traits.cpp
  test/PCH/cxx-traits.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20492.57987.patch
Type: text/x-patch
Size: 27225 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160520/e63fec72/attachment-0001.bin>


More information about the cfe-commits mailing list