[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-01 Thread Fangrui Song via cfe-commits
MaskRay wrote: > I took a look and I think it may be too awkward to do, as we'd want to run > e.g. readelf afterwards. But an example is > `lld/test/ELF/as-needed-not-in-regular.s`. The idea being: if > `-Wl,--as-needed` is in the config file, do we correctly prune an unnecessary > library fr

[clang] [clang][bytecode][NFC] Remove APValue Result argument where unnecessary (PR #118199)

2024-12-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118199 This is unneeded in almost all circumstances. We only return an APValue back to clang when the evaluation is finished, and that is always done by an EvalEmitter - which has its own implementation of the Ret in

[clang] fix access checking about function overloading (PR #107768)

2024-12-01 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght edited https://github.com/llvm/llvm-project/pull/107768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Remove APValue Result argument where unnecessary (PR #118199)

2024-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This is unneeded in almost all circumstances. We only return an APValue back to clang when the evaluation is finished, and that is always done by an EvalEmitter - which has its own implementation of the Ret

[clang] fix access checking about function overloading (PR #107768)

2024-12-01 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght edited https://github.com/llvm/llvm-project/pull/107768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-01 Thread Sam James via cfe-commits
thesamesam wrote: @pawosm-arm See also https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Importance_of_linking_order. It is common for distributions to enable `-Wl,--as-needed` via patches to the compiler or configuration files. https://github.com/llvm/llvm-project/pull/117573

[clang] fix access checking about function overloading (PR #107768)

2024-12-01 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght edited https://github.com/llvm/llvm-project/pull/107768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix access checking about function overloading (PR #107768)

2024-12-01 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght edited https://github.com/llvm/llvm-project/pull/107768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix access checking about function overloading (PR #107768)

2024-12-01 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght ready_for_review https://github.com/llvm/llvm-project/pull/107768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix access checking about function overloading (PR #107768)

2024-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Zhikai Zeng (Backl1ght) Changes fix https://github.com/llvm/llvm-project/issues/107629 After some more debugging, I find out that we will check access here at https://github.com/llvm/llvm-project/blob/8e010ac5a173c9dee44b44324169a3e100a1a

[clang] fix access checking about function overloading (PR #107768)

2024-12-01 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght edited https://github.com/llvm/llvm-project/pull/107768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Support __builtin_reduce_add (PR #117672)

2024-12-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/117672 >From 1bb49850c392cdc535849f43ad14b02cbbb9dcc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 26 Nov 2024 06:33:12 +0100 Subject: [PATCH] [clang][bytecode] Support __builtin_reduce_add

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-01 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: > I took a look and I think it may be too awkward to do, as we'd want to run > e.g. readelf afterwards. But an example is > `lld/test/ELF/as-needed-not-in-regular.s`. The idea being: if > `-Wl,--as-needed` is in the config file, do we correctly prune an unnecessary > library

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcia (Arithmetic) extension (PR #118113)

2024-12-01 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-win` running on `as-worker-93` while building `clang,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/1731 Here is the releva

[clang-tools-extra] [clang-tidy][docs] improve documentation on cppcoreguidelines-narrowing-conversions (#111510) (PR #118209)

2024-12-01 Thread Jonas Toth via cfe-commits
https://github.com/JonasToth updated https://github.com/llvm/llvm-project/pull/118209 >From b10c536f66521249a374908f0bd0eb1fe2ff42ad Mon Sep 17 00:00:00 2001 From: Jonas Toth Date: Sun, 1 Dec 2024 12:02:13 +0100 Subject: [PATCH] [clang-tidy][docs] improve documentation on cppcoreguidelines-nar

[clang] [clang-format][CMake] Generate formatting options docs during build (PR #113739)

2024-12-01 Thread Owen Pan via cfe-commits
owenca wrote: > Can you explicate on what your requirements are here? I don't see why just > wrapping the python script in CMake does anything tangible here. Having a > build target that modifies the source directory is also weird and something > that we should avoid if possible, in my opinion

[clang-tools-extra] [clang-tidy][docs] improve documentation on cppcoreguidelines-narrowing-conversions (#111510) (PR #118209)

2024-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Jonas Toth (JonasToth) Changes This PR improves the docs for this check to include an example of hidden narrowing conversions from the integer promotion rules in arithmetic. --- Full diff: https://github.com/llvm/llvm-project/

[clang-tools-extra] [clang-tidy][docs] improve documentation on cppcoreguidelines-narrowing-conversions (#111510) (PR #118209)

2024-12-01 Thread Jonas Toth via cfe-commits
https://github.com/JonasToth created https://github.com/llvm/llvm-project/pull/118209 This PR improves the docs for this check to include an example of hidden narrowing conversions from the integer promotion rules in arithmetic. >From c662917b248335c85714e791f55e12e834baa87d Mon Sep 17 00:00:0

[clang] [clang-format][CMake] Generate formatting options docs during build (PR #113739)

2024-12-01 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: > That and to also ensure that the edited Format.h doesn't break the python > script. Makes sense. #118154 would cover that too. > If we are to leave the generated part of the rst file in the repo, > https://github.com/llvm/llvm-project/pull/111513 would satisfy my > re

[clang] 6881c6d - [RISCV] Add Qualcomm uC Xqcia (Arithmetic) extension (#118113)

2024-12-01 Thread via cfe-commits
Author: Sudharsan Veeravalli Date: 2024-12-01T17:06:22+05:30 New Revision: 6881c6d2a6ef2b9f1736afb124b2486d6b8bc603 URL: https://github.com/llvm/llvm-project/commit/6881c6d2a6ef2b9f1736afb124b2486d6b8bc603 DIFF: https://github.com/llvm/llvm-project/commit/6881c6d2a6ef2b9f1736afb124b2486d6b8bc60

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcia (Arithmetic) extension (PR #118113)

2024-12-01 Thread Sudharsan Veeravalli via cfe-commits
https://github.com/svs-quic closed https://github.com/llvm/llvm-project/pull/118113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (PR #116888)

2024-12-01 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/116888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (PR #116888)

2024-12-01 Thread Nikita Popov via cfe-commits
@@ -1898,6 +1882,60 @@ static Instruction *foldSelectICmpEq(SelectInst &SI, ICmpInst *ICI, return nullptr; } +/// Fold `X Pred C1 ? X BOp C2 : C1 BOp C2` to `min/max(X, C1) BOp C2`. +/// This allows for better canonicalization. +static Value *foldSelectWithConstOpToBinOp(IC

[clang] [llvm] [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (PR #116888)

2024-12-01 Thread Nikita Popov via cfe-commits
@@ -1898,6 +1882,60 @@ static Instruction *foldSelectICmpEq(SelectInst &SI, ICmpInst *ICI, return nullptr; } +/// Fold `X Pred C1 ? X BOp C2 : C1 BOp C2` to `min/max(X, C1) BOp C2`. +/// This allows for better canonicalization. +static Value *foldSelectWithConstOpToBinOp(IC

[clang] [llvm] [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (PR #116888)

2024-12-01 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/116888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix access checking about function overloading (PR #107768)

2024-12-01 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght updated https://github.com/llvm/llvm-project/pull/107768 >From 694b7dd640676c83a25e79b1f4ba1cb8e6cbb87b Mon Sep 17 00:00:00 2001 From: Backl1ght Date: Sun, 1 Dec 2024 16:45:28 +0800 Subject: [PATCH] fix --- clang/docs/ReleaseNotes.rst| 1 + clang/lib/Sema

[clang] [Driver] Do not add gno-column-info when using sampling PGO (PR #117954)

2024-12-01 Thread Haohai Wen via cfe-commits
https://github.com/HaohaiWen closed https://github.com/llvm/llvm-project/pull/117954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 22417ec - [Driver] Do not add gno-column-info when using sampling PGO (#117954)

2024-12-01 Thread via cfe-commits
Author: Haohai Wen Date: 2024-12-01T20:54:38+08:00 New Revision: 22417ec6cca0ed8ccecb0c2b77011e591378fd2a URL: https://github.com/llvm/llvm-project/commit/22417ec6cca0ed8ccecb0c2b77011e591378fd2a DIFF: https://github.com/llvm/llvm-project/commit/22417ec6cca0ed8ccecb0c2b77011e591378fd2a.diff LO

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-12-01 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/115487 >From 5e24d212f797b5fa1b6da1526c807046373d3c21 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 8 Nov 2024 16:13:17 +0200 Subject: [PATCH 1/6] [Clang] skip default argument instantiation for non-definin

[clang] Add `.cjs` extension handling for JavaScript Language. (PR #118188)

2024-12-01 Thread Jim B via cfe-commits
https://github.com/d3x0r updated https://github.com/llvm/llvm-project/pull/118188 >From 8ce527dc2cc7ac285f782648838664491abffc30 Mon Sep 17 00:00:00 2001 From: d3x0r Date: Sat, 30 Nov 2024 02:32:40 -0800 Subject: [PATCH 1/2] Add *.cjs handling for JavaScript Language. --- clang/lib/Format/For

[clang] [Clang] Change placeholder from `undef` to `poison` (PR #117064)

2024-12-01 Thread Pedro Lobo via cfe-commits
pedroclobo wrote: cc @nunoplopes https://github.com/llvm/llvm-project/pull/117064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] use specified type verbatim in modernize-use-using fix (PR #113837)

2024-12-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/113837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] use specified type verbatim in modernize-use-using fix (PR #113837)

2024-12-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/113837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] use specified type verbatim in modernize-use-using fix (PR #113837)

2024-12-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/113837 >From 8170641109c09e55b1530081e103a1e919eb8bfc Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sun, 27 Oct 2024 21:49:34 +0100 Subject: [PATCH 1/6] [clang-tidy] do not expand macros in modernize-use-using

[clang-tools-extra] [clang-tidy] use specified type verbatim in modernize-use-using fix (PR #113837)

2024-12-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/113837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] use specified type verbatim in modernize-use-using fix (PR #113837)

2024-12-01 Thread Julian Schmidt via cfe-commits
@@ -119,14 +122,55 @@ void UseUsingCheck::check(const MatchFinder::MatchResult &Result) { return; } - PrintingPolicy PrintPolicy(getLangOpts()); - PrintPolicy.SuppressScope = true; - PrintPolicy.ConstantArraySizeAsWritten = true; - PrintPolicy.UseVoidForZeroParams =

[clang-tools-extra] [clang-tidy] use specified type verbatim in modernize-use-using fix (PR #113837)

2024-12-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: I noticed some more issues that this is fixing, so I've added their examples as test-cases https://github.com/llvm/llvm-project/pull/113837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [flang] [Flang][LoongArch] Enable clang command-line options in flang. (PR #118244)

2024-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Zhaoxin Yang (ylzsx) Changes Mainly including the following LoongArch specific options: -m[no-]lsx, -m[no-]lasx, -msimd=, -m[no-]frecipe, -m[no-]lam-bh, -m[no-]lamcas, -m[no-]ld-seq-sa, -m[no-]div32, -m[n

[clang] [flang] [Flang][LoongArch] Enable clang command-line options in flang. (PR #118244)

2024-12-01 Thread Zhaoxin Yang via cfe-commits
https://github.com/ylzsx created https://github.com/llvm/llvm-project/pull/118244 Mainly including the following LoongArch specific options: -m[no-]lsx, -m[no-]lasx, -msimd=, -m[no-]frecipe, -m[no-]lam-bh, -m[no-]lamcas, -m[no-]ld-seq-sa, -m[no-]div32, -m[no-]annotate-tablejump >From ee9aa4d2

[clang] [llvm] [LoongArch] Support sc.q instruction for 128bit cmpxchg operation (PR #116771)

2024-12-01 Thread via cfe-commits
https://github.com/tangaac updated https://github.com/llvm/llvm-project/pull/116771 >From ee422d26ad2695d34b0bf471f6d4fa2c3bef8ca8 Mon Sep 17 00:00:00 2001 From: tangaac Date: Tue, 19 Nov 2024 17:43:31 +0800 Subject: [PATCH 1/3] [LoongArch] Support sc.q instruction for 128bit cmpxchg operation

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/118236 >From 37eb30a2b99daa1f30da3bd53e2a92588cbde0f9 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 1 Dec 2024 19:58:03 -0500 Subject: [PATCH] [clang] [Sema] Preserve nested name specifier prefix in Me

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Nathan Ridge via cfe-commits
@@ -5347,15 +5347,18 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); - // Note: if t

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Matheus Izvekov via cfe-commits
@@ -5347,15 +5347,18 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); - // Note: if t

[clang] [flang] [Flang][LoongArch] Enable clang command-line options in flang. (PR #118244)

2024-12-01 Thread Lu Weining via cfe-commits
@@ -240,7 +240,8 @@ def m_riscv_Features_Group : OptionGroup<"">, def m_ve_Features_Group : OptionGroup<"">, Group, DocName<"VE">; def m_loongarch_Features_Group : OptionGroup<"">, - Group, DocName<"LoongArch">; +

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Matheus Izvekov via cfe-commits
@@ -5347,13 +5347,16 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); + const Type *N

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Matheus Izvekov via cfe-commits
@@ -5347,13 +5347,16 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); + const Type *N

[clang] [llvm] [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (PR #116888)

2024-12-01 Thread Nikita Popov via cfe-commits
nikic wrote: Please also rebase, I expect https://github.com/llvm/llvm-project/pull/118195 will results in some test changes. https://github.com/llvm/llvm-project/pull/116888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [Xtensa] Default to unsigned char (PR #115967)

2024-12-01 Thread Alexander Richardson via cfe-commits
arichardson wrote: > Hi @arichardson. > > Thanks for this change. Acc to the doc which I have `The char type is > unsigned by default for Xtensa processors.` Our GCC Xtensa toolchain also > interprets char type as unsigned by default. Thanks, do you believe we need a backwards compatibility f

[clang] [clang][bytecode][NFC] Remove APValue Result argument where unnecessary (PR #118199)

2024-12-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/118199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 82ed9c0 - [clang][bytecode][NFC] Remove APValue Result argument where unnecessary (#118199)

2024-12-01 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-01T17:36:19+01:00 New Revision: 82ed9c0319c9f0373bcb633a03ce6d35ebac3661 URL: https://github.com/llvm/llvm-project/commit/82ed9c0319c9f0373bcb633a03ce6d35ebac3661 DIFF: https://github.com/llvm/llvm-project/commit/82ed9c0319c9f0373bcb633a03ce6d35ebac3661.diff L

[clang] 31bde71 - [clang][bytecode] Support __builtin_reduce_add (#117672)

2024-12-01 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-01T17:39:11+01:00 New Revision: 31bde711c4098b3136edd1cb92dd4e0cc1d4d179 URL: https://github.com/llvm/llvm-project/commit/31bde711c4098b3136edd1cb92dd4e0cc1d4d179 DIFF: https://github.com/llvm/llvm-project/commit/31bde711c4098b3136edd1cb92dd4e0cc1d4d179.diff L

[clang] [clang][bytecode] Support __builtin_reduce_add (PR #117672)

2024-12-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/117672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Support vector-to-vector bitcasts (PR #118230)

2024-12-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118230 None >From 3bdcf86f356fb6579bebf35ed636b0eae9bf24fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 1 Dec 2024 20:24:05 +0100 Subject: [PATCH] [clang][bytecode] Support vector-to-vector

[clang] [clang][bytecode] Support vector-to-vector bitcasts (PR #118230)

2024-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/118230.diff 3 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+3-3) - (added) clang/test/AST/ByteCode/altivec.c (+19) - (modifi

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/113144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,165 @@ +//===--- UseIntegerSignComparisonCheck.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: Ap

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,36 @@ +.. title:: clang-tidy - modernize-use-integer-sign-comparison + +modernize-use-integer-sign-comparison += + +Replace comparisons between signed and unsigned integers with their safe +C++20 ``std::cmp_*`` alternative, if availab

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: Just some small things to address https://github.com/llvm/llvm-project/pull/113144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,36 @@ +.. title:: clang-tidy - modernize-use-integer-sign-comparison + +modernize-use-integer-sign-comparison += + +Replace comparisons between signed and unsigned integers with their safe +C++20 ``std::cmp_*`` alternative, if availab

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/113144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-12-01 Thread via cfe-commits
https://github.com/antangelo updated https://github.com/llvm/llvm-project/pull/117524 >From ffcae3a593f1324b5f5495b42bb0ec61a61c2055 Mon Sep 17 00:00:00 2001 From: antangelo Date: Mon, 25 Nov 2024 01:54:26 -0500 Subject: [PATCH 1/5] [clang] Implement P3176R1: The Oxford variadic comma Emit a w

[clang] [clang] Implement P3176R1: The Oxford variadic comma (PR #117524)

2024-12-01 Thread via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -std=c++2c -fsyntax-only -verify %s + +void a(...); + +void b(auto...); +void c(auto, ...); + +void d(auto..); // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}} \ +//

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang Author: Nathan Ridge (HighCommander4) Changes Fixes https://github.com/llvm/llvm-project/issues/118198 --- Full diff: https://github.com/llvm/llvm-project/pull/118236.diff 2 Files Affected: - (modified) cl

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 converted_to_draft https://github.com/llvm/llvm-project/pull/118236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Recover GLTemplateParameterList for generic lambdas in RebuildLambdaScopeInfo (PR #118176)

2024-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes The NTTP argument appearing inside a trailing return type of a generic lambda would have to check for potential lambda captures, where the function needs GLTemplateParameterList of the current LSI to tell wh

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (Marked as Draft since there are test failures I need to investigate.) https://github.com/llvm/llvm-project/pull/118236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/118236 Fixes https://github.com/llvm/llvm-project/issues/118198 >From 675aec86732ff4c46250fa0b17cd571387ca4ade Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 1 Dec 2024 19:58:03 -0500 Subject: [PATCH] [

[clang] [Clang] Recover GLTemplateParameterList for generic lambdas in RebuildLambdaScopeInfo (PR #118176)

2024-12-01 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/118176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Matheus Izvekov via cfe-commits
@@ -5347,15 +5347,18 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); - // Note: if t

[clang] [-Wunsafe-buffer-usage] Suppress warning when 2-D constant arrays are indexed (PR #118249)

2024-12-01 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak created https://github.com/llvm/llvm-project/pull/118249 Do not warn about unsafe buffer access, when 2-D constant arrays are accessed and the indices are within the bounds of the buffer. Warning in such cases is a false postive. Such a suppression aleady exist

[clang] [-Wunsafe-buffer-usage] Suppress warning when 2-D constant arrays are indexed (PR #118249)

2024-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Malavika Samak (malavikasamak) Changes Do not warn about unsafe buffer access, when 2-D constant arrays are accessed and the indices are within the bounds of the buffer. Warning in such cases is a false postive. Such a suppressio

[clang] [-Wunsafe-buffer-usage] Suppress warning when 2-D constant arrays are indexed (PR #118249)

2024-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Malavika Samak (malavikasamak) Changes Do not warn about unsafe buffer access, when 2-D constant arrays are accessed and the indices are within the bounds of the buffer. Warning in such cases is a false postive. Such a suppression aleady

[clang] [-Wunsafe-buffer-usage] Suppress warning when 2-D constant arrays are indexed (PR #118249)

2024-12-01 Thread via cfe-commits
graphite-app[bot] wrote: ## Your org has enabled the Graphite merge queue for merging into main Add the label “FP Bundles” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. You must have a Graphite account and log in to Graphite in order to use the

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2024-12-01 Thread Aniket Lal via cfe-commits
@@ -1780,6 +1786,15 @@ void CXXNameMangler::mangleDeviceStubName(const IdentifierInfo *II) { << II->getName(); } +void CXXNameMangler::mangleOCLDeviceStubName(const IdentifierInfo *II) { + // ::= __clang_ocl_kern_imp_ + // ::= [n] + // ::= + StringRef OCLDevi

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2024-12-01 Thread Aniket Lal via cfe-commits
https://github.com/lalaniket8 edited https://github.com/llvm/llvm-project/pull/115821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ast matcher] add `ExportDecl` in dynamically matchers (PR #118258)

2024-12-01 Thread via cfe-commits
graphite-app[bot] wrote: ## Your org has enabled the Graphite merge queue for merging into main Add the label “FP Bundles” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. You must have a Graphite account and log in to Graphite in order to use the

[clang] [flang] [Flang][LoongArch] Enable clang command-line options in flang. (PR #118244)

2024-12-01 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. LGTM for the LoongArch bits. https://github.com/llvm/llvm-project/pull/118244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

2024-12-01 Thread Serge Pavlov via cfe-commits
spavloff wrote: ### Merge activity * **Dec 2, 1:35 AM EST**: The merge label 'FP Bundles' was detected. This PR will be added to the [Graphite merge queue](https://app.graphite.dev/merges?org=llvm&repo=llvm-project) once it meets the requirements. https://github.com/llvm/llvm-project/pull/1

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Nathan Ridge via cfe-commits
@@ -5347,13 +5347,16 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); + const Type *N

[clang] c4a1e0e - [clang] Remove redundant integer values in template type diffing

2024-12-01 Thread Richard Trieu via cfe-commits
Author: Richard Trieu Date: 2024-12-01T19:21:42-08:00 New Revision: c4a1e0efe6b0767dfb5861a7e8814d7db0c0de8a URL: https://github.com/llvm/llvm-project/commit/c4a1e0efe6b0767dfb5861a7e8814d7db0c0de8a DIFF: https://github.com/llvm/llvm-project/commit/c4a1e0efe6b0767dfb5861a7e8814d7db0c0de8a.diff

[clang] [flang] [Flang][LoongArch] Enable clang command-line options in flang. (PR #118244)

2024-12-01 Thread Zhaoxin Yang via cfe-commits
@@ -240,7 +240,8 @@ def m_riscv_Features_Group : OptionGroup<"">, def m_ve_Features_Group : OptionGroup<"">, Group, DocName<"VE">; def m_loongarch_Features_Group : OptionGroup<"">, - Group, DocName<"LoongArch">; +

[clang] Add `.cjs` extension handling for JavaScript Language. (PR #118188)

2024-12-01 Thread Owen Pan via cfe-commits
@@ -87,7 +87,7 @@ static cl::opt AssumeFileName( "supported:\n" " CSharp: .cs\n" " Java: .java\n" - " JavaScript: .mjs .js .ts\n" + " JavaScript: .cjs .mjs .js .ts\n" owenca wrote: ```suggestio

[clang] Add `.cjs` extension handling for JavaScript Language. (PR #118188)

2024-12-01 Thread Owen Pan via cfe-commits
@@ -94,7 +94,7 @@ def main(): # Other languages that clang-format supports 'proto', 'protodevel', # Protocol Buffers 'java', # Java - 'mjs', 'js', # JavaScript + 'cjs', 'mjs', 'js', # JavaScript owenca wrote: ```suggestion

[clang] [clang-format] Add support for `.cjs` as JavaScript file extension (PR #118188)

2024-12-01 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/118188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add `.cjs` extension handling for JavaScript Language. (PR #118188)

2024-12-01 Thread Owen Pan via cfe-commits
@@ -49,7 +49,7 @@ to format C/C++/Java/JavaScript/JSON/Objective-C/Protobuf/C# code. supported: CSharp: .cs Java: .java - Ja

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-01 Thread Serge Pavlov via cfe-commits
spavloff wrote: ### Merge activity * **Dec 2, 12:55 AM EST**: The merge label 'FP Bundles' was detected. This PR will be added to the [Graphite merge queue](https://app.graphite.dev/merges?org=llvm&repo=llvm-project) once it meets the requirements. https://github.com/llvm/llvm-project/pull/

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-01 Thread via cfe-commits
https://github.com/graphite-app[bot] edited https://github.com/llvm/llvm-project/pull/118253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy][use-internal-linkage]fix false positives for ExportDecl (PR #117901)

2024-12-01 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/117901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 010317e - [clang-tidy][use-internal-linkage]fix false positives for ExportDecl (#117901)

2024-12-01 Thread via cfe-commits
Author: Congcong Cai Date: 2024-12-02T13:59:55+08:00 New Revision: 010317e1731d76b91c00ed1241583e518380d65f URL: https://github.com/llvm/llvm-project/commit/010317e1731d76b91c00ed1241583e518380d65f DIFF: https://github.com/llvm/llvm-project/commit/010317e1731d76b91c00ed1241583e518380d65f.diff

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-01 Thread Matheus Izvekov via cfe-commits
@@ -5347,13 +5347,16 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); + const Type *N

[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

2024-12-01 Thread Serge Pavlov via cfe-commits
spavloff wrote: PR https://github.com/llvm/llvm-project/pull/118253 demonstrates changes required to upgrade an intrinsic (`trunc` in this case) to using FP operand bundles. https://github.com/llvm/llvm-project/pull/109798 ___ cfe-commits mailing li

[clang] [flang] [Flang][LoongArch] Enable clang command-line options in flang. (PR #118244)

2024-12-01 Thread Lu Weining via cfe-commits
@@ -240,7 +240,8 @@ def m_riscv_Features_Group : OptionGroup<"">, def m_ve_Features_Group : OptionGroup<"">, Group, DocName<"VE">; def m_loongarch_Features_Group : OptionGroup<"">, - Group, DocName<"LoongArch">; +

[clang] [ast matcher] add `ExportDecl` in dynamically matchers (PR #118258)

2024-12-01 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/118258 None >From f9fbb478194a429f1879c176504b8596312b9baf Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 2 Dec 2024 14:08:47 +0800 Subject: [PATCH] [ast matcher] add `ExportDecl` in dynamically matchers

[clang] [ast matcher] add `ExportDecl` in dynamically matchers (PR #118258)

2024-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Congcong Cai (HerrCai0907) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/118258.diff 1 Files Affected: - (modified) clang/lib/ASTMatchers/Dynamic/Registry.cpp (+1) ``diff diff --git a/clang/lib/ASTMatchers

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-01 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: > > I took a look and I think it may be too awkward to do, as we'd want to run > > e.g. readelf afterwards. But an example is > > `lld/test/ELF/as-needed-not-in-regular.s`. The idea being: if > > `-Wl,--as-needed` is in the config file, do we correctly prune an > > unnecessa

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-01 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm updated https://github.com/llvm/llvm-project/pull/117573 >From b9dd5f9356d457ef1ad050083d650a1da21c4377 Mon Sep 17 00:00:00 2001 From: Pawel Osmialowski Date: Mon, 25 Nov 2024 14:46:55 + Subject: [PATCH] [clang][driver] Special care for -l and -Wl, flags in con

[clang] [llvm] [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (PR #116888)

2024-12-01 Thread via cfe-commits
https://github.com/veera-sivarajan updated https://github.com/llvm/llvm-project/pull/116888 >From a0f38f1b37d7a5d9283e65cb9af07881c6fc5c14 Mon Sep 17 00:00:00 2001 From: Veera Date: Thu, 28 Nov 2024 18:07:30 + Subject: [PATCH 1/2] Add Test --- .../InstCombine/canonicalize-const-to-bop.ll

[clang] [llvm] [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (PR #116888)

2024-12-01 Thread via cfe-commits
@@ -1898,6 +1882,60 @@ static Instruction *foldSelectICmpEq(SelectInst &SI, ICmpInst *ICI, return nullptr; } +/// Fold `X Pred C1 ? X BOp C2 : C1 BOp C2` to `min/max(X, C1) BOp C2`. +/// This allows for better canonicalization. +static Value *foldSelectWithConstOpToBinOp(IC

[clang-tools-extra] [clang-tidy] fix cppcoreguidelines-narrowing-conversions false positives when narrowing integer to signed integer in C++20 (PR #116591)

2024-12-01 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: We probably should have proper guidelines for aliases. IMO, there should only be a "base -> coding guideline" kind of alias relationship, not the other way around. Coding guidelines should "cherry-pick" (and possibly configure/harden/make more strict) base checks. So in th

[clang] [llvm] [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (PR #116888)

2024-12-01 Thread via cfe-commits
veera-sivarajan wrote: Rebased and updated the tests. Please merge it for me. I don't have write access yet. https://github.com/llvm/llvm-project/pull/116888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

  1   2   >