[clang] [llvm] Move several vector intrinsics out of experimental namespace (PR #88748)

2024-04-25 Thread Cullen Rhodes via cfe-commits
c-rhodes wrote: > Rebased on newer LLVM + forcing to re-run the testing which previously failed > on some not related issues. Not sure if you missed my previous comment but you need to update the `interleave2` intrinsic in MLIR. MLIR doesn't build with this patch which you can see in pre-comm

[clang] 9b0651f - [clang][dataflow] Don't propagate result objects in nested declarations. (#89903)

2024-04-25 Thread via cfe-commits
Author: martinboehme Date: 2024-04-25T09:22:14+02:00 New Revision: 9b0651f5ae6510577302ea527b2cc79e80ec9ccc URL: https://github.com/llvm/llvm-project/commit/9b0651f5ae6510577302ea527b2cc79e80ec9ccc DIFF: https://github.com/llvm/llvm-project/commit/9b0651f5ae6510577302ea527b2cc79e80ec9ccc.diff

[clang] [clang][dataflow] Don't propagate result objects in nested declarations. (PR #89903)

2024-04-25 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/89903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Crash fix for `widenDistinctValues()`. (PR #89895)

2024-04-25 Thread via cfe-commits
martinboehme wrote: Code formatting failure is an infrastructure error. https://github.com/llvm/llvm-project/pull/89895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b9208ce - [clang][dataflow] Crash fix for `widenDistinctValues()`. (#89895)

2024-04-25 Thread via cfe-commits
Author: martinboehme Date: 2024-04-25T09:24:08+02:00 New Revision: b9208ce318907b1a5ea4ad0d2aa4414dfba0616c URL: https://github.com/llvm/llvm-project/commit/b9208ce318907b1a5ea4ad0d2aa4414dfba0616c DIFF: https://github.com/llvm/llvm-project/commit/b9208ce318907b1a5ea4ad0d2aa4414dfba0616c.diff

[clang] [clang][dataflow] Crash fix for `widenDistinctValues()`. (PR #89895)

2024-04-25 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/89895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Crash fix for `widenDistinctValues()`. (PR #89895)

2024-04-25 Thread via cfe-commits
martinboehme wrote: > LGTM! Do we want to open tickets to track these FIXMEs? Sounds good -- done: https://github.com/llvm/llvm-project/issues/90024 https://github.com/llvm/llvm-project/pull/89895 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-04-25 Thread via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/89713 >From f6fd1e5e5f42b3c72cb5aeaf9e6d4e91d5424bee Mon Sep 17 00:00:00 2001 From: YanzuoLiu Date: Tue, 23 Apr 2024 14:56:12 +0800 Subject: [PATCH 1/5] Add missing check when making pointer to member --- clang/lib/Sema

[clang] Push immediate function context while transforming lambdas in templates. (PR #89702)

2024-04-25 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/89702 >From ba1c87956f74248467d2f85c20c2f450eef953bd Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Mon, 22 Apr 2024 22:39:06 -0400 Subject: [PATCH] Push immediate function context while transforming lambdas in templa

[clang] 5e767bd - Push immediate function context while transforming lambdas in templates. (#89702)

2024-04-25 Thread via cfe-commits
Author: Daniel M. Katz Date: 2024-04-25T09:41:25+02:00 New Revision: 5e767bd7d16dcdfc1ad8b32ba399f969dd940f57 URL: https://github.com/llvm/llvm-project/commit/5e767bd7d16dcdfc1ad8b32ba399f969dd940f57 DIFF: https://github.com/llvm/llvm-project/commit/5e767bd7d16dcdfc1ad8b32ba399f969dd940f57.diff

[clang] Push immediate function context while transforming lambdas in templates. (PR #89702)

2024-04-25 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/89702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fe47e8f - [NFC] [ASTUnit] [Serialization] Transalte local decl ID to global decl ID before consuming

2024-04-25 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-25T15:55:46+08:00 New Revision: fe47e8ff3ae7fc8975eaade6bfa6679737c28b93 URL: https://github.com/llvm/llvm-project/commit/fe47e8ff3ae7fc8975eaade6bfa6679737c28b93 DIFF: https://github.com/llvm/llvm-project/commit/fe47e8ff3ae7fc8975eaade6bfa6679737c28b93.diff LO

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-04-25 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 created https://github.com/llvm/llvm-project/pull/90030 In CTU there is not always an AnalysisDeclContext for a given call. This led to crashes. The AnalysisDeclContext access is now checked. From de695f8e556e1efd6b2a4e69f916467af94e0c0d Mon Sep 17 00:00:00 2001 Fr

[clang] [clang][analyzer] Fix alpha.unix.BlockInCriticalSection for CTU (PR #90030)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Endre Fülöp (gamesh411) Changes In CTU there is not always an AnalysisDeclContext for a given call. This led to crashes. The AnalysisDeclContext access is now checked. --- Full diff: https://gi

[clang] [Coverage] Add a new flag to split region after every call. (PR #90031)

2024-04-25 Thread via cfe-commits
https://github.com/c01db33f created https://github.com/llvm/llvm-project/pull/90031 This helps with displaying more precise coverage when a function causes the program to exit, crashes, or similar. For example, using this flag should address the case listed in the documentation under "Drawback

[clang] [Coverage] Add a new flag to split region after every call. (PR #90031)

2024-04-25 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [Coverage] Add a new flag to split region after every call. (PR #90031)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (c01db33f) Changes This helps with displaying more precise coverage when a function causes the program to exit, crashes, or similar. For example, using this flag should address the case listed in the documentation under "Drawbacks an

[clang] Notifying assume directive as 'worked on'. (PR #90022)

2024-04-25 Thread via cfe-commits
https://github.com/SunilKuravinakop updated https://github.com/llvm/llvm-project/pull/90022 >From 031b44a69d2b2d408bf07714be0427bab65f29ca Mon Sep 17 00:00:00 2001 From: Sunil Kuravinakop Date: Thu, 25 Apr 2024 01:45:29 -0500 Subject: [PATCH 1/2] Notifying assume directive as 'worked on'. When

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/86912 >From 2c20a6200fb2790b3a891ffc8c43682c113c7e8a Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 18 Mar 2024 08:36:55 +0800 Subject: [PATCH] [Modules] No transitive source location change --- clang/includ

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > The changes LGTM, don't want to block this on my remaining nits. Thanks for reviewing this. > > I believe @Bigcheese wanted to test test impact on PCM size on our side > before this lands. I've rebased this with main. I'll wait for the results from @Bigcheese https://gi

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-04-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Given we're pursuing https://github.com/llvm/llvm-project/pull/83237 series. I'll close this one. https://github.com/llvm/llvm-project/pull/76774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-04-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/76774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Don't default to -mrelax-all for non-RISCV -O0 (PR #90013)

2024-04-25 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert approved this pull request. LGTM. My understanding is that this flag is used for reducing compile time and debug only. https://github.com/llvm/llvm-project/pull/90013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Fall back to DW_TAG_typedef for instantiation dependent template aliases (PR #90032)

2024-04-25 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams created https://github.com/llvm/llvm-project/pull/90032 Workaround for issue #89774 until it can be properly fixed. When `-gtemplate-alias` is specified Clang emits a DW_TAG_template_alias for template aliases. This patch avoids an assertion failure by falling back t

[clang] [Clang] Fall back to DW_TAG_typedef for instantiation dependent template aliases (PR #90032)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Orlando Cazalet-Hyams (OCHyams) Changes Workaround for issue #89774 until it can be properly fixed. When `-gtemplate-alias` is specified Clang emits a DW_TAG_template_alias for template aliases. This patch avoids an assertion failure by f

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-04-25 Thread via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/89713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix the process return code if diagnostics occurred. (PR #89879)

2024-04-25 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: > The Unix pre-merge seems okay, however the windows pre-merge check is doing > nothing for more than 12h. Yeah same here. I recognized that Windows PR checks are running Flang regression tests now. I guess that adds a huge load on the builders and causes the delays. Min

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level (PR #84132)

2024-04-25 Thread Kai Luo via cfe-commits
@@ -80,6 +80,7 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { bool IsISA3_0 = false; bool IsISA3_1 = false; bool HasQuadwordAtomics = false; + bool HasAIXShLibTLSModelHeuristic = false; bzEq wrote: The variable defined here is onl

[clang] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one. (PR #83108)

2024-04-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/83108 >From be1c83fb885536c3e65657c6549bd20dd29d9649 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 7 Jan 2018 15:16:11 +0200 Subject: [PATCH 1/3] D41416: [modules] [pch] Do not deserialize all lazy temp

[clang] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one. (PR #83108)

2024-04-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Rebased with main. https://github.com/llvm/llvm-project/pull/83108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level (PR #84132)

2024-04-25 Thread Kai Luo via cfe-commits
@@ -80,6 +80,7 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { bool IsISA3_0 = false; bool IsISA3_1 = false; bool HasQuadwordAtomics = false; + bool HasAIXShLibTLSModelHeuristic = false; bzEq wrote: Code in `PPCTargetLowering::Lowe

[clang] [Clang] Fall back to DW_TAG_typedef for instantiation dependent template aliases (PR #90032)

2024-04-25 Thread Michael Buch via cfe-commits
https://github.com/Michael137 approved this pull request. https://github.com/llvm/llvm-project/pull/90032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 87ec4ab - [Clang] Fall back to DW_TAG_typedef for instantiation dependent template aliases (#90032)

2024-04-25 Thread via cfe-commits
Author: Orlando Cazalet-Hyams Date: 2024-04-25T10:34:32+01:00 New Revision: 87ec4ab72cb3ae27ac08d040b2825ee01214fe75 URL: https://github.com/llvm/llvm-project/commit/87ec4ab72cb3ae27ac08d040b2825ee01214fe75 DIFF: https://github.com/llvm/llvm-project/commit/87ec4ab72cb3ae27ac08d040b2825ee01214fe

[clang] [Clang] Fall back to DW_TAG_typedef for instantiation dependent template aliases (PR #90032)

2024-04-25 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams closed https://github.com/llvm/llvm-project/pull/90032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SME] Add intrinsics for multi-vector BFCLAMP (PR #88251)

2024-04-25 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/88251 >From fe692284cd248e372302671e094eb9950edb5ee5 Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Wed, 10 Apr 2024 10:20:03 + Subject: [PATCH 1/3] [AArch64][SME] Add intrinsics for multi-vector BFCLAMP --- c

[clang] [Clang][C++23] Core language changes from P1467R9 extended floating-point types and standard names. (PR #78503)

2024-04-25 Thread via cfe-commits
cor3ntin wrote: @codemzs Any news? Thanks a lot for your work! https://github.com/llvm/llvm-project/pull/78503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2c5d7a8 - [clang-format] Remove YAML hack to emit a BasedOnStyle comment (#89228)

2024-04-25 Thread via cfe-commits
Author: Jannik Silvanus Date: 2024-04-25T12:47:43+02:00 New Revision: 2c5d7a888589a608a4cd6adc34f19a65dc4551af URL: https://github.com/llvm/llvm-project/commit/2c5d7a888589a608a4cd6adc34f19a65dc4551af DIFF: https://github.com/llvm/llvm-project/commit/2c5d7a888589a608a4cd6adc34f19a65dc4551af.dif

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-25 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus closed https://github.com/llvm/llvm-project/pull/89228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix a bug on template partial specialization (PR #89862)

2024-04-25 Thread Qizhi Hu via cfe-commits
@@ -7706,7 +7706,7 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, // FIXME: The language rules don't say what happens in this case. // FIXME: We get an opaque dependent type out of decltype(auto) if the // expression is merely instantiati

[clang] 03b1a0c - [Clang] Diagnose apply AST consume actions on LLVM IR (#88602)

2024-04-25 Thread via cfe-commits
Author: yronglin Date: 2024-04-25T19:05:46+08:00 New Revision: 03b1a0c2a72dd24943642ef15e6c046d982643c2 URL: https://github.com/llvm/llvm-project/commit/03b1a0c2a72dd24943642ef15e6c046d982643c2 DIFF: https://github.com/llvm/llvm-project/commit/03b1a0c2a72dd24943642ef15e6c046d982643c2.diff LOG:

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-25 Thread via cfe-commits
https://github.com/yronglin closed https://github.com/llvm/llvm-project/pull/88602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-25 Thread Tom Eccles via cfe-commits
@@ -6582,12 +6582,6 @@ def J : JoinedOrSeparate<["-"], "J">, Group, Alias; -let Visibility = [FlangOption] in { -def no_fortran_main : Flag<["-"], "fno-fortran-main">, tblah wrote: Will this break existing build systems configured to use this flag? https

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-25 Thread Tom Eccles via cfe-commits
https://github.com/tblah commented: Thanks for this. I'm sure it will give a big improvement to the experience of building applications with flang. Code changes look good to me. I'm worried about how this could break existing builds using `-fno-fortran-main` and `-lFortran_main`. Do you have a

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-25 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/89938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-25 Thread Tom Eccles via cfe-commits
@@ -1191,118 +1191,10 @@ bool tools::addOpenMPRuntime(const Compilation &C, ArgStringList &CmdArgs, return true; } -/// Determines if --whole-archive is active in the list of arguments. -static bool isWholeArchivePresent(const ArgList &Args) { - bool WholeArchiveActive = f

[clang] [llvm] [LLVM][SVE] Seperate the int and floating-point variants of addqv. (PR #89762)

2024-04-25 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/89762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implementation of '#pragma STDC FENV_ROUND' (PR #89617)

2024-04-25 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff updated https://github.com/llvm/llvm-project/pull/89617 >From 0fc5c57264ecf51f8b9fe8303520a51cb1fee40e Mon Sep 17 00:00:00 2001 From: Serge Pavlov Date: Thu, 14 Apr 2022 18:00:14 +0700 Subject: [PATCH 1/2] Implementation of '#pragma STDC FENV_ROUND' This pragma is i

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-04-25 Thread Sebastian Wolf via cfe-commits
https://github.com/sebwolf-de created https://github.com/llvm/llvm-project/pull/90043 The string based test to find out whether the check is applicable on the class is not ideal, but I did not find a more elegant way, yet. If there is more clang-query magic available, that I'm not aware of, I'

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-04-25 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Sebastian Wolf (sebwolf-de) Changes The string based test to find out whether the check is applicable on the class is not ideal, but I did not find a more elegant way, yet. If there is more clang-query magic available, that I'

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Sebastian Wolf (sebwolf-de) Changes The string based test to find out whether the check is applicable on the class is not ideal, but I did not find a more elegant way, yet. If there is more clang-query magic available, that I'm not a

[clang] [clang-tools-extra] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you for the improvement for performance! https://github.com/llvm/llvm-project/pull/84384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2024-04-25 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: @efriedma-quic Ping! https://github.com/llvm/llvm-project/pull/89154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-04-25 Thread Brian Bi via cfe-commits
t3nsor wrote: > @t3nsor Do you know the reason for the "not enclosed in parameters" in > https://eel.is/c++draft/expr.unary.op#4 ? No I don't. If I had to guess, it might be because adding parentheses is intended to be used as a way to not create a pointer to member (and instead get an ordina

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-25 Thread via cfe-commits
NagyDonat wrote: @Troy-Butler I initiated the merge, but it seems that github mangles the email metadata: ![image](https://github.com/llvm/llvm-project/assets/43410265/d783c97f-f5f7-469f-9f77-9689275ea429) (Note that I obscured your email address in this screenshot, but it can be found within th

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-25 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > This patch will finally allow us to mark C++17 support in clang as complete. > > This is a continuation of the review process from an [old PR in > phab](https://reviews.llvm.org/D109496). > > Recap: The original patch from phab initially contained no workarounds / > provisio

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-25 Thread Troy Butler via cfe-commits
Troy-Butler wrote: > @Troy-Butler I started to do the merge, but I cancelled it for now because it > seems that github mangles the email metadata: > ![image](https://private-user-images.githubusercontent.com/43410265/325606235-d783c97f-f5f7-469f-9f77-9689275ea429.png?jwt=eyJhbGciOiJIUzI1NiIsInR

[clang] [clang][NFC] Reformat suspicious condition (PR #89923)

2024-04-25 Thread Troy Butler via cfe-commits
Troy-Butler wrote: I see that the build has failed - what do I need to do to fix this? https://github.com/llvm/llvm-project/pull/89923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenCL] Put constant initializer globals into constant addrspace (PR #90048)

2024-04-25 Thread Sven van Haastregt via cfe-commits
https://github.com/svenvh created https://github.com/llvm/llvm-project/pull/90048 Place constant initializer globals into the constant address space. Clang generates such globals for e.g. larger array member initializers of classes and then emits copy operations from the global to the object(s

[clang] [OpenCL] Put constant initializer globals into constant addrspace (PR #90048)

2024-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Sven van Haastregt (svenvh) Changes Place constant initializer globals into the constant address space. Clang generates such globals for e.g. larger array member initializers of classes and then emits copy operations from the glob

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-25 Thread Erich Keane via cfe-commits
erichkeane wrote: I think I've got everything done you were concerned about. Let me know if you see anything else! https://github.com/llvm/llvm-project/pull/89639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang][NFC] Reformat suspicious condition (PR #89923)

2024-04-25 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I see that the build has failed - what do I need to do to fix this? That build failure looks unrelated to your changes, I think it just got caught in a bad state. You can try pushing no changes to the branch to kick off a new build just to be sure, though. https://github

[clang] [Driver] Don't default to -mrelax-all for non-RISCV -O0 (PR #90013)

2024-04-25 Thread Peter Smith via cfe-commits
smithp35 wrote: No objections from me. I would prefer there not to be a difference for assembly at different optimisation levels. I can't find any evidence that this affects Arm (Thumb to be precise) assembly at all. For example: ``` .text b dest// b.n 2-byte branch

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-25 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/89639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][Release] Refactor cache file and use two stages for non-PGO builds (PR #89812)

2024-04-25 Thread Tom Stellard via cfe-commits
tstellar wrote: I've been testing this with #89521. https://github.com/llvm/llvm-project/pull/89812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][Release] Refactor cache file and use two stages for non-PGO builds (PR #89812)

2024-04-25 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/89812 >From 275979816a1de8b16a6c45b5ee2ef4e73c8828ba Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 23 Apr 2024 19:29:04 + Subject: [PATCH] [CMake][Release] Refactor cache file and use two stages for non-

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-25 Thread via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++26 -fsyntax-only -verify %s + +auto&& f1() { + return 42; // expected-error{{returning reference to local temporary object}} +} +const double& f2() { + static int x = 42; + return x; // expected-error{{returning reference to local te

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-25 Thread via cfe-commits
yronglin wrote: > DR changes look good. @erichkeane mind giving CWG650 test a quick look? Thanks for your review! https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-25 Thread via cfe-commits
@@ -8340,8 +8340,17 @@ void Sema::checkInitializerLifetime(const InitializedEntity &Entity, << Entity.getType()->isReferenceType() << CLE->getInitializer() << 2 << DiagRange; } else { -Diag(DiagLoc, diag::warn_ret_local_temp_addr_ref) -

[clang] [Clang][Sema] fix a bug on template partial specialization (PR #89862)

2024-04-25 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/89862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-25 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-25 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 1 Nit, else LGTM, the CWG issue change seems sensible, as does the rest. https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-25 Thread Erich Keane via cfe-commits
@@ -9950,6 +9950,8 @@ def warn_ret_stack_addr_ref : Warning< def warn_ret_local_temp_addr_ref : Warning< "returning %select{address of|reference to}0 local temporary object">, InGroup; +def err_ret_local_temp_addr_ref : Error< + "returning %select{address of|reference to}0

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-25 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Thank you working on this. I'm really like this feature! I've a question, > > do we have any further plans to support GNU extension attributes(e.g. > > **attribute**((aligned)))? Although it is not included in the paper. > > No, sorry! > > My goal here is to increase con

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-25 Thread Kelvin Li via cfe-commits
kkwli wrote: This change will also break backward compatibility that the old object file that contain `main` can no longer use the new compiler to link with other objects. I think we can put a warning in the release note or something like that to warn users. https://github.com/llvm/llvm-proje

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-25 Thread Erich Keane via cfe-commits
@@ -102,11 +102,21 @@ namespace PR33839 { for (auto [x] : a) { // expected-warning {{unused variable '[x]'}} } } - void use() { + void use() { f(); // expected-note {{instantiation of}} g(); g(); h(); // expected-note {{instantiation of}} }

[clang-tools-extra] [clang-tidy] Enable C23 support in modernize-use-nullptr (PR #89990)

2024-04-25 Thread via cfe-commits
@@ -269,6 +269,10 @@ Changes in existing checks don't remove parentheses used in ``sizeof`` calls when they have array index accesses as arguments. +- Improved :doc:`modernize-use-nullptr + ` check to include support for + ``C23``, which also has introduced the ``nullptr

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-04-25 Thread via cfe-commits
@@ -0,0 +1,81 @@ +//===--- AvoidBoundsErrorsCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-04-25 Thread via cfe-commits
@@ -0,0 +1,81 @@ +//===--- AvoidBoundsErrorsCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-04-25 Thread via cfe-commits
@@ -0,0 +1,81 @@ +//===--- AvoidBoundsErrorsCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-04-25 Thread via cfe-commits
@@ -0,0 +1,32 @@ +//===--- AvoidBoundsErrorsCheck.h - clang-tidy --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-04-25 Thread via cfe-commits
@@ -0,0 +1,81 @@ +//===--- AvoidBoundsErrorsCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-04-25 Thread via cfe-commits
@@ -131,6 +131,11 @@ New checks to reading out-of-bounds data due to inadequate or incorrect string null termination. +- New :doc:`cppcoreguidelines-avoid-bounds-errors + ` check. + + Flags the unsafe `operator[]` and replaces it with `at()`. EugeneZelen

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-04-25 Thread via cfe-commits
@@ -0,0 +1,20 @@ +.. title:: clang-tidy - cppcoreguidelines-avoid-bounds-errors + +cppcoreguidelines-avoid-bounds-errors += + +This check enforces the `SL.con.3

[clang] [clang-tools-extra] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-25 Thread Louis Dionne via cfe-commits
ldionne wrote: > > I'd rather keep the libc++ tests green while landing this PR. I tried > > something out, let's see if that works. > > It looks like some further adjustments may be needed as some stage1 builders > are failing: > > ``` > [...] > ``` Ah, yes, we're using the nightly clang wh

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-25 Thread via cfe-commits
@@ -102,11 +102,21 @@ namespace PR33839 { for (auto [x] : a) { // expected-warning {{unused variable '[x]'}} } } - void use() { + void use() { f(); // expected-note {{instantiation of}} g(); g(); h(); // expected-note {{instantiation of}} }

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan created https://github.com/llvm/llvm-project/pull/90064 Certain C++ types, such as `std::chrono::tzdb` in libstdc++, are non-copyable, but don't explicitly delete their copy constructor. Instead, they trigger template instantiation errors when trying to call their

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 697fcd009855a579f756dfe34498a815ed9dc3fd a3ea8c954f3446330314f4b5d1ea42d87761b1c4 --

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/90064 >From 9eac3a34aa9c48e1ddc715ca04c4380f1d78a876 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Thu, 25 Apr 2024 15:19:09 +0100 Subject: [PATCH] [APINotes] Allow annotating a C++ type as non-copyable in Swift

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/90064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Saleem Abdulrasool via cfe-commits
@@ -527,6 +527,13 @@ class TagTableInfo Info.EnumExtensibility = static_cast((Payload & 0x3) - 1); +uint8_t Copyable = +endian::readNext(Data); +if (Copyable == 1) + Info.setSwiftCopyable(std::optional(false)); +else if (Copyable == 2)

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Saleem Abdulrasool via cfe-commits
@@ -1125,10 +1125,10 @@ class CommonTypeTableInfo class TagTableInfo : public CommonTypeTableInfo { public: unsigned getUnversionedInfoSize(const TagInfo &TI) { -return 2 + (TI.SwiftImportAs ? TI.SwiftImportAs->size() : 0) + - 2 + (TI.SwiftRetainOp ? TI.SwiftRet

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/90064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Saleem Abdulrasool via cfe-commits
@@ -1146,6 +1146,12 @@ class TagTableInfo : public CommonTypeTableInfo { writer.write(Flags); +if (auto Copyable = TI.isSwiftCopyable()) { compnerd wrote: Unnecessary braces and we should be able to use the named constants here. https://github.com/

[clang] 39ed3c6 - [clang-scan-deps] Fix contention when updating `TrackingStatistic`s in hot code paths in `FileManager`. (#88427)

2024-04-25 Thread via cfe-commits
Author: Alexandre Ganea Date: 2024-04-25T10:31:45-04:00 New Revision: 39ed3c68e51f1b04fe2890db9006ae1b176b1582 URL: https://github.com/llvm/llvm-project/commit/39ed3c68e51f1b04fe2890db9006ae1b176b1582 DIFF: https://github.com/llvm/llvm-project/commit/39ed3c68e51f1b04fe2890db9006ae1b176b1582.dif

[clang] [clang-scan-deps] Fix contention when updating `TrackingStatistic`s in hot code paths in `FileManager`. (PR #88427)

2024-04-25 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea closed https://github.com/llvm/llvm-project/pull/88427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-25 Thread via cfe-commits
@@ -102,11 +102,21 @@ namespace PR33839 { for (auto [x] : a) { // expected-warning {{unused variable '[x]'}} } } - void use() { + void use() { f(); // expected-note {{instantiation of}} g(); g(); h(); // expected-note {{instantiation of}} }

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Egor Zhdan via cfe-commits
@@ -1125,10 +1125,10 @@ class CommonTypeTableInfo class TagTableInfo : public CommonTypeTableInfo { public: unsigned getUnversionedInfoSize(const TagInfo &TI) { -return 2 + (TI.SwiftImportAs ? TI.SwiftImportAs->size() : 0) + - 2 + (TI.SwiftRetainOp ? TI.SwiftRet

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-25 Thread via cfe-commits
@@ -102,11 +102,21 @@ namespace PR33839 { for (auto [x] : a) { // expected-warning {{unused variable '[x]'}} } } - void use() { + void use() { f(); // expected-note {{instantiation of}} g(); g(); h(); // expected-note {{instantiation of}} }

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/90064 >From f0394cfaf4df3881809fdce7882bda3006951805 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Thu, 25 Apr 2024 15:19:09 +0100 Subject: [PATCH] [APINotes] Allow annotating a C++ type as non-copyable in Swift

  1   2   3   4   >