diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-04-12 22:12:15 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-04-12 22:12:15 +0000 |
commit | d4025eed6397919608278caa0e91fe5d5568d070 (patch) | |
tree | 390acb3bf4038361253616dbee77effd6d7f8898 /test/PCH | |
parent | 57860dbd4fd152259f53426e0f55658ad4e85e10 (diff) |
[Sema] Add __is_aggregate type-trait
Summary:
[LWG 2911](http://cplusplus.github.io/LWG/lwg-defects.html#2911) adds `std::is_aggregate` to the library, which requires a new builtin trait. This patch implements `__is_aggregate`.
Reviewers: rsmith, majnemer, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: STL_MSFT, cfe-commits
Differential Revision: https://reviews.llvm.org/D31513
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300116 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH')
-rw-r--r-- | test/PCH/cxx-traits.cpp | 1 | ||||
-rw-r--r-- | test/PCH/cxx-traits.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/test/PCH/cxx-traits.cpp b/test/PCH/cxx-traits.cpp index b0f1d9d2c3..01b9e9302d 100644 --- a/test/PCH/cxx-traits.cpp +++ b/test/PCH/cxx-traits.cpp @@ -16,6 +16,7 @@ bool copy_construct_int = n::is_trivially_constructible<int, const int&>::value; // The built-ins should still work too: bool _is_abstract_result = __is_abstract(int); +bool _is_aggregate_result = __is_aggregate(int); bool _is_arithmetic_result = __is_arithmetic(int); bool _is_array_result = __is_array(int); bool _is_assignable_result = __is_assignable(int, int); diff --git a/test/PCH/cxx-traits.h b/test/PCH/cxx-traits.h index 1d7d40450f..0a4bd09c36 100644 --- a/test/PCH/cxx-traits.h +++ b/test/PCH/cxx-traits.h @@ -18,6 +18,7 @@ struct is_trivially_constructible { }; struct __is_abstract {}; // expected-warning {{made available}} +struct __is_aggregate {}; // expected-warning {{made available}} struct __is_arithmetic {}; // expected-warning {{made available}} struct __is_array {}; // expected-warning {{made available}} struct __is_assignable {}; // expected-warning {{made available}} |