[PATCH] D137337: Replace LLVM_LIBDIR_SUFFIX by CMAKE_INSTALL_LIBDIR

2023-09-04 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.
Herald added subscribers: bviyer, jplehr.

For libc++ we like to clean up the review queue for the GitHub PR transition. 
Is there still interest on working on this patch? If so would it be possible to 
finish it before the Phabricator is changed to read only mode?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137337/new/

https://reviews.llvm.org/D137337

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D133425: Silence -Wctad-maybe-unsupported stemming from system headers

2023-08-31 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

@aaron.ballman We'd like to clean up the patches from the libc++ review queue. 
Is this patch is still relevant? Especially after landing 
https://reviews.llvm.org/D133535.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133425/new/

https://reviews.llvm.org/D133425

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D158523: [clang][doc] Mentions -Wno-reserved-module-identifiers

2023-08-23 Thread Mark de Wever via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc73de2969162: [clang][doc] Mentions 
-Wno-reserved-module-identifiers (authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158523/new/

https://reviews.llvm.org/D158523

Files:
  clang/docs/StandardCPlusPlusModules.rst


Index: clang/docs/StandardCPlusPlusModules.rst
===
--- clang/docs/StandardCPlusPlusModules.rst
+++ clang/docs/StandardCPlusPlusModules.rst
@@ -313,18 +313,8 @@
 __test
 // and so on ...
 
-If you still want to use the reserved module names for any reason, currently 
you can add a special line marker
-in the front of the module declaration like:
-
-.. code-block:: c++
-
-  # __LINE_NUMBER__ __FILE__ 1 3
-  export module std;
-
-Here the `__LINE_NUMBER__` is the actual line number of the corresponding 
line. The `__FILE__` means the filename
-of the translation unit. The `1` means the following is a new file. And `3` 
means this is a system header/file so
-the certain warnings should be suppressed. You could find more details at:
-https://gcc.gnu.org/onlinedocs/gcc-3.0.2/cpp_9.html.
+If you still want to use the reserved module names for any reason, use
+``-Wno-reserved-module-identifier`` to suppress the warning.
 
 How to specify the dependent BMIs
 ~


Index: clang/docs/StandardCPlusPlusModules.rst
===
--- clang/docs/StandardCPlusPlusModules.rst
+++ clang/docs/StandardCPlusPlusModules.rst
@@ -313,18 +313,8 @@
 __test
 // and so on ...
 
-If you still want to use the reserved module names for any reason, currently you can add a special line marker
-in the front of the module declaration like:
-
-.. code-block:: c++
-
-  # __LINE_NUMBER__ __FILE__ 1 3
-  export module std;
-
-Here the `__LINE_NUMBER__` is the actual line number of the corresponding line. The `__FILE__` means the filename
-of the translation unit. The `1` means the following is a new file. And `3` means this is a system header/file so
-the certain warnings should be suppressed. You could find more details at:
-https://gcc.gnu.org/onlinedocs/gcc-3.0.2/cpp_9.html.
+If you still want to use the reserved module names for any reason, use
+``-Wno-reserved-module-identifier`` to suppress the warning.
 
 How to specify the dependent BMIs
 ~
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D158523: [clang][doc] Mentions -Wno-reserved-module-identifiers

2023-08-22 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision.
Mordante added a reviewer: ChuanqiXu.
Herald added a project: All.
Mordante requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This is a nicer way to suppress the diagnostic instead of using the
pre-processor work-around.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158523

Files:
  clang/docs/StandardCPlusPlusModules.rst


Index: clang/docs/StandardCPlusPlusModules.rst
===
--- clang/docs/StandardCPlusPlusModules.rst
+++ clang/docs/StandardCPlusPlusModules.rst
@@ -313,18 +313,8 @@
 __test
 // and so on ...
 
-If you still want to use the reserved module names for any reason, currently 
you can add a special line marker
-in the front of the module declaration like:
-
-.. code-block:: c++
-
-  # __LINE_NUMBER__ __FILE__ 1 3
-  export module std;
-
-Here the `__LINE_NUMBER__` is the actual line number of the corresponding 
line. The `__FILE__` means the filename
-of the translation unit. The `1` means the following is a new file. And `3` 
means this is a system header/file so
-the certain warnings should be suppressed. You could find more details at:
-https://gcc.gnu.org/onlinedocs/gcc-3.0.2/cpp_9.html.
+If you still want to use the reserved module names for any reason, use
+``-Wno-reserved-module-identifier`` to suppress the warning.
 
 How to specify the dependent BMIs
 ~


Index: clang/docs/StandardCPlusPlusModules.rst
===
--- clang/docs/StandardCPlusPlusModules.rst
+++ clang/docs/StandardCPlusPlusModules.rst
@@ -313,18 +313,8 @@
 __test
 // and so on ...
 
-If you still want to use the reserved module names for any reason, currently you can add a special line marker
-in the front of the module declaration like:
-
-.. code-block:: c++
-
-  # __LINE_NUMBER__ __FILE__ 1 3
-  export module std;
-
-Here the `__LINE_NUMBER__` is the actual line number of the corresponding line. The `__FILE__` means the filename
-of the translation unit. The `1` means the following is a new file. And `3` means this is a system header/file so
-the certain warnings should be suppressed. You could find more details at:
-https://gcc.gnu.org/onlinedocs/gcc-3.0.2/cpp_9.html.
+If you still want to use the reserved module names for any reason, use
+``-Wno-reserved-module-identifier`` to suppress the warning.
 
 How to specify the dependent BMIs
 ~
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D155064: [clang][SemaCXX] Diagnose tautological uses of consteval if and is_constant_evaluated

2023-08-19 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments.



Comment at: libcxx/include/__type_traits/is_constant_evaluated.h:31
+  return false;
+#endif
 }

hazohelet wrote:
> Mordante wrote:
> > Why is this needed? Does this mean the builtin will fail in C++03 mode?
> `__libcpp_is_constant_evaluated` always returns false under C++03 or earlier, 
> where constexpr isn't available. This is a fix to run libc++ tests without 
> seeing warnings from clang with this patch.
> (Live demo: https://godbolt.org/z/oszebM5o5)
I see can you add a comment in that regard? To me it looks like the builtin 
fails in C++03, where returning false indeed is always the right answer.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155064/new/

https://reviews.llvm.org/D155064

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D155064: [clang][SemaCXX] Diagnose tautological uses of consteval if and is_constant_evaluated

2023-08-19 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments.



Comment at: libcxx/include/__type_traits/is_constant_evaluated.h:31
+  return false;
+#endif
 }

Why is this needed? Does this mean the builtin will fail in C++03 mode?



Comment at: 
libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.verify.cpp:27
   static_assert(!std::is_constant_evaluated(), "");
-  // expected-warning@-1 0-1 {{'std::is_constant_evaluated' will always 
evaluate to 'true' in a manifestly constant-evaluated expression}}
+  // expected-warning@-1 0-1 {{'std::is_constant_evaluated' will always 
evaluate to true in this context}}
 #endif

philnik wrote:
> cor3ntin wrote:
> > Mordante wrote:
> > > hazohelet wrote:
> > > > philnik wrote:
> > > > > Mordante wrote:
> > > > > > Since libc++ support the latest ToT Clang and the last two official 
> > > > > > releases this wont work. The `expected-warning` needs to be a 
> > > > > > `expected-warning-re` that works for both the new and old diagnostic
> > > > > You can also just shorten it to `'std::is_constant_evaluated' will 
> > > > > always evaluate to`. Seems good enough to me.
> > > > Thanks!
> > > I really would like a regex. To me the current message misses an 
> > > important piece of information; the `true` part. I care less about the 
> > > rest of the message, but stripping the `true` means a warning like 
> > > `std::is_constant_evaluated' will always evaluate to FALSE` would be 
> > > valid too.
> > Agreed with Mordante
> We're not in the business of testing the compiler though. Taking a closer 
> look, I'm not actually sure why this test exists at all. It doesn't seem like 
> it tests anything useful w.r.t. the library. This has been added in 2fc5a78, 
> but there the warning isn't checked, so that was clearly not the original 
> intention.
> We're not in the business of testing the compiler though. Taking a closer 
> look, I'm not actually sure why this test exists at all. It doesn't seem like 
> it tests anything useful w.r.t. the library. This has been added in 2fc5a78, 
> but there the warning isn't checked, so that was clearly not the original 
> intention.

I agree. But to me this test tests whether 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155064/new/

https://reviews.llvm.org/D155064

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-08-17 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D112921#4594092 , @wangpc wrote:

> - Rebase.
> - Update tests, remove clang-17.

The removal of the markers in the libc++ tests breaks these test. FYI the tests 
are using a Clang build of apt.llvm.org and are not using this patch for 
testing.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112921/new/

https://reviews.llvm.org/D112921

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-08-16 Thread Mark de Wever via Phabricator via cfe-commits
Mordante accepted this revision.
Mordante added a comment.

I'm happy with the libc++ changes, please wait a few days for @ldionne to react.

In D112921#4584704 , @aaron.ballman 
wrote:

> In D112921#4581641 , @rnk wrote:
>
>> What are the next steps here? Have concerns been addressed? The CI failures 
>> seem unrelated (libcxx tests is an AIX bot out of disk, clang CI is an 
>> interpreter test that seems unrelated, but please confirm).
>
> We definitely need the libc++ reviewers to approve before we move forward. 
> IMO. the clang bits look to be in reasonable shape in terms of code quality.

I leave the approval of the clang part to @aaron.ballman




Comment at: 
libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp:29
+// TODO(mordante) fix this test after updating clang in Docker
+// UNSUPPORTED: clang-17
+

Mordante wrote:
> The bootstrap build fails. Currently main is clang-18. Since you intend to 
> backport the patch it needs to be disabled on clang-17 too.
Based on the timing I'm no longer in favor of backporting this patch.

For the future please mark comments as done when addressed. That makes 
reviewing easier.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112921/new/

https://reviews.llvm.org/D112921

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D156032: Implement CWG2137 (list-initialization from objects of the same type)

2023-08-11 Thread Mark de Wever via Phabricator via cfe-commits
Mordante accepted this revision as: libc++.
Mordante added a comment.

I only looked at the libc++ changes. The libc++ AIX CI failures are unrelated 
to your patch. LGTM modulo one nit.




Comment at: 
libcxx/test/std/utilities/utility/pairs/pairs.pair/ctor.pair_U_V_move.pass.cpp:134
+ */
+//test_pair_rv();
+static_assert(std::is_constructible,

Please remove this line.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156032/new/

https://reviews.llvm.org/D156032

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D157324: [clang] Move the Clang CI jobs off of the libc++ builders

2023-08-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante accepted this revision.
Mordante added a comment.

Nice to see the Clang CI new builder! Thanks for working on this, LGTM!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157324/new/

https://reviews.llvm.org/D157324

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-07-29 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D112921#4541063 , @wangpc wrote:

> - Rebase.
> - Unsupport clang-18.

I see the libc++ build failed. It seems like timeouts uploading artifacts, so 
not related to your patch. Can you rebase and give it another run on the CI? (I 
didn't look at the other build failures.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112921/new/

https://reviews.llvm.org/D112921

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D156247: [Clang] Add a warning on uses of coroutine keywords

2023-07-28 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D156247#4541756 , @ilya-biryukov 
wrote:

> In D156247#4540228 , @Mordante 
> wrote:
>
>> 2. My biggest concern is the timing of this patch. The date of the branching 
>> is know upfront and well communicated by the release managers. This patch 
>> was created after the LLVM-17 branch was created. For libc++ this patch 
>> would be a new feature which has no patch at the moment. This means we're 
>> asked to add a new feature after RC1. In libc++ we normally avoid adding new 
>> features in the release branch.
>
> I am sorry for sending the patch late, we have not thought about it before. I 
> have already mentioned that before in the thread.

I've read that, before my reply. That does not change the fact I feel it is a 
concern.

> We could have foreseen the need for this change before, but we did not and 
> there is nothing I can do to fix it now.

I understand.

>> - a pre-approval by the release managers to apply these changes to the 
>> release branch,
>
> I have asked the release managers above.

Thanks.

>> - a libc++ patch that works with `-fno-coroutines`, which I would be happy 
>> to review.
>
> I will check what needs to be done for libc++ here, I suspect adding `#error` 
> inside `` if the feature macro is not defined should be enough.

This is not enough. There is quite a bit of work involved on the libc++ side. 
Here is a quick list of the things I directly can think of. First the patch in 
Clang needs to be available in our CI:

1. The patch needs to land in LLVM
2. We need to wait for the patch to be available in a build on apt.llvm.org 
(typically this takes one day, but may be longer if the build fails.)
3. We need to update and test our Docker image (this takes a few hours)
4. We need to upload the Docker image to the CI runners and wait for it to 
propagate (takes about 8 hours)

So it will take at least two days to get this working. The CI parts needs a 
libc++ developer who wants to do the work and have time in their schedule to 
work on this. When nobody has time, it will take longer to get the CI working.

Then the patch itself needs to do the following things (the work can be done 
directly, testing requires the CI)

1. Add `#error` inside ``
2. Add a LIBCPP feature flag and propagate that to lit
3. Adjust the tests that would fail with `-fno-coroutine`
4. Add a CI job so we can validate the new feature works

As @cor3ntin pointed out we need to be wary of regressions since other C++ 
features depend on coroutines. So we need a CI job to test whether the feature 
works correctly and do not regress when we add features depending on coroutines.

Maybe that helps a bit more to explain why this is a concern and not something 
we can do quickly on the libc++ side.

In D156247#4542155 , @aaron.ballman 
wrote:

> Given the views expressed on this thread, I think this requires a wider 
> community discussion to determine whether we want to support this idea or 
> not, regardless of -cc1 or driver-level option. We should not be adding a 
> novel language dialect as we're getting ready to cut a release unless the 
> need and benefits are *very* compelling, and I don't think that's the case 
> here. We need the time to think about the long-term effects of such a mode, 
> so I don't think Clang 17 is an appropriate ship vehicle for this change, 
> especially because Google can carry this patch in your downstream easily 
> enough.
>
> My recommendation is to start an RFC on Discourse. If the community quickly 
> and decisively agrees this should land in Clang 17 in the next few days, it 
> might still be reasonable to make the rc2 cutoff, but I'd leave that decision 
> to the release managers and it would be contingent on strong libc++ 
> maintainer agreement to whatever direction we go (because they'll be the most 
> impacted by this decision).

+1


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156247/new/

https://reviews.llvm.org/D156247

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-07-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

I see one libc++ failure, I have not looked into the other failures.




Comment at: 
libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp:29
+// TODO(mordante) fix this test after updating clang in Docker
+// UNSUPPORTED: clang-17
+

The bootstrap build fails. Currently main is clang-18. Since you intend to 
backport the patch it needs to be disabled on clang-17 too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112921/new/

https://reviews.llvm.org/D112921

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D156247: [Clang] Add a warning on uses of coroutine keywords

2023-07-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D156247#4538626 , @aaron.ballman 
wrote:

> I would like explicit buy-in from the libc++ folks on the idea of adding 
> `-fno-coroutines` as they're going to be impacted by Clang supporting such an 
> option (and they may have additional testing requirements to ensure that 
> libc++ works reasonably well when coroutines are disabled).

Thanks for the adding libc++ to the review @aaron.ballman!

If some concerns with this patch

1. I share @philnik's concern that it adds a new configuration we need to test.
2. My biggest concern is the timing of this patch. The date of the branching is 
know upfront and well communicated by the release managers. This patch was 
created after the LLVM-17 branch was created. For libc++ this patch would be a 
new feature which has no patch at the moment. This means we're asked to add a 
new feature after RC1. In libc++ we normally avoid adding new features in the 
release branch.
3. I don't see a consensus from the Clang developers to add this option. I also 
see no consensus coroutines are "broken". I agree if we were to do something 
the `-fno-coroutines` would be the way to go.

I do not speak for Apple, but I know the beta's for the new XCode are available 
since June and I have not heard from @ldionne (who works at Apple) there were 
concerns with coroutines. @ldionne is out of the office at the moment. So even 
when we add this option now it will not be available in the next XCode. (Unless 
Apple backports it.)

@ilya-biryukov if you feel strongly about pursuing this patch I would like to 
see:

- a consensus of the Clang developers this is really needed,
- a pre-approval by the release managers to apply these changes to the release 
branch,
- a libc++ patch that works with `-fno-coroutines`, which I would be happy to 
review.

@ilya-biryukov the next time it would be really great to have such intrusive 
changes up for review well before the release branch is created. That gives the 
LLVM community time review this without the need to rush it. For me it would 
have been a lot easier to accept such a patch a month ago than it's now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156247/new/

https://reviews.llvm.org/D156247

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-07-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D112921#4535716 , @wangpc wrote:

> In D112921#4532378 , @Mordante 
> wrote:
>
>> In D112921#4530916 , @wangpc wrote:
>>
>>> In D112921#4529182 , @Mordante 
>>> wrote:
>>>
 I noticed some of the CI jobs are still failing with the patch, I didn't 
 look into them.
>>>
>>> I don't think they are related to this patch, so I rebased again. If still 
>>> failed, I will try to fix them later.
>>
>> I see changes in the libc++ ABI list output
>>
>>   Symbol added: _ZdlPvmSt11align_val_t
>>   {'name': '_ZdlPvmSt11align_val_t', 'type': 'FUNC', 'is_defined': False}
>>   
>>   Symbol added: _ZdlPvm
>>   {'name': '_ZdlPvm', 'type': 'FUNC', 'is_defined': False}
>>   
>>   SYMBOL REMOVED: _ZdlPvSt11align_val_t
>>   {'is_defined': False, 'name': '_ZdlPvSt11align_val_t', 'type': 'FUNC'}
>>   
>>   Summary
>>   Added:   2
>>   Removed: 1
>>   Changed: 0
>>
>> There seems to be small change in the symbol name. What does the `m` in the 
>> added symbol mean?
>>
>>   _ZdlPvmSt11align_val_t - added
>>   _ZdlPvSt11align_val_t  - remove
>>
>> There is also a new symbol `_ZdlPvm` added.
>
> `m` means `unsigned long` in mangled name (5.1.5.2 Builtin types 
> ), which 
> is the `size` of sized deallocation.
>
>   $ c++filt _ZdlPvmSt11align_val_t _ZdlPvm
>   operator delete(void*, unsigned long, std::align_val_t)
>   operator delete(void*, unsigned long)
>
> I am not familiar  with libcxx, can you please help me to fix these tests? I 
> hope we can catch up with the release of LLVM 17.

Looking at the ABI list we currently have

  _ZdlPv -> operator delete(void*)   // this 
one is kept
  _ZdlPvSt11align_val_t -> operator delete(void*, std::align_val_t)  // this 
one is removed

You add the overloads

  operator delete(void*, unsigned long, std::align_val_t)
  operator delete(void*, unsigned long)

Looking in the current WP 
http://eel.is/c++draft/replacement.functions#lib:new,operator the removed 
overload is still listed there.

Do you know why `operator delete(void*)` and `operator delete(void*, unsigned 
long)` are both available?




Comment at: clang/include/clang/Driver/Options.td:2728
+  PosFlag,
+  NegFlag, BothFlags<[CC1Option]>>;
 defm aligned_allocation : BoolFOption<"aligned-allocation",

Can you update the test `test/Lexer/cxx-features.cpp` and remove 
`-fsized-deallocation` in C++14 and newer? This should no longer be required.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112921/new/

https://reviews.llvm.org/D112921

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D152003: [clang] Fix `static_cast` to array of unknown bound

2023-07-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a subscriber: var-const.
Mordante added a comment.

In D152003#4534963 , @Fznamznon wrote:

>> What do you mean with libstdc++ is fine?
>
> What I mean is when I do (current patch is applied to clang):
>
>   source/llvm-project/build/bin/clang++ -std=c++20 t.cpp -c // compilation 
> succeeds

I see what you mean now.

> What I'm seeing is that in libc++ there is a bunch of explicit static casts 
> in `ranges::__crend::__fn` that endup transformed:
>
>   namespace ranges {
>   namespace __crend { 
>
>   struct __fn {
> template 
>   requires is_lvalue_reference_v<_Tp&&>   
>
> [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
> constexpr auto operator()(_Tp&& __t) const
>   noexcept(noexcept(ranges::rend(static_cast remove_reference_t<_Tp>&>(__t
>   -> decltype(  ranges::rend(static_cast remove_reference_t<_Tp>&>(__t)))  
>   { return  ranges::rend(static_cast remove_reference_t<_Tp>&>(__t)); }
>   
>
> template   
>
>   requires is_rvalue_reference_v<_Tp&&>   
>
> [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
> constexpr auto operator()(_Tp&& __t) const
>   noexcept(noexcept(ranges::rend(static_cast(__t 
>
>   -> decltype(  ranges::rend(static_cast(__t)))
>   { return  ranges::rend(static_cast(__t)); }
>   };
>   } // namespace __crend
>
> Is that expected?

I'm not very familiar with ranges but looking at the standard the `static_cast` 
is not required. I don't think the original author intended this behaviour 
which you implement in this patch. (To be honest I'm a bit surprised by this 
change in the language. I wonder how many other (library) developers it will 
catch off-guard.)

I agree this is a bug in libc++ and we should fix it. As mentioned I'm not too 
familiar with ranges. Maybe @var-const has time, otherwise 
we need to wait for @philnik.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152003/new/

https://reviews.llvm.org/D152003

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-07-25 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D112921#4530916 , @wangpc wrote:

> In D112921#4529182 , @Mordante 
> wrote:
>
>> I noticed some of the CI jobs are still failing with the patch, I didn't 
>> look into them.
>
> I don't think they are related to this patch, so I rebased again. If still 
> failed, I will try to fix them later.

I see changes in the libc++ ABI list output

  Symbol added: _ZdlPvmSt11align_val_t
  {'name': '_ZdlPvmSt11align_val_t', 'type': 'FUNC', 'is_defined': False}
  
  Symbol added: _ZdlPvm
  {'name': '_ZdlPvm', 'type': 'FUNC', 'is_defined': False}
  
  SYMBOL REMOVED: _ZdlPvSt11align_val_t
  {'is_defined': False, 'name': '_ZdlPvSt11align_val_t', 'type': 'FUNC'}
  
  Summary
  Added:   2
  Removed: 1
  Changed: 0

There seems to be small change in the symbol name. What does the `m` in the 
added symbol mean?

  _ZdlPvmSt11align_val_t - added
  _ZdlPvSt11align_val_t  - remove

There is also a new symbol `_ZdlPvm` added.




Comment at: clang/test/CodeGenCoroutines/coro-aligned-alloc.cpp:29-31
+// CHECK: %[[coro_size_for_free:.+]] = call{{.*}}@llvm.coro.size
 // CHECK: %[[coro_align_for_free:.+]] = call{{.*}}@llvm.coro.align
+// CHECK: call void 
@_ZdlPvmSt11align_val_t({{.*}}%[[coro_size_for_free]],{{.*}}%[[coro_align_for_free]])

Here I see changes in the symbol name. I see issues in the libc++ ABI list too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112921/new/

https://reviews.llvm.org/D112921

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D152003: [clang] Fix `static_cast` to array of unknown bound

2023-07-25 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D152003#4531404 , @Fznamznon wrote:

>> should we try to land that today?
>
> I'm not sure. It causes failures in libc++ testing:
>
>   Failed Tests (3):
> llvm-libc++-shared.cfg.in :: std/ranges/range.access/end.pass.cpp
> llvm-libc++-shared.cfg.in :: std/ranges/range.access/rbegin.pass.cpp
> llvm-libc++-shared.cfg.in :: std/ranges/range.access/rend.pass.cpp
>
> I haven't figured out why. Trying to compile:
>
>   #include 
>   
>   using RangeCREndT = decltype(std::ranges::crend);
>   static_assert(!std::is_invocable_v);
>
> fails with this patch only using libc++, libstdc++ is fine. I'm not sure it 
> is my misunderstanding, bug in the patch or bug in libc++.

What do you mean with libstdc++ is fine?
The reduced tests passed with libcstd++ https://godbolt.org/z/nh9v8cedr
The change seems to break libc++.

Based on the bug and this patch I am correct that "transformation" of an array 
of unknown bounds to anarray of known bounds only happens with an explicit cast 
and not implicitly?

I have a strong suspicion that this patch changes the test to

  #include 
  
  using RangeCREndT = decltype(std::ranges::crend);
  static_assert(!std::is_invocable_v); // no longer an 
array of unknown bound so the assert fails

Can you look at the AST output of the failed example to verify my hypothesis? 
When you think libc++ is wrong can you then post this AST?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152003/new/

https://reviews.llvm.org/D152003

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-07-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

I noticed some of the CI jobs are still failing with the patch, I didn't look 
into them.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112921/new/

https://reviews.llvm.org/D112921

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-07-14 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments.



Comment at: 
libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array14.pass.cpp:16
+// Sized deallocation was added in macOS 10.12 and aligned OSes.
+// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11}}
 

Maybe as a pragmatic solution
```
// TODO(mordante) fix this test after updating clang in Docker
// UNSUPPORTED: clang-17
```
The same for the other failing test. Then I'll fix this once the libc++ CI can 
be updated with this fix included.




Comment at: libcxx/utils/ci/buildkite-pipeline.yml:148
   #
-  - wait
+  # - wait
 

Please undo the changes to this file.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112921/new/

https://reviews.llvm.org/D112921

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D155064: [clang][SemaCXX] Diagnose tautological uses of consteval if and is_constant_evaluated

2023-07-14 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments.



Comment at: 
libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.verify.cpp:27
   static_assert(!std::is_constant_evaluated(), "");
-  // expected-warning@-1 0-1 {{'std::is_constant_evaluated' will always 
evaluate to 'true' in a manifestly constant-evaluated expression}}
+  // expected-warning@-1 0-1 {{'std::is_constant_evaluated' will always 
evaluate to true in this context}}
 #endif

hazohelet wrote:
> philnik wrote:
> > Mordante wrote:
> > > Since libc++ support the latest ToT Clang and the last two official 
> > > releases this wont work. The `expected-warning` needs to be a 
> > > `expected-warning-re` that works for both the new and old diagnostic
> > You can also just shorten it to `'std::is_constant_evaluated' will always 
> > evaluate to`. Seems good enough to me.
> Thanks!
I really would like a regex. To me the current message misses an important 
piece of information; the `true` part. I care less about the rest of the 
message, but stripping the `true` means a warning like 
`std::is_constant_evaluated' will always evaluate to FALSE` would be valid too.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155064/new/

https://reviews.llvm.org/D155064

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D155064: [clang][SemaCXX] Diagnose tautological uses of consteval if and is_constant_evaluated

2023-07-12 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

I only looked at the libc++ part.




Comment at: 
libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.verify.cpp:27
   static_assert(!std::is_constant_evaluated(), "");
-  // expected-warning@-1 0-1 {{'std::is_constant_evaluated' will always 
evaluate to 'true' in a manifestly constant-evaluated expression}}
+  // expected-warning@-1 0-1 {{'std::is_constant_evaluated' will always 
evaluate to true in this context}}
 #endif

Since libc++ support the latest ToT Clang and the last two official releases 
this wont work. The `expected-warning` needs to be a `expected-warning-re` that 
works for both the new and old diagnostic


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155064/new/

https://reviews.llvm.org/D155064

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D155078: [ci] Make libc++ and Clang CI scripts independent

2023-07-12 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

Thanks for working on this! I really like the direction. I mainly skimmed the 
code since the patch as already landed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155078/new/

https://reviews.llvm.org/D155078

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D153038: [Clang] Fixes a diagnostic typo.

2023-06-16 Thread Mark de Wever via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG501405f1d5f0: [Clang] Fixes a diagnostic typo. (authored by 
Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153038/new/

https://reviews.llvm.org/D153038

Files:
  clang/include/clang/Basic/DiagnosticSerializationKinds.td
  clang/test/Modules/no-implicit-std-cxx-module.cppm


Index: clang/test/Modules/no-implicit-std-cxx-module.cppm
===
--- clang/test/Modules/no-implicit-std-cxx-module.cppm
+++ clang/test/Modules/no-implicit-std-cxx-module.cppm
@@ -7,7 +7,7 @@
 // RUN: -o %t/a.pcm
 // RUN: %clang_cc1 -std=c++20 %t/user.cpp -fmodule-file=a=%t/a.pcm -verify 
-fsyntax-only
 // RUN: %clang_cc1 -std=c++20 %t/user.cpp -fmodule-file=a=%t/a.pcm -verify 
-fsyntax-only \
-// RUN: -Wno-read-modules-implicitly -DNO_DIAG 
+// RUN: -Wno-read-modules-implicitly -DNO_DIAG
 // RUN: %clang_cc1 -std=c++20 %t/user.cpp -fmodule-file=a=%t/a.pcm 
-fmodule-file=b=%t/b.pcm \
 // RUN: -DNO_DIAG -verify -fsyntax-only
 //
@@ -35,7 +35,7 @@
 return b() + 43;
 }
 
-// CHECK: it is deprecated to read module 'b' implcitly;
+// CHECK: it is deprecated to read module 'b' implicitly;
 
 // CHECK-CORRECT-NOT: warning
 // CHECK-CORRECT-NOT: error
@@ -47,9 +47,9 @@
 #ifdef NO_DIAG
 // expected-no-diagnostics
 #else
- // expected-warning@+2 {{it is deprecated to read module 'b' implcitly;}}
+ // expected-warning@+2 {{it is deprecated to read module 'b' implicitly;}}
 #endif
 import a;
 int use() {
 return a();
-}
\ No newline at end of file
+}
Index: clang/include/clang/Basic/DiagnosticSerializationKinds.td
===
--- clang/include/clang/Basic/DiagnosticSerializationKinds.td
+++ clang/include/clang/Basic/DiagnosticSerializationKinds.td
@@ -135,7 +135,7 @@
   InGroup>;
 
 def warn_reading_std_cxx_module_by_implicit_paths : Warning<
-  "it is deprecated to read module '%0' implcitly; it is going to be removed 
in clang18; "
+  "it is deprecated to read module '%0' implicitly; it is going to be removed 
in clang 18; "
   "consider to specify the dependencies explicitly">,
   InGroup>;
 } // let CategoryName


Index: clang/test/Modules/no-implicit-std-cxx-module.cppm
===
--- clang/test/Modules/no-implicit-std-cxx-module.cppm
+++ clang/test/Modules/no-implicit-std-cxx-module.cppm
@@ -7,7 +7,7 @@
 // RUN: -o %t/a.pcm
 // RUN: %clang_cc1 -std=c++20 %t/user.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only
 // RUN: %clang_cc1 -std=c++20 %t/user.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only \
-// RUN: -Wno-read-modules-implicitly -DNO_DIAG 
+// RUN: -Wno-read-modules-implicitly -DNO_DIAG
 // RUN: %clang_cc1 -std=c++20 %t/user.cpp -fmodule-file=a=%t/a.pcm -fmodule-file=b=%t/b.pcm \
 // RUN: -DNO_DIAG -verify -fsyntax-only
 //
@@ -35,7 +35,7 @@
 return b() + 43;
 }
 
-// CHECK: it is deprecated to read module 'b' implcitly;
+// CHECK: it is deprecated to read module 'b' implicitly;
 
 // CHECK-CORRECT-NOT: warning
 // CHECK-CORRECT-NOT: error
@@ -47,9 +47,9 @@
 #ifdef NO_DIAG
 // expected-no-diagnostics
 #else
- // expected-warning@+2 {{it is deprecated to read module 'b' implcitly;}}
+ // expected-warning@+2 {{it is deprecated to read module 'b' implicitly;}}
 #endif
 import a;
 int use() {
 return a();
-}
\ No newline at end of file
+}
Index: clang/include/clang/Basic/DiagnosticSerializationKinds.td
===
--- clang/include/clang/Basic/DiagnosticSerializationKinds.td
+++ clang/include/clang/Basic/DiagnosticSerializationKinds.td
@@ -135,7 +135,7 @@
   InGroup>;
 
 def warn_reading_std_cxx_module_by_implicit_paths : Warning<
-  "it is deprecated to read module '%0' implcitly; it is going to be removed in clang18; "
+  "it is deprecated to read module '%0' implicitly; it is going to be removed in clang 18; "
   "consider to specify the dependencies explicitly">,
   InGroup>;
 } // let CategoryName
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D153038: [Clang] Fixes a diagnostic typo.

