summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer/cxx-features.cpp
Commit message (Collapse)AuthorAgeFilesLines
* P0096R5, P0941R2: Update to match latest feature test macro specification.Richard Smith2018-06-141-8/+23
| | | | llvm-svn: 334677
* As discussed with SG10, bump version of __cpp_deduction_guides macro to ↵Richard Smith2018-05-301-1/+1
| | | | | | indicate support for P0620R0. llvm-svn: 333587
* Implement P0482R2, support for char8_t type.Richard Smith2018-05-011-0/+7
| | | | | | | | | | | | This is not yet part of any C++ working draft, and so is controlled by the flag -fchar8_t rather than a -std= flag. (The GCC implementation is controlled by a flag with the same name.) This implementation is experimental, and will be removed or revised substantially to match the proposal as it makes its way through the C++ committee. llvm-svn: 331244
* Switch to gnu++14 as the default dialect.Tim Northover2017-12-091-2/+2
| | | | | | This is C++14 with conforming GNU extensions. llvm-svn: 320250
* Implement latest feature test macro recommendations, P0096R4.Richard Smith2017-08-111-7/+11
| | | | llvm-svn: 310694
* Reorder tests to match latest SD-6 draft.Richard Smith2017-07-251-8/+8
| | | | llvm-svn: 309054
* [coroutines] Bump __cpp_coroutines versionEric Fiselier2017-05-251-1/+1
| | | | | | | | | | | | | | Summary: This patch is needed so that Libc++ can actually tess if Clang supports coroutines, instead of just paying lip service with a partial implementation. Otherwise the libc++ test suite will fail against older versions of Clang Reviewers: GorNishanov, rsmith Reviewed By: GorNishanov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33536 llvm-svn: 303867
* [c++1z] Mark constexpr lambdas as done on status page and start advertisingRichard Smith2017-02-211-2/+2
| | | | | | | | them via feature test macro __cpp_constexpr. Thanks to Faisal for implementing this feature! llvm-svn: 295791
* [c++1z] Add some more tests for class template argument deduction, addRichard Smith2017-02-141-0/+8
| | | | | | feature-test macro, and mark feature as done on status page. llvm-svn: 295011
* Add __cpp_structured_bindings feature test macro for structured bindings, perRichard Smith2016-12-191-1/+5
| | | | | | latest (provisional) draft of SD-6. llvm-svn: 290082
* [c++1z] cxx_status: mark p0195r2 as done.Richard Smith2016-12-191-2/+5
| | | | llvm-svn: 290081
* p0012r1: define corresponding feature test macroRichard Smith2016-12-021-2/+1
| | | | llvm-svn: 288452
* Mark aligned allocation as done.Richard Smith2016-10-101-2/+1
| | | | llvm-svn: 283724
* [coroutines] Rename driver flag -fcoroutines to -fcoroutines-tsGor Nishanov2016-10-021-1/+1
| | | | | | | | | | | | | | | Summary: Also makes -fcoroutines_ts to be both a Driver and CC1 flag. Patch mostly by EricWF. Reviewers: rnk, cfe-commits, rsmith, EricWF Subscribers: mehdi_amini Differential Revision: https://reviews.llvm.org/D25130 llvm-svn: 283064
* Mark P0127R3 as done, and replace its __has_feature check with the ↵Richard Smith2016-09-291-2/+1
| | | | | | corresponding SD-6 macro. llvm-svn: 282652
* Add a couple more tentative names for upcoming SD-6 feature checks. These mightRichard Smith2016-09-281-0/+21
| | | | | | | not reflect the final chosen names, but supporting them now seems to have little downside. llvm-svn: 282629
* P0095R3: Implement the latest published revision of SD-6 (C++ feature test ↵Richard Smith2016-09-281-3/+19
| | | | | | macros). llvm-svn: 282627
* P0096R2: Implement more recent revision of SD-6 (C++ feature test macros).Richard Smith2016-09-281-12/+63
| | | | llvm-svn: 282622
* Update cxx-features test to C++1zJF Bastien2016-03-221-34/+38
| | | | | | | Forked from the following patch: http://reviews.llvm.org/D17950 llvm-svn: 264098
* Add -Wexpansion-to-undefined: warn when using `defined` in a macro definition.Nico Weber2016-01-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [cpp.cond]p4: Prior to evaluation, macro invocations in the list of preprocessing tokens that will become the controlling constant expression are replaced (except for those macro names modified by the 'defined' unary operator), just as in normal text. If the token 'defined' is generated as a result of this replacement process or use of the 'defined' unary operator does not match one of the two specified forms prior to macro replacement, the behavior is undefined. This isn't an idle threat, consider this program: #define FOO #define BAR defined(FOO) #if BAR ... #else ... #endif clang and gcc will pick the #if branch while Visual Studio will take the #else branch. Emit a warning about this undefined behavior. One problem is that this also applies to function-like macros. While the example above can be written like #if defined(FOO) && defined(BAR) #defined HAVE_FOO 1 #else #define HAVE_FOO 0 #endif there is no easy way to rewrite a function-like macro like `#define FOO(x) (defined __foo_##x && __foo_##x)`. Function-like macros like this are used in practice, and compilers seem to not have differing behavior in that case. So this a default-on warning only for object-like macros. For function-like macros, it is an extension warning that only shows up with `-pedantic`. (But it's undefined behavior in both cases.) llvm-svn: 258128
* [coroutines] Add feature-test macro for coroutines, defined to 1 to indicateRichard Smith2015-10-221-0/+5
| | | | | | the implementation is incomplete. llvm-svn: 250982
* "This adds -fconcepts-ts as a cc1 option for enabling theFaisal Vali2015-05-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | in-progress implementation of the Concepts TS. The recommended feature test macro __cpp_experimental_concepts is set to 1 (as opposed to 201501) to indicate that the feature is enabled, but the implementation is incomplete. The link to the Concepts TS in cxx_status is updated to refer to the PDTS (N4377). Additional changes related to __has_feature and __has_extension are to follow in a later change. Relevant tests include: test/Lexer/cxx-features.cpp The test file is updated with testing of the C++14 + Concepts TS mode. The expected behaviour is the same as that of the C++14 modes except for the case of __cpp_experimental_concepts." - Hubert Tong. Being committed for Hubert (as per his understanding with Richard Smith) as we start work on the concepts-ts following our preliminary strategy session earlier today. The patch is tiny and seems quite standard. Thanks Hubert! llvm-svn: 237982
* C++14: Disable sized deallocation by default due to ABI breakageReid Kleckner2015-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no widely deployed standard libraries providing sized deallocation functions, so we have to punt and ask the user if they want us to use sized deallocation. In the future, when such libraries are deployed, we can teach the driver to detect them and enable this feature. N3536 claimed that a weak thunk from sized to unsized deallocation could be emitted to avoid breaking backwards compatibility with standard libraries not providing sized deallocation. However, this approach and other variations don't work in practice. With the weak function approach, the thunk has to have default visibility in order to ensure that it is overridden by other DSOs providing sized deallocation. Weak, default visibility symbols are particularly expensive on MachO, so John McCall was considering disabling this feature by default on Darwin. It also changes behavior ELF linking behavior, causing certain otherwise unreferenced object files from an archive to be pulled into the link. Our second approach was to use an extern_weak function declaration and do an inline conditional branch at the deletion call site. This doesn't work because extern_weak only works on MachO if you have some archive providing the default value of the extern_weak symbol. Arranging to provide such an archive has the same challenges as providing the symbol in the standard library. Not to mention that extern_weak doesn't really work on COFF. Reviewers: rsmith, rjmccall Differential Revision: http://reviews.llvm.org/D8467 llvm-svn: 232788
* Update Clang's SD-6 support to match N4200 (except for __has_cpp_attribute,Richard Smith2014-11-121-0/+36
| | | | | | which we don't yet implement). llvm-svn: 221816
* Add support for C++'s SD6 feature test macros.Richard Smith2013-11-271-0/+89
llvm-svn: 195888
OpenPOWER on IntegriCloud