summaryrefslogtreecommitdiff
path: root/test/Lexer
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-05-23 17:21:55 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-05-23 17:21:55 +0000
commitd1cedd4e9c5dc6ebe43534b7a376c254a7caaaae (patch)
treea5bafb7359e5dc8bb90ed723d86c695235dc046f /test/Lexer
parent6b373d1daba236a6c672e8a4e21b519cda0540a4 (diff)
Clang support for __is_assignable intrinsic
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. 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. Patch by Dave Bartolomeo! Differential Revision: http://reviews.llvm.org/D20492 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Lexer')
-rw-r--r--test/Lexer/has_feature_type_traits.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Lexer/has_feature_type_traits.cpp b/test/Lexer/has_feature_type_traits.cpp
index f772d6d184..6636e7b396 100644
--- a/test/Lexer/has_feature_type_traits.cpp
+++ b/test/Lexer/has_feature_type_traits.cpp
@@ -45,6 +45,11 @@ int is_abstract();
#endif
// CHECK: int is_abstract();
+#if __has_feature(is_assignable)
+int is_assignable();
+#endif
+// CHECK: int is_assignable();
+
#if __has_feature(is_base_of)
int is_base_of();
#endif