summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH/cxx-traits.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Sema] Add __is_aggregate type-traitEric Fiselier2017-04-121-0/+1
| | | | | | | | | | | | | | | | 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 llvm-svn: 300116
* Clang support for __is_assignable intrinsicDavid Majnemer2016-05-231-0/+1
| | | | | | | | | | | | | | | | | | | 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 llvm-svn: 270458
* Follow-up to r218292: Add more REVERTIBLE_TYPE_TRAITs.Nico Weber2014-09-241-4/+51
| | | | | | | | | r218292 reverted r197496 because it broke things. In addition to breaking things, r197496 also made all traits starting with __is_ revertible. Reinstantiate that part of r197496 because code out there (e.g. libc++) depends on this behavior. Fixes PR21045. llvm-svn: 218365
* Revert r197496, as it broke REVERTIBLE_TYPE_TRAITs from PCH files.Nico Weber2014-09-231-4/+8
| | | | | | Also add a test to make sure that this doesn't break again. Fixes PR21036. llvm-svn: 218292
* Emit an extension warning when changing system header tokensAlp Toker2013-12-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | clang converts keywords to identifiers for compatibility with various system headers such as GNU libc. Implement a -Wkeyword-compat extension warning to diagnose those cases. The warning is on by default but will generally be ignored in system headers. It can however be enabled globally to aid standards conformance testing. This also changes the __uptr keyword avoidance from r195710 to no longer special-case system headers, bringing it in line with other similar workarounds in clang. Implementation returns bool for symmetry with token annotation functions. Some examples: warning: keyword '__is_pod' will be treated as an identifier for the remainder of the translation unit [-Wkeyword-compat] struct __is_pod warning: keyword '__uptr' will be treated as an identifier here [-Wkeyword-compat] union w *__uptr; llvm-svn: 196212
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-191-0/+2
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Implement a new type trait __is_trivially_constructible(T, Args...)Douglas Gregor2012-02-241-3/+6
| | | | | | | | | | | | | | | | 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. llvm-svn: 151352
* -Make TokenID of IdentifierInfo read-only, remove setTokenID().Argyrios Kyrtzidis2010-08-111-0/+8
-There are 2 instances that change the TokenID for GNU libstdc++ 4.2 compatibility. To handler those cases introduce a RevertedTokenID bitfield, RevertTokenIDToIdentifier() and hasRevertedTokenIDToIdentifier() methods. Store the bitfield in PCH. llvm-svn: 110868
OpenPOWER on IntegriCloud