summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx17-compat.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add -std=c++20 flag, replace C++2a with C++20 throughout the ClangRichard Smith2020-02-191-18/+18
| | | | | | | | | | | | | user interface and documentation, and update __cplusplus for C++20. WG21 considers the C++20 standard to be finished (even though it still has some more steps to pass through in the ISO process). The old flag names are accepted for compatibility, as usual, and we still have lots of references to C++2a in comments and identifiers; those can be cleaned up separately. (cherry picked from commit 24ad121582454e625bdad125c90d9ac0dae948c8)
* [c++2a] Allow comparison functions to be explicitly defaulted.Richard Smith2019-10-221-0/+33
| | | | | | This adds some initial syntactic checking that only the appropriate function signatures can be defaulted. No implicit definitions are generated yet.
* Part of P1091R3: permit structured bindings to be declared 'static' andRichard Smith2019-05-221-0/+16
| | | | | | 'thread_local' in C++20. llvm-svn: 361424
* [c++20] P1064R0: Allow virtual function calls in constant expressionRichard Smith2019-05-131-0/+9
| | | | | | | | | | | | | evaluation. This reinstates r360559, reverted in r360580, with a fix to avoid crashing if evaluation-for-overflow mode encounters a virtual call on an object of a class with a virtual base class, and to generally not try to resolve virtual function calls to objects whose (notional) vptrs are not readable. (The standard rules are unclear here, but this seems like a reasonable approach.) llvm-svn: 360635
* Revert r360559 "[c++20] P1064R0: Allow virtual function calls in constant ↵Hans Wennborg2019-05-131-9/+0
| | | | | | | | | expression evaluation." This caused Chromium builds to hit the new "can't handle virtual calls with virtual bases" assert. Reduced repro coming up. llvm-svn: 360580
* [c++20] P1064R0: Allow virtual function calls in constant expressionRichard Smith2019-05-131-0/+9
| | | | | | evaluation. llvm-svn: 360559
* [cxx2a] P0614R1: Support init-statements in range-based for loops.Richard Smith2018-09-281-0/+9
| | | | | | | We don't yet support this for the case where a range-based for loop is implicitly rewritten to an ObjC for..in statement. llvm-svn: 343350
* [cxx2a] P0641R2: (Some) type mismatches on defaulted functions onlyRichard Smith2018-09-281-1/+13
| | | | | | | | | | | | | | | | render the function deleted instead of rendering the program ill-formed. This change also adds an enabled-by-default warning for the case where an explicitly-defaulted special member function of a non-template class is implicitly deleted by the type checking rules. (This fires either due to this language change or due to pre-C++20 reasons for the member being implicitly deleted). I've tested this on a large codebase and found only bugs (where the program means something that's clearly different from what the programmer intended), so this is enabled by default, but we should revisit this if there are problems with this being enabled by default. llvm-svn: 343285
* [cxx2a] P0624R2: Lambdas with no capture-default areRichard Smith2018-09-271-0/+15
| | | | | | default-constructible and assignable. llvm-svn: 343279
* Add test for -Wc++17-compat warning for P0683R1.Richard Smith2017-08-281-0/+7
| | | | llvm-svn: 311868
* Fix up the -Wc++XX-compat warnings to properly handle C++2a.Richard Smith2017-08-251-0/+22
llvm-svn: 311750
OpenPOWER on IntegriCloud