diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-24 07:38:34 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-24 07:38:34 +0000 |
commit | 4ca8ac2e61c37ddadf37024af86f3e1019af8532 (patch) | |
tree | eaded653632e9c6319917df7f2fa190fb5cf1751 /lib/Parse/ParseExpr.cpp | |
parent | 59950d3aa54ca5066b1fb08a8c79ebfe10e0919b (diff) |
Implement a new type trait __is_trivially_constructible(T, Args...)
that provides the behavior of the C++11 library trait
std::is_trivially_constructible<T, Args...>, which can't be
implemented purely as a library.
Since __is_trivially_constructible can have zero or more arguments, I
needed to add Yet Another Type Trait Expression Class, this one
handling arbitrary arguments. The next step will be to migrate
UnaryTypeTrait and BinaryTypeTrait over to this new, more general
TypeTrait class.
Fixes the Clang side of <rdar://problem/10895483> / PR12038.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151352 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index fdf40e877c..62d1f494be 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -1143,6 +1143,9 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression, case tok::kw___is_trivially_assignable: return ParseBinaryTypeTrait(); + case tok::kw___is_trivially_constructible: + return ParseTypeTrait(); + case tok::kw___array_rank: case tok::kw___array_extent: return ParseArrayTypeTrait(); |