Endilll wrote:
Whatever we do, I consider it important for us to understand how widely `cmd`
is used.
https://github.com/llvm/llvm-project/pull/65242
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
Endilll wrote:
> When I install Visual Studio, it creates a widget that brings up a cmd shell
> with the right environment. I'm not aware of a similar widget for PowerShell.
At least in VS 2022, there is a `Developer PowerShell for VS 2022` in Start
menu beside the usual `x64 Native Tools
Endilll wrote:
It's in our public headers, and downstream users were supposed to rely on it,
because `alignof` for `Type` and all its derived types reported the wrong
value. So while I agree with you, I lean towards it being a breaking change
which should be handled appropriately.
Endilll wrote:
Thank you for updating our status page!
The following papers were applied as defect reports. Have you considered them?
N4891: P2156 (Allow Duplicate Attributes)
N4916: P2280 (Using unknown pointers and references in constant expressions)
I agree with your analysis in
Endilll wrote:
If Aaron weren't able to fix this in several commits, I'm not sure it's a `good
first issue`.
https://github.com/llvm/llvm-project/pull/67673
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/Endilll approved this pull request.
https://github.com/llvm/llvm-project/pull/68846
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll closed
https://github.com/llvm/llvm-project/pull/69185
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/69104
>From 976aa5c8f3d936a15e7123069a49d97ad3bf7a05 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Sun, 15 Oct 2023 13:14:55 +0300
Subject: [PATCH 1/3] [clang] Add clang::debug_info_type attribute
---
@@ -5910,6 +5910,28 @@ static void handleBuiltinAliasAttr(Sema , Decl *D,
D->addAttr(::new (S.Context) BuiltinAliasAttr(S.Context, AL, Ident));
}
+static void handleDebugInfoTypeAttr(Sema , Decl *D, const ParsedAttr ) {
+ if (!AL.hasParsedType()) {
+S.Diag(AL.getLoc(),
https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/69104
This attribute allows user to specify type of the bitfield that will be emitted
to debug info without affecting semantics of the program. Since it doesn't
affect semantics, this attribute can be safely ignored
https://github.com/Endilll closed
https://github.com/llvm/llvm-project/pull/69916
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/69104
>From 976aa5c8f3d936a15e7123069a49d97ad3bf7a05 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Sun, 15 Oct 2023 13:14:55 +0300
Subject: [PATCH 1/8] [clang] Add clang::debug_info_type attribute
---
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/69104
>From 976aa5c8f3d936a15e7123069a49d97ad3bf7a05 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Sun, 15 Oct 2023 13:14:55 +0300
Subject: [PATCH 1/7] [clang] Add clang::debug_info_type attribute
---
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/69104
>From 976aa5c8f3d936a15e7123069a49d97ad3bf7a05 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Sun, 15 Oct 2023 13:14:55 +0300
Subject: [PATCH 1/6] [clang] Add clang::debug_info_type attribute
---
@@ -5910,6 +5910,28 @@ static void handleBuiltinAliasAttr(Sema , Decl *D,
D->addAttr(::new (S.Context) BuiltinAliasAttr(S.Context, AL, Ident));
}
+static void handleDebugInfoTypeAttr(Sema , Decl *D, const ParsedAttr ) {
+ if (!AL.hasParsedType()) {
+S.Diag(AL.getLoc(),
Endilll wrote:
I'm ignoring signed/unsigned mismatch as @erichkeane and @AaronBallman
suggested. The only outstanding aspect is the following diagnostic I added
today and haven't received feedback on:
```cpp
[[clang::preferred_type(bool)]] unsigned b4 : 1;
[[clang::preferred_type(bool)]]
@@ -5910,6 +5910,30 @@ static void handleBuiltinAliasAttr(Sema , Decl *D,
D->addAttr(::new (S.Context) BuiltinAliasAttr(S.Context, AL, Ident));
}
+static void handleDebugInfoTypeAttr(Sema , Decl *D, const ParsedAttr ) {
+ if (!AL.hasParsedType()) {
+S.Diag(AL.getLoc(),
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
@@ -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
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/70360
___
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
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:
The only place this enum is stored
Endilll wrote:
[Mozilla](https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html),
[WebKit](https://webkit.org/code-style-guidelines/),
[GCC](https://gcc.gnu.org/codingconventions.html#Cxx_Conventions),
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
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/70360
>From 3866a77d62a34e612ff869cde7c743e31350eed2 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Thu, 26 Oct 2023 20:41:25 +0300
Subject: [PATCH 1/2] [clang-format] Change LLVM style to
@@ -26179,7 +26179,7 @@ TEST_F(FormatTest, RemoveSemicolon) {
TEST_F(FormatTest, BreakAfterAttributes) {
FormatStyle Style = getLLVMStyle();
- EXPECT_EQ(Style.BreakAfterAttributes, FormatStyle::ABS_Never);
+ EXPECT_EQ(Style.BreakAfterAttributes, FormatStyle::ABS_Leave);
@@ -794,6 +794,7 @@ clang-format
- Add ``AllowBreakBeforeNoexceptSpecifier`` option.
- Add ``AllowShortCompoundRequirementOnASingleLine`` option.
+- Change ``BreakAfterAttributes`` from ``Never`` to ``Leave`` in LLVM style
Endilll wrote:
Fixed.
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
Author: Vlad Serebrennikov
Date: 2023-11-01T13:40:11+03:00
New Revision: aaba3761db84032541712899964714f3184e8b3d
URL:
https://github.com/llvm/llvm-project/commit/aaba3761db84032541712899964714f3184e8b3d
DIFF:
Author: Vlad Serebrennikov
Date: 2023-11-01T12:40:13+03:00
New Revision: 50dec541f328a251c2830421f354e4439e635def
URL:
https://github.com/llvm/llvm-project/commit/50dec541f328a251c2830421f354e4439e635def
DIFF:
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
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/5] [clang][NFC] Annotate `Type` bit-fields with
Author: Vlad Serebrennikov
Date: 2023-11-01T11:49:59+03:00
New Revision: b120fe8d3288c4dca1b5427ca34839ce8833f71c
URL:
https://github.com/llvm/llvm-project/commit/b120fe8d3288c4dca1b5427ca34839ce8833f71c
DIFF:
Author: Vlad Serebrennikov
Date: 2023-11-01T16:44:34+03:00
New Revision: 65761200ce4e1f366e8418652efdafd2f744291b
URL:
https://github.com/llvm/llvm-project/commit/65761200ce4e1f366e8418652efdafd2f744291b
DIFF:
https://github.com/Endilll closed
https://github.com/llvm/llvm-project/pull/70955
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/70955
During the recent refactoring (b120fe8d3288c4dca1b5427ca34839ce8833f71c) this
enum was moved out of `RecordDecl`. During post-commit review it was found out
that its association with `RecordDecl` should be
Author: Vlad Serebrennikov
Date: 2023-11-01T17:00:55+03:00
New Revision: 008af1c9f4cd0188a69bf42b821749154a8142c8
URL:
https://github.com/llvm/llvm-project/commit/008af1c9f4cd0188a69bf42b821749154a8142c8
DIFF:
https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/70943
This patch moves definition of recently refactored enums closer to the types
where they were originally defined. Since they are scoped enums at namespace
scope now, they can be forward-declared.
Refactorings
https://github.com/Endilll closed
https://github.com/llvm/llvm-project/pull/70943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Vlad Serebrennikov
Date: 2023-10-31T21:50:18+03:00
New Revision: ae7b20b583fab1325d8b51fe5f2eaf612de8b95e
URL:
https://github.com/llvm/llvm-project/commit/ae7b20b583fab1325d8b51fe5f2eaf612de8b95e
DIFF:
Author: Vlad Serebrennikov
Date: 2023-10-31T20:46:07+03:00
New Revision: 4ad2ada5216ee2bb3c334a3233a9ab51f2521b82
URL:
https://github.com/llvm/llvm-project/commit/4ad2ada5216ee2bb3c334a3233a9ab51f2521b82
DIFF:
https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/71049
This patch introduces a new enumerator `Invalid = 0`, shifting other
enumerators by +1. Contrary to how it might sound, this actually affirms status
quo of how this enum is stored in `clang::Decl`:
```
/// If
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/71049
>From 05089e60021c321b4113db7e4bdf59bdaaa19de7 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Thu, 2 Nov 2023 14:40:12 +0300
Subject: [PATCH 1/4] [clang][NFC] Refactor `clang::Linkage`
This patch
@@ -2214,7 +2214,7 @@ void ASTWriter::WriteDeclAbbrevs() {
Abv->Add(BitCodeAbbrevOp(0)); // TSCSpec
Abv->Add(BitCodeAbbrevOp(0)); // InitStyle
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong
-
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/7] [clang][NFC] Annotate `Type` bit-fields with
@@ -49,7 +49,7 @@ struct ExprDependenceScope {
using ExprDependence = ExprDependenceScope::ExprDependence;
struct TypeDependenceScope {
- enum TypeDependence : uint8_t {
+ enum TypeDependence : unsigned {
Endilll wrote:
I reverted changes to underlying
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/71049
>From 05089e60021c321b4113db7e4bdf59bdaaa19de7 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Thu, 2 Nov 2023 14:40:12 +0300
Subject: [PATCH 1/2] [clang][NFC] Refactor `clang::Linkage`
This patch
Endilll wrote:
> I've considered this but I found the number of alternatives too large to make
> it feasible. Consider that we have 11 possible SValKinds, which would require
> 4 bits to encode. Requiring all Data pointers to be aligned as such seems
> rough - although not impossible.
Sorry,
https://github.com/Endilll approved this pull request.
https://github.com/llvm/llvm-project/pull/71039
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1921,7 +1920,20 @@ bool NamedDecl::declarationReplaces(NamedDecl *OldD,
bool IsKnownNewer) const {
}
bool NamedDecl::hasLinkage() const {
- return getFormalLinkage() != NoLinkage;
+ switch (getFormalLinkage()) {
+ case Linkage::Invalid:
+llvm_unreachable("Linkage
@@ -560,7 +562,7 @@ bool CXIndexDataConsumer::handleDecl(const NamedDecl *D,
if (shouldSuppressRefs())
markEntityOccurrenceInFile(D, Loc);
-
+
Endilll wrote:
I guess that's clang-format at work. I'll revert this.
@@ -138,7 +138,7 @@ namespace dr1295 { // dr1295: 4
#if __cplusplus <= 201402L
// expected-error@-2 {{does not refer to any declaration}} expected-note@-3
{{here}}
#else
- // expected-error@-4 {{refers to subobject}}
+ // expected-error@-4 {{bind to bit-field in converted
@@ -84,22 +88,33 @@ inline bool isUniqueGVALinkage(GVALinkage L) {
}
inline bool isExternallyVisible(Linkage L) {
- return L >= VisibleNoLinkage;
+ switch (L) {
+ case Linkage::Invalid:
+llvm_unreachable("Linkage hasn't been computed!");
Endilll wrote:
@@ -2214,7 +2214,7 @@ void ASTWriter::WriteDeclAbbrevs() {
Abv->Add(BitCodeAbbrevOp(0)); // TSCSpec
Abv->Add(BitCodeAbbrevOp(0)); // InitStyle
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong
-
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/6] [clang][NFC] Annotate `Type` bit-fields with
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/71049
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1996,7 +1996,7 @@ class alignas(TypeAlignment) Type : public
ExtQualsTypeCommonBase {
TypeBits.Dependence = static_cast(Dependence);
TypeBits.CacheValid = false;
TypeBits.CachedLocalOrUnnamed = false;
-TypeBits.CachedLinkage = NoLinkage;
+
@@ -2214,7 +2214,7 @@ void ASTWriter::WriteDeclAbbrevs() {
Abv->Add(BitCodeAbbrevOp(0)); // TSCSpec
Abv->Add(BitCodeAbbrevOp(0)); // InitStyle
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong
-
https://github.com/Endilll approved this pull request.
LGTM from DR testing perspective.
https://github.com/llvm/llvm-project/pull/71077
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/Endilll closed
https://github.com/llvm/llvm-project/pull/70632
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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/6] [clang][NFC] Annotate `Type` bit-fields with
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
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/71049
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll closed
https://github.com/llvm/llvm-project/pull/71049
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/71077
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Endilll wrote:
> What other ways are to make a const void * debugger-friendly - other than
> llvm::PointerUnion?
I'm not aware of any that wouldn't require writing a custom formatter.
Ultimately it boils to how can I extract type information. For
`llvm::PointerUnion` I'm matching
https://github.com/Endilll closed
https://github.com/llvm/llvm-project/pull/71160
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Vlad Serebrennikov
Date: 2023-11-04T08:43:59+03:00
New Revision: 0fea0d2f3b5e5be011e229cdddc7540095ff9236
URL:
https://github.com/llvm/llvm-project/commit/0fea0d2f3b5e5be011e229cdddc7540095ff9236
DIFF:
Author: Vlad Serebrennikov
Date: 2023-11-04T08:58:57+03:00
New Revision: c4b2d338cc450ff4499fd062cd9261bea55808a1
URL:
https://github.com/llvm/llvm-project/commit/c4b2d338cc450ff4499fd062cd9261bea55808a1
DIFF:
Author: Vlad Serebrennikov
Date: 2023-11-04T09:23:50+03:00
New Revision: 5b9d793290c187aee4e63b61d4a12c3766f7cfe6
URL:
https://github.com/llvm/llvm-project/commit/5b9d793290c187aee4e63b61d4a12c3766f7cfe6
DIFF:
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/71039
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll commented:
Converting packed `unsigned Kind` into non-packed `SValKind Kind` is definitely
going to help debuggers to display the value correctly.
But I have to point out that this patch doesn't address the fact that `const
void* Data` is not friendly to debuggers,
@@ -105,38 +86,25 @@ class SVal {
return llvm::dyn_cast(*this);
}
- unsigned getRawKind() const { return Kind; }
- BaseKind getBaseKind() const { return (BaseKind) (Kind & BaseMask); }
- unsigned getSubKind() const { return Kind >> BaseBits; }
+ SValKind getKind()
Author: Vlad Serebrennikov
Date: 2023-11-05T15:39:05+03:00
New Revision: 6e35db0694b2cb80ffe0c7edfed3090f9ede4805
URL:
https://github.com/llvm/llvm-project/commit/6e35db0694b2cb80ffe0c7edfed3090f9ede4805
DIFF:
Author: Vlad Serebrennikov
Date: 2023-11-05T13:36:08+03:00
New Revision: c23aaa410358b9f9c364ddaaeb6b2069b185a99b
URL:
https://github.com/llvm/llvm-project/commit/c23aaa410358b9f9c364ddaaeb6b2069b185a99b
DIFF:
https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/71322
This patch converts `CXXNewExpr::InitializationStyle` into a scoped enum at
namespace scope. It also affirms the status quo by adding a new enumerator to
represent implicit initializer.
>From
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/71322
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Vlad Serebrennikov
Date: 2023-11-05T12:30:49+03:00
New Revision: 3e6ce58701a3a8463b53fb3fd2023c02b4e90554
URL:
https://github.com/llvm/llvm-project/commit/3e6ce58701a3a8463b53fb3fd2023c02b4e90554
DIFF:
Author: Vlad Serebrennikov
Date: 2023-11-05T16:38:45+03:00
New Revision: a9070f22a29e28f7d6f83c24a8dd88f3a94969ae
URL:
https://github.com/llvm/llvm-project/commit/a9070f22a29e28f7d6f83c24a8dd88f3a94969ae
DIFF:
Endilll wrote:
> If you see failures locally, it's best to understand where they coming from:
> even if it passes on bots it just means we have a hole in our test coverage.
Sure, but it wasn't the first time I've seen local test failures that doesn't
reproduce anywhere else (`Clang ::
Author: Vlad Serebrennikov
Date: 2023-11-07T22:24:59+03:00
New Revision: fb8ff4cdaecb7fe498d4e3a9cbcb33d40cccd29a
URL:
https://github.com/llvm/llvm-project/commit/fb8ff4cdaecb7fe498d4e3a9cbcb33d40cccd29a
DIFF:
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
https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/70632
https://github.com/llvm/llvm-project/pull/69104 introduce a diagnostic that
checked underlying type of an enum against type of bit-field that is annotated
with `[[clang::preferred_type]]`. When I tried to
@@ -5928,28 +5928,6 @@ static void handlePreferredTypeAttr(Sema , Decl *D,
const ParsedAttr ) {
S.RequireCompleteType(ParmTSI->getTypeLoc().getBeginLoc(), QT,
diag::err_incomplete_type);
- if (QT->isEnumeralType()) {
-auto IsCorrespondingType =
@@ -5928,28 +5928,6 @@ static void handlePreferredTypeAttr(Sema , Decl *D,
const ParsedAttr ) {
S.RequireCompleteType(ParmTSI->getTypeLoc().getBeginLoc(), QT,
diag::err_incomplete_type);
- if (QT->isEnumeralType()) {
-auto IsCorrespondingType =
Author: Vlad Serebrennikov
Date: 2023-10-31T18:06:34+03:00
New Revision: 49fd28d9601dde429436655ec74234e895c60b89
URL:
https://github.com/llvm/llvm-project/commit/49fd28d9601dde429436655ec74234e895c60b89
DIFF:
Author: Vlad Serebrennikov
Date: 2023-10-31T18:21:36+03:00
New Revision: f5f4c5b313fc809b9b1b9d600d0ec3cec0d12941
URL:
https://github.com/llvm/llvm-project/commit/f5f4c5b313fc809b9b1b9d600d0ec3cec0d12941
DIFF:
@@ -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/69104
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll approved this pull request.
DR test part of this PR looks fine to me.
https://github.com/llvm/llvm-project/pull/70018
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/70296
This patch refactor said enums to hold total size of a bit-field, and not just
non-inherited bits. This brings `Type` and `DeclContext` in line with `Comment`
and `Stmt`. It also makes it unnecessary to list
@@ -1819,10 +1812,10 @@ class DeclContext {
SourceLocation AtStart;
};
- /// Number of non-inherited bits in ObjCContainerDeclBitfields.
+ /// Number of inherited and non-inherited bits in ObjCContainerDeclBitfields.
/// Note that here we rely on the fact that
@@ -1739,10 +1734,8 @@ class DeclContext {
uint64_t IsSimpleExplicit : 1;
};
- /// Number of non-inherited bits in CXXConstructorDeclBitfields.
- enum {
-NumCXXConstructorDeclBits = 64 - NumDeclContextBits - NumFunctionDeclBits
- };
+ /// Number of inherited and
@@ -1663,11 +1663,12 @@ class alignas(TypeAlignment) Type : public
ExtQualsTypeCommonBase {
/// Actually an ArrayType::ArraySizeModifier.
unsigned SizeModifier : 3;
};
+ enum { NumArrayTypeBits = NumTypeBits + 3 + 3 };
Endilll wrote:
Applied.
https://github.com/Endilll updated
https://github.com/llvm/llvm-project/pull/70296
>From 9a20b9609c5d4c18772907e82af4995411c42da6 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov
Date: Thu, 26 Oct 2023 09:04:22 +0300
Subject: [PATCH 1/2] [clang][NFC] Refactor enums that hold size of Type and
https://github.com/Endilll closed
https://github.com/llvm/llvm-project/pull/70296
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll created
https://github.com/llvm/llvm-project/pull/70360
This patch addresses some example of bad formatting in Clang. The following
commit contains only changes suggested by clang-format:
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
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
1 - 100 of 1234 matches
Mail list logo