2023-06-15 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision.
Mordante added a reviewer: ChuanqiXu.
Herald added a project: All.
Mordante requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Some small style updates as drive-by.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153038

Files:
  clang/include/clang/Basic/DiagnosticSerializationKinds.td
  clang/test/Modules/no-implicit-std-cxx-module.cppm


Index: clang/test/Modules/no-implicit-std-cxx-module.cppm
===
--- clang/test/Modules/no-implicit-std-cxx-module.cppm
+++ clang/test/Modules/no-implicit-std-cxx-module.cppm
@@ -7,7 +7,7 @@
 // RUN: -o %t/a.pcm
 // RUN: %clang_cc1 -std=c++20 %t/user.cpp -fmodule-file=a=%t/a.pcm -verify 
-fsyntax-only
 // RUN: %clang_cc1 -std=c++20 %t/user.cpp -fmodule-file=a=%t/a.pcm -verify 
-fsyntax-only \
-// RUN: -Wno-read-modules-implicitly -DNO_DIAG 
+// RUN: -Wno-read-modules-implicitly -DNO_DIAG
 // RUN: %clang_cc1 -std=c++20 %t/user.cpp -fmodule-file=a=%t/a.pcm 
-fmodule-file=b=%t/b.pcm \
 // RUN: -DNO_DIAG -verify -fsyntax-only
 //
@@ -35,7 +35,7 @@
 return b() + 43;
 }
 
-// CHECK: it is deprecated to read module 'b' implcitly;
+// CHECK: it is deprecated to read module 'b' implicitly;
 
 // CHECK-CORRECT-NOT: warning
 // CHECK-CORRECT-NOT: error
@@ -47,9 +47,9 @@
 #ifdef NO_DIAG
 // expected-no-diagnostics
 #else
- // expected-warning@+2 {{it is deprecated to read module 'b' implcitly;}}
+ // expected-warning@+2 {{it is deprecated to read module 'b' implicitly;}}
 #endif
 import a;
 int use() {
 return a();
-}
\ No newline at end of file
+}
Index: clang/include/clang/Basic/DiagnosticSerializationKinds.td
===
--- clang/include/clang/Basic/DiagnosticSerializationKinds.td
+++ clang/include/clang/Basic/DiagnosticSerializationKinds.td
@@ -135,7 +135,7 @@
   InGroup>;
 
 def warn_reading_std_cxx_module_by_implicit_paths : Warning<
-  "it is deprecated to read module '%0' implcitly; it is going to be removed 
in clang18; "
+  "it is deprecated to read module '%0' implicitly; it is going to be removed 
in clang 18; "
   "consider to specify the dependencies explicitly">,
   InGroup>;
 } // let CategoryName


Index: clang/test/Modules/no-implicit-std-cxx-module.cppm
===
--- clang/test/Modules/no-implicit-std-cxx-module.cppm
+++ clang/test/Modules/no-implicit-std-cxx-module.cppm
@@ -7,7 +7,7 @@
 // RUN: -o %t/a.pcm
 // RUN: %clang_cc1 -std=c++20 %t/user.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only
 // RUN: %clang_cc1 -std=c++20 %t/user.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only \
-// RUN: -Wno-read-modules-implicitly -DNO_DIAG 
+// RUN: -Wno-read-modules-implicitly -DNO_DIAG
 // RUN: %clang_cc1 -std=c++20 %t/user.cpp -fmodule-file=a=%t/a.pcm -fmodule-file=b=%t/b.pcm \
 // RUN: -DNO_DIAG -verify -fsyntax-only
 //
@@ -35,7 +35,7 @@
 return b() + 43;
 }
 
-// CHECK: it is deprecated to read module 'b' implcitly;
+// CHECK: it is deprecated to read module 'b' implicitly;
 
 // CHECK-CORRECT-NOT: warning
 // CHECK-CORRECT-NOT: error
@@ -47,9 +47,9 @@
 #ifdef NO_DIAG
 // expected-no-diagnostics
 #else
- // expected-warning@+2 {{it is deprecated to read module 'b' implcitly;}}
+ // expected-warning@+2 {{it is deprecated to read module 'b' implicitly;}}
 #endif
 import a;
 int use() {
 return a();
-}
\ No newline at end of file
+}
Index: clang/include/clang/Basic/DiagnosticSerializationKinds.td
===
--- clang/include/clang/Basic/DiagnosticSerializationKinds.td
+++ clang/include/clang/Basic/DiagnosticSerializationKinds.td
@@ -135,7 +135,7 @@
   InGroup>;
 
 def warn_reading_std_cxx_module_by_implicit_paths : Warning<
-  "it is deprecated to read module '%0' implcitly; it is going to be removed in clang18; "
+  "it is deprecated to read module '%0' implicitly; it is going to be removed in clang 18; "
   "consider to specify the dependencies explicitly">,
   InGroup>;
 } // let CategoryName
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D151344: Reland "[CMake] Bumps minimum version to 3.20.0.

2023-05-27 Thread Mark de Wever via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs 
Review".
This revision was automatically updated to reflect the committed changes.
Mordante marked an inline comment as done.
Closed by commit rGcbaa3597aaf6: Reland "[CMake] Bumps minimum version to 
3.20.0. (authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151344/new/

https://reviews.llvm.org/D151344

Files:
  bolt/runtime/CMakeLists.txt
  clang/CMakeLists.txt
  clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
  cmake/Modules/CMakePolicy.cmake
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/lib/Decimal/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  libc/CMakeLists.txt
  libc/examples/hello_world/CMakeLists.txt
  libclc/CMakeLists.txt
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt
  libunwind/CMakeLists.txt
  libunwind/src/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm-libgcc/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/CMake.rst
  llvm/docs/GettingStarted.rst
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  mlir/examples/standalone/CMakeLists.txt
  openmp/CMakeLists.txt
  openmp/cmake/DetectTestCompiler/CMakeLists.txt
  openmp/docs/SupportAndFAQ.rst
  openmp/libompd/src/CMakeLists.txt
  openmp/libomptarget/plugins/remote/src/CMakeLists.txt
  openmp/runtime/src/CMakeLists.txt
  openmp/tools/Modules/FindOpenMPTarget.cmake
  openmp/tools/Modules/README.rst
  polly/CMakeLists.txt
  pstl/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,16 +1,13 @@
 # This file handles building LLVM runtime sub-projects.
-cmake_minimum_required(VERSION 3.13.4)
-if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-  message(WARNING
-"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-"minimum version of CMake required to build LLVM will become 3.20.0, and "
-"using an older CMake will become an error. Please upgrade your CMake to "
-"at least 3.20.0 now to avoid issues in the future!")
-endif()
-project(Runtimes C CXX ASM)
+cmake_minimum_required(VERSION 3.20.0)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
 set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
+include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
+  NO_POLICY_SCOPE)
+
+project(Runtimes C CXX ASM)
+
 list(INSERT CMAKE_MODULE_PATH 0
   "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
   "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
Index: pstl/CMakeLists.txt
===
--- pstl/CMakeLists.txt
+++ pstl/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #
 #===--===##
-cmake_minimum_required(VERSION 3.13.4)
+cmake_minimum_required(VERSION 3.20.0)
 
 set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
 file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -1,14 +1,7 @@
 # Check if this is a in tree build.
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
-  cmake_minimum_required(VERSION 3.13.4)
-  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-message(WARNING
-  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-  "minimum version of CMake required to build LLVM will become 3.20.0, and "
-  "using an older CMake will become an error. Please upgrade your CMake to "
-  "at least 3.20.0 now to avoid issues in the future!")
-  endif()
+  cmake_minimum_required(VERSION 3.20.0)
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/tools/Modules/README.rst
===
--- openmp/tools/Modules/README.rst
+++ openmp/tools/Modules/README.rst
@@ -26,7 +26,7 @@
 
 .. code-block:: cmake
 
-  cmake_minimum_required(VERSION 3.13.4)
+  cmake_minimum_required(VERSION 3.20.0)
   project(offloadTest VERSION 1.0 LANGUAGES CXX)
 
   list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
@@ -37,7 +37,7 @@
   target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX)
   target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)
 
-Using this module requires at least CMake version 3.13.4. Supported languages
+Using this module requires at least CMake version 3.20.0. Supported languages
 are C and C++ with Fortran support planned in the future. If your application
 requires building for a specif

[PATCH] D151344: Reland "[CMake] Bumps minimum version to 3.20.0.

2023-05-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante accepted this revision.
Mordante marked 3 inline comments as done.
Mordante added a comment.

In D151344#4368926 , @MaskRay wrote:

> Thank you for making another try for the treewide change (which is admittedly 
> very painful and not many people do such work).

Thanks. And it indeed takes quite a lot of effort.

> Can you include the original patch description to the summary? That is the 
> main part and the message "This reverts commit " is secondary. Readers should 
> not need to trace through the revert history to obtain the original 
> motivation.

Good suggestion I've updated the message.

Since @glandium and @hans seem happy with the changes I'll land this patch.




Comment at: libunwind/src/CMakeLists.txt:28-35
 
 # See add_asm_sources() in compiler-rt for explanation of this workaround.
 # CMake doesn't work correctly with assembly on AIX. Workaround by compiling
 # as C files as well.
 if((APPLE AND CMAKE_VERSION VERSION_LESS 3.19) OR
-   (MINGW AND CMAKE_VERSION VERSION_LESS 3.17) OR
-   (${CMAKE_SYSTEM_NAME} MATCHES "AIX"))
+   (MINGW AND CMAKE_VERSION VERSION_LESS 3.17))
   set_source_files_properties(${LIBUNWIND_ASM_SOURCES} PROPERTIES LANGUAGE C)

h-vetinari wrote:
> mstorsjo wrote:
> > h-vetinari wrote:
> > > Shouldn't it be possible to remove that entire block (as it only fires 
> > > for CMake <3.20)?
> > The intention was to do such cleanups in a later patch, as mentioned in the 
> > original commit message in https://reviews.llvm.org/D144509. (I guess it 
> > would be good to bring the original commit message along with the reland 
> > attempts too.)
> Well sure, but "workarounds" is a broad term. It makes sense to not try to 
> clean up everything that newer CMake enables, but this PR does remove a lot 
> of (all?) other lines with `CMAKE_VERSION VERSION_LESS ` where x<3.20. On 
> top of that, since this line is already being changed (which is why I noticed 
> in the first place), I'd suggest to just remove it. But I don't feel strongly 
> about this, just thought I'd point it out.
Yes the intention is to do these cleanups later. The patch does more than I'd 
like already. However that is due to the original patch and followups being 
reverted.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151344/new/

https://reviews.llvm.org/D151344

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-05-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

I've created D151344  @glandium @hans @thakis 
I really would appreciate when you can test the patch locally to avoid another 
revert round.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D151344: Reland "[CMake] Bumps minimum version to 3.20.0.

2023-05-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision.
Mordante added reviewers: glandium, hans, thakis.
Herald added subscribers: libc-commits, bviyer, ekilmer, Moerafaat, zero9178, 
Enna1, bzcheeseman, ayermolo, sdasgup3, wenzhicui, wrengr, cota, teijeong, 
rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, jvesely, Joonsoo, 
liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle, 
mehdi_amini, mstorsjo, whisperity.
Herald added a reviewer: bollu.
Herald added a reviewer: ldionne.
Herald added a reviewer: rafauler.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a reviewer: NoQ.
Herald added projects: libc-project, Flang, All.
Mordante requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, libcxx-commits, openmp-commits, 
lldb-commits, Sanitizers, cfe-commits, jplehr, yota9, sstefan1, 
stephenneuendorffer, nicolasvasilache, jdoerfert.
Herald added projects: clang, Sanitizers, LLDB, libc++, OpenMP, libc++abi, 
libunwind, MLIR, LLVM.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.
Herald added a reviewer: libunwind.

This reverts commit d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6 
.

Adds the patch by @hans from
https://github.com/llvm/llvm-project/issues/62719


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151344

Files:
  bolt/runtime/CMakeLists.txt
  clang/CMakeLists.txt
  clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
  cmake/Modules/CMakePolicy.cmake
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/lib/Decimal/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  libc/CMakeLists.txt
  libc/examples/hello_world/CMakeLists.txt
  libclc/CMakeLists.txt
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt
  libunwind/CMakeLists.txt
  libunwind/src/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm-libgcc/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/CMake.rst
  llvm/docs/GettingStarted.rst
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  mlir/examples/standalone/CMakeLists.txt
  openmp/CMakeLists.txt
  openmp/cmake/DetectTestCompiler/CMakeLists.txt
  openmp/docs/SupportAndFAQ.rst
  openmp/libompd/src/CMakeLists.txt
  openmp/libomptarget/plugins/remote/src/CMakeLists.txt
  openmp/runtime/src/CMakeLists.txt
  openmp/tools/Modules/FindOpenMPTarget.cmake
  openmp/tools/Modules/README.rst
  polly/CMakeLists.txt
  pstl/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,16 +1,13 @@
 # This file handles building LLVM runtime sub-projects.
