Commit Graph

1579 Commits

Author SHA1 Message Date
Timm Bäder 02571f86bb [clang][www] Port make_cxx_dr_status script to Python3
And run it to re-generate the cxx_dr_status.html

Differential Revision: https://reviews.llvm.org/D120313
2022-02-22 15:47:43 +01:00
Balazs Benics 5e0be95fce [analyzer][docs][NFC] Fix some broken links and some cosmetic changes
- We should report bugs to the GitHub Issues
- We should advocate using Discourse instead of the superseded cfe-dev
  mailing list.

There are a couple of other cosmetic changes such as preferring `using`
instead of `typedef` and quoting the `-analyze-function` parameter's
payload for escaping the braces.

Thanks @loic-joly-sonarsource for reporting this on Discord!

Reviewed By: NoQ, Szelethus

Differential Revision: https://reviews.llvm.org/D119245
2022-02-09 10:22:28 +01:00
Richard Smith dc8f4e118d [cxx_status] Add a couple of Feb 2022 library papers that need compiler support. 2022-02-08 17:25:52 -08:00
Corentin Jabot c151225096 [C++2b] Implement multidimentional subscript operator
Implement P2128R6 in C++23 mode.

Unlike GCC's implementation, this doesn't try to recover when a user
meant to use a comma expression.

Because the syntax changes meaning in C++23, the patch is *NOT*
implemented as an extension. Instead, declaring an array with not
exactly 1 parameter is an error in older languages modes. There is an
off-by-default extension warning in C++23 mode.

Unlike the standard, we supports default arguments;

Ie, we assume, based on conversations in WG21, that the proposed
resolution to CWG2507 will be accepted.

We allow arrays OpenMP sections and C++23 multidimensional array to
coexist:

[a , b] multi dimensional array
[a : b] open mp section
[a, b: c] // error

The rest of the patch is relatively straight forward: we take care to
support an arbitrary number of arguments everywhere.
2022-02-08 12:10:47 -05:00
Corentin Jabot 3c17f3955c Add core papers adopted at the february plenary.
2 papers are added to the status page, one targeting
C++23, the other added to the batch of C++20 concept papers.
2022-02-08 09:13:04 -05:00
Aaron Ballman bf7d9970ba Support the *_WIDTH macros in limits.h and stdint.h
This completes the implementation of
WG14 N2412 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2412.pdf),
which standardizes C on a twos complement representation for integer
types. The only work that remained there was to define the correct
macros in the standard headers, which this patch does.
2022-01-13 11:46:34 -05:00
Chuanqi Xu bbce75e352 Update Bug report URL to Github Issues
Although we moved to Github Issues. The bug report message refers to
Bugzilla still. This patch tries to update these URLs.

Reviewed By: MaskRay, Quuxplusone, jhenderson, libunwind, libc++

Differential Revision: https://reviews.llvm.org/D116351
2022-01-06 17:33:25 +08:00
Nathan Sidwell 5fbe21a774 [clang] p2085 out-of-class comparison operator defaulting
This implements p2085, allowing out-of-class defaulting of comparison
operators, primarily so they need not be inline, IIUC intent. this was
mostly straigh forward, but required reimplementing
Sema::CheckExplicitlyDefaultedComparison, as now there's a case where
we have no a priori clue as to what class a defaulted comparison may
be for. We have to inspect the parameter types to find out. Eg:

class X { ... };
bool operator==(X, X) = default;

Thus reimplemented the parameter type checking, and added 'is this a
friend' functionality for the above case.

Reviewed By: mizvekov

Differential Revision: https://reviews.llvm.org/D104478
2021-12-16 07:22:46 -08:00
Chuanqi Xu 5653d127d7 [docs] Give the reason why the support for coroutine is partial
This helps user to know what level of support there
is (roughly) for coroutine feature.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D115778
2021-12-15 21:01:46 +08:00
Aaron Ballman 1feb8ab0d3 Update the status of N2412 in C (we do not implement large parts of it) 2021-12-06 13:14:13 -05:00
Quinn Pham c71fbdd87b [NFC] Inclusive language: Remove instances of master in URLs
[NFC] This patch fixes URLs containing "master". Old URLs were either broken or
redirecting to the new URL.

Reviewed By: #libc, ldionne, mehdi_amini

Differential Revision: https://reviews.llvm.org/D113186
2021-11-05 08:48:41 -05:00
Yaxun (Sam) Liu 60a085beb0 Revert "[clang] deprecate frelaxed-template-template-args, make it on by default"
This reverts commit 2d7fba5f95.

The patch was reverted because it caused regression with rocThrust
due to ambiguity of template specialization.

For details please see https://reviews.llvm.org/D109496
2021-11-02 17:02:19 -04:00
Matheus Izvekov 2d7fba5f95
[clang] deprecate frelaxed-template-template-args, make it on by default
A resolution to the ambiguity issues created by P0522, which is a DR solving
CWG 150, did not come as expected, so we are just going to accept the change,
and watch how users digest it.

