[clang-tools-extra] [clang-tidy] New option `CompilationArgsToRemoveRegex` to remove arguments from the command line (PR #111453)

2024-11-29 Thread Fangrui Song via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: MaskRay wrote: > I think the regex solution might be brittle/not clean from a user > perspective, with potential for a small amount of maintenance. Instead, I > would also suggest a flag to error, warn, or silence these, defaulting

[clang] [Darwin][Driver][clang] Prioritise `-isysroot` over `--sysroot` consistently (PR #115993)

2024-11-29 Thread Fangrui Song via cfe-commits
MaskRay wrote: (I am not familiar with macOS and I'll defer the decision to Apple folks. I agree with James that this PR might break users. You probably want a different way to handle default sysroot in homebrew. ) https://github.com/llvm/llvm-project/pull/115993 ___

[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

2024-11-29 Thread Fangrui Song via cfe-commits
MaskRay wrote: As I'm not a Windows developer, I defer to other reviewers' expertise on MSVC's PGO/LTO feature. However, to be honest, I'm unsure about the value of porting the strings given the large feature differences between Clang and MSVC on PGO and LTO. `clang -flto -c` output is LLVM bi

[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

2024-11-29 Thread Fangrui Song via cfe-commits
@@ -77,6 +77,12 @@ static unsigned char dosProgram[] = { static_assert(sizeof(dosProgram) % 8 == 0, "DOSProgram size must be multiple of 8"); +static char ltcg[] = "LTCG"; MaskRay wrote: `constexpr char ...[]` constexpr/const make this internal

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

2024-11-29 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: > Whenever I review a pull request that has edited Format.h, I always fetch the > PR and run the python script to ensure that the generated rst file matches > the one in git. I don't think there's a way around that. Thinking about this a bit more, I think we can probably

[clang] [clang-format] Add test to ensure formatting options docs are updated (PR #118154)

2024-11-29 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/118154 This patch adds a lit test to clang format to ensure that the ClangFormatStyleOptions doc page has been updated appropriately. The test just runs the automatic update script and diffs the outputs to ensu

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 4df01e5c4b5a5b4872c9d4f28c5bdce60ad79b84 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH] [clang-format] Add BreakBeforeTemplateClose option --- clang/docs/Cl

[clang] [Driver][OpenMP] Fix OpenMP target-toolchain-option parser (PR #115375)

2024-11-29 Thread Fangrui Song via cfe-commits
@@ -84,9 +84,15 @@ /// Check -Xopenmp-target triggers error when an option requiring arguments is passed to it. // RUN: not %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target -Xopenmp-target -mcpu=pwr8 %s 2>&1 \ -

[clang] [Driver][OpenMP] Fix OpenMP target-toolchain-option parser (PR #115375)

2024-11-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/115375 ___ 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-11-29 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw approved this pull request. LGTM. Thank you! Please wait for additional approval from other reviewers :) https://github.com/llvm/llvm-project/pull/116888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] 691e556 - [Driver] BuildCompilation: remove unused BaseArg. NFC

2024-11-29 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-11-29T21:03:38-08:00 New Revision: 691e55643daa3470ff19b02a55e3e2503d2de0c9 URL: https://github.com/llvm/llvm-project/commit/691e55643daa3470ff19b02a55e3e2503d2de0c9 DIFF: https://github.com/llvm/llvm-project/commit/691e55643daa3470ff19b02a55e3e2503d2de0c9.diff

[clang] [clang][Driver] Use shared_ptr in the Compilation class (PR #116406)

2024-11-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay requested changes to this pull request. Using unique_ptr for `Args` is good, but I am not sure about shared_ptr for TranslatedArgs. There is no shared_ptr usage in clangDriver and we want to keep avoiding it. https://github.com/llvm/llvm-project/pull/116406 _

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

2024-11-29 Thread Owen Pan via cfe-commits
owenca wrote: > As a reviewer that means we have to download the review, rebuild the rst then > check it. I don't quite understand the problem we are trying to solve here? > Given that the python script unpacks the Format.h and makes the rst I would > prefer to see the finished rst as part of

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-11-29 Thread Matthew Maurer via cfe-commits
maurer wrote: I'm not sure I buy the argument that cross-arity functions are significantly more exploitable than same-arity mismatches. Restating your argument to make sure I've understood it correctly: When an attacker swaps in a function pointer of higher arity, a dead variable (or even a l

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 79b3767b39d6d5d5c21bb461fb619651fb2443c5 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH] [clang-format] Add BreakBeforeTemplateClose option --- clang/docs/Cl

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ 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-11-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: leijurv (leijurv) Changes In clang-format, multiline templates have the `>` on the same line as the last parameter: ```c++ template< typename Foo, typename Bar, typename Baz> void foo() { ``` I would like to add an opt

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv ready_for_review https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 217f80766d1eeeab4195f5d79cfed79c06657166 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH] BreakBeforeTemplateClose --- clang/docs/ClangFormatStyleOptions.rst

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2024-11-29 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,30 @@ +/// Check that we generate fake uses only when -fextend-lifetimes is set and we +/// are not setting optnone, or when we have optimizations set to -Og and we have +/// not passed -fno-extend-lifetimes. +// RUN: %clang_cc1 -emit-llvm -disable-llvm-passes -O0 -fex

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] BreakBeforeTemplateClose (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From de78cfbdefd90ce2427b552c941c613f93c9fd9a Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:35:06 -0600 Subject: [PATCH] BreakBeforeTemplateClose --- clang/docs/ClangFormatStyleOptions.rst

[clang] BreakBeforeTemplateClose (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From de78cfbdefd90ce2427b552c941c613f93c9fd9a Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:35:06 -0600 Subject: [PATCH] BreakBeforeTemplateClose --- clang/docs/ClangFormatStyleOptions.rst

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2024-11-29 Thread Fangrui Song via cfe-commits
@@ -1834,6 +1834,14 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, Opts.setInlining(CodeGenOptions::NormalInlining); } + // If we have specified -Og and have not explicitly set -fno-extend-lifetimes, + // then default to -fextend-li

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

2024-11-29 Thread Fangrui Song via cfe-commits
@@ -82,3 +82,35 @@ // CHECK-TWO-CONFIGS: -isysroot // CHECK-TWO-CONFIGS-SAME: /opt/data // CHECK-TWO-CONFIGS-SAME: -Wall + +//--- The linker input flags should be moved to the end of input list and appear only when linking. +// RUN: %clang --target=aarch64-unknown-linux-gnu --

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

2024-11-29 Thread Fangrui Song via cfe-commits
@@ -1250,6 +1273,7 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { if (!ContainsError) ContainsError = loadConfigFiles(); bool HasConfigFile = !ContainsError && (CfgOptions.get() != nullptr); + bool HasConfigLinkerIn = !ContainsError && (CfgLinkerInputs.ge

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

2024-11-29 Thread Fangrui Song via cfe-commits
@@ -1250,6 +1273,7 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { if (!ContainsError) ContainsError = loadConfigFiles(); bool HasConfigFile = !ContainsError && (CfgOptions.get() != nullptr); + bool HasConfigLinkerIn = !ContainsError && (CfgLinkerInputs.ge

[clang] BreakBeforeTemplateClose (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From b9886635c250fe765bf35c6b0e785f55b0749d52 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 28 Nov 2024 21:44:50 -0600 Subject: [PATCH 01/10] BreakBeforeTemplateClose --- clang/docs/ClangFormatStyleOption

[clang] BreakBeforeTemplateClose (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From b9886635c250fe765bf35c6b0e785f55b0749d52 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 28 Nov 2024 21:44:50 -0600 Subject: [PATCH 1/9] BreakBeforeTemplateClose --- clang/docs/ClangFormatStyleOptions.

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

2024-11-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/117573 ___ 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-11-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay requested changes to this pull request. . https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support symbolTags for document symbol (PR #113669)

2024-11-29 Thread via cfe-commits
chouzz wrote: @travkin79 Are you using the latesed commit? It works in my local clangd with given example. ``` I[11:05:17.623] --> reply:textDocument/documentSymbol(11) 3 ms V[11:05:17.624] >>> {"id":11,"jsonrpc":"2.0","result":[{"detail":"const int","kind":13,"name":"g_var","range":{"end":{"c

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

2024-11-29 Thread Fangrui Song via cfe-commits
@@ -1062,6 +1062,16 @@ bool Driver::readConfigFile(StringRef FileName, for (Arg *A : *NewOptions) A->claim(); + std::unique_ptr NewLinkerIns = std::make_unique(); MaskRay wrote: `auto` since RHS makes the type clear. https://github.com/llvm/llvm-proj

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

2024-11-29 Thread Fangrui Song via cfe-commits
@@ -82,3 +82,35 @@ // CHECK-TWO-CONFIGS: -isysroot // CHECK-TWO-CONFIGS-SAME: /opt/data // CHECK-TWO-CONFIGS-SAME: -Wall + +//--- The linker input flags should be moved to the end of input list and appear only when linking. +// RUN: %clang --target=aarch64-unknown-linux-gnu --

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

2024-11-29 Thread Fangrui Song via cfe-commits
@@ -82,3 +82,35 @@ // CHECK-TWO-CONFIGS: -isysroot // CHECK-TWO-CONFIGS-SAME: /opt/data // CHECK-TWO-CONFIGS-SAME: -Wall + +//--- The linker input flags should be moved to the end of input list and appear only when linking. +// RUN: %clang --target=aarch64-unknown-linux-gnu --

[clang] BreakBeforeTemplateClose (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From b9886635c250fe765bf35c6b0e785f55b0749d52 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 28 Nov 2024 21:44:50 -0600 Subject: [PATCH 1/8] BreakBeforeTemplateClose --- clang/docs/ClangFormatStyleOptions.

[clang] BreakBeforeTemplateClose (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From b9886635c250fe765bf35c6b0e785f55b0749d52 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 28 Nov 2024 21:44:50 -0600 Subject: [PATCH 1/7] BreakBeforeTemplateClose --- clang/docs/ClangFormatStyleOptions.

[clang-tools-extra] [clangd] Support symbolTags for document symbol (PR #113669)

2024-11-29 Thread via cfe-commits
https://github.com/chouzz updated https://github.com/llvm/llvm-project/pull/113669 >From 02124e4cfd7dbc395d4974c7561d5f110980aaa5 Mon Sep 17 00:00:00 2001 From: chouzz Date: Fri, 25 Oct 2024 17:42:04 +0800 Subject: [PATCH 1/5] [clangd] Support symbolTags for document symbol --- clang-tools-ex

[clang] BreakBeforeTemplateClose (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From b9886635c250fe765bf35c6b0e785f55b0749d52 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Thu, 28 Nov 2024 21:44:50 -0600 Subject: [PATCH 1/6] BreakBeforeTemplateClose --- clang/docs/ClangFormatStyleOptions.

[clang] [Clang] prevent errors for deduction guides using deduced type aliases (PR #117450)

2024-11-29 Thread Erich Keane via cfe-commits
erichkeane wrote: Hmmm... See the comment on the issue. I'll have to look more closely, but this very well might be the incorrect change. This perhaps needs a revert. https://github.com/llvm/llvm-project/pull/117450 ___ cfe-commits mailing list cfe-co

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

2024-11-29 Thread via cfe-commits
@@ -1898,6 +1882,56 @@ static Instruction *foldSelectICmpEq(SelectInst &SI, ICmpInst *ICI, return nullptr; } +/// Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1`. +/// 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-11-29 Thread via cfe-commits
https://github.com/veera-sivarajan updated https://github.com/llvm/llvm-project/pull/116888 >From 77c2b799a067270ba23dde2cd3b7324c9c26b362 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] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2024-11-29 Thread via cfe-commits
charan-003 wrote: hi @cor3ntin made necessary updates to ParseExprCXX.cpp, but now ten tests are failing. Could you kindly provide on how to debug them? What are the main areas in ParseExprCXX.cpp that I should concentrate on while debugging these kinds of problems? https://github.com/llvm/ll

[clang-tools-extra] [clang-tidy] fix false positive in bugprone-return-const-ref-from-parameter (PR #117734)

2024-11-29 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/117734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 04ab599 - [clang-tidy] fix false positive in bugprone-return-const-ref-from-parameter (#117734)

2024-11-29 Thread via cfe-commits
Author: Qizhi Hu Date: 2024-11-30T08:29:28+08:00 New Revision: 04ab599363eacc156e11238da9343c1d9d90db56 URL: https://github.com/llvm/llvm-project/commit/04ab599363eacc156e11238da9343c1d9d90db56 DIFF: https://github.com/llvm/llvm-project/commit/04ab599363eacc156e11238da9343c1d9d90db56.diff LOG:

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

2024-11-29 Thread Craig Topper via cfe-commits
topperc wrote: > LGTM. > > > > I note Craig has questions about the spec, we will ensure those are relayed > to the spec authors, but they don't relate to encoding/assembling problems, > so I'm not sure if they should block landing this. I don't consider my questions blocking. I just didn't

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-29 Thread via cfe-commits
https://github.com/vabridgers closed https://github.com/llvm/llvm-project/pull/114715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8ac2b77 - [analyzer] Remove alpha.core.IdenticalExpr Checker (#114715)

2024-11-29 Thread via cfe-commits
Author: vabridgers Date: 2024-11-29T17:38:59-06:00 New Revision: 8ac2b77a11c9db9879557ce1c26e38628e1ef45f URL: https://github.com/llvm/llvm-project/commit/8ac2b77a11c9db9879557ce1c26e38628e1ef45f DIFF: https://github.com/llvm/llvm-project/commit/8ac2b77a11c9db9879557ce1c26e38628e1ef45f.diff LO

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-29 Thread Aaron Puchert via cfe-commits
@@ -336,6 +336,40 @@ Improvements to Clang's diagnostics local variables passed to function calls using the ``[[clang::musttail]]`` attribute. +- The Thread Safety Analysis (#GH110523) now supports passing scoped capabilities into functions: + an attribute on the scoped

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-29 Thread Aaron Puchert via cfe-commits
@@ -336,6 +336,40 @@ Improvements to Clang's diagnostics local variables passed to function calls using the ``[[clang::musttail]]`` attribute. +- The Thread Safety Analysis (#GH110523) now supports passing scoped capabilities into functions: + an attribute on the scoped

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-29 Thread Aaron Puchert via cfe-commits
@@ -336,6 +336,40 @@ Improvements to Clang's diagnostics local variables passed to function calls using the ``[[clang::musttail]]`` attribute. +- The Thread Safety Analysis (#GH110523) now supports passing scoped capabilities into functions: + an attribute on the scoped

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-29 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: @AaronBallman, please also have a look at the Release Note. https://github.com/llvm/llvm-project/pull/110523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-29 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/110523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix -Wdangling false negative regressions caused by 117315 (PR #118088)

2024-11-29 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/118088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 52690db - [clang] Fix -Wdangling false negative regressions caused by 117315 (#118088)

2024-11-29 Thread via cfe-commits
Author: Haojian Wu Date: 2024-11-29T23:48:09+01:00 New Revision: 52690db47da36a739ee506d3b3a7457fb918dc1e URL: https://github.com/llvm/llvm-project/commit/52690db47da36a739ee506d3b3a7457fb918dc1e DIFF: https://github.com/llvm/llvm-project/commit/52690db47da36a739ee506d3b3a7457fb918dc1e.diff LO

[clang] 2dc0de7 - [clang] recognize hexagon-*-ld.lld variants (#117338)

2024-11-29 Thread via cfe-commits
Author: Brian Cain Date: 2024-11-29T16:42:44-06:00 New Revision: 2dc0de753b6df83e35f3d98e0e6a26c95e3399c0 URL: https://github.com/llvm/llvm-project/commit/2dc0de753b6df83e35f3d98e0e6a26c95e3399c0 DIFF: https://github.com/llvm/llvm-project/commit/2dc0de753b6df83e35f3d98e0e6a26c95e3399c0.diff LO

[clang] [clang] recognize hexagon-*-ld.lld variants (PR #117338)

2024-11-29 Thread Brian Cain via cfe-commits
https://github.com/androm3da closed https://github.com/llvm/llvm-project/pull/117338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-11-29 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/116462 >From daddb9e13db6ca8373dc7298d17aa36a03014aeb Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Fri, 15 Nov 2024 07:37:17 -0500 Subject: [PATCH 1/9] [a

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-11-29 Thread Sander de Smalen via cfe-commits
@@ -50,20 +50,30 @@ using TypeSpec = std::string; namespace { class SVEType { - bool Float, Signed, Immediate, Void, Constant, Pointer, BFloat, MFloat; - bool DefaultType, IsScalable, Predicate, PredicatePattern, PrefetchOp, - Svcount; + + enum TypeKind { +Void, +

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

2024-11-29 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM. I note Craig has questions about the spec, we will ensure those are relayed to the spec authors, but they don't relate to encoding/assembling problems, so I'm not sure if they should block landing this. https://github.com/llvm/llvm-p

[libunwind] [libunwind] Make sure `__STDC_FORMAT_MACROS` is defined to ensure `PRId64` is available (PR #117491)

2024-11-29 Thread via cfe-commits
Zentrik wrote: Based on https://github.com/WAVM/WAVM/pull/266#issue-583580780 and https://en.cppreference.com/w/cpp/types/integer#Notes this might have been fixed in glibc 2.18. https://github.com/llvm/llvm-project/pull/117491 ___ cfe-commits mailin

[libunwind] [libunwind] Make sure `__STDC_FORMAT_MACROS` is defined to ensure `PRId64` is available (PR #117491)

2024-11-29 Thread Mosè Giordano via cfe-commits
giordano wrote: Based on https://github.com/JuliaPackaging/Yggdrasil/pull/9861/files#diff-812a6db0df5a0d42010930d41a801e33e89c6064172903e5aacb88a7c704def2R7 this came up with gcc 10 https://github.com/llvm/llvm-project/pull/117491 ___ cfe-commits mai

[libunwind] [libunwind] Make sure `__STDC_FORMAT_MACROS` is defined to ensure `PRId64` is available (PR #117491)

2024-11-29 Thread Louis Dionne via cfe-commits
ldionne wrote: Ah, I didn't realize this was only required for much older compilers. In that case, indeed we don't support GCC 8 so we probably don't want to merge this. https://github.com/llvm/llvm-project/pull/117491 ___ cfe-commits mailing list cfe

[clang] cbf495f - [Clang][Driver] report unsupported option error when link + compile in same process (#116476)

2024-11-29 Thread via cfe-commits
Author: Reno Dakota Date: 2024-11-29T12:16:04-08:00 New Revision: cbf495fd12ba08c3a8e10dbcd482df1bf80736ed URL: https://github.com/llvm/llvm-project/commit/cbf495fd12ba08c3a8e10dbcd482df1bf80736ed DIFF: https://github.com/llvm/llvm-project/commit/cbf495fd12ba08c3a8e10dbcd482df1bf80736ed.diff L

[clang] [Clang][Driver] report unsupported option error when link + compile in same process (PR #116476)

2024-11-29 Thread via cfe-commits
github-actions[bot] wrote: @paparodeo Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a buil

[clang] [compiler-rt] [libcxx] [libcxxabi] [llvm] [libc++] Replace LIBCXX_ENABLE_STATIC_ABI_LIBRARY & friends by a new LIBCXX_CXX_ABI choice (PR #112978)

2024-11-29 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/112978 >From 7c156ea8545fd9b5211c488ba5c4386c368d5f82 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Fri, 13 May 2022 09:26:01 -0400 Subject: [PATCH 1/6] [libc++] Replace LIBCXX_ENABLE_STATIC_ABI_LIBRARY & friends

[clang] [Clang][Driver] report unsupported option error when link + compile in same process (PR #116476)

2024-11-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/116476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] report unsupported option error when link + compile in same process (PR #116476)

2024-11-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/116476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] report unsupported option error when link + compile in same process (PR #116476)

2024-11-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/116476 >From 49a748517c19adc10e9c65b548642a468de2d65e Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Sat, 16 Nov 2024 05:57:40 + Subject: [PATCH] [Clang][Driver] report unsupported option error regardless of arg

[clang] [Clang][Driver] report unsupported option error when link + compile in same process (PR #116476)

2024-11-29 Thread Fangrui Song via cfe-commits
@@ -4129,10 +4130,8 @@ void Driver::handleArguments(Compilation &C, DerivedArgList &Args, } } - // If we are linking, claim any options which are obviously only used for - // compilation. - // FIXME: Understand why the last Phase List length is used here. - if (Fina

[clang] [llvm] [AArch64] Implement FP8 SVE Intrinsics for narrowing conversions (PR #118124)

2024-11-29 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov created https://github.com/llvm/llvm-project/pull/118124 None >From 3a9643e6c2d61eae2e23df42c19b1410d4a5fcc5 Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Thu, 21 Nov 2024 11:21:29 + Subject: [PATCH 1/2] FP8 CVT/CVTL --- clang/include/clang/Basic

[clang-tools-extra] [clang-tidy] Add modernize-make-direct check (PR #118120)

2024-11-29 Thread Oliver Stöneberg via cfe-commits
firewave wrote: This will conflict with `modernize-make-shared` and `modernize-make-unique`. I also very sure having `new` any modern C++ code is very much to be avoided. Having no insight on the differences of the inner workings - but just based on https://en.cppreference.com/w/cpp/memory/sha

[clang] 820403c - [analyzer] Never create Regions wrapping reference TypedValueRegions (NFCI) (#118096)

2024-11-29 Thread via cfe-commits
Author: Balazs Benics Date: 2024-11-29T20:36:24+01:00 New Revision: 820403c4e04db1f4adc8528bec33d393a5be3856 URL: https://github.com/llvm/llvm-project/commit/820403c4e04db1f4adc8528bec33d393a5be3856 DIFF: https://github.com/llvm/llvm-project/commit/820403c4e04db1f4adc8528bec33d393a5be3856.diff

[clang] [analyzer] Never create Regions wrapping reference TypedValueRegions (NFCI) (PR #118096)

2024-11-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/118096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix crash due to incorrect argument position in merging deduced template arguments (PR #118041)

2024-11-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/8581 Here is the relevant piec

[clang] [llvm] [AArch64] Implement FP8 SVE intrinsics for fused multiply-add (PR #118126)

2024-11-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Momchil Velikov (momchil-velikov) Changes --- Patch is 105.50 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/118126.diff 16 Files Affected: - (modified) clang/include/clang/Basic/arm_sve.td

[clang] [llvm] [AArch64] Implement FP8 SVE intrinsics for fused multiply-add (PR #118126)

2024-11-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Momchil Velikov (momchil-velikov) Changes --- Patch is 105.50 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/118126.diff 16 Files Affected: - (modified) clang/include/clang/Basic/arm_sve.

[clang] [llvm] [AArch64] Implements FP8 SVE intrinsics for dot-product (PR #118125)

2024-11-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Momchil Velikov (momchil-velikov) Changes --- Patch is 56.65 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/118125.diff 14 Files Affected: - (modified) clang/include/clang/Basic/arm

[clang] [llvm] [AArch64] Implements FP8 SVE intrinsics for dot-product (PR #118125)

2024-11-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Momchil Velikov (momchil-velikov) Changes --- Patch is 56.65 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/118125.diff 14 Files Affected: - (modified) clang/include/clang/Basic/arm_sve.t

[clang] [llvm] [AArch64] Implement FP8 SVE Intrinsics for narrowing conversions (PR #118124)

2024-11-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Momchil Velikov (momchil-velikov) Changes --- Patch is 33.78 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/118124.diff 9 Files Affected: - (modified) clang/include/clang/Basic/ar

[clang] [llvm] [AArch64] Implement FP8 SVE Intrinsics for narrowing conversions (PR #118124)

2024-11-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Momchil Velikov (momchil-velikov) Changes --- Patch is 33.78 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/118124.diff 9 Files Affected: - (modified) clang/include/clang/Basic/arm_sve.td (

[clang] [llvm] [AArch64] Implements FP8 SVE intrinsics for dot-product (PR #118125)

2024-11-29 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov created https://github.com/llvm/llvm-project/pull/118125 None >From 3a9643e6c2d61eae2e23df42c19b1410d4a5fcc5 Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Thu, 21 Nov 2024 11:21:29 + Subject: [PATCH 1/3] FP8 CVT/CVTL --- clang/include/clang/Basic

[clang] [llvm] [AArch64] Implement FP8 SVE intrinsics for widening conversions (PR #118123)

2024-11-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Momchil Velikov (momchil-velikov) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/118123.diff 7 Files Affected: - (modified) clang/include/clang/Basic/arm_sve.td (+10) - (added) clang/test/CodeGen/AArch64/fp8-intrin

[clang] [llvm] [AArch64] Implement FP8 SVE intrinsics for widening conversions (PR #118123)

2024-11-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-aarch64 Author: Momchil Velikov (momchil-velikov) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/118123.diff 7 Files Affected: - (modified) clang/include/clang/Basic/arm_sve.td (+10) - (added) cl

[clang] [llvm] [AArch64] Implement FP8 SVE intrinsics for widening conversions (PR #118123)

2024-11-29 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov created https://github.com/llvm/llvm-project/pull/118123 None >From 3a9643e6c2d61eae2e23df42c19b1410d4a5fcc5 Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Thu, 21 Nov 2024 11:21:29 + Subject: [PATCH] FP8 CVT/CVTL --- clang/include/clang/Basic/arm

[clang] be75a14 - [Clang] fix crash due to incorrect argument position in merging deduced template arguments (#118041)

2024-11-29 Thread via cfe-commits
Author: Oleksandr T. Date: 2024-11-29T21:26:59+02:00 New Revision: be75a14207ab0dac6ad9f9097957f14a918ac611 URL: https://github.com/llvm/llvm-project/commit/be75a14207ab0dac6ad9f9097957f14a918ac611 DIFF: https://github.com/llvm/llvm-project/commit/be75a14207ab0dac6ad9f9097957f14a918ac611.diff

[clang] [Clang] fix crash due to incorrect argument position in merging deduced template arguments (PR #118041)

2024-11-29 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk closed https://github.com/llvm/llvm-project/pull/118041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-11-29 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/110102 >From fdfa695bc74847f5cc366bfcbf142bd5c2e3937f Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Wed, 25 Sep 2024 16:55:39 +0100 Subject: [PATCH 1/4] [Clang] Add fake use emission to Clang with -fextend-lifeti

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-29 Thread Malek Ben Slimane via cfe-commits
@@ -3984,6 +3984,10 @@ def warn_thread_attribute_decl_not_lockable : Warning< def warn_thread_attribute_decl_not_pointer : Warning< "%0 only applies to pointer types; type here is %1">, InGroup, DefaultIgnore; +def warn_thread_attribute_not_on_scoped_lockable_param : Warnin

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-11-29 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/110102 >From fdfa695bc74847f5cc366bfcbf142bd5c2e3937f Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Wed, 25 Sep 2024 16:55:39 +0100 Subject: [PATCH 1/3] [Clang] Add fake use emission to Clang with -fextend-lifeti

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

2024-11-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. 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] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-11-29 Thread Stephen Tozer via cfe-commits
@@ -1664,6 +1710,17 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) { emission.getOriginalAllocatedAddress(), emission.getSizeForLifetimeMarkers()); + // Analogous to lifetime markers,

[clang-tools-extra] [clang-tidy] Add modernize-make-direct check (PR #118120)

2024-11-29 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka created https://github.com/llvm/llvm-project/pull/118120 Adds a new check that converts std::make_* function calls to direct constructor calls using CTAD. Transforms make_optional, make_unique, make_shared and make_pair into their equivalent direct constructor cal

  1   2   3   >