[clang] e77bfaa - [clang][NFC] Fill in historical data on when C++ DRs 500-599 were fixed

2023-12-04 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-05T00:42:13+03:00 New Revision: e77bfaaf9d66748fc2dc3a710a0c9b4665dd3034 URL: https://github.com/llvm/llvm-project/commit/e77bfaaf9d66748fc2dc3a710a0c9b4665dd3034 DIFF:

[clang] [clang][NFC] Refactor expected directives in C++ DRs 400-499 (PR #74311)

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

[clang] [clang][NFC] Refactor expected directives in C++ DRs 400-499 (PR #74311)

2023-12-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/74311 >From fc5d07e9917e84b7927b4d3f6ea5058b008f120f Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 4 Dec 2023 15:15:08 +0300 Subject: [PATCH 1/4] [clang][NFC] Refactor expected directives in C++ DRs

[clang] [clang][NFC] Refactor expected directives in C++ DRs 400-499 (PR #74311)

2023-12-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/74311 >From fc5d07e9917e84b7927b4d3f6ea5058b008f120f Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 4 Dec 2023 15:15:08 +0300 Subject: [PATCH 1/3] [clang][NFC] Refactor expected directives in C++ DRs

[clang] [clang][NFC] Refactor expected directives in C++ DRs 400-499 (PR #74311)

2023-12-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/74311 >From fc5d07e9917e84b7927b4d3f6ea5058b008f120f Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 4 Dec 2023 15:15:08 +0300 Subject: [PATCH 1/2] [clang][NFC] Refactor expected directives in C++ DRs

[clang] [clang][NFC] Refactor expected directives in C++ DRs 400-499 (PR #74311)

2023-12-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR is opened to check this patch against pre-commit CI. https://github.com/llvm/llvm-project/pull/74311 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor expected directives in C++ DRs 400-499 (PR #74311)

2023-12-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/74311 This patch continues the work started with ea5b1ef016d020c37f903d6c7d4f623be975dab8. See that commit and its corresponding PR for details. >From fc5d07e9917e84b7927b4d3f6ea5058b008f120f Mon Sep 17 00:00:00

[clang] f9afe40 - [clang][NFC] Fill in historical data on when C++ DRs 400-499 were fixed

2023-12-04 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-04T15:15:40+03:00 New Revision: f9afe4049a8829aa8dad64b0eb7dccc8dd4a8bbe URL: https://github.com/llvm/llvm-project/commit/f9afe4049a8829aa8dad64b0eb7dccc8dd4a8bbe DIFF:

[clang] [clang][NFC] Refactor expected directives in C++ DRs 300-399 (PR #74243)

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

[clang] [clang][NFC] Refactor expected directives in C++ DRs 300-399 (PR #74243)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR is created only for CI purposes. https://github.com/llvm/llvm-project/pull/74243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor expected directives in C++ DRs 300-399 (PR #74243)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/74243 This patch continues the work started with ea5b1ef016d020c37f903d6c7d4f623be975dab8. See that commit and its corresponding PR for details. >From 49a5323663b8bc56d9720c6d2ebb9c3d686fd362 Mon Sep 17 00:00:00

[clang] 599cba3 - [clang][NFC] Fill in historical data on when C++ DRs 300-399 were fixed

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-03T16:48:53+03:00 New Revision: 599cba3e7c82f046f247aa1cae4948dbbdcb7cb3 URL: https://github.com/llvm/llvm-project/commit/599cba3e7c82f046f247aa1cae4948dbbdcb7cb3 DIFF:

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
@@ -128,6 +128,10 @@ class DiagnosticOptions : public RefCountedBase{ /// whether -Wsystem-headers is enabled on a per-module basis. std::vector SystemHeaderWarningsModules; + /// Level of scrutiny reinterpret_casts get for type-unsafe aliasing + /// checks. Requires

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
@@ -498,3 +498,137 @@ CodeGenTBAA::mergeTBAAInfoForMemoryTransfer(TBAAAccessInfo DestInfo, // access type regardless of their base types. return TBAAAccessInfo::getMayAliasInfo(); } + +// Determine the aliasing kind bit-converting from type Src to type Dst.

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
@@ -37,6 +38,27 @@ class ASTConsumer { friend class SemaConsumer; +public: + /// Allow type-based aliasing information to be interrogated by the AST + /// producer (for diagnostics). + class TypeAliasing { Endilll wrote: It seems to me that we'd be

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
@@ -2026,6 +2027,137 @@ static TryCastResult TryConstCast(Sema , ExprResult , return TC_Success; } +// We're dereferencing E, either by turning into an RValue, or by dereferencing +// it. Check whether it's a deref of a reinterpret cast that has aliasing +// issues. +void

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
@@ -498,3 +498,137 @@ CodeGenTBAA::mergeTBAAInfoForMemoryTransfer(TBAAAccessInfo DestInfo, // access type regardless of their base types. return TBAAAccessInfo::getMayAliasInfo(); } + +// Determine the aliasing kind bit-converting from type Src to type Dst.

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

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

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Thank you for your efforts! I scratched the surface a bit; not qualified to do an in-depth review. Can you also add a release note? https://github.com/llvm/llvm-project/pull/74155 ___ cfe-commits mailing list

[clang] Fix dr2xx clang test (PR #74223)

2023-12-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: https://lab.llvm.org/buildbot/#/builders/123/builds/23364 stage 1 checks run successfully. You can close this PR as superseded by 19bef888a8c7c58bdf94d377fc485e050efb https://github.com/llvm/llvm-project/pull/74223 ___ cfe-commits

[clang] Fix dr2xx clang test (PR #74223)

2023-12-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Thank you for looking into this! https://github.com/llvm/llvm-project/pull/74223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix dr2xx clang test (PR #74223)

2023-12-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: It was my commit that broke bots, so it is only appropriate to tag me on this. I committed a different fix just now 19bef888a8c7c58bdf94d377fc485e050efb https://github.com/llvm/llvm-project/pull/74223 ___ cfe-commits mailing list

[clang] 19bef88 - [clang][NFC] Adjust expected directives in DR tests further

2023-12-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-03T09:02:58+03:00 New Revision: 19bef888a8c7c58bdf94d377fc485e050efb URL: https://github.com/llvm/llvm-project/commit/19bef888a8c7c58bdf94d377fc485e050efb DIFF:

[clang] 96070e1 - [clang][NFC] Adjust expected directives in DR tests

2023-12-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-03T00:21:53+03:00 New Revision: 96070e1e4c13f53c2cef8178d64e206162923f54 URL: https://github.com/llvm/llvm-project/commit/96070e1e4c13f53c2cef8178d64e206162923f54 DIFF:

[clang] 0c06e87 - [clang][NFC] Refactor expected directives in C++ DRs 200-299

2023-12-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-02T21:25:54+03:00 New Revision: 0c06e8745f131d867c566f4d35a7a04e24b4a075 URL: https://github.com/llvm/llvm-project/commit/0c06e8745f131d867c566f4d35a7a04e24b4a075 DIFF:

[clang] 2f9c922 - [clang][NFC] Fill in historical data on when C++ DRs 200-299 were fixed

2023-12-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-02T21:25:00+03:00 New Revision: 2f9c922a12e9f15abe5f6b1a50d684414be47d26 URL: https://github.com/llvm/llvm-project/commit/2f9c922a12e9f15abe5f6b1a50d684414be47d26 DIFF:

[libc] [libcxx] [llvm] [lld] [lldb] [clang] [flang] [clang][NFC] Refactor expected directives in C++ DRs 100-199 (PR #74061)

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

[libcxx] [lldb] [flang] [lld] [clang] [llvm] [libc] [clang][NFC] Refactor expected directives in C++ DRs 100-199 (PR #74061)

2023-12-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/74061 >From e6b9f54ce066e029b043e72281a7144338a84219 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 1 Dec 2023 13:35:23 +0300 Subject: [PATCH 1/4] [clang][NFC] Fill in historical data on when C++ DRs

[lld] [libc] [flang] [lldb] [libcxx] [clang] [llvm] [clang][NFC] Refactor expected directives in C++ DRs 100-199 (PR #74061)

2023-12-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/74061 >From e6b9f54ce066e029b043e72281a7144338a84219 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 1 Dec 2023 13:35:23 +0300 Subject: [PATCH 1/3] [clang][NFC] Fill in historical data on when C++ DRs

[flang] [libcxx] [lld] [libc] [clang] [lldb] [llvm] [clang][NFC] Refactor expected directives in C++ DRs 100-199 (PR #74061)

2023-12-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR is created to run the patch through CI, so no review requested. https://github.com/llvm/llvm-project/pull/74061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [libcxx] [lld] [libc] [clang] [lldb] [llvm] [clang][NFC] Refactor expected directives in C++ DRs 100-199 (PR #74061)

2023-12-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/74061 This patch continues the work started with ea5b1ef016d020c37f903d6c7d4f623be975dab8. See that commit and its corresponding PR for details. >From e6b9f54ce066e029b043e72281a7144338a84219 Mon Sep 17 00:00:00

[clang] 289fe74 - [clang][NFC] Fill in historical data on when C++ DRs 100-199 were fixed

2023-12-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-01T13:43:22+03:00 New Revision: 289fe74ddbb4c8aa7128f60db6b20c119922b542 URL: https://github.com/llvm/llvm-project/commit/289fe74ddbb4c8aa7128f60db6b20c119922b542 DIFF:

[flang] [libcxx] [lldb] [libc] [llvm] [libunwind] [clang] [lld] [clang][NFC] Refactor expected directives in C++ DRs 1-99 (PR #73879)

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

[clang] [clang][NFC] Refactor expected directives in C++ DRs 1-99 (PR #73879)

2023-11-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I could nit on the naming conventions here or there, but I think this overall > is such a vast improvement that I'd rather get 'this', then argue on names in > future files, and let this one lie. @erichkeane Now is the best time to bring those nits on, unless you want

[clang] [clang][NFC] Refactor expected directives in C++ DRs 1-99 (PR #73879)

2023-11-30 Thread Vlad Serebrennikov via cfe-commits
@@ -80,14 +86,21 @@ namespace dr5 { // dr5: 3.1 namespace dr7 { // dr7: 3.4 class A { public: ~A(); }; - class B : virtual private A {}; // expected-note 2 {{declared private here}} - class C : public B {} c; // expected-error 2 {{inherited virtual base class 'A' has

[clang] [clang][NFC] Refactor expected directives in C++ DRs 1-99 (PR #73879)

2023-11-29 Thread Vlad Serebrennikov via cfe-commits
@@ -80,14 +86,21 @@ namespace dr5 { // dr5: 3.1 namespace dr7 { // dr7: 3.4 class A { public: ~A(); }; - class B : virtual private A {}; // expected-note 2 {{declared private here}} - class C : public B {} c; // expected-error 2 {{inherited virtual base class 'A' has

[clang] [clang][NFC] Refactor expected directives in C++ DRs 1-99 (PR #73879)

2023-11-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'm putting this NFC for a review, because that's the direction I'd like our DR test suite to take. If it goes well, I'll go on and refactor the rest of the test suite in this manner. https://github.com/llvm/llvm-project/pull/73879

[clang] [clang][NFC] Refactor expected directives in C++ DRs 1-99 (PR #73879)

2023-11-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/73879 This patch converts (almost) every expected directive in `test/CXX/drs/dr0xx.cpp` into either `@-1` form (when directive immediately follow the line diagnostic is pointing out to), or `@#` form (when directive

[clang] bf2e05c - [clang][NFC] Fill in historical data on when C++ DR 1-99 were fixed

2023-11-29 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-30T02:25:15+03:00 New Revision: bf2e05c7fbc739cd9b9086163303f846ee2806d2 URL: https://github.com/llvm/llvm-project/commit/bf2e05c7fbc739cd9b9086163303f846ee2806d2 DIFF:

[clang] Move documentation about -verify from a header to public docs (PR #73694)

2023-11-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Would it make sense to document this more publicly? While it's designed to be > an internal tool, it's really useful for people who want to make sure their > library produces high quality diagnostics (e.g. nodiscard, static_asserts > etc.). I'm sure you are aware that libc++

[clang] Move documentation about -verify from a header to public docs (PR #73694)

2023-11-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/73694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [libcxx] [compiler-rt] [clang] [llvm] [lldb] [clang-tools-extra] [libc] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-11-28 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > The human-readability of a big list of integers is not better than embedded > base64 -- and actually, seems more of a pain to decode. I agree that the entirety of the data is not too comprehensible, but I can imagine users being interested in the first and last N bytes when

[clang] [Clang] CWG2789 Overload resolution with implicit and explicit object… (PR #73493)

2023-11-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/73493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [compiler-rt] [lldb] [llvm] [flang] [libcxx] [clang] [clang-tools-extra] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Your reasoning works until we have a crash that relies on `#embed` and/or its contents. >From what I saw triaging old crashes, crash submitters are conscious if they >work with proprietary code they can't share even a fragment of, and not so >rarely reduce crash by themselves.

[clang-tools-extra] [libc] [libcxx] [compiler-rt] [flang] [llvm] [clang] [lldb] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'd also like to highlight the use case of diagnostic for compiler crashes. IIRC preprocessed source to attach to an issue is produced with `-frewrite-includes`, so we might want to change its behavior for `#embed`. This might be a good use case for `#embed_base64`.

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + +namespace dr2798 { // dr2798: 17 drafting +#if __cpp_static_assert >= 202306 +struct string { +constexpr string() { +data_ = new char[6](); +__builtin_memcpy(data_, "Hello", 5); +data_[5] =

[clang] [Clang] CWG2789 Overload resolution with implicit and explicit object… (PR #73493)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. https://github.com/llvm/llvm-project/pull/73493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] CWG2789 Overload resolution with implicit and explicit object… (PR #73493)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + + +namespace dr2789 { // dr2789: 18 open + +template +struct Base { +constexpr void g(); // expected-note {{candidate function}} +}; + +template +struct Base2 { +constexpr void g() requires true; //

[clang] [Clang] CWG2789 Overload resolution with implicit and explicit object… (PR #73493)

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

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + +namespace dr2798 { // dr2798: 17 drafting +#if __cpp_static_assert >= 202306 +struct string { +constexpr string() { +data_ = new char[6](); +__builtin_memcpy(data_, "Hello", 5); +data_[5] =

[compiler-rt] [llvm] [lldb] [libcxx] [flang] [libc] [clang-tools-extra] [clang] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @AaronBallman Can you describe your current plan how driver options are going to behave in the light of `#embed`? https://github.com/llvm/llvm-project/pull/68620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[lldb] [llvm] [clang] [clang-tools-extra] [libc] [flang] [libcxx] [compiler-rt] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: There has been multiple discussion in different places about behavior of `-E`, `-M`, and friends (the most notable starts [here](https://discord.com/channels/636084430946959380/636732781086638081/1175241241710055424)), so I thought it would be a good idea to raise awareness

[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)

2023-11-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @frederick-vs-ja Just to be clear, are you waiting for anyone to merge this? https://github.com/llvm/llvm-project/pull/68846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + +namespace dr2798 { // dr2798: 17 drafting +#if __cpp_static_assert >= 202306 +struct string { +constexpr string() { +data_ = new char[6](); +__builtin_memcpy(data_, "Hello", 5); +data_[5] =

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + +namespace dr2798 { // dr2798: 17 drafting +#if __cpp_static_assert >= 202306 +struct string { +constexpr string() { Endilll wrote: Is there a reason not to format this test with clang-format?

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. DR testing part looks good, save for a couple of minor comments. https://github.com/llvm/llvm-project/pull/73234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

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

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

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

[clang] [Clang] Implement P2308R1 - Template Parameter Initialization. (PR #73103)

2023-11-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. DR test side looks good, except for a small nit. https://github.com/llvm/llvm-project/pull/73103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Implement P2308R1 - Template Parameter Initialization. (PR #73103)

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

[clang] [Clang] Implement P2308R1 - Template Parameter Initialization. (PR #73103)

2023-11-22 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors \ Endilll wrote: Is triple necessary for the test? https://github.com/llvm/llvm-project/pull/73103

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-17 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Aaron suggested to me offline that `IsInterestingIdentifier` that I recently changed could be implemented in a simpler way retaining the intent. That's what the latest update about. https://github.com/llvm/llvm-project/pull/71709 ___

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/71709 >From 2823d38544d18213b5bf48c67e4eedd52acce850 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 8 Nov 2023 20:30:37 +0300 Subject: [PATCH 1/3] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` This

[clang] Fix to attribute plugins reaching an unreachable (PR #70877)

2023-11-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > https://github.com/amykhuang/llvm-project/tree/attr-plugin > This branch is [2 commits > ahead](https://github.com/amykhuang/llvm-project/compare/llvm:llvm-project:main...attr-plugin), > [1684 commits >

[clang] Fix to attribute plugins reaching an unreachable (PR #70877)

2023-11-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This was fixed by e11148fda6d8c0eec496463adb46fd6f03a91081 I checked the logs, and exactly the part that this commit fixed is failing. https://github.com/llvm/llvm-project/pull/70877 ___ cfe-commits mailing list

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Finally got past previous test failures. But the following tests started to fail: ``` Clang :: AST/HLSL/pch.hlsl Clang :: PCH/__va_list_tag-typedef.c Clang :: PCH/builtin-is-constant-evaluated.cpp Clang-Unit :: Lex/./LexTests/failed_to_discover_tests_from_gtest ``` Here

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/71709 >From 2823d38544d18213b5bf48c67e4eedd52acce850 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 8 Nov 2023 20:30:37 +0300 Subject: [PATCH 1/2] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` This

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Oh, I didn't look into the identifier's system before. I took a while to look > at the patch but I failed to understand it and I failed to find the > relationships between this patch and header units... Yeah, the part this PR touches in not the most straightforward one. Thank

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-09 Thread Vlad Serebrennikov via cfe-commits
@@ -86,19 +87,26 @@ enum { IdentifierInfoAlignment = 8 }; static constexpr int ObjCOrBuiltinIDBits = 16; /// The "layout" of ObjCOrBuiltinID is: -/// - The first value (0) represents "not a special identifier". -/// - The next (NUM_OBJC_KEYWORDS - 1) values represent

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-08 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @ChuanqiXu9 Can I use some of your help? This PR breaks two module tests: ``` Clang :: Modules/cxx20-hu-04.cpp Clang :: Modules/cxx20-module-file-info-macros.cpp ``` Apparently I somehow break import or export of header unit macros. In `cxx20-module-file-info-macros.cpp`, the

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-08 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/71709 This patch refactors how values are stored inside `IdentifierInfo::ObjcOrBuiltinID` bit-field, and annotates it with `preferred_type`. In order to make the value easier to interpret by debuggers, a new

[clang] 5e09c4e - [clang][NFC] Partially annotate `IdentifierInfo` with `preferred_type`

2023-11-08 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-08T15:44:46+03:00 New Revision: 5e09c4e6a865707ed26f9a893dbef8b499591459 URL: https://github.com/llvm/llvm-project/commit/5e09c4e6a865707ed26f9a893dbef8b499591459 DIFF:

[clang] fb8ff4c - [clang][NFC] Add a missing comment to #71322 changes

2023-11-07 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-07T22:24:59+03:00 New Revision: fb8ff4cdaecb7fe498d4e3a9cbcb33d40cccd29a URL: https://github.com/llvm/llvm-project/commit/fb8ff4cdaecb7fe498d4e3a9cbcb33d40cccd29a DIFF:

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

2023-11-07 Thread Vlad Serebrennikov via cfe-commits
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 ::

[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] 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] 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] 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] 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] 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-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] [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` (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] [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 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
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] [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] [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] [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] 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] 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] 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] 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] 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] 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] 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] 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] 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:

<    5   6   7   8   9   10   11   12   13   >