For now we deprecate the flag with a warning, and make it on by default.
We don't remove the flag completely in order to give users a chance to
work around any problems by disabling it.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D109496
2021-10-27 22:48:27 +02:00
Frederik Seiffert c5348355ee [www] Fix Ninja build instructions on Windows
The `clang` target used in the line below is only generated with `LLVM_ENABLE_PROJECTS=clang`.

Without this change, running `ninja clang` will fail with:
```
ninja: error: unknown target 'clang', did you mean 'clean'?
```

Reviewed By: xgupta

Differential Revision: https://reviews.llvm.org/D112257
2021-10-23 16:09:04 +05:30
Aaron Ballman 408075ec6a Add the papers that were applied to the latest C2x working draft 2021-10-21 13:38:57 -04:00
Aaron Ballman acfe7d895d Update the title and encoding for the C++ status page 2021-10-21 12:14:44 -04:00
Aaron Ballman cfca2ae1f5 Update the C++ and C status pages now that Clang 13 has been released 2021-10-21 12:13:19 -04:00
Nathan Sidwell d45526e6c3 [doc][clang] correct version for p0388 implementation
The p0388 patch series took so long, the clang version was incorrect,
and I failed to realize that.
2021-10-13 04:12:07 -07:00
Nathan Sidwell 444ec0957c [clang] p0388 array list initialization overloads
This is the second part of p0388, dealing with overloads of list
initialization to incomplete array types.  It extends the handling
added in D103088 to permit incomplete arrays.  We have to record that
the conversion involved an incomplete array, and so (re-add) a bit flag
into the standard conversion sequence object.  Comparing such
conversion sequences requires knowing (a) the number of array elements
initialized and (b) whether the initialization is of an incomplete array.

This also updates the web page to indicate p0388 is implemented (there
is no feature macro).

Differential Revision: https://reviews.llvm.org/D103908
2021-10-12 07:35:21 -07:00
Richard Smith 7ac308fb8f PR52073: Fix equivalence computation for lambda-expressions.
Distinct lambda expressions are always considered non-equivalent, so two
token-for-token identical function declarations whose signatures involve
lambda-expressions declare distinct functions.
2021-10-08 13:54:01 -07:00
Corentin Jabot ff013b6100 Extend init-statement to allow alias-declaration
Implement P2360R0 in C++23 mode and as an extension in older
languages mode.
2021-10-08 07:13:45 -04:00
Corentin Jabot d456fed1a9 Add information about partially implemented features
Desccribe in cxx_status.html the missing parts of the partially
implemented proposals described in cxx_status.html.

Uses <details> blocks so the information appears collapsed
by default.
2021-10-07 13:07:44 -04:00
Aaron Ballman aa4f4d18e8 consteval if is now fully supported
This amends 424733c12a which accidentally
dropped the change to the status page.
2021-10-05 08:21:29 -04:00
Corentin Jabot 922863e75f Add core papers added in the October 2021 WG21 plenary 2021-10-04 14:42:13 -04:00
Erich Keane 77d200a546 Add test for DR1307, which we have already implemented.
Also regenerated cxx_dr_status.html
2021-09-24 10:24:32 -07:00
Erich Keane 8dd42ffc09 Write test for CWG1772/CWG1762/CWG1779, mark them 'done', and update
cxx_dr_status.html

I noticed that these two DRs are currently working correctly, so I
added a pair of lit tests that check the AST (which is most useful for
CWG1779, since 'dependent' is really only observable in an ast dump) to
make sure __func__ works correctly in dependent cases, and in lambda
operator().

Also noticed that CWG1762, mostly an 'example' change, works correctly,
so added a test so that it gets marked 'done' as well.

Additionally, I regenerated cxx_dr_status.html, updating it for Clang
13's release, based on the cwg_status.html from August 12, 2021.