-cmake_minimum_required(VERSION 3.13.4)
-if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-  message(WARNING
-"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-"minimum version of CMake required to build LLVM will become 3.20.0, and "
-"using an older CMake will become an error. Please upgrade your CMake to "
-"at least 3.20.0 now to avoid issues in the future!")
-endif()
-project(Runtimes C CXX ASM)
+cmake_minimum_required(VERSION 3.20.0)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
 set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
+include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
+  NO_POLICY_SCOPE)
+
+project(Runtimes C CXX ASM)
+
 list(INSERT CMAKE_MODULE_PATH 0
   "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
   "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
Index: pstl/CMakeLists.txt
===
--- pstl/CMakeLists.txt
+++ pstl/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #
 #===--===##
-cmake_minimum_required(VERSION 3.13.4)
+cmake_minimum_required(VERSION 3.20.0)
 
 set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
 file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -1,14 +1,7 @@
 # Check if this is a in tree build.
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
-  cmake_minimum_required(VERSION 3.13.4)
-  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-message(WARNING
-  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-  "minimum version of CMake required to build LLVM will become 3.20.0, and "
-  "using an older CMake will become an error. Please upgrade your CMake to "
-  "at least 3.20.0 now to avoid issues in the fu

[PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-05-19 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D144509#4356160 , @hans wrote:

> In D144509#4350052 , @Mordante 
> wrote:
>
>> In D144509#4349921 , @thakis wrote:
>>
>>> Reverted this and follow-ups in d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6 
>>>  for 
>>> now.
>>>
>>> Sorry this is such a pain to land :(
>>>
>>> (See also discussion over in D150688 )
>>
>> I'm not happy that the patch needs to be reverted again.
>>
>> It has taken me a lot of time to contact all buildbots maintainers to get 
>> all buildbots updated to the minimal CMake requirement.
>
> I sympathize with this, but I still believe reverting in these situations is 
> the right thing to do. It reduces disruption for everyone who needs their 
> builds to keep working, while allowing the failures to be investigated 
> without the pressure of knowing that head is currently broken. That this 
> patch has been hard to land is in the nature of the change itself.

I'm caught quite off-guard that it seems the LLVM buildbots don't cover our 
Windows support that well. It would also be great to know how we can improve 
the process to update dependency versions. The current way does not really 
encourage me to propose LLVM wide updates again.

>> Now that they are updated it turned out that one of the two last updated 
>> bots has an issue with this patch and that has been fixed. But now it seems 
>> to break Chromium. I don't have access to Windows so I don't know how I can 
>> test patches.
>
> I'm happy to test patches on my Windows machine.

Thanks!

>> Do you have a suggestion how we can move this patch forward?
>
> IIRC, D150688  + the diff in 
> https://github.com/llvm/llvm-project/issues/62719#issuecomment-1552903385 + 
> upgrading the pre-merge linux bot should take care of all known issues.

Would it make sense to put all these patches in one new review and then test 
that on Chromium and ask @glandium to test that too. Then we know whether it 
solves the issues. Do you want me to make a patch or do you want to do it?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-05-17 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D144509#4350148 , @thakis wrote:

> https://github.com/llvm/llvm-project/issues/62719 is independent of chromium 
> and others have reported problems above too, from what I understand. Is that 
> not accurate?

That bug report originally was independent of Chromium, that part was fixed by 
D150688 . This wasn't noticed earlier since 
that happened on one of the buildbots that took the longest to update. For the 
earlier failed landings there was never a notification this patch caused issues 
on Chromium, so I'm quite taken by surprise.

The other issues I see are build errors on Chromium, unless I missed something.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-05-17 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D144509#4349017 , @dyung wrote:

> I'm not really sure where else to post this, but the pre-merge linux bot 
> still seems to be running 3.18.4.
>
> https://buildkite.com/llvm-project/premerge-checks/builds/152678#018828d2-1837-4fc2-baec-fca595969219
>
>   CMake Error at CMakeLists.txt:3 (cmake_minimum_required):
> CMake 3.20.0 or higher is required.  You are running version 3.18.4

Thanks, I've notified the owner of the build bot.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-05-17 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D144509#4349921 , @thakis wrote:

> Reverted this and follow-ups in d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6 
>  for now.
>
> Sorry this is such a pain to land :(
>
> (See also discussion over in D150688 )

I'm not happy that the patch needs to be reverted again.

It has taken me a lot of time to contact all buildbots maintainers to get all 
buildbots updated to the minimal CMake requirement.
Now that they are updated it turned out that one of the two last updated bots 
has an issue with this patch and that has been fixed. But now it seems to break 
Chromium. I don't have access to Windows so I don't know how I can test patches.

Do you have a suggestion how we can move this patch forward?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D150450: Add C++26 compile flags.

2023-05-15 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments.



Comment at: clang/docs/CommandGuide/clang.rst:206-210
+   Working draft for ISO C++ 2026
+
+  | ``gnu++2c``
+
+   Working draft for ISO C++ 2026 with GNU extensions

erichkeane wrote:
> aaron.ballman wrote:
> > We shouldn't call it `ISO C++ 2026` until it's published by ISO. (I don't 
> > have strong opinions about 2c vs 26 in there, but since we need to update 
> > it anyway when 26 is released, I figured it'd be easier to find again with 
> > 2c.)
> Ah, I just copied from what we had for C++23 before the flip.  But this makes 
> sense, I chose `2c` for the reason you mentioned.
Note that before D149553 similar wording was used for C++2b "Working draft for 
ISO C++ 2023".


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150450/new/

https://reviews.llvm.org/D150450

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D150450: Add C++26 compile flags.

2023-05-12 Thread Mark de Wever via Phabricator via cfe-commits
Mordante accepted this revision.
Mordante added a comment.
This revision is now accepted and ready to land.

In D150450#4338065 , @erichkeane 
wrote:

> In D150450#4338034 , @Mordante 
> wrote:
>
>> In D150450#4337952 , @erichkeane 
>> wrote:
>>
>>> In D150450#4337858 , @cor3ntin 
>>> wrote:
>>>
 Similar PR here https://reviews.llvm.org/D149875
>>>
>>> Ah! I'd not noticed that one (or maybe someone mentioned it?).  If 
>>> @Mordante wants to take this over/change his to meet our RFC, I'm all for 
>>> it.
>>
>> I've mentioned it in 
>> https://discourse.llvm.org/t/rfc-lets-just-call-it-c-26-and-forget-about-the-c-2c-business-at-least-internally/70383/3
>>  to avoid duplicated effort.
>>
>> It seems, as expected. the patches have a large overlap, but you added a bit 
>> more of the status page and I updated the clang-cl driver.
>>
>> I just updated my patch before I saw this update in the mail.
>
> Woops, looks like that was long enough ago I completely forgot about it :)
>
> Completely up to you if you want to just steal my stuff and we can go with 
> your review, or you want to just help me fill in anything I missed here.

No problem. I think it's easier to land this patch instead of me stealing your 
work.
I mainly care that Clang get C++2c support so I can prepare libc++ for C++2c.

LGTM after `clang/test/Driver/cl-options.c` is fixed.




Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6650
  // TODO add c++23 when MSVC supports it.
- .Case("c++latest", "-std=c++23")
+ .Case("c++latest", "-std=c++26")
  .Default("");

The CI will fail in the test clang/test/Driver/cl-options.c
see https://reviews.llvm.org/D149875#change-s8WC0AhDg4dT



Comment at: clang/test/Preprocessor/init.c:22
 // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++23 -E -dM < /dev/null | 
FileCheck -match-full-lines -check-prefix CXX2B %s
+// RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++2b -E -dM < /dev/null | 
FileCheck -match-full-lines -check-prefix CXX2B %s
 //

I had noticed I missed this too, this landed earlier today D150063.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150450/new/

https://reviews.llvm.org/D150450

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D150450: Add C++26 compile flags.

2023-05-12 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D150450#4337952 , @erichkeane 
wrote:

> In D150450#4337858 , @cor3ntin 
> wrote:
>
>> Similar PR here https://reviews.llvm.org/D149875
>
> Ah! I'd not noticed that one (or maybe someone mentioned it?).  If @Mordante 
> wants to take this over/change his to meet our RFC, I'm all for it.

I've mentioned it in 
https://discourse.llvm.org/t/rfc-lets-just-call-it-c-26-and-forget-about-the-c-2c-business-at-least-internally/70383/3
 to avoid duplicated effort.

It seems, as expected. the patches have a large overlap, but you added a bit 
more of the status page and I updated the clang-cl driver.

I just updated my patch before I saw this update in the mail.




Comment at: clang/lib/Frontend/InitPreprocessor.cpp:457
+  Builder.defineMacro("__cplusplus", "202402L");
+g/ FIXME: Use correct value for C++23, and update C++26 to be 'one more'.
+else if (LangOpts.CPlusPlus23)

Note this has been committed in the draft for N4950.
https://github.com/cplusplus/draft/commit/4e4de1df8ee941255b653b61d0a62050b34cf8c9#diff-1b14eeb3be43fba46b5d0ff51fe0695c9a856544d1f45b1d486f98f5e1b889bf



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150450/new/

https://reviews.llvm.org/D150450

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D150063: [clang] Restores some -std=c++2b tests.

2023-05-12 Thread Mark de Wever via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfd556368a1a8: [clang] Restores some -std=c++2b tests. 
(authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150063/new/

https://reviews.llvm.org/D150063

Files:
  clang/test/Preprocessor/init.c


Index: clang/test/Preprocessor/init.c
===
--- clang/test/Preprocessor/init.c
+++ clang/test/Preprocessor/init.c
@@ -10,6 +10,7 @@
 //
 //
 // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++23 -E -dM < /dev/null | 
FileCheck -match-full-lines -check-prefix CXX2B %s
+// RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++2b -E -dM < /dev/null | 
FileCheck -match-full-lines -check-prefix CXX2B %s
 //
 // CXX2B:#define __GNUG__ 4
 // CXX2B:#define __GXX_EXPERIMENTAL_CXX0X__ 1
@@ -134,6 +135,7 @@
 // FREESTANDING:#define __STDC_HOSTED__ 0
 //
 // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++23 -E -dM < /dev/null 
| FileCheck -match-full-lines -check-prefix GXX2B %s
+// RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++2b -E -dM < /dev/null 
| FileCheck -match-full-lines -check-prefix GXX2B %s
 //
 // GXX2B:#define __GNUG__ 4
 // GXX2B:#define __GXX_WEAK__ 1


Index: clang/test/Preprocessor/init.c
===
--- clang/test/Preprocessor/init.c
+++ clang/test/Preprocessor/init.c
@@ -10,6 +10,7 @@
 //
 //
 // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++23 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX2B %s
+// RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++2b -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX2B %s
 //
 // CXX2B:#define __GNUG__ 4
 // CXX2B:#define __GXX_EXPERIMENTAL_CXX0X__ 1
@@ -134,6 +135,7 @@
 // FREESTANDING:#define __STDC_HOSTED__ 0
 //
 // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++23 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GXX2B %s
+// RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++2b -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GXX2B %s
 //
 // GXX2B:#define __GNUG__ 4
 // GXX2B:#define __GXX_WEAK__ 1
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D150063: [clang] Restores some -std=c++2b tests.

2023-05-07 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision.
Mordante added a reviewer: aaron.ballman.
Herald added a project: All.
Mordante updated this revision to Diff 520185.
Mordante added a comment.
Mordante edited the summary of this revision.
Mordante published this revision for review.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Retrigger CI.




Comment at: clang/test/Preprocessor/init.c:13
 // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++23 -E -dM < /dev/null | 
FileCheck -match-full-lines -check-prefix CXX2B %s
+// RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++2b -E -dM < /dev/null | 
FileCheck -match-full-lines -check-prefix CXX2B %s
 //

FYI the revision had a parent revision to test some changes for the Clang 
pre-commit CI not related to this patch at all.


These tests should have added -std=c++23 instead of replacing -std=c++2b
in D149553 .


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150063

Files:
  clang/test/Preprocessor/init.c


Index: clang/test/Preprocessor/init.c
===
--- clang/test/Preprocessor/init.c
+++ clang/test/Preprocessor/init.c
@@ -10,6 +10,7 @@
 //
 //
 // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++23 -E -dM < /dev/null | 
FileCheck -match-full-lines -check-prefix CXX2B %s
+// RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++2b -E -dM < /dev/null | 
FileCheck -match-full-lines -check-prefix CXX2B %s
 //
 // CXX2B:#define __GNUG__ 4
 // CXX2B:#define __GXX_EXPERIMENTAL_CXX0X__ 1
@@ -134,6 +135,7 @@
 // FREESTANDING:#define __STDC_HOSTED__ 0
 //
 // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++23 -E -dM < /dev/null 
| FileCheck -match-full-lines -check-prefix GXX2B %s
+// RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++2b -E -dM < /dev/null 
| FileCheck -match-full-lines -check-prefix GXX2B %s
 //
 // GXX2B:#define __GNUG__ 4
 // GXX2B:#define __GXX_WEAK__ 1


Index: clang/test/Preprocessor/init.c
===
--- clang/test/Preprocessor/init.c
+++ clang/test/Preprocessor/init.c
@@ -10,6 +10,7 @@
 //
 //
 // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++23 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX2B %s
+// RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=c++2b -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix CXX2B %s
 //
 // CXX2B:#define __GNUG__ 4
 // CXX2B:#define __GXX_EXPERIMENTAL_CXX0X__ 1
@@ -134,6 +135,7 @@
 // FREESTANDING:#define __STDC_HOSTED__ 0
 //
 // RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++23 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GXX2B %s
+// RUN: %clang_cc1 -x c++ -fgnuc-version=4.2.1 -std=gnu++2b -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GXX2B %s
 //
 // GXX2B:#define __GNUG__ 4
 // GXX2B:#define __GXX_WEAK__ 1
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D146090: [Clang] Updating handling of defaulted comparison operators to reflect changes from P2448R2

2023-05-04 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D146090#4319685 , @shafik wrote:

> Landed fix 7887af027ee5eff27bbc953074726ab8d9d9f592 
> 
>
> There was also 058f04ea7dcbafbeed271fa75ee65e41409b4479 
>  and 
> b323b407f76d22bfc08b1430f7952c03eb504288 
> 

Thanks for fixing these!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146090/new/

https://reviews.llvm.org/D146090

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D149553: [clang] Use -std=c++23 instead of -std=c++2b

2023-05-03 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 3 inline comments as done.
Mordante added a comment.

In D149553#4313211 , @aaron.ballman 
wrote:

> In D149553#4312788 , @Mordante 
> wrote:
>
>> In D149553#4310478 , 
>> @aaron.ballman wrote:
>>
>>> Thank you for working on this! The Clang changes are mostly all good, but I 
>>> think we should hold off on changing the value of `__cplusplus` for the 
>>> moment as it's not set in stone in the standard yet (I thought it was 
>>> though, so I'm checking with the editor).
>>
>> I noticed the same and I was wondering whether I should contact the editor. 
>> I noticed some approved papers also have not been merged yet. (These papers 
>> are still open issues in the paper repository.)
>>
>> I'll wait a few days to see whether the draft gets updated otherwise I 
>> revert the macro change.
>>
>> I would be very surprised if the macro gets a different value, that's why I 
>> already bumped it.
>
> I heard back from the editor yesterday and he said that the macro would be 
> replaced with an appropriate value for the DIS, and that he hopes to ensure 
> that value is published in the next meeting mailing (which would be roughly 
> May 15). So I think we can either wait until that mailing comes out and see 
> if it has a concrete value to land these changes, or we can land everything 
> but the macro value changes and deal with that in a follow up (this might be 
> easier due to rebasing woes given how large this patch is).

Yes I created a new patch for that part. That patch is a lot easier to rebase 
than this one.




Comment at: clang/lib/Frontend/InitPreprocessor.cpp:455
+if (LangOpts.CPlusPlus23)
+  Builder.defineMacro("__cplusplus", "202302L");
 //  [C++20] The integer literal 202002L.

aaron.ballman wrote:
> I think this might still be premature. I noticed that the draft C++ standard 
> does not have this value set yet: 
> https://github.com/cplusplus/draft/blob/main/source/config.tex#L6
> 
> I've emailed the editor to find out if that's a mistake (I am pretty sure 
> we're sending this off to PDTS at some point shortly).
I've reverted this and similar parts. They are now in D149761. I will update 
that patch once editor made a release with the updated `__cplusplus` macro.



Comment at: clang/test/Parser/cxx2b-label.cpp:1
-// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx2b -std=c++2b 
-Wpre-c++2b-compat %s
+// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx23 -std=c++23 
-Wpre-c++23-compat %s
 // RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx20 -std=c++20 %s

ldionne wrote:
> We could also consider renaming those files.
I could do that but rather in a follow-up there are still files named like 
`clang/test/Parser/cxx0x-lambda-expressions.cpp` too. I'm not sure how much the 
Clang devs want to remove these code names.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149553/new/

https://reviews.llvm.org/D149553

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D149553: [clang] Use -std=c++23 instead of -std=c++2b

2023-05-02 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D149553#4310478 , @aaron.ballman 
wrote:

> Thank you for working on this! The Clang changes are mostly all good, but I 
> think we should hold off on changing the value of `__cplusplus` for the 
> moment as it's not set in stone in the standard yet (I thought it was though, 
> so I'm checking with the editor).

I noticed the same and I was wondering whether I should contact the editor. I 
noticed some approved papers also have not been merged yet. (These papers are 
still open issues in the paper repository.)

I'll wait a few days to see whether the draft gets updated otherwise I revert 
the macro change.

I would be very surprised if the macro gets a different value, that's why I 
already bumped it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149553/new/

https://reviews.llvm.org/D149553

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D149553: [clang] Use -std=c++23 instead of -std=c++2b

2023-04-30 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments.



Comment at: libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp:46
 
-  if (lang_opts.CPlusPlus2b) {
 attributes.emplace_back("assume");

philnik wrote:
> You probably want to `#ifdef` this based on Clang 16/17.
Yeah I noticed that when I uploaded the diff and the CI started the libc++ CI 
instead of Clang.

For now I'll undo this hunk and will do that in a different patch. That way I 
can test with the Clang CI.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149553/new/

https://reviews.llvm.org/D149553

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D147844: [clang][Sema]Print diagnostic warning about precedence when integer expression is used without parentheses in an conditional operator expression

2023-04-22 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

One suggestion for the commit message either use `[[maybe_unused]]` or 
`-Wno-unused` that way the unrelated messages aren't shown in the commit 
message.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147844/new/

https://reviews.llvm.org/D147844

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D147844: Emit warning when implicit cast from int to bool happens in an conditional operator expression

2023-04-21 Thread Mark de Wever via Phabricator via cfe-commits
Mordante accepted this revision.
Mordante added a comment.

I too am not really convinced by all changes in libc++. On the other hand I 
don't think the change make the libc++ code looking bad. So I don't feel a 
reason to reject the libc++ changes.

I don't like the commit message, there's only a title and a bug report. Please 
add a bit more information in the message, with an example of code that now 
gives a diagnostic.

Note I only reviewed the libc++ changes, I leave the clang part to 
@aaron.ballman.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147844/new/

https://reviews.llvm.org/D147844

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D144331: [libc++][format] Implements formatter thread::id.

2023-04-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked an inline comment as done.
Mordante added inline comments.



Comment at: 
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/parse.pass.cpp:49
+  std::same_as auto it = 
formatter.parse(parse_ctx);
+  assert(it == fmt.end() - (!fmt.empty() && fmt.back() == '}'));
+}

ldionne wrote:
> This seems a bit clever to me. Can we pass the expected end position as a 
> parameter to the function explicitly? So this would look like `it == 
> fmt.begin() + offset`. If you have this pattern in other places, I'm OK to 
> land the patch as-is but we could have a simple patch to change all of them.
See D147885


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144331/new/

https://reviews.llvm.org/D144331

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-08 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments.



Comment at: libcxx/include/__type_traits/is_equality_comparable.h:46
 template 
-struct __is_trivially_equality_comparable
+struct __libcpp_is_trivially_equality_comparable
 : integral_constant Mordante wrote:
> > This does not magically use the builtin right? Does the patch miss that 
> > parts that use the builtin or is that a followup? If it's a followup I 
> > would prefer move the libc++ code changes of this patch to a separate 
> > review.
> No, it doesn't magically use the builtin. I plan to do that in a follow-up. 
> These changes are required though, since clang grabs the name with this patch.
But it would still be possible to have these libc++ changes in a separate 
review and commit them separately. I would say the libc++ changes are quite 
trivial and can be landed quite quickly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147175/new/

https://reviews.llvm.org/D147175

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D144331: [libc++][format] Implements formatter thread::id.

2023-04-08 Thread Mark de Wever via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG88622aabf107: [libc++][format] Implements formatter 
thread::id. (authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144331/new/

https://reviews.llvm.org/D144331

Files:
  libcxx/docs/FeatureTestMacroTable.rst
  libcxx/docs/ReleaseNotes.rst
  libcxx/docs/Status/Cxx2b.rst
  libcxx/docs/Status/Cxx2bPapers.csv
  libcxx/docs/Status/FormatPaper.csv
  libcxx/include/__format/parser_std_format_spec.h
  libcxx/include/__threading_support
  libcxx/include/thread
  libcxx/include/version
  libcxx/test/libcxx/transitive_includes/cxx03.csv
  libcxx/test/libcxx/transitive_includes/cxx11.csv
  libcxx/test/libcxx/transitive_includes/cxx14.csv
  libcxx/test/libcxx/transitive_includes/cxx17.csv
  libcxx/test/libcxx/transitive_includes/cxx20.csv
  libcxx/test/libcxx/transitive_includes/cxx2b.csv
  
libcxx/test/std/language.support/support.limits/support.limits.general/thread.version.compile.pass.cpp
  
libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.format.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.tests.h
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.vformat.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/parse.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
  
libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
  libcxx/utils/generate_feature_test_macro_components.py

Index: libcxx/utils/generate_feature_test_macro_components.py
===
--- libcxx/utils/generate_feature_test_macro_components.py
+++ libcxx/utils/generate_feature_test_macro_components.py
@@ -327,6 +327,13 @@
 "test_suite_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
 "libcxx_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
 "unimplemented": True,
+  }, {
+"name": "__cpp_lib_formatters",
+"values": { "c++2b": 202302 },
+"headers": ["stacktrace", "thread"],
+"test_suite_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
+"libcxx_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
+"unimplemented": True,
   }, {
 "name": "__cpp_lib_forward_like",
 "values": { "c++2b": 202207 },
Index: libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
===
--- libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
+++ libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
@@ -175,7 +175,8 @@
 // Tests for P1636 Formatters for library types
 //
 // The paper hasn't been voted in so currently all formatters are disabled.
-// TODO validate whether the test is correct after the paper has been accepted.
+// Note the paper has been abandoned, the types are kept since other papers may
+// introduce these formatters.
 template 
 void test_P1636() {
   assert_is_not_formattable, CharT>();
@@ -191,7 +192,7 @@
 assert_is_not_formattable, CharT>();
 #endif
 #ifndef TEST_HAS_NO_THREADS
-  assert_is_not_formattable();
+  assert_is_formattable();
 #endif
   assert_is_not_formattable, CharT>();
 }
Index: libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
===
--- libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
+++ libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
@@ -9,6 +9,9 @@
 // UNSUPPORTED: no-threads
 // UNSUPPORTED: no-localization
 
+// TODO FMT This test should not require std::to_chars(floating-point)
+// XFAIL: availability-fp_to_chars-missing
+
 // 
 
 // class thread::id
@@ -18,16 +21,38 @@
 // operator<<(basic_ostream& out, thread::id id);
 
 #include 
+#include 
 #include 
 #include 
 
+#include "make_string.h"
 #include "test_macros.h"
 
-int main(int, char**)
-{
-std::thread::id id0 = std::this_thread::get_id();
-std::ostringstream os;
-os << id0;
+template 
+static void test() {
+  std::thread::id id0 = std::this_thread::get_id();
+  std::basic_ostringstream os;
+  os << id0;
+
+#if TEST_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+  // C++23 added a formatter spe

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-08 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

I mainly glossed over the patch and didn't do a real review.




Comment at: clang/lib/AST/ASTContext.cpp:2672
+const RecordDecl *RD,
+bool CheckIfTriviallyCOpyable) 
{
   assert(RD->isUnion() && "Must be union type");





Comment at: libcxx/include/__type_traits/is_equality_comparable.h:46
 template 
-struct __is_trivially_equality_comparable
+struct __libcpp_is_trivially_equality_comparable
 : integral_constanthttps://reviews.llvm.org/D147175/new/

https://reviews.llvm.org/D147175

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D146986: Downgrade reserved module identifier error into a warning

2023-04-08 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

Sorry I was not available earlier. Thanks for working on this. LGTM but one 
remark.




Comment at: clang/docs/ReleaseNotes.rst:92
+  `_ and allows easier
+  building of precompiled modules. This diagnostic may be strengthened into an
+  error again in the future once there is a less fragile way to mark a module

Note this is about the standard modules, which are not precompiled per se.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146986/new/

https://reviews.llvm.org/D146986

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D144331: [libc++][format] Implements formatter thread::id.

2023-04-08 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 511875.
Mordante added a comment.

CI fixes


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144331/new/

https://reviews.llvm.org/D144331

Files:
  libcxx/docs/FeatureTestMacroTable.rst
  libcxx/docs/ReleaseNotes.rst
  libcxx/docs/Status/Cxx2b.rst
  libcxx/docs/Status/Cxx2bPapers.csv
  libcxx/docs/Status/FormatPaper.csv
  libcxx/include/__format/parser_std_format_spec.h
  libcxx/include/__threading_support
  libcxx/include/thread
  libcxx/include/version
  libcxx/test/libcxx/transitive_includes/cxx03.csv
  libcxx/test/libcxx/transitive_includes/cxx11.csv
  libcxx/test/libcxx/transitive_includes/cxx14.csv
  libcxx/test/libcxx/transitive_includes/cxx17.csv
  libcxx/test/libcxx/transitive_includes/cxx20.csv
  libcxx/test/libcxx/transitive_includes/cxx2b.csv
  
libcxx/test/std/language.support/support.limits/support.limits.general/thread.version.compile.pass.cpp
  
libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.format.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.tests.h
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.vformat.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/parse.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
  
libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
  libcxx/utils/generate_feature_test_macro_components.py

Index: libcxx/utils/generate_feature_test_macro_components.py
===
--- libcxx/utils/generate_feature_test_macro_components.py
+++ libcxx/utils/generate_feature_test_macro_components.py
@@ -327,6 +327,13 @@
 "test_suite_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
 "libcxx_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
 "unimplemented": True,
+  }, {
+"name": "__cpp_lib_formatters",
+"values": { "c++2b": 202302 },
+"headers": ["stacktrace", "thread"],
+"test_suite_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
+"libcxx_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
+"unimplemented": True,
   }, {
 "name": "__cpp_lib_forward_like",
 "values": { "c++2b": 202207 },
Index: libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
===
--- libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
+++ libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
@@ -175,7 +175,8 @@
 // Tests for P1636 Formatters for library types
 //
 // The paper hasn't been voted in so currently all formatters are disabled.
-// TODO validate whether the test is correct after the paper has been accepted.
+// Note the paper has been abandoned, the types are kept since other papers may
+// introduce these formatters.
 template 
 void test_P1636() {
   assert_is_not_formattable, CharT>();
@@ -191,7 +192,7 @@
 assert_is_not_formattable, CharT>();
 #endif
 #ifndef TEST_HAS_NO_THREADS
-  assert_is_not_formattable();
+  assert_is_formattable();
 #endif
   assert_is_not_formattable, CharT>();
 }
Index: libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
===
--- libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
+++ libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
@@ -9,6 +9,9 @@
 // UNSUPPORTED: no-threads
 // UNSUPPORTED: no-localization
 
+// TODO FMT This test should not require std::to_chars(floating-point)
+// XFAIL: availability-fp_to_chars-missing
+
 // 
 
 // class thread::id
@@ -18,16 +21,38 @@
 // operator<<(basic_ostream& out, thread::id id);
 
 #include 
+#include 
 #include 
 #include 
 
+#include "make_string.h"
 #include "test_macros.h"
 
-int main(int, char**)
-{
-std::thread::id id0 = std::this_thread::get_id();
-std::ostringstream os;
-os << id0;
+template 
+static void test() {
+  std::thread::id id0 = std::this_thread::get_id();
+  std::basic_ostringstream os;
+  os << id0;
+
+#if TEST_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+  // C++23 added a formatter specialization for thread::id.
+  // This changed the requirement of ostream to have a
+  // [thread.thread.id]/2
+  //   The text representation for the cha

[PATCH] D144331: [libc++][format] Implements formatter thread::id.

2023-04-08 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 511865.
Mordante added a comment.
Herald added a subscriber: krytarowski.

CI fixes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144331/new/

https://reviews.llvm.org/D144331

Files:
  libcxx/docs/FeatureTestMacroTable.rst
  libcxx/docs/ReleaseNotes.rst
  libcxx/docs/Status/Cxx2b.rst
  libcxx/docs/Status/Cxx2bPapers.csv
  libcxx/docs/Status/FormatPaper.csv
  libcxx/include/__format/parser_std_format_spec.h
  libcxx/include/__threading_support
  libcxx/include/thread
  libcxx/include/version
  libcxx/test/libcxx/transitive_includes/cxx03.csv
  libcxx/test/libcxx/transitive_includes/cxx11.csv
  libcxx/test/libcxx/transitive_includes/cxx14.csv
  libcxx/test/libcxx/transitive_includes/cxx17.csv
  libcxx/test/libcxx/transitive_includes/cxx20.csv
  libcxx/test/libcxx/transitive_includes/cxx2b.csv
  
libcxx/test/std/language.support/support.limits/support.limits.general/thread.version.compile.pass.cpp
  
libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.format.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.tests.h
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.vformat.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/parse.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
  
libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
  libcxx/utils/generate_feature_test_macro_components.py

Index: libcxx/utils/generate_feature_test_macro_components.py
===
--- libcxx/utils/generate_feature_test_macro_components.py
+++ libcxx/utils/generate_feature_test_macro_components.py
@@ -327,6 +327,13 @@
 "test_suite_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
 "libcxx_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
 "unimplemented": True,
+  }, {
+"name": "__cpp_lib_formatters",
+"values": { "c++2b": 202302 },
+"headers": ["stacktrace", "thread"],
+"test_suite_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
+"libcxx_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
+"unimplemented": True,
   }, {
 "name": "__cpp_lib_forward_like",
 "values": { "c++2b": 202207 },
Index: libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
===
--- libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
+++ libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
@@ -175,7 +175,8 @@
 // Tests for P1636 Formatters for library types
 //
 // The paper hasn't been voted in so currently all formatters are disabled.
-// TODO validate whether the test is correct after the paper has been accepted.
+// Note the paper has been abandoned, the types are kept since other papers may
+// introduce these formatters.
 template 
 void test_P1636() {
   assert_is_not_formattable, CharT>();
@@ -191,7 +192,7 @@
 assert_is_not_formattable, CharT>();
 #endif
 #ifndef TEST_HAS_NO_THREADS
-  assert_is_not_formattable();
+  assert_is_formattable();
 #endif
   assert_is_not_formattable, CharT>();
 }
Index: libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
===
--- libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
+++ libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
@@ -9,6 +9,10 @@
 // UNSUPPORTED: no-threads
 // UNSUPPORTED: no-localization
 
+// TODO FMT This test should not require std::to_chars(floating-point)
+// This test requires std::to_chars(floating-point), which is in the dylib
+// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
+
 // 
 
 // class thread::id
@@ -18,16 +22,38 @@
 // operator<<(basic_ostream& out, thread::id id);
 
 #include 
+#include 
 #include 
 #include 
 
+#include "make_string.h"
 #include "test_macros.h"
 
-int main(int, char**)
-{
-std::thread::id id0 = std::this_thread::get_id();
-std::ostringstream os;
-os << id0;
+template 
+static void test() {
+  std::thread::id id0 = std::this_thread::get_id();
+  std::basic_ostringstream os;
+  os << id0;
+
+#if TEST_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+  /

[PATCH] D144331: [libc++][format] Implements formatter thread::id.

2023-04-07 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 511715.
Mordante added a comment.

CI fixes


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144331/new/

https://reviews.llvm.org/D144331

Files:
  libcxx/docs/FeatureTestMacroTable.rst
  libcxx/docs/ReleaseNotes.rst
  libcxx/docs/Status/Cxx2b.rst
  libcxx/docs/Status/Cxx2bPapers.csv
  libcxx/docs/Status/FormatPaper.csv
  libcxx/include/__format/parser_std_format_spec.h
  libcxx/include/__threading_support
  libcxx/include/thread
  libcxx/include/version
  libcxx/test/libcxx/transitive_includes/cxx03.csv
  libcxx/test/libcxx/transitive_includes/cxx11.csv
  libcxx/test/libcxx/transitive_includes/cxx14.csv
  libcxx/test/libcxx/transitive_includes/cxx17.csv
  libcxx/test/libcxx/transitive_includes/cxx20.csv
  libcxx/test/libcxx/transitive_includes/cxx2b.csv
  
libcxx/test/std/language.support/support.limits/support.limits.general/thread.version.compile.pass.cpp
  
libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.format.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.tests.h
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.vformat.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/parse.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
  
libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
  libcxx/utils/generate_feature_test_macro_components.py

Index: libcxx/utils/generate_feature_test_macro_components.py
===
--- libcxx/utils/generate_feature_test_macro_components.py
+++ libcxx/utils/generate_feature_test_macro_components.py
@@ -327,6 +327,13 @@
 "test_suite_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
 "libcxx_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
 "unimplemented": True,
+  }, {
+"name": "__cpp_lib_formatters",
+"values": { "c++2b": 202302 },
+"headers": ["stacktrace", "thread"],
+"test_suite_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
+"libcxx_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
+"unimplemented": True,
   }, {
 "name": "__cpp_lib_forward_like",
 "values": { "c++2b": 202207 },
Index: libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
===
--- libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
+++ libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
@@ -175,7 +175,8 @@
 // Tests for P1636 Formatters for library types
 //
 // The paper hasn't been voted in so currently all formatters are disabled.
-// TODO validate whether the test is correct after the paper has been accepted.
+// Note the paper has been abandoned, the types are kept since other papers may
+// introduce these formatters.
 template 
 void test_P1636() {
   assert_is_not_formattable, CharT>();
@@ -191,7 +192,7 @@
 assert_is_not_formattable, CharT>();
 #endif
 #ifndef TEST_HAS_NO_THREADS
-  assert_is_not_formattable();
+  assert_is_formattable();
 #endif
   assert_is_not_formattable, CharT>();
 }
Index: libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
===
--- libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
+++ libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
@@ -18,16 +18,38 @@
 // operator<<(basic_ostream& out, thread::id id);
 
 #include 
+#include 
 #include 
 #include 
 
+#include "make_string.h"
 #include "test_macros.h"
 
-int main(int, char**)
-{
-std::thread::id id0 = std::this_thread::get_id();
-std::ostringstream os;
-os << id0;
+template 
+static void test() {
+  std::thread::id id0 = std::this_thread::get_id();
+  std::basic_ostringstream os;
+  os << id0;
+
+#if TEST_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+  // C++23 added a formatter specialization for thread::id.
+  // This changed the requirement of ostream to have a
+  // [thread.thread.id]/2
+  //   The text representation for the character type charT of an object of
+  //   type thread::id is an unspecified sequence of charT ...
+  // This definition is used for both streaming and formatting.
+  //
+  // Test whether the output is identical.
+  std::basi

[PATCH] D144331: [libc++][format] Implements formatter thread::id.

2023-04-07 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 511709.
Mordante added a comment.

CI fixes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144331/new/

https://reviews.llvm.org/D144331

Files:
  libcxx/docs/FeatureTestMacroTable.rst
  libcxx/docs/ReleaseNotes.rst
  libcxx/docs/Status/Cxx2b.rst
  libcxx/docs/Status/Cxx2bPapers.csv
  libcxx/docs/Status/FormatPaper.csv
  libcxx/include/__format/parser_std_format_spec.h
  libcxx/include/__threading_support
  libcxx/include/thread
  libcxx/include/version
  libcxx/test/libcxx/transitive_includes/cxx03.csv
  libcxx/test/libcxx/transitive_includes/cxx11.csv
  libcxx/test/libcxx/transitive_includes/cxx14.csv
  libcxx/test/libcxx/transitive_includes/cxx17.csv
  libcxx/test/libcxx/transitive_includes/cxx20.csv
  libcxx/test/libcxx/transitive_includes/cxx2b.csv
  
libcxx/test/std/language.support/support.limits/support.limits.general/thread.version.compile.pass.cpp
  
libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.format.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.tests.h
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.vformat.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/parse.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
  
libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
  libcxx/utils/generate_feature_test_macro_components.py

Index: libcxx/utils/generate_feature_test_macro_components.py
===
--- libcxx/utils/generate_feature_test_macro_components.py
+++ libcxx/utils/generate_feature_test_macro_components.py
@@ -327,6 +327,13 @@
 "test_suite_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
 "libcxx_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
 "unimplemented": True,
+  }, {
+"name": "__cpp_lib_formatters",
+"values": { "c++2b": 202302 },
+"headers": ["stacktrace", "thread"],
+"test_suite_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
+"libcxx_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
+"unimplemented": True,
   }, {
 "name": "__cpp_lib_forward_like",
 "values": { "c++2b": 202207 },
Index: libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
===
--- libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
+++ libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
@@ -175,7 +175,8 @@
 // Tests for P1636 Formatters for library types
 //
 // The paper hasn't been voted in so currently all formatters are disabled.
-// TODO validate whether the test is correct after the paper has been accepted.
+// Note the paper has been abandoned, the types are kept since other papers may
+// introduce these formatters.
 template 
 void test_P1636() {
   assert_is_not_formattable, CharT>();
@@ -191,7 +192,7 @@
 assert_is_not_formattable, CharT>();
 #endif
 #ifndef TEST_HAS_NO_THREADS
-  assert_is_not_formattable();
+  assert_is_formattable();
 #endif
   assert_is_not_formattable, CharT>();
 }
Index: libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
===
--- libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
+++ libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
@@ -18,16 +18,38 @@
 // operator<<(basic_ostream& out, thread::id id);
 
 #include 
+#include 
 #include 
 #include 
 
+#include "make_string.h"
 #include "test_macros.h"
 
-int main(int, char**)
-{
-std::thread::id id0 = std::this_thread::get_id();
-std::ostringstream os;
-os << id0;
+template 
+static void test() {
+  std::thread::id id0 = std::this_thread::get_id();
+  std::basic_ostringstream os;
+  os << id0;
+
+#if TEST_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+  // C++23 added a formatter specialization for thread::id.
+  // This changed the requirement of ostream to have a
+  // [thread.thread.id]/2
+  //   The text representation for the character type charT of an object of
+  //   type thread::id is an unspecified sequence of charT ...
+  // This definition is used for both streaming and formatting.
+  //
+  // Test whether the output is identical.
+  std::bas

[PATCH] D144331: [libc++][format] Implements formatter thread::id.

2023-04-07 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 511705.
Mordante marked 2 inline comments as done.
Mordante added a comment.

Rebased, addresses review comment, and get a CI run.


Herald added a comment.

NOTE: Clang-Format Team Automated Review Comment

It looks like your clang-format review does not contain any unit tests, please 
try to ensure all code changes have a unit test (unless this is an `NFC` or 
refactoring, adding documentation etc..)

Add your unit tests in `clang/unittests/Format` and you can build with `ninja 
FormatTests`.  We recommend using the `verifyFormat(xxx)` format of unit tests 
rather than `EXPECT_EQ` as this will ensure you change is tolerant to random 
whitespace changes (see FormatTest.cpp as an example)

For situations where your change is altering the TokenAnnotator.cpp which can 
happen if you are trying to improve the annotation phase to ensure we are 
correctly identifying the type of a token, please add a token annotator test in 
`TokenAnnotatorTest.cpp`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144331/new/

https://reviews.llvm.org/D144331

Files:
  libcxx/docs/FeatureTestMacroTable.rst
  libcxx/docs/ReleaseNotes.rst
  libcxx/docs/Status/Cxx2b.rst
  libcxx/docs/Status/Cxx2bPapers.csv
  libcxx/docs/Status/FormatPaper.csv
  libcxx/include/__format/parser_std_format_spec.h
  libcxx/include/__threading_support
  libcxx/include/thread
  libcxx/include/version
  libcxx/test/libcxx/transitive_includes/cxx03.csv
  libcxx/test/libcxx/transitive_includes/cxx11.csv
  libcxx/test/libcxx/transitive_includes/cxx14.csv
  libcxx/test/libcxx/transitive_includes/cxx17.csv
  libcxx/test/libcxx/transitive_includes/cxx20.csv
  libcxx/test/libcxx/transitive_includes/cxx2b.csv
  
libcxx/test/std/language.support/support.limits/support.limits.general/thread.version.compile.pass.cpp
  
libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.format.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.tests.h
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.vformat.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/parse.pass.cpp
  
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
  
libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
  libcxx/utils/generate_feature_test_macro_components.py

Index: libcxx/utils/generate_feature_test_macro_components.py
===
--- libcxx/utils/generate_feature_test_macro_components.py
+++ libcxx/utils/generate_feature_test_macro_components.py
@@ -327,6 +327,13 @@
 "test_suite_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
 "libcxx_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
 "unimplemented": True,
+  }, {
+"name": "__cpp_lib_formatters",
+"values": { "c++2b": 202302 },
+"headers": ["stacktrace", "thread"],
+"test_suite_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
+"libcxx_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
+"unimplemented": True,
   }, {
 "name": "__cpp_lib_forward_like",
 "values": { "c++2b": 202207 },
Index: libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
===
--- libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
+++ libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
@@ -175,7 +175,8 @@
 // Tests for P1636 Formatters for library types
 //
 // The paper hasn't been voted in so currently all formatters are disabled.
-// TODO validate whether the test is correct after the paper has been accepted.
+// Note the paper has been abandoned, the types are kept since other papers may
+// introduce these formatters.
 template 
 void test_P1636() {
   assert_is_not_formattable, CharT>();
@@ -191,7 +192,7 @@
 assert_is_not_formattable, CharT>();
 #endif
 #ifndef TEST_HAS_NO_THREADS
-  assert_is_not_formattable();
+  assert_is_formattable();
 #endif
   assert_is_not_formattable, CharT>();
 }
Index: libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
===
--- libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp
+++ libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cp

[PATCH] D144331: [libc++][format] Implements formatter thread::id.

2023-04-07 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 4 inline comments as done.
Mordante added a comment.
Herald added projects: clang, clang-format.
Herald added a subscriber: cfe-commits.
Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay.

Thanks for the review!




Comment at: 
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/format.functions.tests.h:17
+template 
+void format_tests(TestFunction check, ExceptionTest check_exception) {
+  // Note the output of std::thread::id is unspecified. The output text is the

ldionne wrote:
> ```
> std::stringstream s; s << id;
> assert(s.str() == std::format("{}", id);
> ```
As discussed this change is already done in `stream.pass.cpp`.



Comment at: 
libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/stream.pass.cpp:27
 #include "test_macros.h"
 
+template 

ldionne wrote:
> While we're at it, can we also test the output stream version on an empty 
> `std::thread::id`?
Based on [thread.thread.id]/1
```
An object of type thread​::​id provides a unique identifier for each thread of 
execution and a single distinct value for all thread objects that do not 
represent a thread of execution ([thread.thread.class]).
Each thread of execution has an associated thread​::​id object that is not 
equal to the thread​::​id object of any other thread of execution and that is 
not equal to the thread​::​id object of any thread object that does not 
represent threads of execution.
```
That value is unspecified and may differ between implementations; I expect it 
will be different.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144331/new/

https://reviews.llvm.org/D144331

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D144328: [libc++][format][chrono] Addresses LWG3842.

2023-04-07 Thread Mark de Wever via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcf07b882e2c1: [libc++][format][chrono] Addresses LWG3842. 
(authored by Mordante).
Herald added projects: clang, clang-format.
Herald added a subscriber: cfe-commits.
Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay.

Changed prior to commit:
  https://reviews.llvm.org/D144328?vs=498582&id=511700#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144328/new/

https://reviews.llvm.org/D144328

Files:
  libcxx/docs/Status/Cxx2bIssues.csv


Index: libcxx/docs/Status/Cxx2bIssues.csv
===
--- libcxx/docs/Status/Cxx2bIssues.csv
+++ libcxx/docs/Status/Cxx2bIssues.csv
@@ -266,7 +266,7 @@
 "`3834 `__","Missing ``constexpr`` for 
``std::intmax_t`` math functions in ","February 2023","","",""
 "`3839 `__","``range_formatter``'s 
``set_separator``, ``set_brackets``, and ``underlying`` functions should be 
``noexcept``","February 2023","|Complete|","17.0","|format|"
 "`3841 `__"," should not be ""all 
freestanding""","February 2023","","",""
-"`3842 `__","Unclear wording for ``precision`` in 
``chrono-format-spec``","February 2023","","","|format|"
+"`3842 `__","Unclear wording for ``precision`` in 
``chrono-format-spec``","February 2023","|Complete|","16.0","|format|"
 "`3848 `__","``adjacent_view``, 
``adjacent_transform_view`` and ``slide_view`` missing ``base`` 
accessor","February 2023","","","|ranges|"
 "`3849 `__","``cartesian_product_view::iterator``'s 
default constructor is overconstrained","February 2023","","","|ranges|"
 "`3850 `__","``views::as_const`` on 
``empty_view`` should return ``empty_view``","February 
2023","","","|ranges|"


Index: libcxx/docs/Status/Cxx2bIssues.csv
===
--- libcxx/docs/Status/Cxx2bIssues.csv
+++ libcxx/docs/Status/Cxx2bIssues.csv
@@ -266,7 +266,7 @@
 "`3834 `__","Missing ``constexpr`` for ``std::intmax_t`` math functions in ","February 2023","","",""
 "`3839 `__","``range_formatter``'s ``set_separator``, ``set_brackets``, and ``underlying`` functions should be ``noexcept``","February 2023","|Complete|","17.0","|format|"
 "`3841 `__"," should not be ""all freestanding""","February 2023","","",""
-"`3842 `__","Unclear wording for ``precision`` in ``chrono-format-spec``","February 2023","","","|format|"
+"`3842 `__","Unclear wording for ``precision`` in ``chrono-format-spec``","February 2023","|Complete|","16.0","|format|"
 "`3848 `__","``adjacent_view``, ``adjacent_transform_view`` and ``slide_view`` missing ``base`` accessor","February 2023","","","|ranges|"
 "`3849 `__","``cartesian_product_view::iterator``'s default constructor is overconstrained","February 2023","","","|ranges|"
 "`3850 `__","``views::as_const`` on ``empty_view`` should return ``empty_view``","February 2023","","","|ranges|"
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D146240: [libc++][format] Use granularized charconv.

2023-04-07 Thread Mark de Wever via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG57e20cab5a1d: [libc++][format] Use granularized charconv. 
(authored by Mordante).
Herald added projects: clang, clang-format.
Herald added a subscriber: cfe-commits.
Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146240/new/

https://reviews.llvm.org/D146240

Files:
  libcxx/include/__format/formatter_floating_point.h
  libcxx/include/__format/formatter_integral.h
  libcxx/include/__format/formatter_output.h
  libcxx/include/chrono
  libcxx/test/libcxx/transitive_includes/cxx03.csv
  libcxx/test/libcxx/transitive_includes/cxx11.csv
  libcxx/test/libcxx/transitive_includes/cxx14.csv
  libcxx/test/libcxx/transitive_includes/cxx17.csv
  libcxx/test/libcxx/transitive_includes/cxx20.csv
  libcxx/test/libcxx/transitive_includes/cxx2b.csv

Index: libcxx/test/libcxx/transitive_includes/cxx2b.csv
===
--- libcxx/test/libcxx/transitive_includes/cxx2b.csv
+++ libcxx/test/libcxx/transitive_includes/cxx2b.csv
@@ -68,7 +68,6 @@
 charconv initializer_list
 charconv limits
 chrono array
-chrono charconv
 chrono cmath
 chrono compare
 chrono cstddef
@@ -227,7 +226,7 @@
 filesystem system_error
 filesystem version
 format array
-format charconv
+format cmath
 format cstddef
 format cstdint
 format cstdlib
Index: libcxx/test/libcxx/transitive_includes/cxx20.csv
===
--- libcxx/test/libcxx/transitive_includes/cxx20.csv
+++ libcxx/test/libcxx/transitive_includes/cxx20.csv
@@ -326,7 +326,7 @@
 filesystem type_traits
 filesystem version
 format array
-format charconv
+format cmath
 format cstddef
 format cstdint
 format cstdlib
Index: libcxx/test/libcxx/transitive_includes/cxx17.csv
===
--- libcxx/test/libcxx/transitive_includes/cxx17.csv
+++ libcxx/test/libcxx/transitive_includes/cxx17.csv
@@ -319,7 +319,7 @@
 filesystem type_traits
 filesystem version
 format array
-format charconv
+format cmath
 format cstddef
 format cstdint
 format cstdlib
Index: libcxx/test/libcxx/transitive_includes/cxx14.csv
===
--- libcxx/test/libcxx/transitive_includes/cxx14.csv
+++ libcxx/test/libcxx/transitive_includes/cxx14.csv
@@ -319,7 +319,7 @@
 filesystem type_traits
 filesystem version
 format array
-format charconv
+format cmath
 format cstddef
 format cstdint
 format cstdlib
Index: libcxx/test/libcxx/transitive_includes/cxx11.csv
===
--- libcxx/test/libcxx/transitive_includes/cxx11.csv
+++ libcxx/test/libcxx/transitive_includes/cxx11.csv
@@ -317,7 +317,7 @@
 filesystem type_traits
 filesystem version
 format array
-format charconv
+format cmath
 format cstddef
 format cstdint
 format cstdlib
Index: libcxx/test/libcxx/transitive_includes/cxx03.csv
===
--- libcxx/test/libcxx/transitive_includes/cxx03.csv
+++ libcxx/test/libcxx/transitive_includes/cxx03.csv
@@ -317,7 +317,7 @@
 filesystem type_traits
 filesystem version
 format array
-format charconv
+format cmath
 format cstddef
 format cstdint
 format cstdlib
Index: libcxx/include/chrono
===
--- libcxx/include/chrono
+++ libcxx/include/chrono
@@ -797,4 +797,8 @@
 #  include 
 #endif
 
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER == 20
+#  include 
+#endif
+
 #endif // _LIBCPP_CHRONO
Index: libcxx/include/__format/formatter_output.h
===
--- libcxx/include/__format/formatter_output.h
+++ libcxx/include/__format/formatter_output.h
@@ -14,9 +14,12 @@
 #include <__algorithm/ranges_fill_n.h>
 #include <__algorithm/ranges_for_each.h>
 #include <__algorithm/ranges_transform.h>
+#include <__charconv/to_chars_integral.h>
+#include <__charconv/to_chars_result.h>
 #include <__chrono/statically_widen.h>
 #include <__concepts/same_as.h>
 #include <__config>
+#include <__errc>
 #include <__format/buffer.h>
 #include <__format/concepts.h>
 #include <__format/escaped_output_table.h>
@@ -29,7 +32,6 @@
 #include <__type_traits/make_unsigned.h>
 #include <__utility/move.h>
 #include <__utility/unreachable.h>
-#include 
 #include 
 #include 
 #include 
Index: libcxx/include/__format/formatter_integral.h
===
--- libcxx/include/__format/formatter_integral.h
+++ libcxx/include/__format/formatter_integral.h
@@ -10,9 +10,13 @@
 #ifndef _LIBCPP___FORMAT_FORMATTER_INTEGRAL_H
 #define _LIBCPP___FORMAT_FORMATTER_INTEGRAL_H
 
+#include <__charconv/to_chars_integral.h>

[PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-03-04 Thread Mark de Wever via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG44c6b905f852: [CMake] Bumps minimum version to 3.20.0. 
(authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

Files:
  bolt/runtime/CMakeLists.txt
  clang/CMakeLists.txt
  clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/lib/Decimal/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  libc/CMakeLists.txt
  libc/examples/hello_world/CMakeLists.txt
  libclc/CMakeLists.txt
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt
  libunwind/CMakeLists.txt
  libunwind/src/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm-libgcc/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/CMake.rst
  llvm/docs/GettingStarted.rst
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  mlir/examples/standalone/CMakeLists.txt
  openmp/CMakeLists.txt
  openmp/cmake/DetectTestCompiler/CMakeLists.txt
  openmp/docs/SupportAndFAQ.rst
  openmp/libompd/src/CMakeLists.txt
  openmp/libomptarget/plugins/remote/src/CMakeLists.txt
  openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
  openmp/tools/Modules/FindOpenMPTarget.cmake
  openmp/tools/Modules/README.rst
  polly/CMakeLists.txt
  pstl/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,12 +1,5 @@
 # This file handles building LLVM runtime sub-projects.
-cmake_minimum_required(VERSION 3.13.4)
-if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-  message(WARNING
-"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-"minimum version of CMake required to build LLVM will become 3.20.0, and "
-"using an older CMake will become an error. Please upgrade your CMake to "
-"at least 3.20.0 now to avoid issues in the future!")
-endif()
+cmake_minimum_required(VERSION 3.20.0)
 project(Runtimes C CXX ASM)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
Index: pstl/CMakeLists.txt
===
--- pstl/CMakeLists.txt
+++ pstl/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #
 #===--===##
-cmake_minimum_required(VERSION 3.13.4)
+cmake_minimum_required(VERSION 3.20.0)
 
 set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
 file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -1,14 +1,7 @@
 # Check if this is a in tree build.
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
-  cmake_minimum_required(VERSION 3.13.4)
-  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-message(WARNING
-  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-  "minimum version of CMake required to build LLVM will become 3.20.0, and "
-  "using an older CMake will become an error. Please upgrade your CMake to "
-  "at least 3.20.0 now to avoid issues in the future!")
-  endif()
+  cmake_minimum_required(VERSION 3.20.0)
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/tools/Modules/README.rst
===
--- openmp/tools/Modules/README.rst
+++ openmp/tools/Modules/README.rst
@@ -26,7 +26,7 @@
 
 .. code-block:: cmake
 
-  cmake_minimum_required(VERSION 3.13.4)
+  cmake_minimum_required(VERSION 3.20.0)
   project(offloadTest VERSION 1.0 LANGUAGES CXX)
 
   list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
@@ -37,7 +37,7 @@
   target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX)
   target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)
 
-Using this module requires at least CMake version 3.13.4. Supported languages
+Using this module requires at least CMake version 3.20.0. Supported languages
 are C and C++ with Fortran support planned in the future. If your application
 requires building for a specific device architecture you can set the
 ``OpenMPTarget__ARCH=`` variable. Compiler support is best for
Index: openmp/tools/Modules/FindOpenMPTarget.cmake
===
--- openmp/tools/Modules/FindOpenMPTarget.cmake
+++ openmp/tools/Modules/FindOpenMPTarget.cmake
@@ -79,7 +79,7 @@
 # TODO: Test more compilers
 
 cmake_policy(PUSH)
-cmake_policy(

[PATCH] D144894: [clang] Documents clang-scan-deps requirements.

2023-02-28 Thread Mark de Wever via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8dbeb41f8ebd: [clang] Documents clang-scan-deps 
requirements. (authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144894/new/

https://reviews.llvm.org/D144894

Files:
  clang/docs/StandardCPlusPlusModules.rst


Index: clang/docs/StandardCPlusPlusModules.rst
===
--- clang/docs/StandardCPlusPlusModules.rst
+++ clang/docs/StandardCPlusPlusModules.rst
@@ -1033,6 +1033,12 @@
 
   $ clang-scan-deps -format=p1689 -- /clang++ 
-std=c++20 impl_part.cppm -c -o impl_part.o
 
+.. warning::
+
+   The ``/clang++`` should point to the real
+   binary and not to a symlink. If it points to a symlink the include paths
+   will not be correctly resolved.
+
 And we'll get:
 
 .. code-block:: text


Index: clang/docs/StandardCPlusPlusModules.rst
===
--- clang/docs/StandardCPlusPlusModules.rst
+++ clang/docs/StandardCPlusPlusModules.rst
@@ -1033,6 +1033,12 @@
 
   $ clang-scan-deps -format=p1689 -- /clang++ -std=c++20 impl_part.cppm -c -o impl_part.o
 
+.. warning::
+
+   The ``/clang++`` should point to the real
+   binary and not to a symlink. If it points to a symlink the include paths
+   will not be correctly resolved.
+
 And we'll get:
 
 .. code-block:: text
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D144894: [clang] Documents clang-scan-deps requirements.

2023-02-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision.
Mordante added a reviewer: ChuanqiXu.
Herald added a project: All.
Mordante requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This was discussed in https://llvm.org/PR61006.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144894

Files:
  clang/docs/StandardCPlusPlusModules.rst


Index: clang/docs/StandardCPlusPlusModules.rst
===
--- clang/docs/StandardCPlusPlusModules.rst
+++ clang/docs/StandardCPlusPlusModules.rst
@@ -1033,6 +1033,12 @@
 
   $ clang-scan-deps -format=p1689 -- /clang++ 
-std=c++20 impl_part.cppm -c -o impl_part.o
 
+.. warning::
+
+   The ``/clang++`` should point to the real
+   binary and not to a symlink. If it points to a symlink the include paths
+   will not be correctly resolved.
+
 And we'll get:
 
 .. code-block:: text


Index: clang/docs/StandardCPlusPlusModules.rst
===
--- clang/docs/StandardCPlusPlusModules.rst
+++ clang/docs/StandardCPlusPlusModules.rst
@@ -1033,6 +1033,12 @@
 
   $ clang-scan-deps -format=p1689 -- /clang++ -std=c++20 impl_part.cppm -c -o impl_part.o
 
+.. warning::
+
+   The ``/clang++`` should point to the real
+   binary and not to a symlink. If it points to a symlink the include paths
+   will not be correctly resolved.
+
 And we'll get:
 
 .. code-block:: text
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-02-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 500547.
Mordante added a comment.

Rebased to test CI.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

Files:
  bolt/runtime/CMakeLists.txt
  clang/CMakeLists.txt
  clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/lib/Decimal/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  libc/CMakeLists.txt
  libc/examples/hello_world/CMakeLists.txt
  libclc/CMakeLists.txt
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt
  libunwind/CMakeLists.txt
  libunwind/src/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm-libgcc/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/CMake.rst
  llvm/docs/GettingStarted.rst
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  mlir/examples/standalone/CMakeLists.txt
  openmp/CMakeLists.txt
  openmp/cmake/DetectTestCompiler/CMakeLists.txt
  openmp/docs/SupportAndFAQ.rst
  openmp/libompd/src/CMakeLists.txt
  openmp/libomptarget/plugins/remote/src/CMakeLists.txt
  openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
  openmp/tools/Modules/FindOpenMPTarget.cmake
  openmp/tools/Modules/README.rst
  polly/CMakeLists.txt
  pstl/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,12 +1,5 @@
 # This file handles building LLVM runtime sub-projects.
-cmake_minimum_required(VERSION 3.13.4)
-if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-  message(WARNING
-"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-"minimum version of CMake required to build LLVM will become 3.20.0, and "
-"using an older CMake will become an error. Please upgrade your CMake to "
-"at least 3.20.0 now to avoid issues in the future!")
-endif()
+cmake_minimum_required(VERSION 3.20.0)
 project(Runtimes C CXX ASM)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
Index: pstl/CMakeLists.txt
===
--- pstl/CMakeLists.txt
+++ pstl/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #
 #===--===##
-cmake_minimum_required(VERSION 3.13.4)
+cmake_minimum_required(VERSION 3.20.0)
 
 set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
 file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -1,14 +1,7 @@
 # Check if this is a in tree build.
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
-  cmake_minimum_required(VERSION 3.13.4)
-  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-message(WARNING
-  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-  "minimum version of CMake required to build LLVM will become 3.20.0, and "
-  "using an older CMake will become an error. Please upgrade your CMake to "
-  "at least 3.20.0 now to avoid issues in the future!")
-  endif()
+  cmake_minimum_required(VERSION 3.20.0)
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/tools/Modules/README.rst
===
--- openmp/tools/Modules/README.rst
+++ openmp/tools/Modules/README.rst
@@ -26,7 +26,7 @@
 
 .. code-block:: cmake
 
-  cmake_minimum_required(VERSION 3.13.4)
+  cmake_minimum_required(VERSION 3.20.0)
   project(offloadTest VERSION 1.0 LANGUAGES CXX)
 
   list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
@@ -37,7 +37,7 @@
   target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX)
   target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)
 
-Using this module requires at least CMake version 3.13.4. Supported languages
+Using this module requires at least CMake version 3.20.0. Supported languages
 are C and C++ with Fortran support planned in the future. If your application
 requires building for a specific device architecture you can set the
 ``OpenMPTarget__ARCH=`` variable. Compiler support is best for
Index: openmp/tools/Modules/FindOpenMPTarget.cmake
===
--- openmp/tools/Modules/FindOpenMPTarget.cmake
+++ openmp/tools/Modules/FindOpenMPTarget.cmake
@@ -79,7 +79,7 @@
 # TODO: Test more compilers
 
 cmake_policy(PUSH)
-cmake_policy(VERSION 3.13.4)
+cmake_policy(VERSION 3.20.0)
 
 find_package(OpenMP ${OpenMPTarget_FIND_VERSION} REQUIRED)
 
Index: openmp/runtime/cm

[PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-02-22 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 499569.
Mordante added a comment.
Herald added a subscriber: mstorsjo.

Try to fix AIX CI.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

Files:
  bolt/runtime/CMakeLists.txt
  clang/CMakeLists.txt
  clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/lib/Decimal/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  libc/CMakeLists.txt
  libc/examples/hello_world/CMakeLists.txt
  libclc/CMakeLists.txt
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt
  libunwind/CMakeLists.txt
  libunwind/src/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm-libgcc/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/CMake.rst
  llvm/docs/GettingStarted.rst
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  mlir/examples/standalone/CMakeLists.txt
  openmp/CMakeLists.txt
  openmp/cmake/DetectTestCompiler/CMakeLists.txt
  openmp/docs/SupportAndFAQ.rst
  openmp/libompd/src/CMakeLists.txt
  openmp/libomptarget/plugins/remote/src/CMakeLists.txt
  openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
  openmp/tools/Modules/FindOpenMPTarget.cmake
  openmp/tools/Modules/README.rst
  polly/CMakeLists.txt
  pstl/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,12 +1,5 @@
 # This file handles building LLVM runtime sub-projects.
-cmake_minimum_required(VERSION 3.13.4)
-if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-  message(WARNING
-"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-"minimum version of CMake required to build LLVM will become 3.20.0, and "
-"using an older CMake will become an error. Please upgrade your CMake to "
-"at least 3.20.0 now to avoid issues in the future!")
-endif()
+cmake_minimum_required(VERSION 3.20.0)
 project(Runtimes C CXX ASM)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
Index: pstl/CMakeLists.txt
===
--- pstl/CMakeLists.txt
+++ pstl/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #
 #===--===##
-cmake_minimum_required(VERSION 3.13.4)
+cmake_minimum_required(VERSION 3.20.0)
 
 set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
 file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -1,14 +1,7 @@
 # Check if this is a in tree build.
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
-  cmake_minimum_required(VERSION 3.13.4)
-  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-message(WARNING
-  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-  "minimum version of CMake required to build LLVM will become 3.20.0, and "
-  "using an older CMake will become an error. Please upgrade your CMake to "
-  "at least 3.20.0 now to avoid issues in the future!")
-  endif()
+  cmake_minimum_required(VERSION 3.20.0)
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/tools/Modules/README.rst
===
--- openmp/tools/Modules/README.rst
+++ openmp/tools/Modules/README.rst
@@ -26,7 +26,7 @@
 
 .. code-block:: cmake
 
-  cmake_minimum_required(VERSION 3.13.4)
+  cmake_minimum_required(VERSION 3.20.0)
   project(offloadTest VERSION 1.0 LANGUAGES CXX)
 
   list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
@@ -37,7 +37,7 @@
   target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX)
   target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)
 
-Using this module requires at least CMake version 3.13.4. Supported languages
+Using this module requires at least CMake version 3.20.0. Supported languages
 are C and C++ with Fortran support planned in the future. If your application
 requires building for a specific device architecture you can set the
 ``OpenMPTarget__ARCH=`` variable. Compiler support is best for
Index: openmp/tools/Modules/FindOpenMPTarget.cmake
===
--- openmp/tools/Modules/FindOpenMPTarget.cmake
+++ openmp/tools/Modules/FindOpenMPTarget.cmake
@@ -79,7 +79,7 @@
 # TODO: Test more compilers
 
 cmake_policy(PUSH)
-cmake_policy(VERSION 3.13.4)
+cmake_policy(VERSION 3.20.0)
 
 find_package(OpenMP ${OpenMPTarget_FIND_VERSION} 

[PATCH] D144497: [clang][doc] Removes obsolete comment.

2023-02-22 Thread Mark de Wever via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa7b6978285c1: [clang][doc] Removes obsolete comment. 
(authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144497/new/

https://reviews.llvm.org/D144497

Files:
  clang/docs/StandardCPlusPlusModules.rst


Index: clang/docs/StandardCPlusPlusModules.rst
===
--- clang/docs/StandardCPlusPlusModules.rst
+++ clang/docs/StandardCPlusPlusModules.rst
@@ -603,16 +603,6 @@
 
 For higher level support for proposals, you could visit 
https://clang.llvm.org/cxx_status.html.
 
-Support for clang-scan-deps
-~~~
-
-The support for clang-scan-deps may be the most urgent problem for modules now.
-Without the support for clang-scan-deps, it's hard to involve build systems.
-This means that users could only play with modules through makefiles or by 
writing a parser by hand.
-It blocks more uses for modules, which will block more defect reports or 
requirements.
-
-This is tracked in: https://github.com/llvm/llvm-project/issues/51792.
-
 Ambiguous deduction guide
 ~
 


Index: clang/docs/StandardCPlusPlusModules.rst
===
--- clang/docs/StandardCPlusPlusModules.rst
+++ clang/docs/StandardCPlusPlusModules.rst
@@ -603,16 +603,6 @@
 
 For higher level support for proposals, you could visit https://clang.llvm.org/cxx_status.html.
 
-Support for clang-scan-deps
-~~~
-
-The support for clang-scan-deps may be the most urgent problem for modules now.
-Without the support for clang-scan-deps, it's hard to involve build systems.
-This means that users could only play with modules through makefiles or by writing a parser by hand.
-It blocks more uses for modules, which will block more defect reports or requirements.
-
-This is tracked in: https://github.com/llvm/llvm-project/issues/51792.
-
 Ambiguous deduction guide
 ~
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-02-21 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision.
Mordante added reviewers: bollu, tstellar, mehdi_amini, MaskRay, ChuanqiXu, 
to268, kparzysz, thieta, tschuett, mgorny, stellaraccident, mizvekov, ldionne, 
jdoerfert, phosek.
Herald added subscribers: libc-commits, libcxx-commits, Moerafaat, zero9178, 
Enna1, bzcheeseman, ayermolo, sdasgup3, wenzhicui, wrengr, cota, teijeong, 
rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, jvesely, Joonsoo, 
liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle, 
thopre, whisperity.
Herald added a reviewer: rafauler.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a reviewer: NoQ.
Herald added projects: libunwind, libc-project, Flang, All.
Herald added a reviewer: libunwind.
Mordante added reviewers: libc++ vendors, clang-vendors.
Mordante published this revision for review.
Herald added subscribers: llvm-commits, openmp-commits, lldb-commits, 
Sanitizers, cfe-commits, yota9, stephenneuendorffer, nicolasvasilache.
Herald added projects: clang, Sanitizers, LLDB, libc++, OpenMP, libc++abi, 
MLIR, LLVM.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.

This partly undoes D137724 .

This change has been discussed on discourse
https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-cmake-version/66193

Note this does not remove work-arounds for older CMake versions, that
will be done in followup patches.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144509

Files:
  bolt/runtime/CMakeLists.txt
  clang/CMakeLists.txt
  clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/lib/Decimal/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  libc/CMakeLists.txt
  libc/examples/hello_world/CMakeLists.txt
  libclc/CMakeLists.txt
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt
  libunwind/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm-libgcc/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/CMake.rst
  llvm/docs/GettingStarted.rst
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  mlir/examples/standalone/CMakeLists.txt
  openmp/CMakeLists.txt
  openmp/cmake/DetectTestCompiler/CMakeLists.txt
  openmp/docs/SupportAndFAQ.rst
  openmp/libompd/src/CMakeLists.txt
  openmp/libomptarget/plugins/remote/src/CMakeLists.txt
  openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
  openmp/tools/Modules/FindOpenMPTarget.cmake
  openmp/tools/Modules/README.rst
  polly/CMakeLists.txt
  pstl/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,12 +1,5 @@
 # This file handles building LLVM runtime sub-projects.
-cmake_minimum_required(VERSION 3.13.4)
-if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-  message(WARNING
-"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-"minimum version of CMake required to build LLVM will become 3.20.0, and "
-"using an older CMake will become an error. Please upgrade your CMake to "
-"at least 3.20.0 now to avoid issues in the future!")
-endif()
+cmake_minimum_required(VERSION 3.20.0)
 project(Runtimes C CXX ASM)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
Index: pstl/CMakeLists.txt
===
--- pstl/CMakeLists.txt
+++ pstl/CMakeLists.txt
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #
 #===--===##
-cmake_minimum_required(VERSION 3.13.4)
+cmake_minimum_required(VERSION 3.20.0)
 
 set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h")
 file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$")
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -1,14 +1,7 @@
 # Check if this is a in tree build.
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
-  cmake_minimum_required(VERSION 3.13.4)
-  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
-message(WARNING
-  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
-  "minimum version of CMake required to build LLVM will become 3.20.0, and "
-  "using an older CMake will become an error. Please upgrade your CMake to "
-  "at least 3.20.0 now to avoid issues in the future!")
-  endif()
+  cmake_minimum_required(VERSION 3.20.0)
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/tools/Modules/README.rst
===
--- openmp/tools/Modules/README.r

[PATCH] D144497: [clang][doc] Removes obsolete comment.

2023-02-21 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision.
Mordante added a reviewer: ChuanqiXu.
Herald added a project: All.
Mordante requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

After reading about the documentation improvements on LLVM weekly this
part seems obsolete.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144497

Files:
  clang/docs/StandardCPlusPlusModules.rst


Index: clang/docs/StandardCPlusPlusModules.rst
===
--- clang/docs/StandardCPlusPlusModules.rst
+++ clang/docs/StandardCPlusPlusModules.rst
@@ -603,16 +603,6 @@
 
 For higher level support for proposals, you could visit 
https://clang.llvm.org/cxx_status.html.
 
-Support for clang-scan-deps
-~~~
-
-The support for clang-scan-deps may be the most urgent problem for modules now.
-Without the support for clang-scan-deps, it's hard to involve build systems.
-This means that users could only play with modules through makefiles or by 
writing a parser by hand.
-It blocks more uses for modules, which will block more defect reports or 
requirements.
-
-This is tracked in: https://github.com/llvm/llvm-project/issues/51792.
-
 Ambiguous deduction guide
 ~
 


Index: clang/docs/StandardCPlusPlusModules.rst
===
--- clang/docs/StandardCPlusPlusModules.rst
+++ clang/docs/StandardCPlusPlusModules.rst
@@ -603,16 +603,6 @@
 
 For higher level support for proposals, you could visit https://clang.llvm.org/cxx_status.html.
 
-Support for clang-scan-deps
-~~~
-
-The support for clang-scan-deps may be the most urgent problem for modules now.
-Without the support for clang-scan-deps, it's hard to involve build systems.
-This means that users could only play with modules through makefiles or by writing a parser by hand.
-It blocks more uses for modules, which will block more defect reports or requirements.
-
-This is tracked in: https://github.com/llvm/llvm-project/issues/51792.
-
 Ambiguous deduction guide
 ~
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142690: [libc++] Fixes the Clang modular build.

2023-01-31 Thread Mark de Wever via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa7f8ddc4e2e3: [libc++] Fixes the Clang modular build. 
(authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142690/new/

https://reviews.llvm.org/D142690

Files:
  libcxx/include/module.modulemap.in


Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -758,13 +758,19 @@
   module derived_from   { private header 
"__concepts/derived_from.h" }
   module destructible   { private header 
"__concepts/destructible.h" }
   module different_from { private header 
"__concepts/different_from.h" }
-  module equality_comparable{ private header 
"__concepts/equality_comparable.h" }
+  module equality_comparable {
+private header "__concepts/equality_comparable.h"
+export type_traits.common_reference
+  }
   module invocable  { private header 
"__concepts/invocable.h" }
   module movable{ private header 
"__concepts/movable.h" }
   module predicate  { private header 
"__concepts/predicate.h" }
   module regular{ private header 
"__concepts/regular.h" }
   module relation   { private header 
"__concepts/relation.h" }
-  module same_as{ private header 
"__concepts/same_as.h" }
+  module same_as {
+private header "__concepts/same_as.h"
+export type_traits.is_same
+  }
   module semiregular{ private header 
"__concepts/semiregular.h" }
   module swappable  { private header 
"__concepts/swappable.h" }
   module totally_ordered{ private header 
"__concepts/totally_ordered.h" }
@@ -981,7 +987,11 @@
   module back_insert_iterator  { private header 
"__iterator/back_insert_iterator.h" }
   module bounded_iter  { private header 
"__iterator/bounded_iter.h" }
   module common_iterator   { private header 
"__iterator/common_iterator.h" }
-  module concepts  { private header "__iterator/concepts.h" }
+  module concepts {
+private header "__iterator/concepts.h"
+export concepts.equality_comparable
+export type_traits.common_reference
+  }
   module counted_iterator  { private header 
"__iterator/counted_iterator.h" }
   module data  { private header "__iterator/data.h" }
   module default_sentinel  { private header 
"__iterator/default_sentinel.h" }


Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -758,13 +758,19 @@
   module derived_from   { private header "__concepts/derived_from.h" }
   module destructible   { private header "__concepts/destructible.h" }
   module different_from { private header "__concepts/different_from.h" }
-  module equality_comparable{ private header "__concepts/equality_comparable.h" }
+  module equality_comparable {
+private header "__concepts/equality_comparable.h"
+export type_traits.common_reference
+  }
   module invocable  { private header "__concepts/invocable.h" }
   module movable{ private header "__concepts/movable.h" }
   module predicate  { private header "__concepts/predicate.h" }
   module regular{ private header "__concepts/regular.h" }
   module relation   { private header "__concepts/relation.h" }
-  module same_as{ private header "__concepts/same_as.h" }
+  module same_as {
+private header "__concepts/same_as.h"
+export type_traits.is_same
+  }
   module semiregular{ private header "__concepts/semiregular.h" }
   module swappable  { private header "__concepts/swappable.h" }
   module totally_ordered{ private header "__concepts/totally_ordered.h" }
@@ -981,7 +987,11 @@
   module back_insert_iterator  { private header "__iterator/back_insert_iterator.h" }
   module bounded_iter  { private header "__iterator/bounded_iter.h" }
   module common_iterator   { private header "__iterator/common_iterator.h" }
-  module concepts  { private header "__iterator/concepts.h" }
+  module concepts {
+private header "__iterator/concepts.h"
+export concepts.equality_comparable
+export type_traits.common_reference
+  }
   module counted_iterator  { private h

[PATCH] D142690: [libc++] Fixes the Clang modular build.

2023-01-28 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

https://buildkite.com/llvm-project/libcxx-ci/builds/18148 shows this patch 
fixes the Clang modular build.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142690/new/

https://reviews.llvm.org/D142690

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142690: [DRAFT][libc++] Fixes the Clang modular build.

2023-01-28 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 492999.
Mordante added a comment.

Undo CI changes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142690/new/

https://reviews.llvm.org/D142690

Files:
  libcxx/include/module.modulemap.in


Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -755,13 +755,19 @@
   module derived_from   { private header 
"__concepts/derived_from.h" }
   module destructible   { private header 
"__concepts/destructible.h" }
   module different_from { private header 
"__concepts/different_from.h" }
-  module equality_comparable{ private header 
"__concepts/equality_comparable.h" }
+  module equality_comparable {
+private header "__concepts/equality_comparable.h"
+export type_traits.common_reference
+  }
   module invocable  { private header 
"__concepts/invocable.h" }
   module movable{ private header 
"__concepts/movable.h" }
   module predicate  { private header 
"__concepts/predicate.h" }
   module regular{ private header 
"__concepts/regular.h" }
   module relation   { private header 
"__concepts/relation.h" }
-  module same_as{ private header 
"__concepts/same_as.h" }
+  module same_as {
+private header "__concepts/same_as.h"
+export type_traits.is_same
+  }
   module semiregular{ private header 
"__concepts/semiregular.h" }
   module swappable  { private header 
"__concepts/swappable.h" }
   module totally_ordered{ private header 
"__concepts/totally_ordered.h" }
@@ -979,7 +985,11 @@
   module back_insert_iterator  { private header 
"__iterator/back_insert_iterator.h" }
   module bounded_iter  { private header 
"__iterator/bounded_iter.h" }
   module common_iterator   { private header 
"__iterator/common_iterator.h" }
-  module concepts  { private header "__iterator/concepts.h" }
+  module concepts {
+private header "__iterator/concepts.h"
+export concepts.equality_comparable
+export type_traits.common_reference
+  }
   module counted_iterator  { private header 
"__iterator/counted_iterator.h" }
   module data  { private header "__iterator/data.h" }
   module default_sentinel  { private header 
"__iterator/default_sentinel.h" }


Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -755,13 +755,19 @@
   module derived_from   { private header "__concepts/derived_from.h" }
   module destructible   { private header "__concepts/destructible.h" }
   module different_from { private header "__concepts/different_from.h" }
-  module equality_comparable{ private header "__concepts/equality_comparable.h" }
+  module equality_comparable {
+private header "__concepts/equality_comparable.h"
+export type_traits.common_reference
+  }
   module invocable  { private header "__concepts/invocable.h" }
   module movable{ private header "__concepts/movable.h" }
   module predicate  { private header "__concepts/predicate.h" }
   module regular{ private header "__concepts/regular.h" }
   module relation   { private header "__concepts/relation.h" }
-  module same_as{ private header "__concepts/same_as.h" }
+  module same_as {
+private header "__concepts/same_as.h"
+export type_traits.is_same
+  }
   module semiregular{ private header "__concepts/semiregular.h" }
   module swappable  { private header "__concepts/swappable.h" }
   module totally_ordered{ private header "__concepts/totally_ordered.h" }
@@ -979,7 +985,11 @@
   module back_insert_iterator  { private header "__iterator/back_insert_iterator.h" }
   module bounded_iter  { private header "__iterator/bounded_iter.h" }
   module common_iterator   { private header "__iterator/common_iterator.h" }
-  module concepts  { private header "__iterator/concepts.h" }
+  module concepts {
+private header "__iterator/concepts.h"
+export concepts.equality_comparable
+export type_traits.common_reference
+  }
   module counted_iterator  { private header "__iterator/counted_iterator.h" }
   module data  { private header "__iterator/data.h" }
   module default

[PATCH] D142690: [DRAFT][libc++] Fixes the Clang modular build.

2023-01-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 492834.
Mordante added a comment.

Removes uninteded include.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142690/new/

https://reviews.llvm.org/D142690

Files:
  libcxx/include/module.modulemap.in
  libcxx/utils/ci/generate-buildkite-pipeline


Index: libcxx/utils/ci/generate-buildkite-pipeline
===
--- libcxx/utils/ci/generate-buildkite-pipeline
+++ libcxx/utils/ci/generate-buildkite-pipeline
@@ -19,8 +19,4 @@
   CLANG_CHANGED=true
 fi
 
-if [[ "${CLANG_CHANGED}" == "true" && "${LIBCXX_CHANGED}" != "true" ]]; then
-  cat libcxx/utils/ci/buildkite-pipeline-clang.yml
-else
-  cat libcxx/utils/ci/buildkite-pipeline.yml
-fi
+cat libcxx/utils/ci/buildkite-pipeline-clang.yml
Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -755,13 +755,19 @@
   module derived_from   { private header 
"__concepts/derived_from.h" }
   module destructible   { private header 
"__concepts/destructible.h" }
   module different_from { private header 
"__concepts/different_from.h" }
-  module equality_comparable{ private header 
"__concepts/equality_comparable.h" }
+  module equality_comparable {
+private header "__concepts/equality_comparable.h"
+export type_traits.common_reference
+  }
   module invocable  { private header 
"__concepts/invocable.h" }
   module movable{ private header 
"__concepts/movable.h" }
   module predicate  { private header 
"__concepts/predicate.h" }
   module regular{ private header 
"__concepts/regular.h" }
   module relation   { private header 
"__concepts/relation.h" }
-  module same_as{ private header 
"__concepts/same_as.h" }
+  module same_as {
+private header "__concepts/same_as.h"
+export type_traits.is_same
+  }
   module semiregular{ private header 
"__concepts/semiregular.h" }
   module swappable  { private header 
"__concepts/swappable.h" }
   module totally_ordered{ private header 
"__concepts/totally_ordered.h" }
@@ -979,7 +985,11 @@
   module back_insert_iterator  { private header 
"__iterator/back_insert_iterator.h" }
   module bounded_iter  { private header 
"__iterator/bounded_iter.h" }
   module common_iterator   { private header 
"__iterator/common_iterator.h" }
-  module concepts  { private header "__iterator/concepts.h" }
+  module concepts {
+private header "__iterator/concepts.h"
+export concepts.equality_comparable
+export type_traits.common_reference
+  }
   module counted_iterator  { private header 
"__iterator/counted_iterator.h" }
   module data  { private header "__iterator/data.h" }
   module default_sentinel  { private header 
"__iterator/default_sentinel.h" }


Index: libcxx/utils/ci/generate-buildkite-pipeline
===
--- libcxx/utils/ci/generate-buildkite-pipeline
+++ libcxx/utils/ci/generate-buildkite-pipeline
@@ -19,8 +19,4 @@
   CLANG_CHANGED=true
 fi
 
-if [[ "${CLANG_CHANGED}" == "true" && "${LIBCXX_CHANGED}" != "true" ]]; then
-  cat libcxx/utils/ci/buildkite-pipeline-clang.yml
-else
-  cat libcxx/utils/ci/buildkite-pipeline.yml
-fi
+cat libcxx/utils/ci/buildkite-pipeline-clang.yml
Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -755,13 +755,19 @@
   module derived_from   { private header "__concepts/derived_from.h" }
   module destructible   { private header "__concepts/destructible.h" }
   module different_from { private header "__concepts/different_from.h" }
-  module equality_comparable{ private header "__concepts/equality_comparable.h" }
+  module equality_comparable {
+private header "__concepts/equality_comparable.h"
+export type_traits.common_reference
+  }
   module invocable  { private header "__concepts/invocable.h" }
   module movable{ private header "__concepts/movable.h" }
   module predicate  { private header "__concepts/predicate.h" }
   module regular{ private header "__concepts/regular.h" }
   module relation   { private header "__concepts/relation.h" }
-  module same_as{ private header "__concepts/same_as.h" }
+  module same_as {
+private hea

[PATCH] D142690: [DRAFT][libc++] Fixes the Clang modular build.

2023-01-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 492828.
Mordante added a comment.

Finalized patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142690/new/

https://reviews.llvm.org/D142690

Files:
  clang/lib/run_the_clang_CI
  libcxx/include/module.modulemap.in


Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -755,13 +755,19 @@
   module derived_from   { private header 
"__concepts/derived_from.h" }
   module destructible   { private header 
"__concepts/destructible.h" }
   module different_from { private header 
"__concepts/different_from.h" }
-  module equality_comparable{ private header 
"__concepts/equality_comparable.h" }
+  module equality_comparable {
+private header "__concepts/equality_comparable.h"
+export type_traits.common_reference
+  }
   module invocable  { private header 
"__concepts/invocable.h" }
   module movable{ private header 
"__concepts/movable.h" }
   module predicate  { private header 
"__concepts/predicate.h" }
   module regular{ private header 
"__concepts/regular.h" }
   module relation   { private header 
"__concepts/relation.h" }
-  module same_as{ private header 
"__concepts/same_as.h" }
+  module same_as {
+private header "__concepts/same_as.h"
+export type_traits.is_same
+  }
   module semiregular{ private header 
"__concepts/semiregular.h" }
   module swappable  { private header 
"__concepts/swappable.h" }
   module totally_ordered{ private header 
"__concepts/totally_ordered.h" }
@@ -979,7 +985,11 @@
   module back_insert_iterator  { private header 
"__iterator/back_insert_iterator.h" }
   module bounded_iter  { private header 
"__iterator/bounded_iter.h" }
   module common_iterator   { private header 
"__iterator/common_iterator.h" }
-  module concepts  { private header "__iterator/concepts.h" }
+  module concepts {
+private header "__iterator/concepts.h"
+export concepts.equality_comparable
+export type_traits.common_reference
+  }
   module counted_iterator  { private header 
"__iterator/counted_iterator.h" }
   module data  { private header "__iterator/data.h" }
   module default_sentinel  { private header 
"__iterator/default_sentinel.h" }
@@ -1416,7 +1426,10 @@
 module extent  { private header 
"__type_traits/extent.h" }
 module has_unique_object_representation{ private header 
"__type_traits/has_unique_object_representation.h" }
 module has_virtual_destructor  { private header 
"__type_traits/has_virtual_destructor.h" }
-module integral_constant   { private header 
"__type_traits/integral_constant.h" }
+module integral_constant   {
+  private header "__type_traits/integral_constant.h"
+  export type_traits.common_reference
+}
 module is_abstract { private header 
"__type_traits/is_abstract.h" }
 module is_aggregate{ private header 
"__type_traits/is_aggregate.h" }
 module is_allocator{ private header 
"__type_traits/is_allocator.h" }


Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -755,13 +755,19 @@
   module derived_from   { private header "__concepts/derived_from.h" }
   module destructible   { private header "__concepts/destructible.h" }
   module different_from { private header "__concepts/different_from.h" }
-  module equality_comparable{ private header "__concepts/equality_comparable.h" }
+  module equality_comparable {
+private header "__concepts/equality_comparable.h"
+export type_traits.common_reference
+  }
   module invocable  { private header "__concepts/invocable.h" }
   module movable{ private header "__concepts/movable.h" }
   module predicate  { private header "__concepts/predicate.h" }
   module regular{ private header "__concepts/regular.h" }
   module relation   { private header "__concepts/relation.h" }
-  module same_as{ private header "__concepts/same_as.h" }
+  module same_as {
+private header "__concepts/same_as.h"
+export type_traits.is_same
+  }
   module semiregular{ priv

[PATCH] D142690: [DRAFT][libc++] Fixes the Clang modular build.

2023-01-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 492779.
Mordante added a comment.

Rebased and improve fixes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142690/new/

https://reviews.llvm.org/D142690

Files:
  clang/lib/run_the_clang_CI
  libcxx/include/module.modulemap.in
  libcxx/utils/ci/generate-buildkite-pipeline


Index: libcxx/utils/ci/generate-buildkite-pipeline
===
--- libcxx/utils/ci/generate-buildkite-pipeline
+++ libcxx/utils/ci/generate-buildkite-pipeline
@@ -19,7 +19,7 @@
   CLANG_CHANGED=true
 fi
 
-if [[ "${CLANG_CHANGED}" == "true" && "${LIBCXX_CHANGED}" != "true" ]]; then
+if [[ "${CLANG_CHANGED}" == "true" ]]; then
   cat libcxx/utils/ci/buildkite-pipeline-clang.yml
 else
   cat libcxx/utils/ci/buildkite-pipeline.yml
Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -755,13 +755,19 @@
   module derived_from   { private header 
"__concepts/derived_from.h" }
   module destructible   { private header 
"__concepts/destructible.h" }
   module different_from { private header 
"__concepts/different_from.h" }
-  module equality_comparable{ private header 
"__concepts/equality_comparable.h" }
+  module equality_comparable {
+private header "__concepts/equality_comparable.h"
+export type_traits.common_reference
+  }
   module invocable  { private header 
"__concepts/invocable.h" }
   module movable{ private header 
"__concepts/movable.h" }
   module predicate  { private header 
"__concepts/predicate.h" }
   module regular{ private header 
"__concepts/regular.h" }
   module relation   { private header 
"__concepts/relation.h" }
-  module same_as{ private header 
"__concepts/same_as.h" }
+  module same_as {
+private header "__concepts/same_as.h"
+export type_traits.is_same
+  }
   module semiregular{ private header 
"__concepts/semiregular.h" }
   module swappable  { private header 
"__concepts/swappable.h" }
   module totally_ordered{ private header 
"__concepts/totally_ordered.h" }
@@ -979,7 +985,11 @@
   module back_insert_iterator  { private header 
"__iterator/back_insert_iterator.h" }
   module bounded_iter  { private header 
"__iterator/bounded_iter.h" }
   module common_iterator   { private header 
"__iterator/common_iterator.h" }
-  module concepts  { private header "__iterator/concepts.h" }
+  module concepts {
+private header "__iterator/concepts.h"
+export concepts.equality_comparable
+export type_traits.common_reference
+  }
   module counted_iterator  { private header 
"__iterator/counted_iterator.h" }
   module data  { private header "__iterator/data.h" }
   module default_sentinel  { private header 
"__iterator/default_sentinel.h" }
@@ -1416,7 +1426,10 @@
 module extent  { private header 
"__type_traits/extent.h" }
 module has_unique_object_representation{ private header 
"__type_traits/has_unique_object_representation.h" }
 module has_virtual_destructor  { private header 
"__type_traits/has_virtual_destructor.h" }
-module integral_constant   { private header 
"__type_traits/integral_constant.h" }
+module integral_constant   {
+  private header "__type_traits/integral_constant.h"
+  export type_traits.common_reference
+}
 module is_abstract { private header 
"__type_traits/is_abstract.h" }
 module is_aggregate{ private header 
"__type_traits/is_aggregate.h" }
 module is_allocator{ private header 
"__type_traits/is_allocator.h" }


Index: libcxx/utils/ci/generate-buildkite-pipeline
===
--- libcxx/utils/ci/generate-buildkite-pipeline
+++ libcxx/utils/ci/generate-buildkite-pipeline
@@ -19,7 +19,7 @@
   CLANG_CHANGED=true
 fi
 
-if [[ "${CLANG_CHANGED}" == "true" && "${LIBCXX_CHANGED}" != "true" ]]; then
+if [[ "${CLANG_CHANGED}" == "true" ]]; then
   cat libcxx/utils/ci/buildkite-pipeline-clang.yml
 else
   cat libcxx/utils/ci/buildkite-pipeline.yml
Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -755,13 +755,19 @@
   module derived_from   { private header "__concepts/derived_from.h" }
   module destructible   { private heade

[PATCH] D142690: [DRAFT][libc++] Fixes the Clang modular build.

2023-01-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 492648.
Mordante added a comment.
Herald added a subscriber: arichardson.

Fix CI run instead of libc++.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142690/new/

https://reviews.llvm.org/D142690

Files:
  clang/lib/run_the_clang_CI
  libcxx/include/module.modulemap.in
  libcxx/utils/ci/generate-buildkite-pipeline


Index: libcxx/utils/ci/generate-buildkite-pipeline
===
--- libcxx/utils/ci/generate-buildkite-pipeline
+++ libcxx/utils/ci/generate-buildkite-pipeline
@@ -19,7 +19,7 @@
   CLANG_CHANGED=true
 fi
 
-if [[ "${CLANG_CHANGED}" == "true" && "${LIBCXX_CHANGED}" != "true" ]]; then
+if [[ "${CLANG_CHANGED}" == "true" ]]; then
   cat libcxx/utils/ci/buildkite-pipeline-clang.yml
 else
   cat libcxx/utils/ci/buildkite-pipeline.yml
Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -1416,7 +1416,10 @@
 module extent  { private header 
"__type_traits/extent.h" }
 module has_unique_object_representation{ private header 
"__type_traits/has_unique_object_representation.h" }
 module has_virtual_destructor  { private header 
"__type_traits/has_virtual_destructor.h" }
-module integral_constant   { private header 
"__type_traits/integral_constant.h" }
+module integral_constant   {
+  private header "__type_traits/integral_constant.h"
+  export type_traits.common_reference
+}
 module is_abstract { private header 
"__type_traits/is_abstract.h" }
 module is_aggregate{ private header 
"__type_traits/is_aggregate.h" }
 module is_allocator{ private header 
"__type_traits/is_allocator.h" }


Index: libcxx/utils/ci/generate-buildkite-pipeline
===
--- libcxx/utils/ci/generate-buildkite-pipeline
+++ libcxx/utils/ci/generate-buildkite-pipeline
@@ -19,7 +19,7 @@
   CLANG_CHANGED=true
 fi
 
-if [[ "${CLANG_CHANGED}" == "true" && "${LIBCXX_CHANGED}" != "true" ]]; then
+if [[ "${CLANG_CHANGED}" == "true" ]]; then
   cat libcxx/utils/ci/buildkite-pipeline-clang.yml
 else
   cat libcxx/utils/ci/buildkite-pipeline.yml
Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -1416,7 +1416,10 @@
 module extent  { private header "__type_traits/extent.h" }
 module has_unique_object_representation{ private header "__type_traits/has_unique_object_representation.h" }
 module has_virtual_destructor  { private header "__type_traits/has_virtual_destructor.h" }
-module integral_constant   { private header "__type_traits/integral_constant.h" }
+module integral_constant   {
+  private header "__type_traits/integral_constant.h"
+  export type_traits.common_reference
+}
 module is_abstract { private header "__type_traits/is_abstract.h" }
 module is_aggregate{ private header "__type_traits/is_aggregate.h" }
 module is_allocator{ private header "__type_traits/is_allocator.h" }
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142690: [DRAFT][libc++] Fixes the Clang modular build.

2023-01-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments.



Comment at: libcxx/include/module.modulemap.in:1421
+  private header "__type_traits/integral_constant.h"
+  export type_traits.common_reference
+}

Note this looks wrong from libc++'s perspective. When this "solves" the issue 
we need to investigate why it fixes it; I think the export belongs to a 
different header.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142690/new/

https://reviews.llvm.org/D142690

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142690: [DRAFT][libc++] Fixes the Clang modular build.

2023-01-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision.
Herald added a project: All.
Mordante requested review of this revision.
Herald added projects: clang, libc++.
Herald added subscribers: libcxx-commits, cfe-commits.
Herald added a reviewer: libc++.

This attempts to fix the issue introduced in 12cb1cb3720d 



Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142690

Files:
  clang/lib/run_the_clang_CI
  libcxx/include/module.modulemap.in


Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -1416,7 +1416,10 @@
 module extent  { private header 
"__type_traits/extent.h" }
 module has_unique_object_representation{ private header 
"__type_traits/has_unique_object_representation.h" }
 module has_virtual_destructor  { private header 
"__type_traits/has_virtual_destructor.h" }
-module integral_constant   { private header 
"__type_traits/integral_constant.h" }
+module integral_constant   {
+  private header "__type_traits/integral_constant.h"
+  export type_traits.common_reference
+}
 module is_abstract { private header 
"__type_traits/is_abstract.h" }
 module is_aggregate{ private header 
"__type_traits/is_aggregate.h" }
 module is_allocator{ private header 
"__type_traits/is_allocator.h" }


Index: libcxx/include/module.modulemap.in
===
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -1416,7 +1416,10 @@
 module extent  { private header "__type_traits/extent.h" }
 module has_unique_object_representation{ private header "__type_traits/has_unique_object_representation.h" }
 module has_virtual_destructor  { private header "__type_traits/has_virtual_destructor.h" }
-module integral_constant   { private header "__type_traits/integral_constant.h" }
+module integral_constant   {
+  private header "__type_traits/integral_constant.h"
+  export type_traits.common_reference
+}
 module is_abstract { private header "__type_traits/is_abstract.h" }
 module is_aggregate{ private header "__type_traits/is_aggregate.h" }
 module is_allocator{ private header "__type_traits/is_allocator.h" }
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142500: Fix one of the regressions found in revert of concept sugaring

2023-01-25 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D142500#4080317 , @erichkeane 
wrote:

> In D142500#4080302 , @erichkeane 
> wrote:
>
>> In D142500#4080279 , @Mordante 
>> wrote:
>>
>>> In D142500#4079669 , @erichkeane 
>>> wrote:
>>>
 In D142500#4079135 , @Mordante 
 wrote:

> FYI I tested this patch with libc++ and as expected it does not fix the 
> libc++ modular build ICE.

 A man can dream, eh?  Thank you for testing it!  I'm having troubles 
 getting it reproduced unfortunately.
>>>
>>> Of course you can dream, and it would have been great if it had resolved 
>>> the issue.
>>>
>>> Do you have trouble with libc++ or your hardware?
>>
>> I was having trouble with libc++ and the config.  The cmake you'd given me 
>> was either used poorly, or just didn't work.

:-(

> However, I was able to reproduce it with just the zip file you gave me.
>
> Woops, it wasn't you :)  It was @mstorsjo who gave me the zip file I can 
> repro from :)

That's great!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142500/new/

https://reviews.llvm.org/D142500

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142500: Fix one of the regressions found in revert of concept sugaring

2023-01-25 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D142500#4079669 , @erichkeane 
wrote:

> In D142500#4079135 , @Mordante 
> wrote:
>
>> FYI I tested this patch with libc++ and as expected it does not fix the 
>> libc++ modular build ICE.
>
> A man can dream, eh?  Thank you for testing it!  I'm having troubles getting 
> it reproduced unfortunately.

Of course you can dream, and it would have been great if it had resolved the 
issue.

Do you have trouble with libc++ or your hardware?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142500/new/

https://reviews.llvm.org/D142500

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142500: Fix one of the regressions found in revert of concept sugaring

2023-01-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

FYI I tested this patch with libc++ and as expected it does not fix the libc++ 
modular build ICE.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142500/new/

https://reviews.llvm.org/D142500

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142007: [NFC] Fix "form/from" typos

2023-01-22 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

Thanks for your contribution, I just landed this patch on your behalf.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142007/new/

https://reviews.llvm.org/D142007

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D142007: [NFC] Fix "form/from" typos

2023-01-22 Thread Mark de Wever via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG898b5c9f5e77: [NFC] Fix "form/from" typos 
(authored by pfusik, committed by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142007/new/

https://reviews.llvm.org/D142007

Files:
  clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
  libcxx/include/__format/extended_grapheme_cluster_table.h
  libcxx/utils/generate_extended_grapheme_cluster_table.py
  lldb/include/lldb/Host/File.h
  lldb/source/Plugins/CMakeLists.txt
  lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
  llvm/lib/Analysis/IVDescriptors.cpp
  llvm/lib/CodeGen/CodeGenPrepare.cpp
  llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
  llvm/test/DebugInfo/ARM/PR26163.ll
  llvm/tools/llvm-exegesis/lib/Clustering.cpp
  llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
  llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp
  mlir/lib/Dialect/Transform/IR/TransformDialect.cpp

Index: mlir/lib/Dialect/Transform/IR/TransformDialect.cpp
===
--- mlir/lib/Dialect/Transform/IR/TransformDialect.cpp
+++ mlir/lib/Dialect/Transform/IR/TransformDialect.cpp
@@ -74,7 +74,7 @@
 
 void transform::TransformDialect::mergeInPDLMatchHooks(
 llvm::StringMap &&constraintFns) {
-  // Steal the constraint functions form the given map.
+  // Steal the constraint functions from the given map.
   for (auto &it : constraintFns)
 pdlMatchHooks.registerConstraintFunction(it.getKey(), std::move(it.second));
 }
Index: llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp
===
--- llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp
+++ llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp
@@ -130,7 +130,7 @@
 }
 
 TEST(RandomIRBuilderTest, ShuffleVectorSink) {
-  // Check that we will never use shuffle vector mask as a sink form the
+  // Check that we will never use shuffle vector mask as a sink from the
   // unrelated operation.
 
   LLVMContext Ctx;
Index: llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
===
--- llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
+++ llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
@@ -6,7 +6,7 @@
 //
 //===--===//
 //
-// This test suite verifies basic MCJIT functionality when invoked form the C
+// This test suite verifies basic MCJIT functionality when invoked from the C
 // API.
 //
 //===--===//
Index: llvm/tools/llvm-exegesis/lib/Clustering.cpp
===
--- llvm/tools/llvm-exegesis/lib/Clustering.cpp
+++ llvm/tools/llvm-exegesis/lib/Clustering.cpp
@@ -314,7 +314,7 @@
   // Actually append to-be-moved points to the new cluster.
   UnstableCluster.PointIndices.insert(UnstableCluster.PointIndices.end(),
   it, OldCluster.PointIndices.end());
-  // And finally, remove "to-be-moved" points form the old cluster.
+  // And finally, remove "to-be-moved" points from the old cluster.
   OldCluster.PointIndices.erase(it, OldCluster.PointIndices.end());
   // Now, the old cluster may end up being empty, but let's just keep it
   // in whatever state it ended up. Purging empty clusters isn't worth it.
Index: llvm/test/DebugInfo/ARM/PR26163.ll
===
--- llvm/test/DebugInfo/ARM/PR26163.ll
+++ llvm/test/DebugInfo/ARM/PR26163.ll
@@ -17,7 +17,7 @@
 ; CHECK-NEXT: DW_AT_location (DW_OP_lit0, DW_OP_stack_value, DW_OP_piece 0x4)
 ; CHECK-NEXT: DW_AT_abstract_origin
 
-; Created form the following test case (PR26163) with
+; Created from the following test case (PR26163) with
 ; clang -cc1 -triple armv4t--freebsd11.0-gnueabi -emit-obj -debug-info-kind=standalone -O2 -x c test.c
 ;
 ; typedef	unsigned int	size_t;
Index: llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
===
--- llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
+++ llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
@@ -722,7 +722,7 @@
 
 /// Updates the operand at Idx in instruction Inst with the result of
 ///instruction Mat. If the instruction is a PHI node then special
-///handling for duplicate values form the same incoming basic block is
+///handling for duplicate values from the same incoming basic block is
 ///required.
 /// \return The update will always succeed, but the return value indicated if
 /// Mat was used for the update or not.
Index: ll

[PATCH] D142007: [NFC] Fix "form/from" typos

2023-01-22 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D142007#4071765 , @pfusik wrote:

> @ldionne Can you check it in?

Can you provide your name and email address to we can attribute the patch to 
you?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142007/new/

https://reviews.llvm.org/D142007

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

I just tested locally with the latest nightly build

  Debian clang version 16.0.0 
(++20230116071901+2563ad8ef1a8-1~exp1~20230116072002.532)
  Target: x86_64-pc-linux-gnu
  Thread model: posix
  InstalledDir: /usr/bin

and that passes the test that fails in the CI.

Can you test whether the issue occurs for you in HEAD without your patch.

@ldionne would it make sense to test the Clang CI in the scheduled build too, 
that would make pin-pointing a possible regression easier.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141954/new/

https://reviews.llvm.org/D141954

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

I see the current main pass for the module build in libc++. The error message 
seems different, from the message for missing parts of the module map. I'll dig 
a bit further to see whether I can find what's wrong.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141954/new/

https://reviews.llvm.org/D141954

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D141423: Trigger the Clang/libc++ CI pipeline even when libc++ has been modified

2023-01-13 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

Should this also fix the issue where the scheduled build sometimes picks the 
"clang build"?
For example https://buildkite.com/llvm-project/libcxx-ci/builds/17300 but I 
noticed to at other times too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141423/new/

https://reviews.llvm.org/D141423

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139986: [clang][TypePrinter] Teach isSubstitutedDefaultArgument about integral types

2022-12-31 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

I think it would be better to have a meeting to discuss this further instead of 
posting in this review. I propose to do it after everybody's back from their 
holidays. WDYT?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139986/new/

https://reviews.llvm.org/D139986

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139986: [clang][TypePrinter] Teach isSubstitutedDefaultArgument about integral types

2022-12-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added subscribers: erichkeane, ldionne, aaron.ballman.
Mordante added a comment.

In D139986#4017467 , @dblaikie wrote:

> In D139986#4008169 , @Mordante 
> wrote:
>
>> In D139986#4005997 , @dblaikie 
>> wrote:
>>
>>> In D139986#4003873 , @Mordante 
>>> wrote:
>>>
 In D139986#4001180 , @Michael137 
 wrote:

> Missed couple of test cases in libcxx
> About to fix those

 There were more breakage due to this patch, which I fixed in D140272 
 .

 Next time please don't commit patches when the pre-commit CI is red. This 
 build https://buildkite.com/llvm-project/libcxx-ci/builds/16118 shows the 
 patch will break libc++. These pre-commit CI jobs were added specifically 
 to aid the Clang developers to validate whether their changes break 
 libc++. Libc++ heavily relies on its pre-commit CI so breaking the CI has 
 a huge impact.
>
>
>
 Note that when libc++ breaks there might be other projects that use the 
 latest Clang HEAD that will be affected too. (Not likely with diagnostics, 
 but likely when the modular build fails.)

 When you have issues resolving the libc++ issues you can always reach out 
 to us for assistance.
>>>
>>> Perhaps these LibC++ tests shouldn't be testing/using clang warnings? 
>>> (could the warnings be turned off in the libc++ tests?)
>>
>> In the failing tests we want to make sure we marked a struct as 
>> `[[deprecated]]`.
>
> At least looking at 
> https://reviews.llvm.org/rG54d7c4dc870c5822df3d5ce538ad3936ac6405fe - that 
> could be made more robust to clang changes by perhaps using `// 
> expected-warning {{deprecated}}` - unlikely that the word deprecated will be 
> removed from a deprecation warning, or that we'll emit a deprecation warning 
> on some unrelated line from the usage. This would make the test more 
> resilient to phrasing/spelling changes without, imho, significantly reducing 
> the functionality of the test.
>
> Though even more generally, I could see a test being written to use `-Werror` 
> and various single uses of deprecated entities, checking that they're 
> rejected - though that'd probably slow things down too much (singel process 
> invocations for each deprecated entity) - so I'd say the above 
> (`{{deprecated}}`) is probably a fairly good balance of making the tests less 
> brittle while keeping them fast/functional.
>
> (for `locale.convenience` for instance - I think that test could be 
> simplified to name each type separately, rather than using them together - so 
> they're on separate lines. Or maybe you can separate them onto different 
> lines despite the nesting, splitting the outer templtae name over multiple 
> lines)

I don't see how that helps to validate whether we have the expected error or an 
error due to ill-formed code. For example just forgetting a semicolon.

>> In other tests we validate error messages to make sure things are ill-formed 
>> as mandated. We test the diagnostic to make sure the compilation fails for 
>> the expected reason and not a different compilation error. Do you have a 
>> suggestion how we can do that without checking Clang diagnostics?
>>
>> In general I consider it bad practice to commit code when the CI is red.
>
> My take on this is that, at least to my understanding, libc++ implemented 
> this CI without discussiong/buy-in from other LLVM subprojects that libc++ 
> depends on - that I'm not sure were/are willing to accept this extra 
> constraint on their development. It's not suitable to bring up a CI in that 
> way and then say "make sure you don't break this" - we didn't agree not to 
> break it. Especially with tests like these that could/should be written 
> differently to be less brittle. Perhaps I've misunderstood this & there is 
> more explicit buy-in from Clang developers/owners about this relationship 
> between the two subprojects?
>
> Generally prior to this it was up to libc++ folks to cleanup after upstream 
> project's breakage (like lldb still does, to some extent) - though buildbots, 
> etc, do provide llvm/clang contributors some chance to proactively provide 
> fixes.

This CI has been discussed with members of the Clang community. In the past 
I've spoken with @aaron.ballman. I know @erichkeane requested @ldionne to 
create this CI recently. (I wasn't present during this meeting.) I don't know 
whether or not the creation of this CI has been further communicated in the 
Clang community. Note that this CI is a benefit for Clang too. Some patches 
that break libc++, also break code in other external projects. This patch 
probably doesn't break external projects, but @erichkeane's D126907 
 was reverted several times due to b

[PATCH] D131963: [libc++] Add custom clang-tidy checks

2022-12-23 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments.



Comment at: libcxx/test/libcxx/clang_tidy.sh.cpp:15
 // TODO: run clang-tidy with modules enabled once they are supported
+// RUN: clang-tidy %s --warnings-as-errors=* -header-filter=.* 
--checks='-*,libcpp-*' 
--load=%{test-tools}/clang_tidy_checks/libcxx-tidy.plugin -- %{compile_flags} 
-fno-modules
 // RUN: clang-tidy %s --warnings-as-errors=* -header-filter=.* 
--config-file=%S/../../.clang-tidy -- -Wweak-vtables %{compile_flags} 
-fno-modules

I actually think it would be better to do this is a separate script.

Is there any documentation on how to run this test?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131963/new/

https://reviews.llvm.org/D131963

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139986: [clang][TypePrinter] Teach isSubstitutedDefaultArgument about integral types

2022-12-20 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D139986#4005997 , @dblaikie wrote:

> In D139986#4003873 , @Mordante 
> wrote:
>
>> In D139986#4001180 , @Michael137 
>> wrote:
>>
>>> Missed couple of test cases in libcxx
>>> About to fix those
>>
>> There were more breakage due to this patch, which I fixed in D140272 
>> .
>>
>> Next time please don't commit patches when the pre-commit CI is red. This 
>> build https://buildkite.com/llvm-project/libcxx-ci/builds/16118 shows the 
>> patch will break libc++. These pre-commit CI jobs were added specifically to 
>> aid the Clang developers to validate whether their changes break libc++. 
>> Libc++ heavily relies on its pre-commit CI so breaking the CI has a huge 
>> impact.
>> Note that when libc++ breaks there might be other projects that use the 
>> latest Clang HEAD that will be affected too. (Not likely with diagnostics, 
>> but likely when the modular build fails.)
>>
>> When you have issues resolving the libc++ issues you can always reach out to 
>> us for assistance.
>
> Perhaps these LibC++ tests shouldn't be testing/using clang warnings? (could 
> the warnings be turned off in the libc++ tests?)

In the failing tests we want to make sure we marked a struct as 
`[[deprecated]]`. In other tests we validate error messages to make sure things 
are ill-formed as mandated. We test the diagnostic to make sure the compilation 
fails for the expected reason and not a different compilation error. Do you 
have a suggestion how we can do that without checking Clang diagnostics?

In general I consider it bad practice to commit code when the CI is red.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139986/new/

https://reviews.llvm.org/D139986

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139986: [clang][TypePrinter] Teach isSubstitutedDefaultArgument about integral types

2022-12-18 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D139986#4001180 , @Michael137 
wrote:

> Missed couple of test cases in libcxx
> About to fix those

There were more breakage due to this patch, which I fixed in D140272 
.

Next time please don't commit patches when the pre-commit CI is red. This build 
https://buildkite.com/llvm-project/libcxx-ci/builds/16118 shows the patch will 
break libc++. These pre-commit CI jobs were added specifically to aid the Clang 
developers to validate whether their changes break libc++. Libc++ heavily 
relies on its pre-commit CI so breaking the CI has a huge impact.
Note that when libc++ breaks there might be other projects that use the latest 
Clang HEAD that will be affected too. (Not likely with diagnostics, but likely 
when the modular build fails.)

When you have issues resolving the libc++ issues you can always reach out to us 
for assistance.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139986/new/

https://reviews.llvm.org/D139986

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D137724: [CMake] Warn when the version is older than 3.20.0.

2022-12-11 Thread Mark de Wever via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Mordante marked an inline comment as done.
Closed by commit rGd40dc417389e: [CMake] Warn when the version is older than 
3.20.0. (authored by Mordante).

Changed prior to commit:
  https://reviews.llvm.org/D137724?vs=474295&id=481933#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137724/new/

https://reviews.llvm.org/D137724

Files:
  clang/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  openmp/CMakeLists.txt
  polly/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,5 +1,12 @@
 # This file handles building LLVM runtime sub-projects.
 cmake_minimum_required(VERSION 3.13.4)
+if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+  message(WARNING
+"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+"minimum version of CMake required to build LLVM will become 3.20.0, and "
+"using an older CMake will become an error. Please upgrade your CMake to "
+"at least 3.20.0 now to avoid issues in the future!")
+endif()
 project(Runtimes C CXX ASM)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -2,6 +2,13 @@
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
   cmake_minimum_required(VERSION 3.13.4)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING
+  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+  "minimum version of CMake required to build LLVM will become 3.20.0, and "
+  "using an older CMake will become an error. Please upgrade your CMake to "
+  "at least 3.20.0 now to avoid issues in the future!")
+  endif()
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/CMakeLists.txt
===
--- openmp/CMakeLists.txt
+++ openmp/CMakeLists.txt
@@ -12,6 +12,13 @@
 if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
   set(OPENMP_STANDALONE_BUILD TRUE)
   project(openmp C CXX)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING
+  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+  "minimum version of CMake required to build LLVM will become 3.20.0, and "
+  "using an older CMake will become an error. Please upgrade your CMake to "
+  "at least 3.20.0 now to avoid issues in the future!")
+  endif()
 endif()
 
 # Must go below project(..)
Index: mlir/CMakeLists.txt
===
--- mlir/CMakeLists.txt
+++ mlir/CMakeLists.txt
@@ -11,6 +11,13 @@
 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
   project(mlir)
   set(MLIR_STANDALONE_BUILD TRUE)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING
+  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+  "minimum version of CMake required to build LLVM will become 3.20.0, and "
+  "using an older CMake will become an error. Please upgrade your CMake to "
+  "at least 3.20.0 now to avoid issues in the future!")
+  endif()
 endif()
 
 # Must go below project(..)
Index: llvm/docs/ReleaseNotes.rst
===
--- llvm/docs/ReleaseNotes.rst
+++ llvm/docs/ReleaseNotes.rst
@@ -64,6 +64,17 @@
 * Apple Clang >= 10.0
 * Visual Studio 2019 >= 16.7
 
+With LLVM 16.x we will raise the version requirement of CMake used to build
+LLVM. The new requirements are as follows:
+
+* CMake >= 3.20.0
+
+In LLVM 16.x this requirement will be "soft", there will only be a diagnostic.
+
+With the release of LLVM 17.x this requirement will be hard and LLVM developers
+can start using CMake 3.20.0 features, making it impossible to build with older
+versions of CMake.
+
 Changes to the LLVM IR
 --
 
Index: llvm/CMakeLists.txt
===
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -1,6 +1,13 @@
 # See docs/CMake.html for instructions about how to build LLVM with CMake.
 
 cmake_minimum_required(VERSION 3.13.4)
+if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+  message(WARNING
+"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+"minimum version of CMake required to build LLVM w

[PATCH] D137724: [CMake] Warn when the version is older than 3.20.0.

2022-12-11 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked an inline comment as done.
Mordante added a comment.

Thanks for all reviews!

In D137724#3974764 , @thieta wrote:

> I think this is ready to land @Mordante or is there anything else missing?

No but I've been quite busy. I needed some time to find the list of buildbot 
owners to mail after landing this.




Comment at: clang/CMakeLists.txt:14
   set(CLANG_BUILT_STANDALONE TRUE)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING

mgorny wrote:
> I wonder if we could move this to `CMakePolicy.cmake`, though admittedly 
> you'd have to somehow avoid warning multiple times in in-tree builds.
Yes I prefer to keep it this way. The warning will be removed once 3.20.0 or 
newer is mandated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137724/new/

https://reviews.llvm.org/D137724

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D138042: [libc++] Trigger both Clang and libc++ CI when there are changes to both

2022-12-10 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

Sorry I overlooked this review. Based on the CI output it only runs the Clang 
CI right.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138042/new/

https://reviews.llvm.org/D138042

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139266: Headers: tweak inclusion condition for stdatomic.h

2022-12-06 Thread Mark de Wever via Phabricator via cfe-commits
Mordante accepted this revision.
Mordante added a comment.

LGTM after addressing @aaron.ballman's comments.




Comment at: clang/lib/Headers/stdatomic.h:21
+#if __STDC_HOSTED__ && __has_include_next()   
 \
+&& !(defined(_MSC_VER) && __cplusplus-0 < 202002l)
 # include_next 

compnerd wrote:
> Mordante wrote:
> > Is `__cplusplus-0` intentional? If so please add some comments how this 
> > differs from `__cplusplus`.
> > Since this is a C header we should test whether the macro exists before 
> > querying its value.
> Yes, that is intentional.  The `-0` is a trick!  That avoids the need to 
> check for the definition, because it will be evaluated to as the value of 
> `__cplusplus` or be `0` due to the expansion to CPP rules and `-0`.
Ah yes of course. I really prefer the current version without the trick.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139266/new/

https://reviews.llvm.org/D139266

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139266: Headers: tweak inclusion condition for stdatomic.h

2022-12-04 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

Thanks for the patch!




Comment at: clang/lib/Headers/stdatomic.h:21
+#if __STDC_HOSTED__ && __has_include_next()   
 \
+&& !(defined(_MSC_VER) && __cplusplus-0 < 202002l)
 # include_next 

Is `__cplusplus-0` intentional? If so please add some comments how this differs 
from `__cplusplus`.
Since this is a C header we should test whether the macro exists before 
querying its value.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139266/new/

https://reviews.llvm.org/D139266

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D133249: [libc++] Documents details of the pre-commit CI.

2022-11-10 Thread Mark de Wever via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Mordante marked an inline comment as done.
Closed by commit rG0c111dd86fff: [libc++] Documents details of the pre-commit 
CI. (authored by Mordante).

Changed prior to commit:
  https://reviews.llvm.org/D133249?vs=460827&id=474582#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133249/new/

https://reviews.llvm.org/D133249

Files:
  clang/www/hacking.html
  libcxx/docs/Contributing.rst
  libcxx/docs/index.rst

Index: libcxx/docs/index.rst
===
--- libcxx/docs/index.rst
+++ libcxx/docs/index.rst
@@ -93,6 +93,7 @@
   Further, both projects are apparently abandoned: STLport 5.2.1 was
   released in Oct'08, and STDCXX 4.2.1 in May'08.
 
+.. _SupportedPlatforms:
 
 Platform and Compiler Support
 =
Index: libcxx/docs/Contributing.rst
===
--- libcxx/docs/Contributing.rst
+++ libcxx/docs/Contributing.rst
@@ -84,5 +84,136 @@
 Look for the failed build and select the ``artifacts`` tab. There, download the
 abilist for the platform, e.g.:
 
-* C++20 for the Linux platform.
-* MacOS C++20 for the Apple platform.
+* C++.
+* MacOS X86_64 and MacOS arm64 for the Apple platform.
+
+
+Pre-commit CI
+=
+
+Introduction
+
+
+Unlike most parts of the LLVM project, libc++ uses a pre-commit CI [#]_. This
+CI is hosted on `Buildkite `__ and
+the build results are visible in the review on Phabricator. Please make sure
+the CI is green before committing a patch.
+
+The CI tests libc++ for all :ref:`supported platforms `.
+The build is started for every diff uploaded to Phabricator. A complete CI run
+takes approximately one hour. To reduce the load:
+
+* The build is cancelled when a new diff for the same revision is uploaded.
+* The build is done in several stages and cancelled when a stage fails.
+
+Typically, the libc++ jobs use a Ubuntu Docker image. This image contains
+recent `nightly builds `__ of all supported versions of
+Clang and the current version of the ``main`` branch. These versions of Clang
+are used to build libc++ and execute its tests.
+
+Unless specified otherwise, the configurations:
+
+* use a nightly build of the ``main`` branch of Clang,
+* execute the tests using the language C++. This is the version
+  "developed" by the C++ committee.
+
+.. note:: Updating the Clang nightly builds in the Docker image is a manual
+   process and is done at an irregular interval on purpose. When you need to
+   have the latest nightly build to test recent Clang changes, ask in the
+   ``#libcxx`` channel on `LLVM's Discord server
+   `__.
+
+.. [#] There's `LLVM Dev Meeting talk `__
+   explaining the benefits of libc++'s pre-commit CI.
+
+Builds
+--
+
+Below is a short description of the most interesting CI builds [#]_:
+
+* ``Format`` runs ``clang-format`` and uploads its output as an artifact. At the
+  moment this build is a soft error and doesn't fail the build.
+* ``Generated output`` runs the ``libcxx-generate-files`` build target and
+  tests for non-ASCII characters in libcxx. Some files are excluded since they
+  use Unicode, mainly tests. The output of these commands are uploaded as
+  artifact.
+* ``Documentation`` builds the documentation. (This is done early in the build
+  process since it is cheap to run.)
+* ``C++`` these build steps test the various C++ versions, making sure all
+  C++ language versions work with the changes made.
+* ``Clang `` these build steps test whether the changes work with all
+  supported Clang versions.
+* ``Booststrapping build`` builds Clang using the revision of the patch and
+  uses that Clang version to build and test libc++. This validates the current
+  Clang and lib++ are compatible.
+
+  When a crash occurs in this build, the crash reproducer is available as an
+  artifact.
+
+* ``Modular build`` tests libc++ using Clang modules [#]_.
+* ``GCC `` tests libc++ with the latest stable GCC version. Only C++11
+  and the latest C++ version are tested.
+* ``Santitizers`` tests libc++ using the Clang sanitizers.
+* ``Parts disabled`` tests libc++ with certain libc++ features disabled.
+* ``Windows`` tests libc++ using MinGW and clang-cl.
+* ``Apple`` tests libc++ on MacOS.
+* ``ARM`` tests libc++ on various Linux ARM platforms.
+* ``AIX`` tests libc++ on AIX.
+
+.. [#] Not all all steps are listed: steps are added and removed when the need
+   arises.
+.. [#] Clang modules are not the same as C++20's modules.
+
+Infrastructure
+--
+
+All files of the CI infrastructure are in the directory ``libcxx/utils/ci``.
+Note that quite a bit of this infrastructure is heavily Linux focused. This is
+the platform used by most of libc++

[PATCH] D133249: [libc++] Documents details of the pre-commit CI.

2022-11-10 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 6 inline comments as done.
Mordante added a comment.

Thanks for all feedback!




Comment at: clang/www/hacking.html:311-312
+  Unlike Clang, libc++ supports multiple versions of Clang. Therefore when a
+  patch changes the diagnostics it might be required to use a regex in the
+  "expected" tests to make it pass the CI.
+

aaron.ballman wrote:
> ldionne wrote:
> > Mordante wrote:
> > > Mordante wrote:
> > > > philnik wrote:
> > > > > aaron.ballman wrote:
> > > > > > Should we document the expectation that breaking libc++ due to 
> > > > > > conforming changes in Clang (in terms of diagnostics and bug fixes, 
> > > > > > not so much in terms of introducing new language extensions) are 
> > > > > > generally the responsibility of libc++ maintainers to address, but 
> > > > > > Clang contributors should attempt to reduce disruptions as much as 
> > > > > > possible by collaborating with libc++ maintainers when this 
> > > > > > situation comes up?
> > > > > That's definitely a good idea. Maybe mention that clang contributors 
> > > > > should ping the #libc group to get the attention of libc++ 
> > > > > contributors so we can prepare a follow-up patch or, if the author is 
> > > > > comfortable with it, also fix libc++ in the same patch (and hopefully 
> > > > > get fast approval). Most breakages should be relatively simple to fix.
> > > > I like the idea to collaborate more.
> > > > 
> > > > I want to give this some thought and especially how to word it. I want 
> > > > to avoid that it's seen as a carte blanche to commit Clang changes 
> > > > which break libc++. This would mean HEAD is broken and that's a huge 
> > > > issue for downstream users like Google who tend to follow HEAD closely.
> > > > 
> > > > I would prefer to use commandeering and instead of two patches where 
> > > > one leave HEAD in a broken state. Even if it's short it would make 
> > > > bi-secting harder. Personally I really dislike the idea of having 
> > > > commits that knowingly leave a repository in a broken state. It also 
> > > > doesn't align with the LLVM developer policy 
> > > > https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy 
> > > > ```
> > > > As a community, we strongly value having the tip of tree in a good 
> > > > state while allowing rapid iterative development. 
> > > > ```
> > > > 
> > > > Should we document the expectation that breaking libc++ due to 
> > > > conforming changes in Clang (in terms of diagnostics and bug fixes, not 
> > > > so much in terms of introducing new language extensions) are generally 
> > > > the responsibility of libc++ maintainers to address, but Clang 
> > > > contributors should attempt to reduce disruptions as much as possible 
> > > > by collaborating with libc++ maintainers when this situation comes up?
> > > 
> > > @aaron.ballman I have given this some thought. I think it would be best 
> > > to discuss this with some libc++ and Clang contributors/code owners. For 
> > > libc++ at least @ldionne should be present since he's the libc++ code 
> > > owner. I would like to be present too. After we have agreement we can 
> > > update this documentation accordingly.
> > I remember discussing this with @aaron.ballman.
> > 
> > I am 100% on-board with the notion that if Clang makes a legitimate 
> > conforming change and it breaks libc++ (most likely because we are doing 
> > something wrong, UB, or relying on Clang details), then it is *primarily* 
> > libc++'s responsibility to fix this ASAP. I also remember that we agreed it 
> > should be a collaborative effort, i.e. the Clang folks should try to help 
> > us understand the failure, and should be understanding if the fix on our 
> > side is really non-trivial. But, the bottom line is that if they change 
> > something and it breaks us because we're doing something wrong, it's our 
> > responsibility to fix our stuff ASAP to get the CI green again.
> > 
> > This is the same situation that we sometimes have with the LLDB data 
> > formatters, and I think the dynamics need to be the same there as well. If 
> > we break that because of a 100% legitimate change in libc++, our 
> > expectation is that they'll fix it ASAP, and their expectation is that 
> > we'll provide support as needed.
> > 
> > I think it would be useful to document that, since it technically departs 
> > from LLVM's usual policy of "revert when it breaks anything at all". And 
> > more generally speaking, I strongly think that this policy needs to be 
> > revisited, however that's beyond the scope of this documentation 
> > improvement.
> > I am 100% on-board with the notion that if Clang makes a legitimate 
> > conforming change and it breaks libc++ (most likely because we are doing 
> > something wrong, UB, or relying on Clang details), then it is *primarily* 
> > libc++'s responsibility to fix this ASAP. I also remember that we agreed it 
> > should be a collaborative effort, i.e. the Clang folks sho

[PATCH] D137724: [CMake] Warn when the version is older than 3.20.0.

2022-11-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D137724#3917644 , @MaskRay wrote:

> I think `if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)` checks for 
> standalone builds is not necessary. The check in `llvm/CMakeLists.txt` 
> suffices.
> It's unlikely the users will use different cmake versions to configure llvm 
> and a subproject like clang.

I can remove the others, but we need to keep the one in 
`runtimes/CMakeLists.txt` too. The runtimes (libc++, libc++abi, and libunwind) 
can be build without building or configuring LLVM.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137724/new/

https://reviews.llvm.org/D137724

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D137724: [CMake] Warn when the version is older than 3.20.0.

2022-11-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment.

In D137724#3917616 , @thieta wrote:

> I think this is fine as we have discussed before. But I really dislike the 
> code duplication for the check. We could put it in a include() I guess - but 
> maybe it's not worth it.

I wanted to make sure it shows up in different build scenarios. The code is 
temporary, once we switch to CMake 3.20.0 we can just change the 
`cmake_minimum_required` and remove these verbose blocks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137724/new/

https://reviews.llvm.org/D137724

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D137724: [CMake] Warn when the version is older than 3.20.0.

2022-11-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision.
Herald added a reviewer: bollu.
Herald added subscribers: Moerafaat, zero9178, Enna1, bzcheeseman, sdasgup3, 
wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, 
Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, 
antiagainst, shauheen, rriddle, mehdi_amini.
Herald added projects: Flang, All.
Mordante edited the summary of this revision.
Mordante added reviewers: libc++ vendors, clang-vendors, tstellar, mehdi_amini, 
MaskRay, ChuanqiXu, to268, kparzysz, thieta, tschuett, mgorny, stellaraccident, 
mizvekov, ldionne.
Herald added subscribers: StephenFan, jdoerfert.
Mordante published this revision for review.
Herald added subscribers: llvm-commits, libcxx-commits, openmp-commits, 
lldb-commits, Sanitizers, cfe-commits, stephenneuendorffer, nicolasvasilache.
Herald added projects: clang, Sanitizers, LLDB, libc++, OpenMP, libc++abi, 
MLIR, LLVM.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.

This is a preparation to require CMake 3.20.0 after LLVM 16 has been
released.

This change has been discussed on discourse
https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-cmake-version/66193


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137724

Files:
  clang/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  compiler-rt/lib/builtins/CMakeLists.txt
  compiler-rt/lib/crt/CMakeLists.txt
  flang/CMakeLists.txt
  flang/runtime/CMakeLists.txt
  lld/CMakeLists.txt
  lldb/CMakeLists.txt
  lldb/tools/debugserver/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/docs/ReleaseNotes.rst
  mlir/CMakeLists.txt
  openmp/CMakeLists.txt
  polly/CMakeLists.txt
  runtimes/CMakeLists.txt

Index: runtimes/CMakeLists.txt
===
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -1,5 +1,12 @@
 # This file handles building LLVM runtime sub-projects.
 cmake_minimum_required(VERSION 3.13.4)
+if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+  message(WARNING
+"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+"minimum version of CMake required to build LLVM will become 3.20.0, and "
+"using an older CMake will become an error. Please upgrade your CMake to "
+"at least 3.20.0 now to avoid issues in the future!")
+endif()
 project(Runtimes C CXX ASM)
 
 # Add path for custom and the LLVM build's modules to the CMake module path.
Index: polly/CMakeLists.txt
===
--- polly/CMakeLists.txt
+++ polly/CMakeLists.txt
@@ -2,6 +2,13 @@
 if (NOT DEFINED LLVM_MAIN_SRC_DIR)
   project(Polly)
   cmake_minimum_required(VERSION 3.13.4)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING
+  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+  "minimum version of CMake required to build LLVM will become 3.20.0, and "
+  "using an older CMake will become an error. Please upgrade your CMake to "
+  "at least 3.20.0 now to avoid issues in the future!")
+  endif()
   set(POLLY_STANDALONE_BUILD TRUE)
 endif()
 
Index: openmp/CMakeLists.txt
===
--- openmp/CMakeLists.txt
+++ openmp/CMakeLists.txt
@@ -12,6 +12,13 @@
 if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
   set(OPENMP_STANDALONE_BUILD TRUE)
   project(openmp C CXX)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING
+  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+  "minimum version of CMake required to build LLVM will become 3.20.0, and "
+  "using an older CMake will become an error. Please upgrade your CMake to "
+  "at least 3.20.0 now to avoid issues in the future!")
+  endif()
 endif()
 
 # Must go below project(..)
Index: mlir/CMakeLists.txt
===
--- mlir/CMakeLists.txt
+++ mlir/CMakeLists.txt
@@ -11,6 +11,13 @@
 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
   project(mlir)
   set(MLIR_STANDALONE_BUILD TRUE)
+  if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0")
+message(WARNING
+  "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the "
+  "minimum version of CMake required to build LLVM will become 3.20.0, and "
+  "using an older CMake will become an error. Please upgrade your CMake to "
+  "at least 3.20.0 now to avoid issues in the future!")
+  endif()
 endif()
 
 # Must go below project(..)
Index: llvm/docs/ReleaseNotes.rst
===
--- llvm/docs/ReleaseNotes.rst
+++ llvm/docs/ReleaseNotes.rst
@@ -64,6 +64,17 @@
 * Apple Clang >= 10.0
 * Visual Studio 2019 >= 16.7
 
+With LLVM 16.x we will raise the version requirement of CMake used to build
+LLVM. The new requirements are as follows:
+
+* CMake >= 3.20.0
+
+In LLVM 16.x t

[PATCH] D135177: [clang] adds `__is_scoped_enum`, `__is_nullptr`, and `__is_referenceable`

2022-10-08 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments.



Comment at: clang/include/clang/Basic/TokenKinds.def:525
+TYPE_TRAIT_1(__is_scoped_enum, IsScopedEnum, KEYCXX)
+TYPE_TRAIT_1(__is_referenceable, IsReferenceable, KEYCXX)
 TYPE_TRAIT_2(__reference_binds_to_temporary, ReferenceBindsToTemporary, KEYCXX)

Shouldn't these traits be documented or is the documentation generated 
automatically from the def files?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135177/new/

https://reviews.llvm.org/D135177

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D134878: Update developer policy on potentially breaking changes

2022-09-29 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments.



Comment at: llvm/docs/DeveloperPolicy.rst:129
+
+  People interested in joining the vendors group can do so by clicking the
+  "Join Project" link on the vendor's "Members" page in Phabricator.

aaron.ballman wrote:
> Mordante wrote:
> > 
> I didn't apply this one because I think it's grammatically correct without 
> the comma.
I looks slightly odd to me, but I'm not a native speaker.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134878/new/

https://reviews.llvm.org/D134878

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


  1   2   3   4   5   >