]> granicus.if.org Git - clang/commit
Implement a new type trait __is_trivially_constructible(T, Args...)
authorDouglas Gregor <dgregor@apple.com>
Fri, 24 Feb 2012 07:38:34 +0000 (07:38 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 24 Feb 2012 07:38:34 +0000 (07:38 +0000)
commit4ca8ac2e61c37ddadf37024af86f3e1019af8532
treeeaded653632e9c6319917df7f2fa190fb5cf1751
parent59950d3aa54ca5066b1fb08a8c79ebfe10e0919b
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
33 files changed:
docs/LanguageExtensions.html
include/clang/AST/ExprCXX.h
include/clang/AST/RecursiveASTVisitor.h
include/clang/AST/Stmt.h
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/StmtNodes.td
include/clang/Basic/TokenKinds.def
include/clang/Basic/TypeTraits.h
include/clang/Parse/Parser.h
include/clang/Sema/Sema.h
include/clang/Serialization/ASTBitCodes.h
lib/AST/Expr.cpp
lib/AST/ExprCXX.cpp
lib/AST/ExprClassification.cpp
lib/AST/ExprConstant.cpp
lib/AST/ItaniumMangle.cpp
lib/AST/StmtPrinter.cpp
lib/AST/StmtProfile.cpp
lib/Lex/PPMacroExpansion.cpp
lib/Parse/ParseExpr.cpp
lib/Parse/ParseExprCXX.cpp
lib/Parse/ParseTentative.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/TreeTransform.h
lib/Serialization/ASTReaderStmt.cpp
lib/Serialization/ASTWriterStmt.cpp
lib/StaticAnalyzer/Core/ExprEngine.cpp
test/Index/annotate-tokens-cxx0x.cpp
test/PCH/cxx-traits.cpp
test/PCH/cxx-traits.h
test/SemaCXX/type-traits.cpp
tools/libclang/CIndex.cpp
tools/libclang/CXCursor.cpp