[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/70349 This patch adds `clang::preferred_type` annotations to Type-related bit-fields where possible. Notable exception are bit-fields that hold values of types that are incomplete at bit-field declaration. This is a l

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch adds `clang::preferred_type` annotations to Type-related bit-fields where possible. Notable exception are bit-fields that hold values of types that are incomplete at bit-field declaration. T

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/70349 >From 7329f68092d5f8f5a5978e5a6cbad6ada87d4fe8 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 26 Oct 2023 16:09:25 +0300 Subject: [PATCH 1/3] [clang][NFC] Annotate `Type` bit-fields with `clang::pr

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 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 45ccc1666c723e11d7b0148b2ef5c37c7a36e916 3eb936f9351d1252c465372023423344b63488fa --

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Formatting is good. I created a PR against `clang-format` to convince the tool: https://github.com/llvm/llvm-project/pull/70360 https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread via cfe-commits
@@ -20,7 +20,7 @@ namespace clang { /// Describes the different kinds of linkage /// (C++ [basic.link], C99 6.2.2) that an entity may have. -enum Linkage : unsigned char { +enum Linkage : unsigned { cor3ntin wrote: can you explain this change? https://github

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread via cfe-commits
@@ -49,7 +49,7 @@ struct ExprDependenceScope { using ExprDependence = ExprDependenceScope::ExprDependence; struct TypeDependenceScope { - enum TypeDependence : uint8_t { + enum TypeDependence : unsigned { cor3ntin wrote: Can you explain this change? Making

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread Vlad Serebrennikov via cfe-commits
@@ -49,7 +49,7 @@ struct ExprDependenceScope { using ExprDependence = ExprDependenceScope::ExprDependence; struct TypeDependenceScope { - enum TypeDependence : uint8_t { + enum TypeDependence : unsigned { Endilll wrote: The only place this enum is stored is

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread Vlad Serebrennikov via cfe-commits
@@ -49,7 +49,7 @@ struct ExprDependenceScope { using ExprDependence = ExprDependenceScope::ExprDependence; struct TypeDependenceScope { - enum TypeDependence : uint8_t { + enum TypeDependence : unsigned { Endilll wrote: In this particular case, width of bit

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread Vlad Serebrennikov via cfe-commits
@@ -20,7 +20,7 @@ namespace clang { /// Describes the different kinds of linkage /// (C++ [basic.link], C99 6.2.2) that an entity may have. -enum Linkage : unsigned char { +enum Linkage : unsigned { Endilll wrote: This case is similar to `TypeDependence` we d

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread Timm Baeder via cfe-commits
tbaederr wrote: Since this is done unconditionally, doesn't this mean we now need an unreleased clang to compile? Or are `[[clang::]]` attributes just ignored if they are unknown? https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits mailin

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @tbaederr As highlighted in https://github.com/llvm/llvm-project/pull/69104, this attribute doesn't change semantics of the program, so it's safe to ignore. https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits mailing list cf

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread Timm Baeder via cfe-commits
tbaederr wrote: Sure but clang 16 will emit a warning for them: https://godbolt.org/z/jnsc4336G - are we passing `-Wno-unknown-attributes` to the build? https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: That's a good point. I'm not opposed to wrap this attribute if we must. I'd like to hear from @AaronBallman on this matter. https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-27 Thread via cfe-commits
@@ -49,7 +49,7 @@ struct ExprDependenceScope { using ExprDependence = ExprDependenceScope::ExprDependence; struct TypeDependenceScope { - enum TypeDependence : uint8_t { + enum TypeDependence : unsigned { cor3ntin wrote: I had a chat with @Endilll offline.

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-27 Thread via cfe-commits
@@ -49,7 +49,7 @@ struct ExprDependenceScope { using ExprDependence = ExprDependenceScope::ExprDependence; struct TypeDependenceScope { - enum TypeDependence : uint8_t { + enum TypeDependence : unsigned { cor3ntin wrote: @erichkeane @AaronBallman wdyt? htt

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-27 Thread Erich Keane via cfe-commits
@@ -49,7 +49,7 @@ struct ExprDependenceScope { using ExprDependence = ExprDependenceScope::ExprDependence; struct TypeDependenceScope { - enum TypeDependence : uint8_t { + enum TypeDependence : unsigned { erichkeane wrote: >>My preferred solution would be t

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-27 Thread Erich Keane via cfe-commits
erichkeane wrote: We definitely need to wrap these in a macro/hide them in a macro somehow. This will fail `-Werror` on GCC/MSVC/Older Clang compilers. https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-27 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > We definitely need to wrap these in a macro/hide them in a macro somehow. > This will fail `-Werror` on GCC/MSVC/Older Clang compilers. +1, the macro would live in https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/Compiler.h along with the other at

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/70349 >From 7329f68092d5f8f5a5978e5a6cbad6ada87d4fe8 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 26 Oct 2023 16:09:25 +0300 Subject: [PATCH 1/4] [clang][NFC] Annotate `Type` bit-fields with `clang::pr

[llvm] [clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-31 Thread Aaron Ballman via cfe-commits
@@ -49,7 +49,7 @@ struct ExprDependenceScope { using ExprDependence = ExprDependenceScope::ExprDependence; struct TypeDependenceScope { - enum TypeDependence : uint8_t { + enum TypeDependence : unsigned { AaronBallman wrote: Now that we're reviewing https:/

[llvm] [clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-31 Thread Vlad Serebrennikov via cfe-commits
@@ -49,7 +49,7 @@ struct ExprDependenceScope { using ExprDependence = ExprDependenceScope::ExprDependence; struct TypeDependenceScope { - enum TypeDependence : uint8_t { + enum TypeDependence : unsigned { Endilll wrote: Yeah, I'm putting this on hold for a

[flang] [compiler-rt] [libc] [llvm] [lldb] [lld] [libcxx] [clang-tools-extra] [clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits