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
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
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
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 --
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
@@ -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
@@ -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
@@ -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
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
@@ -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
@@ -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
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
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
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
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://
@@ -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.
@@ -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
@@ -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
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
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
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
@@ -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:/
@@ -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
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
24 matches
Mail list logo