[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I think I should post here an example from our codebase that made me think twice about this PR. First, there's a `MultiLevelTemplateArgumentList` (MLTAL for short), which I believe is one of the backbones of our template engine:

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
@@ -3548,6 +3561,56 @@ class Sema final : public SemaBase { BuiltinFunction }; + /// A helper function to provide Attribute Location for the Attr types + /// AND the ParsedAttr. + template + static std::enable_if_t, SourceLocation> + getAttrLoc(const AttrInfo ) {

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
@@ -67,15 +67,13 @@ On Unix-like Systems Build LLVM and Clang: cd llvm-project -mkdir build (in-tree build is not supported) -cd build This builds both LLVM and Clang in release mode. Alternatively, if you need a debug build, switch Release to

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
@@ -1,82 +0,0 @@ -#===--===## Endilll wrote: Committed as 681fc40d68936f145963207236d62886e5a34e5d https://github.com/llvm/llvm-project/pull/93318

[clang] 42b4be6 - [clang][NFC] Remove `utils/ci/run-buildbot` script

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-28T13:45:22+03:00 New Revision: 42b4be6d7b896fcf2ef16818862a5be3e98ca791 URL: https://github.com/llvm/llvm-project/commit/42b4be6d7b896fcf2ef16818862a5be3e98ca791 DIFF:

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -1,82 +0,0 @@ -#===--===## Endilll wrote: I decided to keep it intact out of caution, and asked on Discord instead whether this file is still needed.

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Sounds like you have a plan after this PR, which is good. I was worried that you're just applying `const` where it doesn't cause issues _today_. Such approach to const-correctness has been failing us (it leads to `const_cast`s down the usage chain).

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Can you make sure that at every place this PR touches `const` makes sense? I found out recently that we can be quite good at pretending that something is `const`, all the way down until we realize we need a `const_cast`, because modification is required in that one place.

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++23 %s -ast-dump | FileCheck --check-prefixes=CXX23 %s + +namespace cwg2771 { // cwg2771: 18 + +struct A{ +int a; +void cwg2771(){ + int* r = +} +}; +// CXX23: CXXMethodDecl{{.+}}cwg2771 +// CXX23-NEXT: CompoundStmt

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -240,3 +240,29 @@ void test() { } } #endif + + +#if __cplusplus >= 202302L Endilll wrote: Move `#if` inside `namespace`. https://github.com/llvm/llvm-project/pull/93430 ___ cfe-commits mailing list

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -240,3 +240,29 @@ void test() { } } #endif + + +#if __cplusplus >= 202302L +namespace cwg2692 { // cwg2692: 19 + + struct A { +static void f(A); // #cwg2692-1 +void f(this A); // #cwg2692-2 + +void g(); + }; + + void A::g() { +(::f)(A()); // expected-error

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++23 %s -ast-dump | FileCheck --check-prefixes=CXX23 %s + +namespace cwg2771 { // cwg2771: 18 + +struct A{ +int a; +void cwg2771(){ + int* r = Endilll wrote: You can use `#pragma clang __debug dump ` to

[clang] [clang] In Sema use new parentEvaluationContext function (PR #93338)

2024-05-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: LGTM https://github.com/llvm/llvm-project/pull/93338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] In Sema use new parentEvaluationContext function (PR #93338)

2024-05-26 Thread Vlad Serebrennikov via cfe-commits
@@ -5153,6 +5153,12 @@ class Sema final : public SemaBase { return ExprEvalContexts.back(); }; + ExpressionEvaluationContextRecord () { +assert(ExprEvalContexts.size() >= 2 && + "Must be in an expression evaluation context"); +return

[clang] [clang] In Sema use new parentEvaluationContext function (PR #93338)

2024-05-25 Thread Vlad Serebrennikov via cfe-commits
@@ -17693,12 +17691,13 @@ void Sema::PopExpressionEvaluationContext() { // Append the collected materialized temporaries into previous context before // exit if the previous also is a lifetime extending context. - auto = ExprEvalContexts[ExprEvalContexts.size() - 2]; +

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/17] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + Endilll wrote: > 1. It's not parallelized anymore

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/16] [clang][ci] Move libc++ testing into the main PR

[clang] [clang] In Sema use new parentEvaluationContext function (PR #93338)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good. https://github.com/llvm/llvm-project/pull/93338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] In Sema use new parentEvaluationContext function (PR #93338)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > You may want to have someone double-checkout those new libcxx jobs. Sure. libc++ jobs are not really new: I basically copied them over from https://github.com/llvm/llvm-project/blob/b9d40a7ae4b3e5b9829eca8a497637c9fab6dd3e/clang/utils/ci/run-buildbot#L94-L147

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Can we also delete > https://github.com/llvm/llvm-project/blob/main/clang/utils/ci/buildkite-pipeline.yml Done. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/13] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll ready_for_review https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
@@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" Endilll

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/12] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: https://buildkite.com/llvm-project/github-pull-requests/builds/67044#018fab83-257d-446a-9ec2-3faab776dfa8 has both new additions and `clang-ci` run at the same time. `clang-ci` took 15 minutes, Linux run of GitHub Pull requests pipeline that does what `clang-ci` does on top of

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/10] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/9] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/8] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/7] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/6] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/5] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/4] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/3] [clang][ci] Move libc++ testing into the main PR

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/93233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -1213,6 +1213,197 @@ static bool isRemark(const Record ) { return ClsName == "CLASS_REMARK"; } +// Presumes the text has been split at the first whitespace or hyphen. +static bool isExemptAtStart(StringRef Text) { + // Fast path, the first character is lowercase or not

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. OK, I'll try to add this testing to "GitHub Pull Requests" later so that we can avoid building Clang twice. https://github.com/llvm/llvm-project/pull/93233 ___ cfe-commits mailing list

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Do we even need to build Clang and run libc++ jobs? I don't even see them linked in libc++ PR, even besides the fact that I think libc++ is fully tested with GitHub Actions. https://github.com/llvm/llvm-project/pull/93233 ___

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -1213,6 +1213,194 @@ static bool isRemark(const Record ) { return ClsName == "CLASS_REMARK"; } +// Presumes the text has been split at the first whitespace or hyphen. +static bool isExemptAtStart(StringRef Text) { + // Fast path, the first character is lowercase or not

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -1213,6 +1213,194 @@ static bool isRemark(const Record ) { return ClsName == "CLASS_REMARK"; } +// Presumes the text has been split at the first whitespace or hyphen. +static bool isExemptAtStart(StringRef Text) { + // Fast path, the first character is lowercase or not

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > FYI this causes a minor compile-time improvement in stage1 builds using gcc: > https://llvm-compile-time-tracker.com/compare.php?from=32c3561d44aa792ef08d72b5a4c342c9965bc4c2=4feae05c6abda364a9295aecfa600d7d4e7dfeb6=instructions:u > While that's nice, it does suggest that the

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

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

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/93190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -10362,12 +10362,12 @@ def err_shufflevector_argument_too_large : Error< "index for __builtin_shufflevector must be less than the total number " "of vector elements">; def err_shufflevector_minus_one_is_undefined_behavior_constexpr : Error< - "index for

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -3548,6 +3561,56 @@ class Sema final : public SemaBase { BuiltinFunction }; + /// A helper function to provide Attribute Location for the Attr types Endilll wrote: We decided that there's nothing to change here after an offline discussion.

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Quite expectedly, I see buildbot failures. Working on them. https://lab.llvm.org/buildbot/#/builders/36/builds/45836 https://lab.llvm.org/buildbot/#/builders/57/builds/35200 https://github.com/llvm/llvm-project/pull/92953 ___

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

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

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -67,6 +67,7 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringExtras.h" Endilll wrote: For `toString(*I, 10, false)` in `CheckUInt32Argument` definition that I moved.

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -3548,6 +3561,56 @@ class Sema final : public SemaBase { BuiltinFunction }; + /// A helper function to provide Attribute Location for the Attr types Endilll wrote: Yes, I moved them together, so http://eel.is/c++draft/over.match.best#general-2.4

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/92953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Should update the GitHub autolabeler paths for the targets if they don't get > caught talready AMDGPU has been already caught, I updated the rest. Thank you! https://github.com/llvm/llvm-project/pull/93179 ___ cfe-commits mailing

