[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64-aix` running on `aix-ppc64` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/3884 Here is the relevant piece

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/140890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-27 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder approved this pull request. https://github.com/llvm/llvm-project/pull/140890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/140890 >From 10cb78bd9f361dd442c40702dad3c7809f466615 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 21 May 2025 08:59:47 -0400 Subject: [PATCH 1/4] [C2y] Add stdcountof.h WG14 N3469 changed _Lengthof to

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-22 Thread Aaron Ballman via cfe-commits
@@ -389,6 +389,7 @@ SYMBOL(cosh, None, ) SYMBOL(coshf, None, ) SYMBOL(coshl, None, ) SYMBOL(cosl, None, ) +SYMBOL(countof, None, ) AaronBallman wrote: Yup, I missed: ``` // Generated from cppreference offline HTML book (modified on 2018-10-28). //===--

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-22 Thread via cfe-commits
@@ -389,6 +389,7 @@ SYMBOL(cosh, None, ) SYMBOL(coshf, None, ) SYMBOL(coshl, None, ) SYMBOL(cosl, None, ) +SYMBOL(countof, None, ) cor3ntin wrote: That file is code-generated, right? https://github.com/llvm/llvm-project/pull/140890 ___

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-22 Thread Aaron Ballman via cfe-commits
@@ -49,6 +49,11 @@ module cstd [system] [no_undeclared_includes] { export * } + module stdcountof { +header "stdcountof.h" +export * + } + AaronBallman wrote: Good catch! I've updated that test as well. https://github.com/llvm/llvm-project/pu

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/140890 >From 10cb78bd9f361dd442c40702dad3c7809f466615 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 21 May 2025 08:59:47 -0400 Subject: [PATCH 1/3] [C2y] Add stdcountof.h WG14 N3469 changed _Lengthof to

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/140890 WG14 N3469 changed _Lengthof to _Countof but it also introduced the header to expose a macro with a non-ugly identifier. GCC vends this header as part of the compiler implementation, so Clang should do th

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread Alejandro Colomar via cfe-commits
alejandro-colomar wrote: > > Thanks! > > For the first commit: > > ``` > > Suggested-by: Alejandro Colomar > > ``` > > Happy to add it, Thanks! :) > but for my own education: what's that do? :-D

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread Erich Keane via cfe-commits
@@ -260,6 +260,7 @@ static bool isBuiltinHeaderName(StringRef FileName) { .Case("stdarg.h", true) .Case("stdatomic.h", true) .Case("stdbool.h", true) + .Case("stdcountof.h", true) erichkeane wrote: These too! https:/

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread Alejandro Colomar via cfe-commits
https://github.com/alejandro-colomar approved this pull request. Thanks! For the first commit: ``` Suggested-by: Alejandro Colomar ``` https://github.com/llvm/llvm-project/pull/140890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I still have no problem with this, but it is now into things I have zero > confidence reviewing :) Please have someone who has ever used modules review > this. I've added some modules reviewers, so hopefully they can take a look. Yeah, I agree that tablegen would be a ni

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/140890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions c,h,cpp,inc -- clang/lib/Headers/stdcountof.h clang/lib/Lex/

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread Erich Keane via cfe-commits
@@ -252,8 +252,8 @@ static bool warnByDefaultOnWrongCase(StringRef Include) { .Cases("assert.h", "complex.h", "ctype.h", "errno.h", "fenv.h", true) erichkeane wrote: The fact that these aren't tablegened somewhere is frightening! https://github.com/llvm/llv

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I still have no problem with this, but it is now into things I have zero confidence reviewing :) Please have someone who has ever used modules review this. https://github.com/llvm/llvm-project/pull/140890 __

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/140890 >From 10cb78bd9f361dd442c40702dad3c7809f466615 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 21 May 2025 08:59:47 -0400 Subject: [PATCH 1/2] [C2y] Add stdcountof.h WG14 N3469 changed _Lengthof to

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Precommit CI caught a relevant failure that only happens when testing against an install target, so yay for that! I've got a fix coming along with some other updated support files I found when looking at stdalign.h https://github.com/llvm/llvm-project/pull/140890 __

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: CC @alejandro-colomar https://github.com/llvm/llvm-project/pull/140890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/140890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes WG14 N3469 changed _Lengthof to _Countof but it also introduced the header to expose a macro with a non-ugly identifier. GCC vends this header as part of the compiler implementation, so