Differential Revision: https://reviews.llvm.org/D109956
2021-09-24 10:10:38 -07:00
Aaron Ballman fe16d331d3 Add document numbers for the C99 status page.
This doesn't add all of the document numbers, but it adds a bunch of
them. Not all of the documents are available on the committee page
(they're old enough that they come from a time when the mailing was
comprised of physical pieces of paper), so some of the documents listed
are assumed to be correct based on my reading of editor's reports.
2021-09-22 13:02:25 -04:00
Aaron Ballman 101c3de39f Add information about C99 to the C status page. 2021-09-17 13:49:17 -04:00
Corentin Jabot 7fc743ff84 Mark as P0692R1 as implemented; NFC
P0692R1 was implemented in https://reviews.llvm.org/D92024
but the status page was not updated.
2021-09-09 08:45:47 -04:00
Corentin Jabot 4e80636db7 Implement P1949
This adds the Unicode 13 data for XID_Start and XID_Continue.
The definition of valid identifier is changed in all C++ modes
as P1949 (https://wg21.link/p1949) was accepted by WG21 as a defect
report.
2021-08-18 07:33:14 -04:00
Corentin Jabot 131b4620ee Implement P1937 consteval in unevaluated contexts
In an unevaluated contexts, consteval functions should not be
immediately evaluated.
2021-08-06 10:29:28 -04:00
Corentin Jabot 3c8e94bc20 Disallow narrowing conversions to bool in noexcept specififers
Completes the support for P1401R5.
2021-08-06 10:26:39 -04:00
Aaron Ballman 80c17bb298 This feature is not in Clang 13 and only has partial support 2021-08-03 08:21:15 -04:00
Corentin Jabot 977bdf6f44 Make simple requirements starting with requires ill-formed in in requirement body
This patch implements P2092

Simple requirements in requirement body shall not start with requires.
A warning was already in place so we just turn this warning into an error.

In addition, we add tests to make sure typename is optional in
requirement-parameter-list as per the same paper.
2021-08-03 07:42:29 -04:00
Corentin Jabot 8747234032 Partially implement P1401R5 (Narrowing contextual conversions to bool)
Support Narrowing conversions to bool in if constexpr condition
under C++23 language mode.

Only if constexpr is implemented as the behavior of static_assert
is already conforming. Still need to work on explicit(bool) to
complete support.
2021-07-12 08:06:27 -04:00
Corentin Jabot 18c3c77849 Add papers adopted by the C++ committee in the June 2021 plenary 2021-06-28 13:45:12 -04:00
Corentin Jabot 22aa3680ea [C++20] Support for lambdas in unevaluated context
Partially implement P0315R4.

This patch allow lambda in unevaluated context.
It does not implement temp.deduct/9.
2021-06-28 09:01:56 -04:00
Matheus Izvekov ced6b204d1 [clang] Implement P2266 Simpler implicit move
This Implements [[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2266r1.html|P2266 Simpler implicit move]].

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: Quuxplusone

Differential Revision: https://reviews.llvm.org/D99005
2021-06-18 17:08:59 +02:00
Aaron Ballman dc3bd11e5b Adding the rest of the C11 papers to the status page. 2021-06-15 16:13:26 -04:00
Aaron Ballman 69cfa178b7 Clearly specify that these are partially implemented features 2021-06-15 07:28:29 -04:00
Aaron Ballman 00dbf8c832 Adding some of the documents for C11.
This is not the complete set of language-related documents for C11, but
is about 75% complete.
2021-06-14 16:43:44 -04:00
Aaron Ballman 82a3b606b0 Update the C status page somewhat.
This adds implementation information for N2607,
clarifies that C17 only resolved defect reports,
and adds -std= information for the different versions.
2021-06-11 12:06:50 -04:00
Aaron Ballman 3a7a774941 Add a page to track the status of C proposals in Clang. 2021-06-10 12:00:52 -04:00
Aaron Ballman 8908903eac Corrects some minor issues with the CXX status page.
1) Adds some </p> tags where they were missing.
2) Documents that C++14 is the current default language mode, not C++98
2021-06-09 13:38:41 -04:00
Nathan Sidwell c1cd743519 [clang] p1099 using-enum feature macro & web page
This completes the series implementing p1099, by adding the feature
macro and updating the web page.

Differential Revision: https://reviews.llvm.org/D102242
2021-06-09 05:40:53 -07:00
Sushma Unnibhavi 67ee2f870d Added a faster method to clone llvm project [DOCS]
Reviewed By: xgupta, amccarth

Differential Revision: https://reviews.llvm.org/D101433
2021-05-05 21:37:53 +05:30
Alessandro Vergani 6e77a67171 Fix clang Visual Studio build instructions
Change cd ..\.. to cd llvm-project (the former is probably a leftover
of the old svn instructions)

Committer: Adrian McCarthy <amccarth@google.com>

Differential Revision: https://reviews.llvm.org/D68321
2021-04-20 11:17:29 -07:00
Anton Bikineev dc7ebd2cb0 [C++2b] Support size_t literals
This adds support for C++2b's z/uz suffixes for size_t literals (P0330).
2021-03-31 13:36:23 +00:00
Richard Smith ee176d2e6e [www] Color Clang 11 and Clang 12 features as green and not yellow, and
Clang 13 features as yellow not green.
2021-03-30 15:22:16 -07:00
Marek Kurdej 0620e6f4b7 [clang] [C++2b] [P1102] Accept lambdas without parameter list ().
As an extension, accept such lambdas in previous standards with a warning.

* http://eel.is/c++draft/expr.prim.lambda
* http://wg21.link/P1102

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D98433
2021-03-24 14:42:27 +01:00