[clang] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: The only thing clang-format complain about is switches for builtins for ARM, Hexagon, MIPS, and SystemZ. I don't feel like it makes improvements there, but open for input from contributors in those areas. https://github.com/llvm/llvm-project/pull/93179

[clang] [clang] Introduce `SemaX86` (PR #93098)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @RKSimon Not at the moment. The current goal is to reduce amount of declarations in `Sema`, and target-specific functions are easy to move out and, importantly, teach where new ones should be placed. No functional changes intended. I don't know much about our CodeGen, so I'm

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good. https://github.com/llvm/llvm-project/pull/93121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaX86` (PR #93098)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/93098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Sema.h changes look good. https://github.com/llvm/llvm-project/pull/70024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92953 >From 66e05ac24613435dbe774d49684d8ff9d119c4c3 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 21 May 2024 21:41:24 +0300 Subject: [PATCH 1/3] Remove some `try_compile` CMake checks for compiler

[clang] [clang] Introduce `SemaX86` (PR #93098)

2024-05-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/93098 This patch moves `Sema` functions that are specific for x86 into the new `SemaX86` class. This continues previous efforts to split `Sema` up. Additional context can be found in #84184 and #92682. >From

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92953 >From 66e05ac24613435dbe774d49684d8ff9d119c4c3 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 21 May 2024 21:41:24 +0300 Subject: [PATCH 1/2] Remove some `try_compile` CMake checks for compiler

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/92682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -86,6 +86,23 @@ struct A { }; } +namespace cwg1458 { // cwg1458: 3.1 +#if __cplusplus >= 201103L +struct A; + +void f() { + constexpr A* a = nullptr; + constexpr int p = &*a; + // expected-error@-1 {{cannot initialize a variable of type 'const int' with an rvalue of

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -451,6 +463,25 @@ static_assert(!__is_nothrow_constructible(D4, int), ""); #endif } // namespace cwg1350 +namespace cwg1352 { // cwg1352: 3.0 +struct A { +#if __cplusplus >= 201103L + int a = sizeof(A); Endilll wrote: > It also mentions in the body of

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -451,6 +463,25 @@ static_assert(!__is_nothrow_constructible(D4, int), ""); #endif } // namespace cwg1350 +namespace cwg1352 { // cwg1352: 3.0 +struct A { +#if __cplusplus >= 201103L + int a = sizeof(A); Endilll wrote: It's not going to fail for static

[clang] [clang][NFC] Refactor `Sema::TagUseKind` (PR #92689)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/92689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement resolution for CWG1835 (PR #92957)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: It was a pure accident I opened this PR. I think draft status does a good job at silencing notifications. I spend a decent amount of time in P1787R6, so I might be able to provide good feedback. I'll take a look tomorrow. It would be nice to see a test for CWG1835 among the

[clang] [llvm] Disable compiling and testing Flang on Clang changes (PR #92740)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/92740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Here are CE links with the set of minimum required compilers that should cover almost all the changes I made: https://godbolt.org/z/j98xzhrGa https://godbolt.org/z/errv4WhfP https://godbolt.org/z/vnoh8YqEP Windows-targeted flags were tested both on MSVC on CE, and on clang-cl 5.0

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: On my setup, this patch improves CMake configuration times (from a clean state) from 51 seconds down to 46 seconds (average of 3 measurements). My setup: ancient x86 hardware, Debian Sid, nightly Clang, build directory on a RAM disk. CMake invocation: `cmake

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92953 This patch remove 36 checks for compiler flags that are done via invoking the compiler across LLVM, Clang, and LLDB. It's was made possible by raising the bar for supported compilers that has been happening

[clang-tools-extra] e6b14b6 - [clangd] Fix directory separators in `infinite-instantiation.test`

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-21T21:01:21+03:00 New Revision: e6b14b6f8bfeeea8d24c8dccb17053ba491d5879 URL: https://github.com/llvm/llvm-project/commit/e6b14b6f8bfeeea8d24c8dccb17053ba491d5879 DIFF:

[clang] [Clang] Change how the argument of a delete expression is converted (PR #92814)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -1230,11 +1230,11 @@ namespace cwg598 { // cwg598: yes int = h(N::i); } -namespace cwg599 { // cwg599: partial +namespace cwg599 { // cwg599: 19 typedef int Fn(); struct S { operator void*(); }; struct T { operator Fn*(); }; - struct U { operator int*();

[clang] [Clang] Change how the argument of a delete expression is converted (PR #92814)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -1245,12 +1245,7 @@ namespace cwg599 { // cwg599: partial // expected-error@-1 {{cannot delete expression with pointer-to-'void' type 'void *'}} delete t; // expected-error@-1 {{cannot delete expression of type 'T'}} -// FIXME: This is valid, but is

[clang] [Clang] Change how the argument of a delete expression is converted (PR #92814)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -1230,11 +1230,11 @@ namespace cwg598 { // cwg598: yes int = h(N::i); } -namespace cwg599 { // cwg599: partial +namespace cwg599 { // cwg599: 19 typedef int Fn(); struct S { operator void*(); }; struct T { operator Fn*(); }; - struct U { operator int*();

[clang-tools-extra] 7c640d1 - [clangd] Fix directory separators in `infinite-instatiation.test`

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-21T17:12:35+03:00 New Revision: 7c640d1d43d7a151100e92c678757e0ce897bcc2 URL: https://github.com/llvm/llvm-project/commit/7c640d1d43d7a151100e92c678757e0ce897bcc2 DIFF:

[clang-tools-extra] 2117136 - [clangd] Fix bad directory path in `infinite-instantiations.test`

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-21T15:42:31+03:00 New Revision: 2117136b2b78ef3b83202909ffaf351598da8bd5 URL: https://github.com/llvm/llvm-project/commit/2117136b2b78ef3b83202909ffaf351598da8bd5 DIFF:

[clang] [clang] Introduce `SemaPseudoObject` (PR #92646)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/92646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Reduce instantiation depth in `infinite-instantiations.test` (PR #92888)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/92888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Reduce instantiation depth in `infinite-instantiations.test` (PR #92888)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Linux CI passed, so I'm merging this. https://github.com/llvm/llvm-project/pull/92888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Reduce instantiation depth in `infinite-instantiations.test` (PR #92888)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll ready_for_review https://github.com/llvm/llvm-project/pull/92888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Reduce instantiation depth in `infinite-instantiations.test` (PR #92888)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92888 This patch reduces template instantiation depth in `infinite-instantiations.test`, because it doesn't seem to be concerned with the default instantiation depth in particular, but has a very material impact on

[clang] [clang] Introduce `SemaRISCV` (PR #92682)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,52 @@ +//===- SemaRISCV.h --- RISC-V target-specific routines ===// Endilll wrote: Fixed https://github.com/llvm/llvm-project/pull/92682 ___ cfe-commits mailing list

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -561,6 +561,42 @@ void CXXRecordDecl::addedClassSubobject(CXXRecordDecl *Subobj) { data().StructuralIfLiteral = false; } +const CXXRecordDecl *CXXRecordDecl::getStandardLayoutBaseWithFields() const { +#ifndef NDEBUG + { +assert( +isStandardLayout() && +

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Thank you for working on this! https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -561,6 +561,42 @@ void CXXRecordDecl::addedClassSubobject(CXXRecordDecl *Subobj) { data().StructuralIfLiteral = false; } +const CXXRecordDecl *CXXRecordDecl::getStandardLayoutBaseWithFields() const { +#ifndef NDEBUG Endilll wrote: We have

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
@@ -561,6 +561,42 @@ void CXXRecordDecl::addedClassSubobject(CXXRecordDecl *Subobj) { data().StructuralIfLiteral = false; } +const CXXRecordDecl *CXXRecordDecl::getStandardLayoutBaseWithFields() const { +#ifndef NDEBUG + { +assert( +isStandardLayout() && +

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor `Sema::TagUseKind` (PR #92689)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92689 >From 9c89a7b451221d79f96fd1fc1d015c6a22b9f66e Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 19 May 2024 15:00:38 +0300 Subject: [PATCH] [clang][NFC] Refactor `Sema::TagUseKind` This patch makes

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good to me. https://github.com/llvm/llvm-project/pull/91310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Change how the argument of a delete expression is converted (PR #92814)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
@@ -1245,12 +1245,7 @@ namespace cwg599 { // cwg599: partial // expected-error@-1 {{cannot delete expression with pointer-to-'void' type 'void *'}} delete t; // expected-error@-1 {{cannot delete expression of type 'T'}} -// FIXME: This is valid, but is

[clang] [Clang] Change how the argument of a delete expression is converted (PR #92814)

2024-05-20 Thread Vlad Serebrennikov via cfe-commits
@@ -1230,11 +1230,11 @@ namespace cwg598 { // cwg598: yes int = h(N::i); } -namespace cwg599 { // cwg599: partial +namespace cwg599 { // cwg599: 19 typedef int Fn(); struct S { operator void*(); }; struct T { operator Fn*(); }; - struct U { operator int*();

  1   2   3   4   5   6   7   8   9   10   >