[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] [clang][NFC] Refactor `Selector` to use `PointerIntPair` inside (PR #69916)

2023-10-25 Thread Vlad Serebrennikov via cfe-commits
@@ -809,43 +927,42 @@ class Selector { enum IdentifierInfoFlag { // Empty selector = 0. Note that these enumeration values must // correspond to the enumeration values of DeclarationName::StoredNameKind -ZeroArg = 0x01, -OneArg = 0x02, +ZeroArg = 0x01,

[clang] [clang][NFC] Refactor `Selector` to use `PointerIntPair` inside (PR #69916)

2023-10-25 Thread Vlad Serebrennikov via cfe-commits
@@ -809,43 +927,42 @@ class Selector { enum IdentifierInfoFlag { // Empty selector = 0. Note that these enumeration values must // correspond to the enumeration values of DeclarationName::StoredNameKind -ZeroArg = 0x01, -OneArg = 0x02, +ZeroArg = 0x01,

[clang] 421d6cc - [clang][NFC] Annotate `CXXInheritance.h` with `preferred_type`

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T10:00:42+03:00 New Revision: 421d6ccc4c663b90aa03be7b7598fff50478e997 URL: https://github.com/llvm/llvm-project/commit/421d6ccc4c663b90aa03be7b7598fff50478e997 DIFF:

[clang] a5d2570 - [clang][NFC] Annotate ``DependentDiagnostic.h` with `preferred_type`

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T10:04:21+03:00 New Revision: a5d25708616d692592e705a0913afd78237698af URL: https://github.com/llvm/llvm-project/commit/a5d25708616d692592e705a0913afd78237698af DIFF:

[clang] 61d17b1 - [clang][NFC] Annotate `DeclCXX.h` with `preferred_type`

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T10:14:49+03:00 New Revision: 61d17b116880b34b6639e2780b9d46865d811be2 URL: https://github.com/llvm/llvm-project/commit/61d17b116880b34b6639e2780b9d46865d811be2 DIFF:

[clang] c032225 - [clang][NFC] Annotate `RawCommentList.h` with `preferred_type`

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T10:43:53+03:00 New Revision: c032225bfcac9322661fac8c943a63ba70eb0e19 URL: https://github.com/llvm/llvm-project/commit/c032225bfcac9322661fac8c943a63ba70eb0e19 DIFF:

[clang] a07dbf1 - [clang][NFC] Annotate `PrettyPrinter.h` with `preferred_type`

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T10:58:27+03:00 New Revision: a07dbf1fb0f4ba36911233c82914a9ddf3eb4a09 URL: https://github.com/llvm/llvm-project/commit/a07dbf1fb0f4ba36911233c82914a9ddf3eb4a09 DIFF:

[clang] fb9d124 - [clang][NFC] Clean up commented-out code in `StringLiteral`

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T09:20:04+03:00 New Revision: fb9d1243f535a8b678824d2b63d33eb183a7f2bc URL: https://github.com/llvm/llvm-project/commit/fb9d1243f535a8b678824d2b63d33eb183a7f2bc DIFF:

[clang] f1fdbcb - [clang]]NFC] Annotate `DeclObjC.h` with `preferred_type`

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T10:28:58+03:00 New Revision: f1fdbcba5fc0f88a481f105c2a16f56db0dd2940 URL: https://github.com/llvm/llvm-project/commit/f1fdbcba5fc0f88a481f105c2a16f56db0dd2940 DIFF:

[clang] [clang-tools-extra] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
@@ -2388,15 +2389,20 @@ class CXXNewExpr final /// Whether this new-expression has any initializer at all. bool hasInitializer() const { -return CXXNewExprBits.StoredInitializationStyle > 0; +switch (getInitializationStyle()) { +case

[clang] 58679ea - [clang][NFC] Annotate `clang/Lex` headers with `preferred_type`

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T12:34:10+03:00 New Revision: 58679ea576f9e48e20e43dcd99fd75c98fb7e6ba URL: https://github.com/llvm/llvm-project/commit/58679ea576f9e48e20e43dcd99fd75c98fb7e6ba DIFF:

[clang] acb714c - [clang][NFC] Annotate `DeclTemplate.h` with `preferred_type`

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T10:35:53+03:00 New Revision: acb714c10126192a2ead8b7fd3d5e16e4653d656 URL: https://github.com/llvm/llvm-project/commit/acb714c10126192a2ead8b7fd3d5e16e4653d656 DIFF:

[clang] ad27848 - [clang][NFC] Annotate `Decl.h` with `preferred_type`

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T12:17:53+03:00 New Revision: ad278482095242cc20f5988c25381f4586fed589 URL: https://github.com/llvm/llvm-project/commit/ad278482095242cc20f5988c25381f4586fed589 DIFF:

[clang] b89aadf - [clang][NFC] Annotate `TemplateName.h` with `preferred_type`

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T09:35:57+03:00 New Revision: b89aadf084feb025c2625f7bf7e206d666035ab1 URL: https://github.com/llvm/llvm-project/commit/b89aadf084feb025c2625f7bf7e206d666035ab1 DIFF:

[clang] 17db462 - [clang][NFC] Annotate `TemplateBase.h` with `preferred_type`

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T09:46:41+03:00 New Revision: 17db462810436e6cb5c422208d0d7718a8adb168 URL: https://github.com/llvm/llvm-project/commit/17db462810436e6cb5c422208d0d7718a8adb168 DIFF:

[clang] 24faf3b - [clang][NFC] Annotate `Attr.h` with `preferred_type`

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T09:58:02+03:00 New Revision: 24faf3b0b8e9b68304d9dd87c63afd5a0e813daa URL: https://github.com/llvm/llvm-project/commit/24faf3b0b8e9b68304d9dd87c63afd5a0e813daa DIFF:

[clang] 13023ed - [clang][NFC] Annotate `DeclFriend.h` with `preferred_type`

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T10:18:30+03:00 New Revision: 13023ed1d606a6e4a7c2590e1b698593bc317a61 URL: https://github.com/llvm/llvm-project/commit/13023ed1d606a6e4a7c2590e1b698593bc317a61 DIFF:

[clang] a0029a8 - [clang][NFC] Annotate `Sema.h` with `preferred_type`

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T11:03:23+03:00 New Revision: a0029a8a765f2bfe938de2c34ffb0264724ca04a URL: https://github.com/llvm/llvm-project/commit/a0029a8a765f2bfe938de2c34ffb0264724ca04a DIFF:

[clang] dda8e3d - [clang][NFC] Refactor `ImplicitParamDecl::ImplicitParamKind`

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T12:01:09+03:00 New Revision: dda8e3de35ead65498094e75adf6f6efd2641323 URL: https://github.com/llvm/llvm-project/commit/dda8e3de35ead65498094e75adf6f6efd2641323 DIFF:

[clang] [clang-tools-extra] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/71322 >From 40d25b8009f1c8734a99fd1350adaced6884cc7f Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 5 Nov 2023 18:53:48 +0300 Subject: [PATCH 1/3] [clang][NFC] Refacator `CXXNewExpr::InitializationStyle`

[clang] [clang-tools-extra] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/71322 >From 40d25b8009f1c8734a99fd1350adaced6884cc7f Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 5 Nov 2023 18:53:48 +0300 Subject: [PATCH 1/5] [clang][NFC] Refacator `CXXNewExpr::InitializationStyle`

[clang] [clang-tools-extra] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
@@ -2008,22 +2008,23 @@ ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, SourceRange TypeRange = AllocTypeInfo->getTypeLoc().getSourceRange(); SourceLocation StartLoc = Range.getBegin(); - CXXNewExpr::InitializationStyle initStyle; +

[clang] b178cec - [clang][NFC] Annotate most of `clang/Basic` headers with `preferred_type`

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T14:18:26+03:00 New Revision: b178cec84f95210db615cfa0a84e78585445f16b URL: https://github.com/llvm/llvm-project/commit/b178cec84f95210db615cfa0a84e78585445f16b DIFF:

[clang] 1a0e743 - [clang][NFC] Annotate `clang/Frontend` headers with `preferred_type`

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T13:38:12+03:00 New Revision: 1a0e743ab01716ecafeb33858d9975cf90017c59 URL: https://github.com/llvm/llvm-project/commit/1a0e743ab01716ecafeb33858d9975cf90017c59 DIFF:

[clang] [clang-tools-extra] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
@@ -2034,18 +2035,19 @@ ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, // - If the new-initializer is omitted, the object is default- // initialized (8.5); if no initialization is performed, // the object has indeterminate

[clang] [clang-tools-extra] Revert "[clang][NFC] Refactor `CXXNewExpr::InitializationStyle`" (PR #71395)

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

[clang-tools-extra] [clang] Revert "[clang][NFC] Refactor `CXXNewExpr::InitializationStyle`" (PR #71395)

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/71395 Reverts llvm/llvm-project#71322 >From 40921a217a4bda5ce739561606a4e16677ee48f5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 6 Nov 2023 17:53:21 +0400 Subject: [PATCH] Revert "[clang][NFC]

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll ready_for_review 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

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed 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

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (PR #71322)

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I've seen those exact test failures locally, but since precommit CI was fine, I landed this PR and kept a close eye on the bots. Me and Aaron are also wondering now how did it pass CI, and what's wrong with changes here. I'm sorry @zmodem that we got you involved. > It catches

[clang] 565e21b - [clang][NFC] Refactor `InlineCommandComment::RenderKind`

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T22:39:26+03:00 New Revision: 565e21b3e079e53c4fcf47d2ec898dbc248fbd3a URL: https://github.com/llvm/llvm-project/commit/565e21b3e079e53c4fcf47d2ec898dbc248fbd3a DIFF:

[clang] f2d8a0a - [clang][NFC] Refactor `ParamCommandComment::PassDirection`

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T22:55:51+03:00 New Revision: f2d8a0ac1dd1fe55b2c3b358c525fbc01b0121ed URL: https://github.com/llvm/llvm-project/commit/f2d8a0ac1dd1fe55b2c3b358c525fbc01b0121ed DIFF:

[clang] 088932d - [clang][NFC] Annotate `AST/Comment.h` with `preferred_type`

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T23:08:39+03:00 New Revision: 088932d8ef1f80ba9e1349ce7cda95accd2f745e URL: https://github.com/llvm/llvm-project/commit/088932d8ef1f80ba9e1349ce7cda95accd2f745e DIFF:

[clang] b6f2597 - Add missing `llvm::to_underlying` in `AST/CommentParser.cpp` unit test

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T23:27:13+03:00 New Revision: b6f2597a45f426f3a276c1c59f7ff5521b6dcc89 URL: https://github.com/llvm/llvm-project/commit/b6f2597a45f426f3a276c1c59f7ff5521b6dcc89 DIFF:

[clang] [clang-tools-extra] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (re-land) (PR #71417)

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/71417 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. This is a re-land of

[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (re-land) (PR #71417)

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

[clang-tools-extra] cd60229 - [clang][NFC] Refactor `ConstantExpr::ResultStorageKind`

2023-11-04 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-04T13:28:29+03:00 New Revision: cd6022916bff1d6fab007b554810b631549ba43c URL: https://github.com/llvm/llvm-project/commit/cd6022916bff1d6fab007b554810b631549ba43c DIFF:

[clang] 99e7e7a - [clang][NFC] Refactor `SourceLocExpr::IdentKind`

2023-11-04 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-04T12:43:26+03:00 New Revision: 99e7e7a597fa4ebaa8ebacdc42eae9f0b976f54c URL: https://github.com/llvm/llvm-project/commit/99e7e7a597fa4ebaa8ebacdc42eae9f0b976f54c DIFF:

[clang] 7ec8a6f - [clang][NFC] Annotate `Stmt.h` with `preferred_type`

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T21:02:14+03:00 New Revision: 7ec8a6fd31d8ddb161b06067fb6b7f9026a460df URL: https://github.com/llvm/llvm-project/commit/7ec8a6fd31d8ddb161b06067fb6b7f9026a460df DIFF:

[clang] 60f7fa1 - [clang][NFC] Refactor `Comment::CommentKind`

2023-11-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-06T22:17:03+03:00 New Revision: 60f7fa123d77ecf8e138be35ad8880622586fa03 URL: https://github.com/llvm/llvm-project/commit/60f7fa123d77ecf8e138be35ad8880622586fa03 DIFF:

[clang] [clang] Remove diagnostic that came with `[[clang::preferred_type]]` (PR #70632)

2023-10-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Why doesn't this result in any changes to tests? I would expect having to > remove them, right? There was a single test that was relying on sign mismatch, and then during code review we made the diagnostic to ignore signness. So it ended up merged without test case where

[clang] [clang][NFC] Refactor `Selector` to use `PointerIntPair` inside (PR #69916)

2023-10-25 Thread Vlad Serebrennikov via cfe-commits
@@ -809,43 +927,42 @@ class Selector { enum IdentifierInfoFlag { // Empty selector = 0. Note that these enumeration values must // correspond to the enumeration values of DeclarationName::StoredNameKind -ZeroArg = 0x01, -OneArg = 0x02, +ZeroArg = 0x01,

[clang] [clang][NFC] Refactor `Selector` to use `PointerIntPair` inside (PR #69916)

2023-10-25 Thread Vlad Serebrennikov via cfe-commits
@@ -809,43 +927,42 @@ class Selector { enum IdentifierInfoFlag { // Empty selector = 0. Note that these enumeration values must // correspond to the enumeration values of DeclarationName::StoredNameKind -ZeroArg = 0x01, -OneArg = 0x02, +ZeroArg = 0x01,

[clang] [clang-format] Change LLVM style to BreakAfterAttributes == ABS_Leave (PR #70360)

2023-10-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed 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

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @erichkeane I guess you'd be pretty happy if our enums were declared the following way: ```cpp enum E : unsigned _BitInt(4) { e0 = 16, }; ``` Then you'd be warned on the spot if you have more values than bits can hold, and bit-fields side check would be trivial to implement:

[clang] [clang] Bump latest release to 17 for C++ DR Status page (PR #67996)

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

[clang] [clang] Add test for CWG472 (PR #67948)

2023-10-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > None of the implementations seem to agree with the resolution of the DR: > https://godbolt.org/z/a7nEvW5Gr It's definitely not the first time CWG goes against every major implementation with their DR resolution. https://github.com/llvm/llvm-project/pull/67948

[clang] [clang] Add test for CWG2267 (PR #67931)

2023-10-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/67931 Related: #63416 >From 4720a0f6bce7b1531dec2005d642938db1370335 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 1 Oct 2023 21:28:21 +0300 Subject: [PATCH] [clang] Add test for CWG2267 ---

[clang] [clang] Add test for CWG472 (PR #67948)

2023-10-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/67948 https://cplusplus.github.io/CWG/issues/472.html It has drafting status, but I think CWG has reached consesus on the behavior. >From ad0df2131e12c59e57b603b955626e27e3067505 Mon Sep 17 00:00:00 2001 From: Vlad

[clang] [clang] Add test for CWG2267 (PR #67931)

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

[clang] [clang] Add test for CWG472 (PR #67948)

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

[clang] [clang] Add test for CWG2267 (PR #67931)

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

[clang] [clang] Add check for duplicates to make_cxx_dr_status script (PR #67969)

2023-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -7145,7 +7145,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/1223.html;>1223 drafting Syntactic disambiguation and trailing-return-types -Not resolved +Clang 17 Endilll wrote: `make_cxx_dr_status`

[clang] [clang] Add test for CWG1341 (PR #67965)

2023-10-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/67965 https://cplusplus.github.io/CWG/issues/1341.html https://wg21.link/p0683r1 >From 92fec6fe49de0392596e7f7d4a1c5524dd436747 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 2 Oct 2023 13:17:40 +0300

[clang] [clang] Add check for duplicates to make_cxx_dr_status script (PR #67969)

2023-10-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/67969 While working on #67965, I stumbled upon the fact that `make_cxx_dr_status` script doesn't check for duplicated comment (last comment wins), so I added this check. It even found another instance of duplicated

[clang] [clang] Add test for CWG1341 (PR #67965)

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

[clang] [clang][driver] Use platform specific calls to get the executable absolute path (PR #68091)

2023-10-03 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: You have failed tests on Linux CI: ``` Failed Tests (4): Clang :: Driver/mingw-sysroot.cpp Clang :: Driver/no-canonical-prefixes.c Clang :: Driver/program-path-priority.c Clang :: Driver/rocm-detect.hip ``` Windows CI has another test in Clang interpreter failing, but that

[clang] [clang] Bump latest release to 17 for C++ DR Status page (PR #67996)

2023-10-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/67996 `make_cxx_dr_status` has a hardcoded number of the latest release, for the puproses of determining whether a particular DR is available to users or not yet. I'm bumping it to 17. >From

[clang] [clang] Add check for duplicates to make_cxx_dr_status script (PR #67969)

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

[clang] [clang] Bump latest release to 17 for C++ DR Status page (PR #67996)

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

[clang] [clang] Bump latest release to 17 for C++ DR Status page (PR #67996)

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

[clang] [clang] Add test for CWG2267 (PR #67931)

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

[clang] [clang][NFC] Specify Type and ExtQuals as having 16-byte alignment (PR #68377)

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

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

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

[clang] [clang][NFC] Specify Type and ExtQuals as having 16-byte alignment (PR #68377)

2023-10-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/68377 >From 8503ff3e70e585a4a3597e3ee8111269f48105cc Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 5 Oct 2023 13:18:14 +0300 Subject: [PATCH 1/3] [clang] Align Type and ExtQuals on 16-byte boundary ---

[clang] [clang][NFC] Specify Type and ExtQuals as having 16-byte alignment (PR #68377)

2023-10-07 Thread Vlad Serebrennikov via cfe-commits
@@ -1982,9 +1986,9 @@ class alignas(8) Type : public ExtQualsTypeCommonBase { Type(TypeClass tc, QualType canon, TypeDependence Dependence) : ExtQualsTypeCommonBase(this, canon.isNull() ? QualType(this_(), 0) : canon) { -

[clang] [clang][NFC] Specify Type and ExtQuals as having 16-byte alignment (PR #68377)

2023-10-07 Thread Vlad Serebrennikov via cfe-commits
@@ -1507,6 +1508,9 @@ class ExtQuals : public ExtQualsTypeCommonBase, public llvm::FoldingSetNode { : ExtQualsTypeCommonBase(baseType, canon.isNull() ? QualType(this_(), 0) : canon), Quals(quals) { +

[clang] [clang][NFC] Specify Type and ExtQuals as having 16-byte alignment (PR #68377)

2023-10-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: My plan is to phase-out `TypeAlignment` in subsequent patches, because we have proper language support for `alignas` and `alignof` now. It's the only one of its kind passed to `Allocate()` (I inspected all references to this function). CC @zygolod as the author of

[clang] [clang][NFC] Add missing placement-new after Allocate() calls (PR #68382)

2023-10-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/68382 >From d987a8523086ab8b6d49f395429afda75769a731 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 6 Oct 2023 07:20:07 +0300 Subject: [PATCH 1/2] [clang][NFC] Add missing placement-new after Allocate()

[clang] [clang][NFC] Add missing placement-new after Allocate() calls (PR #68382)

2023-10-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/68382 While working on #68377 inspecting `Allocate()` calls, I found out that there are couple of places where we forget to use placement-new to create objects in the allocated memory. >From

[clang] [clang][NFC] Specify Type and ExtQuals as having 16-byte alignment (PR #68377)

2023-10-06 Thread Vlad Serebrennikov via cfe-commits
@@ -1982,9 +1986,9 @@ class alignas(8) Type : public ExtQualsTypeCommonBase { Type(TypeClass tc, QualType canon, TypeDependence Dependence) : ExtQualsTypeCommonBase(this, canon.isNull() ? QualType(this_(), 0) : canon) { -

[clang] [clang][NFC] Specify Type and ExtQuals as having 16-byte alignment (PR #68377)

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

[clang] [clang][NFC] Specify Type and ExtQuals as having 16-byte alignment (PR #68377)

2023-10-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Relevant code snippets: https://github.com/llvm/llvm-project/blob/777a6e6f10b2b90496d248b7fa904fce834484be/clang/lib/AST/ASTContext.cpp#L5813C1-L5816C33

[clang] [clang][NFC] Specify Type and ExtQuals as having 16-byte alignment (PR #68377)

2023-10-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: CC @zygoloid as the author of ee0ce302c5eb4f26738f334f2fd8b165fa65dfca https://github.com/llvm/llvm-project/pull/68377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Specify Type and ExtQuals as having 16-byte alignment (PR #68377)

2023-10-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/68377 >From 8503ff3e70e585a4a3597e3ee8111269f48105cc Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 5 Oct 2023 13:18:14 +0300 Subject: [PATCH 1/2] [clang] Align Type and ExtQuals on 16-byte boundary ---

[clang] [clang][NFC] Specify Type and ExtQuals as having 16-byte alignment (PR #68377)

2023-10-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/68377 While working on LLDB visualizer for `QualType`, I stumbled upon `Type` and `ExtQuals` defined with `alignas(8)`. Such alignment leaves only 3 lower bits available for pointer tagging, whereas `QualType`

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -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(),

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: %clang -target x86_64-linux -g -S -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -verify -DMISMATCH %s Endilll wrote: Tests are split now. `const` case is now checked and working as expected (qualifiers are ignored).

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -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(),

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -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(),

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via 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/5] [clang] Add clang::debug_info_type attribute ---

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -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(),

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -verify %s + +struct A { + enum E : unsigned {}; + [[clang::preferred_type(E)]] unsigned b : 2; + [[clang::preferred_type(E)]] int b2 : 2; + // expected-warning@-1 {{underlying type 'unsigned int' of enumeration 'E' doesn't match

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via 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/4] [clang] Add clang::debug_info_type attribute ---

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -7219,6 +7219,18 @@ its underlying representation to be a WebAssembly ``funcref``. }]; } +def DebugInfoTypeDocumentation : Documentation { + let Category = DocCatField; + let Content = [{ +This attribute allows to alter type of a bitfield in debug information. +Such a

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -107,6 +107,10 @@ def NonBitField : SubsetSubjectisBitField()}], "non-bit-field non-static data members">; +def BitField : SubsetSubjectisBitField()}], + "bit-field non-static data members">;

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -3153,6 +3153,8 @@ def err_invalid_branch_protection_spec : Error< "invalid or misplaced branch protection specification '%0'">; def warn_unsupported_branch_protection_spec : Warning< "unsupported branch protection specification '%0'">, InGroup; +def

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -7219,6 +7219,18 @@ its underlying representation to be a WebAssembly ``funcref``. }]; } +def DebugInfoTypeDocumentation : Documentation { + let Category = DocCatField; + let Content = [{ +This attribute allows to alter type of a bitfield in debug information. +Such a

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -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(),

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited 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

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -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(),

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Taking the example above, I think it would have to look the following way to fully complement a check for bit-field width in `preferred_type`: ```cpp enum StoredNameKind : unsigned _BitInt(3) { StoredIdentifier = 0, StoredObjCZeroArgSelector = Selector::ZeroArg,

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
@@ -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(),

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: >>@erichkeane I guess you'd be pretty happy if our enums were declared the >> following way: >Not really? That doesn't gain us the 'we must change where this is stored' >situation like a preferred_type attribute would/could. We MIGHT be able to get >away with a comment on

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > when does someone have an enum value that they don't intend to ever be in the > enum In my previous comments (https://github.com/llvm/llvm-project/pull/69104#issuecomment-1771167758, https://github.com/llvm/llvm-project/pull/69104#issuecomment-1771204043) I provided an

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > which brings up an additional concern/thing to deal with for the non_storable > attribute (that is, do we apply it to assignments? how about > exact-assignments like you've done there?). Conservative approach would be to issue diagnostics based on `non_storable` only when

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > See how on the assignment to a bitfield we check to make sure the largest > value of the enum will fit in the bitfield? I'm saying I want us to do this > EARLIER, on declaration with this attribute. I totally do. Thank you for pointing out to `-Wbitfield-enum-conversion`! But

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > While I think that warning is accurate, I somewhat question the value of the > 'bool' as working on this type I'm not sure what you mean by "working" here, but I'd like to highlight that we have hundreds of single-bit bit-fields across Clang that would benefit from

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > However, will this actually work in practice in the debugger? If not, perhaps > we should limit to just integer and enumeration types for now, leaving the > extension for the future. I composed an example of that: ```cpp struct A { short a1; short a2; }; struct B {

<    1   2   3   4   5   6   7   8   9   10   >