[clang] dac1829 - [clang][bytecode] IntPointer::atOffset() should append (#104686)

2024-08-17 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-18T08:59:34+02:00 New Revision: dac182990dabe8d15cfb8079aba68df2ded015aa URL: https://github.com/llvm/llvm-project/commit/dac182990dabe8d15cfb8079aba68df2ded015aa DIFF: https://github.com/llvm/llvm-project/commit/dac182990dabe8d15cfb8079aba68df2ded015aa.diff L

[clang] [clang][bytecode] IntPointer::atOffset() should append (PR #104686)

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

[clang] 07bd3bb - [clang][bytecode][NFC] Improve Pointer::print()

2024-08-17 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-08-18T08:55:22+02:00 New Revision: 07bd3bb9b7eb34426a81de2b988f53f08611ab35 URL: https://github.com/llvm/llvm-project/commit/07bd3bb9b7eb34426a81de2b988f53f08611ab35 DIFF: https://github.com/llvm/llvm-project/commit/07bd3bb9b7eb34426a81de2b988f53f08611ab35.diff LO

[clang-tools-extra] [clang-tidy] Consider `readability-uppercase-literal-suffix` when dealing with `readability-implicit-bool-conversion`. (PR #104694)

2024-08-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (c8ef) Changes close: #40544. --- Full diff: https://github.com/llvm/llvm-project/pull/104694.diff 3 Files Affected: - (modified) clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp (+27-9) - (modified)

[clang-tools-extra] [clang-tidy] Consider `readability-uppercase-literal-suffix` when dealing with `readability-implicit-bool-conversion`. (PR #104694)

2024-08-17 Thread via cfe-commits
https://github.com/c8ef edited https://github.com/llvm/llvm-project/pull/104694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Consider `readability-uppercase-literal-suffix` when dealing with `readability-implicit-bool-conversion`. (PR #104694)

2024-08-17 Thread via cfe-commits
https://github.com/c8ef created https://github.com/llvm/llvm-project/pull/104694 None >From 5e2cd3fa3ce2676e4d528bd8c1342af138cca604 Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 18 Aug 2024 06:17:32 + Subject: [PATCH] [clang-tidy] readability-implicit-bool-conversion take readability-upp

[clang-tools-extra] [clang-tidy] Correct typo in ReleaseNotes.rst (PR #104674)

2024-08-17 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta closed https://github.com/llvm/llvm-project/pull/104674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 88f8010 - [clang-tidy] Correct typo in ReleaseNotes.rst (#104674)

2024-08-17 Thread via cfe-commits
Author: Mike Crowe Date: 2024-08-18T11:28:25+05:30 New Revision: 88f801037338a2c273a8f6dea8ebcb0c48a2cc06 URL: https://github.com/llvm/llvm-project/commit/88f801037338a2c273a8f6dea8ebcb0c48a2cc06 DIFF: https://github.com/llvm/llvm-project/commit/88f801037338a2c273a8f6dea8ebcb0c48a2cc06.diff LO

[clang-tools-extra] [clang-tidy] Correct typo in ReleaseNotes.rst (PR #104674)

2024-08-17 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/104674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Add pre-processing type to `.i` files (PR #104664)

2024-08-17 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 8b911e77c30edb19cc5dbb95423de0290ddf2c6b Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [llvm] [HLSL] Implement support for HLSL intrinsic - saturate (PR #104619)

2024-08-17 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/104619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-17 Thread Younan Zhang via cfe-commits
@@ -1122,6 +1122,154 @@ bool Sema::CheckInstantiatedFunctionTemplateConstraints( PointOfInstantiation, Satisfaction); } +namespace { + +// We employ a TreeTransform because RAV couldn't recurse into a bunch of +// Exprs e.g. SizeOfPackExpr,

[clang] [clang][bytecode] Fix shifting negative values (PR #104663)

2024-08-17 Thread via cfe-commits
DTeachs wrote: We should probably backport this to 19.x https://github.com/llvm/llvm-project/pull/104663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] `constexpr` builtin floating point classification / comparison functions (PR #94118)

2024-08-17 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @MitalAshok Is there anything left to do here? https://github.com/llvm/llvm-project/pull/94118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Un-constify `MultiLevelTemplateArgumentList` (PR #104687)

2024-08-17 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 27d37ee4d067f42e9a46a0871d3cb961323e5c85 919da31d73a408f16e1c855cb658359b73ad1d28 --e

[clang] [clang][bytecode] IntPointer::atOffset() should append (PR #104686)

2024-08-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes ... to current offset. This breaks other tests which this commit also fixes. Namely, getIndex() should return the integer representation for non-block pointers. --- Full diff: https://github.com/llvm/llvm-p

[clang] [clang][bytecode] IntPointer::atOffset() should append (PR #104686)

2024-08-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/104686 ... to current offset. This breaks other tests which this commit also fixes. Namely, getIndex() should return the integer representation for non-block pointers. >From c85a03aa716aa2c3d23ed2567b1d81066b160dee

[clang] [Clang] warn on discarded [[nodiscard]] function results after casting in C (PR #104677)

2024-08-17 Thread via cfe-commits
cor3ntin wrote: can you add a test for void? we should make sure this still warns! https://github.com/llvm/llvm-project/pull/104677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Hazard3 Core as taped out for RP2350 (PR #102452)

2024-08-17 Thread Luke Wren via cfe-commits
@@ -402,6 +402,21 @@ // MCPU-SIFIVE-P670-SAME: "-target-feature" "+zvkt" // MCPU-SIFIVE-P670-SAME: "-target-abi" "lp64d" +// RUN: %clang -target riscv32 -### -c %s 2>&1 -mcpu=rp2350-hazard3 | FileCheck -check-prefix=MCPU-HAZARD3 %s +// MCPU-HAZARD3: "-target-cpu" "rp2350-haza

[clang] [llvm] [HLSL] Implement support for HLSL intrinsic - saturate (PR #104619)

2024-08-17 Thread Farzon Lotfi via cfe-commits
@@ -362,6 +364,34 @@ static bool expandClampIntrinsic(CallInst *Orig, Intrinsic::ID ClampIntrinsic) { return true; } +static bool expandSaturateIntrinsic(CallInst *SaturateCall) { + FunctionType *FT = SaturateCall->getFunctionType(); + Type *FTRetTy = FT->getReturnType();

[clang] [llvm] [HLSL] Implement support for HLSL intrinsic - saturate (PR #104619)

2024-08-17 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/104619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement support for HLSL intrinsic - saturate (PR #104619)

2024-08-17 Thread Farzon Lotfi via cfe-commits
@@ -325,6 +325,16 @@ def Abs : DXILOp<6, unary> { let attributes = [Attributes]; } +def Saturate : DXILOp<7, unary> { + let Doc = "Clamps a single or double precision floating point value to [0.0f...1.0f]."; + let LLVMIntrinsic = int_dx_saturate; + let arguments = [ove

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-17 Thread via cfe-commits
@@ -1122,6 +1122,154 @@ bool Sema::CheckInstantiatedFunctionTemplateConstraints( PointOfInstantiation, Satisfaction); } +namespace { + +// We employ a TreeTransform because RAV couldn't recurse into a bunch of +// Exprs e.g. SizeOfPackExpr,

[clang] [clang][bytecode] Fix shifting negative values (PR #104663)

2024-08-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-windows` running on `sanitizer-windows` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/107/builds/1989 Here is the relevant piece of the build lo

[clang] 555399d - [clang][bytecode] Fix shifting negative values (#104663)

2024-08-17 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-17T22:57:19+02:00 New Revision: 555399d562201f3114fb22f883cd1b6710af1a0d URL: https://github.com/llvm/llvm-project/commit/555399d562201f3114fb22f883cd1b6710af1a0d DIFF: https://github.com/llvm/llvm-project/commit/555399d562201f3114fb22f883cd1b6710af1a0d.diff L

[clang] [clang][bytecode] Fix shifting negative values (PR #104663)

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

[clang] [flang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-08-17 Thread Nikolas Klauser via cfe-commits
@@ -14638,6 +14649,8 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { return true; } + case Builtin::BIfmin: + case Builtin::BIfminf: philnik777 wrote: I don't think anything should happen to the libc++ documentation in this patch. We

[clang-tools-extra] [clang-tidy] Support member functions with modernize-use-std-print/format (PR #104675)

2024-08-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/104675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f620c5b - [clang][bytecode] Classify 1-bit unsigned integers as bool (#104662)

2024-08-17 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-17T22:06:46+02:00 New Revision: f620c5b692dd0bc08692979236073db0db27f0fc URL: https://github.com/llvm/llvm-project/commit/f620c5b692dd0bc08692979236073db0db27f0fc DIFF: https://github.com/llvm/llvm-project/commit/f620c5b692dd0bc08692979236073db0db27f0fc.diff L

[clang] [clang][bytecode] Classify 1-bit unsigned integers as bool (PR #104662)

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

[clang] [llvm] [RISCV] Add Hazard3 Core as taped out for RP2350 (PR #102452)

2024-08-17 Thread Craig Topper via cfe-commits
@@ -402,6 +402,21 @@ // MCPU-SIFIVE-P670-SAME: "-target-feature" "+zvkt" // MCPU-SIFIVE-P670-SAME: "-target-abi" "lp64d" +// RUN: %clang -target riscv32 -### -c %s 2>&1 -mcpu=rp2350-hazard3 | FileCheck -check-prefix=MCPU-HAZARD3 %s +// MCPU-HAZARD3: "-target-cpu" "rp2350-haza

[clang] [llvm] [RISCV] Add Hazard3 Core as taped out for RP2350 (PR #102452)

2024-08-17 Thread Luke Wren via cfe-commits
@@ -402,6 +402,21 @@ // MCPU-SIFIVE-P670-SAME: "-target-feature" "+zvkt" // MCPU-SIFIVE-P670-SAME: "-target-abi" "lp64d" +// RUN: %clang -target riscv32 -### -c %s 2>&1 -mcpu=rp2350-hazard3 | FileCheck -check-prefix=MCPU-HAZARD3 %s +// MCPU-HAZARD3: "-target-cpu" "rp2350-haza

[clang-tools-extra] [clang-tidy] Support member functions with modernize-use-std-print/format (PR #104675)

2024-08-17 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/104675 >From afdd6c2a12735e1da69a46c6ff78b5d4e0dcdb6e Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sun, 21 Jul 2024 20:37:02 +0100 Subject: [PATCH 1/2] [clang-tidy] Support member functions with modernize-use-std

[clang-tools-extra] [clang-tidy] Support member functions with modernize-use-std-print/format (PR #104675)

2024-08-17 Thread Piotr Zegar via cfe-commits
@@ -104,6 +104,12 @@ New check aliases Changes in existing checks ^^ +- Improved :doc:`modernize-use-std-print + ` and PiotrZSL wrote: wrong name, and split that entry into 2, even if you would need to duplicate description https://

[clang-tools-extra] [clang-tidy] Support member functions with modernize-use-std-print/format (PR #104675)

2024-08-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/104675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver] Default -msmall-data-limit= to 0 and clean up code (PR #83093)

2024-08-17 Thread Fangrui Song via cfe-commits
MaskRay wrote: Thanks! I'll land this in a few days. I believe it's now up to the gp default users to justify the default and why they cannot user a Clang configuration file (this is difficult to justify, as we've many many decisions to Clang configuration files). I think this is important to

[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)

2024-08-17 Thread Fangrui Song via cfe-commits
MaskRay wrote: > @MaskRay Are you OK with this change? Sorry for the delay. I've read through https://discourse.llvm.org/t/making-ffp-model-fast-more-user-friendly/78402, how we ended up with `-ffp-contract=fast-honor-pragmas` beside `=fast` (GCC compatibility, sigh), some notes that ICC/GCC

[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)

2024-08-17 Thread Fangrui Song via cfe-commits
@@ -163,23 +183,41 @@ // CHECK-FEB-IGNORE: "-fno-rounding-math" // CHECK-FEB-IGNORE: "-ffp-exception-behavior=ignore" -// RUN: %clang -### -nostdinc -Werror -ffast-math -ffp-model=fast -c %s 2>&1 \ +// RUN: %clang -### -nostdinc -Werror -ffast-math -ffp-model=aggressive -c %s

[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)

2024-08-17 Thread Fangrui Song via cfe-commits
@@ -109,20 +112,37 @@ // CHECK-TRAP: "-cc1" // CHECK-TRAP: "-ffp-exception-behavior=strict" +// RUN: %clang -### -nostdinc -ffp-model=aggressive -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-FPM-AGGR %s +// CHECK-FPM-AGGR: "-cc1" +// CHECK-FPM-AGGR: "-menable-no-inf

[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)

2024-08-17 Thread Fangrui Song via cfe-commits
@@ -3033,8 +3039,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, SignedZeros = true; StringRef Val = A->getValue(); - if (OFastEnabled && Val != "fast") { -// Only -ffp-model=fast is compatible with OFast, ignore. +

[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)

2024-08-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. fp-model= => -ffp-model= LGTM. I expect that the subject explicit mentions -ffp-model=fast behavior difference, even if it becomes less aggressive and unlikely breaks users. With "Introduce ...", nobody would expect behavior differences.

[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)

2024-08-17 Thread Fangrui Song via cfe-commits
@@ -2879,10 +2879,31 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, std::string ComplexRangeStr = ""; std::string GccRangeComplexOption = ""; + auto setComplexRange = [&](LangOptions::ComplexRangeKind NewRange) { +// Warn if user expe

[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)

2024-08-17 Thread Fangrui Song via cfe-commits
@@ -2,13 +2,13 @@ // and other floating point options get a warning diagnostic. // -// RUN: %clang -### -ffp-model=fast -ffp-contract=off -c %s 2>&1 \ +// RUN: %clang -### -ffp-model=aggressive -ffp-contract=off -c %s 2>&1 \ MaskRay wrote: It's still useful t

[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)

2024-08-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/100453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-08-17 Thread via cfe-commits
yonghong-song wrote: @AaronBallman the llvm side of change looks good to me! https://github.com/llvm/llvm-project/pull/101228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Split invalid-cpu-note tests (PR #104601)

2024-08-17 Thread Tomas Matheson via cfe-commits
@@ -0,0 +1,90 @@ +// Use --implicit-check-not to ensure no additional CPUs are in this list + +// RUN: not %clang_cc1 -triple arm64--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --implicit-check-not={{[a-zA-Z0-9]}} +// RUN: not %clang_cc1 -triple arm64--- -tune-cp

[clang] [Clang] warn on discarded [[nodiscard]] function results after casting in C (PR #104677)

2024-08-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #104391 --- Full diff: https://github.com/llvm/llvm-project/pull/104677.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+2) - (modified) clang/lib/Sema/SemaStmt.cpp (+2-1) - (mo

[clang] [Clang] warn on discarded [[nodiscard]] function results after casting in C (PR #104677)

2024-08-17 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/104677 Fixes #104391 >From cd7ce740464c9c46ab231cf773fd1cf28e3495eb Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 17 Aug 2024 19:43:45 +0300 Subject: [PATCH] [Clang] warn on discarded [[nodiscard]] function

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/102857 >From 1119f0a8d180e482bff45c999d488827ac5ae49e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 12 Aug 2024 23:32:34 +0800 Subject: [PATCH 1/9] [Clang][NFCI] Slightly refactor getTemplateInstantiationArgs

[clang] [clang][NFC] Split invalid-cpu-note tests (PR #104601)

2024-08-17 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,90 @@ +// Use --implicit-check-not to ensure no additional CPUs are in this list + +// RUN: not %clang_cc1 -triple arm64--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --implicit-check-not={{[a-zA-Z0-9]}} +// RUN: not %clang_cc1 -triple arm64--- -tune-cp

[clang-tools-extra] [clang-tidy] Support member functions with modernize-use-std-print/format (PR #104675)

2024-08-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Mike Crowe (mikecrowe) Changes These checks can be made to work on member functions quite easily and it's not unknown to have at least printf-style functions as members. Let's remove the restriction. --- Full diff: https://gi

[clang-tools-extra] [clang-tidy] Support member functions with modernize-use-std-print/format (PR #104675)

2024-08-17 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe created https://github.com/llvm/llvm-project/pull/104675 These checks can be made to work on member functions quite easily and it's not unknown to have at least printf-style functions as members. Let's remove the restriction. >From afdd6c2a12735e1da69a46c6ff78b5d4

[clang-tools-extra] [clang-tidy] Correct typo in ReleaseNotes.rst (PR #104674)

2024-08-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Mike Crowe (mikecrowe) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/104674.diff 1 Files Affected: - (modified) clang-tools-extra/docs/ReleaseNotes.rst (+1-1) ``diff diff --git a/clang-tools-ex

[clang-tools-extra] [clang-tidy] Correct typo in ReleaseNotes.rst (PR #104674)

2024-08-17 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe created https://github.com/llvm/llvm-project/pull/104674 None >From b96dfbca33c5beb5ca3c984bc9388d11f0d7f707 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sat, 17 Aug 2024 17:04:06 +0100 Subject: [PATCH] [clang-tidy] Correct typo in ReleaseNotes.rst --- clang-t

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/102857 >From 1119f0a8d180e482bff45c999d488827ac5ae49e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 12 Aug 2024 23:32:34 +0800 Subject: [PATCH 1/8] [Clang][NFCI] Slightly refactor getTemplateInstantiationArgs

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/102857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/102857 >From 1119f0a8d180e482bff45c999d488827ac5ae49e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 12 Aug 2024 23:32:34 +0800 Subject: [PATCH 1/7] [Clang][NFCI] Slightly refactor getTemplateInstantiationArgs

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/102857 >From 1119f0a8d180e482bff45c999d488827ac5ae49e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 12 Aug 2024 23:32:34 +0800 Subject: [PATCH 1/6] [Clang][NFCI] Slightly refactor getTemplateInstantiationArgs

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/102857 >From 1119f0a8d180e482bff45c999d488827ac5ae49e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 12 Aug 2024 23:32:34 +0800 Subject: [PATCH 1/5] [Clang][NFCI] Slightly refactor getTemplateInstantiationArgs

[clang] [llvm] [AArch64] Add a check for invalid default features (PR #104435)

2024-08-17 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm closed https://github.com/llvm/llvm-project/pull/104435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 362142c - [AArch64] Add a check for invalid default features (#104435)

2024-08-17 Thread via cfe-commits
Author: Tomas Matheson Date: 2024-08-17T13:36:40+01:00 New Revision: 362142c4bb5cc657151f592e507f552d5b9f7dde URL: https://github.com/llvm/llvm-project/commit/362142c4bb5cc657151f592e507f552d5b9f7dde DIFF: https://github.com/llvm/llvm-project/commit/362142c4bb5cc657151f592e507f552d5b9f7dde.diff

[clang] 27d37ee - [clang][NFC] Clean up `Sema` headers

2024-08-17 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-08-17T14:57:59+03:00 New Revision: 27d37ee4d067f42e9a46a0871d3cb961323e5c85 URL: https://github.com/llvm/llvm-project/commit/27d37ee4d067f42e9a46a0871d3cb961323e5c85 DIFF: https://github.com/llvm/llvm-project/commit/27d37ee4d067f42e9a46a0871d3cb961323e5c85.

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -1192,20 +1192,36 @@ struct FormatStyle { /// \version 3.7 bool BinPackArguments; - /// If ``false``, a function declaration's or function definition's - /// parameters will either all be on the same line or will have one line each. - /// \code - /// true: - ///

[clang] [clang-format] Change GNU style language standard to LS_Latest (PR #104669)

2024-08-17 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/104669 >From d7c7c0da69864067999ecd9b1621fdbb85d4d365 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 17 Aug 2024 02:32:19 -0700 Subject: [PATCH 1/2] [clang-format] Change GNU style language standard to LS_Latest F

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread via cfe-commits
@@ -1192,20 +1192,36 @@ struct FormatStyle { /// \version 3.7 bool BinPackArguments; - /// If ``false``, a function declaration's or function definition's - /// parameters will either all be on the same line or will have one line each. - /// \code - /// true: - ///

[clang] [clang-format] Change GNU style language standard to LS_Latest (PR #104669)

2024-08-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #104655. --- Full diff: https://github.com/llvm/llvm-project/pull/104669.diff 2 Files Affected: - (modified) clang/lib/Format/Format.cpp (-1) - (modified) clang/unittests/Format/TokenAnnotatorTest

[clang] [clang-format] Change GNU style language standard to LS_Latest (PR #104669)

2024-08-17 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/104669 Fixes #104655. >From d7c7c0da69864067999ecd9b1621fdbb85d4d365 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 17 Aug 2024 02:32:19 -0700 Subject: [PATCH] [clang-format] Change GNU style language standard to

[clang] [clang] fix divide by zero in ComplexExprEvaluator (PR #104666)

2024-08-17 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/104666 >From b58b9c3ad5fb2b37715ba9f52c905b6961159f0c Mon Sep 17 00:00:00 2001 From: c8ef Date: Sat, 17 Aug 2024 05:42:39 + Subject: [PATCH 1/3] [clang] fix divide by zero in ComplexExprEvaluator --- clang/lib/AST/Ex

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -1192,20 +1192,36 @@ struct FormatStyle { /// \version 3.7 bool BinPackArguments; - /// If ``false``, a function declaration's or function definition's - /// parameters will either all be on the same line or will have one line each. - /// \code - /// true: - ///

[clang] [clang] fix divide by zero in ComplexExprEvaluator (PR #104666)

2024-08-17 Thread via cfe-commits
@@ -0,0 +1,3 @@ +// RUN: %clang_cc1 -fsyntax-only %s + +auto f() { return 43273096 / 65536j; } c8ef wrote: Thank you for your suggestion! I have relocated the test case and included the relevant release note. https://github.com/llvm/llvm-project/pull/104666 ___

[clang] [clang] fix divide by zero in ComplexExprEvaluator (PR #104666)

2024-08-17 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/104666 >From b58b9c3ad5fb2b37715ba9f52c905b6961159f0c Mon Sep 17 00:00:00 2001 From: c8ef Date: Sat, 17 Aug 2024 05:42:39 + Subject: [PATCH 1/2] [clang] fix divide by zero in ComplexExprEvaluator --- clang/lib/AST/Ex

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread via cfe-commits
@@ -1192,20 +1192,36 @@ struct FormatStyle { /// \version 3.7 bool BinPackArguments; - /// If ``false``, a function declaration's or function definition's - /// parameters will either all be on the same line or will have one line each. - /// \code - /// true: - ///

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -128,25 +128,6 @@ static bool startsSegmentOfBuilderTypeCall(const FormatToken &Tok) { return Tok.isMemberAccess() && Tok.Previous && Tok.Previous->closesScope(); } -// Returns \c true if \c Current starts a new parameter. -static bool startsNextParameter(const FormatTok

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -1978,6 +1978,25 @@ inline bool continuesLineComment(const FormatToken &FormatTok, FormatTok.OriginalColumn >= MinContinueColumn; } +// Returns \c true if \c Current starts a new parameter. +static bool startsNextParameter(const FormatToken &Current, -

[clang] [clang][NFC] Split invalid-cpu-note tests (PR #104601)

2024-08-17 Thread Tomas Matheson via cfe-commits
@@ -0,0 +1,90 @@ +// Use --implicit-check-not to ensure no additional CPUs are in this list + +// RUN: not %clang_cc1 -triple arm64--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --implicit-check-not={{[a-zA-Z0-9]}} +// RUN: not %clang_cc1 -triple arm64--- -tune-cp

[clang] [llvm] [AArch64] Add a check for invalid default features (PR #104435)

2024-08-17 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm updated https://github.com/llvm/llvm-project/pull/104435 >From f79eb28441491f1625691886cc92bd05d3b3cb6a Mon Sep 17 00:00:00 2001 From: Tomas Matheson Date: Thu, 15 Aug 2024 13:41:31 +0100 Subject: [PATCH 01/18] [AArch64] Add a check for invalid default features

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread via cfe-commits
@@ -128,25 +128,6 @@ static bool startsSegmentOfBuilderTypeCall(const FormatToken &Tok) { return Tok.isMemberAccess() && Tok.Previous && Tok.Previous->closesScope(); } -// Returns \c true if \c Current starts a new parameter. -static bool startsNextParameter(const FormatTok

[clang] [clang] fix divide by zero in ComplexExprEvaluator (PR #104666)

2024-08-17 Thread via cfe-commits
cor3ntin wrote: This change needs a release note. Please add an entry to `clang/docs/ReleaseNotes.rst` in the section the most adapted to the change, and referencing any Github issue this change fixes. Thanks! The fix itself looks good https://github.com/llvm/llvm-project/pull/104666

[clang] [clang] fix divide by zero in ComplexExprEvaluator (PR #104666)

2024-08-17 Thread via cfe-commits
@@ -0,0 +1,3 @@ +// RUN: %clang_cc1 -fsyntax-only %s + +auto f() { return 43273096 / 65536j; } cor3ntin wrote: can you move that to , for example `clang/test/SemaCXX/constant-expression-cxx11.cpp` and make sure that actually always get evaluated? maybe `constexp

[clang] [clang][NFC] Split invalid-cpu-note tests (PR #104601)

2024-08-17 Thread Sam Elliott via cfe-commits
@@ -0,0 +1,90 @@ +// Use --implicit-check-not to ensure no additional CPUs are in this list + +// RUN: not %clang_cc1 -triple arm64--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --implicit-check-not={{[a-zA-Z0-9]}} +// RUN: not %clang_cc1 -triple arm64--- -tune-cp

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
owenca wrote: > > Whilst I can understand BinPackParameters being deprecated, as its one of > > the original options I do worry a little about just how much impact such a > > deprecation might have... it needs to be completely seemless because there > > is ALOT of documentation references to i

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -7165,7 +7165,7 @@ TEST_F(FormatTest, LineBreakingInBinaryExpressions) { "}"); FormatStyle OnePerLine = getLLVMStyle(); - OnePerLine.BinPackParameters = false; + OnePerLine.BinPackParameters = FormatStyle::BPPS_Never; owenca wrote: Ditto

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -362,6 +362,26 @@ TEST_F(FormatTestComments, KeepsParameterWithTrailingCommentsOnTheirOwnLine) { format("aa((,\n" "), //\n" ", b);")); + + FormatStyle BreakAlways = getLLVMStyle(); + BreakAlways

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -2338,7 +2338,7 @@ TEST_F(FormatTest, FormatsForLoop) { "for (const Foo &baz = in.value(); !baz.at_end(); ++baz) {\n}"); FormatStyle NoBinPacking = getLLVMStyle(); - NoBinPacking.BinPackParameters = false; + NoBinPacking.BinPackParameters = FormatStyle::BPPS_Never

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -7694,7 +7694,7 @@ TEST_F(FormatTest, ConstructorInitializers) { ": a(aa, aa,\n" "aa) {}", OnePerLine); - OnePerLine.BinPackParameters = false; + On

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -8925,6 +8925,97 @@ TEST_F(FormatTest, FormatsOneParameterPerLineIfNecessary) { NoBinPacking); } +TEST_F(FormatTest, FormatsDeclarationBreakAlways) { + FormatStyle BreakAlways = getGoogleStyle(); + BreakAlways.BinPackParameters = FormatStyle::BPPS_OnePerLine; + ve

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -7954,7 +7954,7 @@ TEST_F(FormatTest, AllowAllArgumentsOnNextLine) { } // This parameter should not affect declarations. - Style.BinPackParameters = false; + Style.BinPackParameters = FormatStyle::BPPS_Never; owenca wrote: Ditto. https://github.com/

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -1850,7 +1863,7 @@ FormatStyle getMozillaStyle() { MozillaStyle.AlwaysBreakAfterDefinitionReturnType = FormatStyle::DRTBS_TopLevel; MozillaStyle.BinPackArguments = false; - MozillaStyle.BinPackParameters = false; + MozillaStyle.BinPackParameters = FormatStyle::BP

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -8925,6 +8925,97 @@ TEST_F(FormatTest, FormatsOneParameterPerLineIfNecessary) { NoBinPacking); } +TEST_F(FormatTest, FormatsDeclarationBreakAlways) { + FormatStyle BreakAlways = getGoogleStyle(); + BreakAlways.BinPackParameters = FormatStyle::BPPS_OnePerLine; + ve

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -8925,6 +8925,97 @@ TEST_F(FormatTest, FormatsOneParameterPerLineIfNecessary) { NoBinPacking); } +TEST_F(FormatTest, FormatsDeclarationBreakAlways) { + FormatStyle BreakAlways = getGoogleStyle(); + BreakAlways.BinPackParameters = FormatStyle::BPPS_OnePerLine; + ve

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -8244,7 +8244,7 @@ TEST_F(FormatTest, BreakConstructorInitializersAfterColon) { "a(aa, aa,\n" " aa) {}", OnePerLine); - OnePerLine.BinPackParameters =

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -8925,6 +8925,97 @@ TEST_F(FormatTest, FormatsOneParameterPerLineIfNecessary) { NoBinPacking); } +TEST_F(FormatTest, FormatsDeclarationBreakAlways) { + FormatStyle BreakAlways = getGoogleStyle(); + BreakAlways.BinPackParameters = FormatStyle::BPPS_OnePerLine; + ve

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -128,25 +128,6 @@ static bool startsSegmentOfBuilderTypeCall(const FormatToken &Tok) { return Tok.isMemberAccess() && Tok.Previous && Tok.Previous->closesScope(); } -// Returns \c true if \c Current starts a new parameter. -static bool startsNextParameter(const FormatTok

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -8925,6 +8925,97 @@ TEST_F(FormatTest, FormatsOneParameterPerLineIfNecessary) { NoBinPacking); } +TEST_F(FormatTest, FormatsDeclarationBreakAlways) { + FormatStyle BreakAlways = getGoogleStyle(); + BreakAlways.BinPackParameters = FormatStyle::BPPS_OnePerLine; -

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -1192,20 +1192,36 @@ struct FormatStyle { /// \version 3.7 bool BinPackArguments; - /// If ``false``, a function declaration's or function definition's - /// parameters will either all be on the same line or will have one line each. - /// \code - /// true: - ///

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -5475,6 +5475,14 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, return true; } + // Ignores the first parameter as this will be handled separately by + // BreakFunctionDefinitionParameters or AlignAfterOpenBracket. + if (FormatStyle::BPPS_OnePe

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-17 Thread Owen Pan via cfe-commits
@@ -8925,6 +8925,97 @@ TEST_F(FormatTest, FormatsOneParameterPerLineIfNecessary) { NoBinPacking); } +TEST_F(FormatTest, FormatsDeclarationBreakAlways) { + FormatStyle BreakAlways = getGoogleStyle(); + BreakAlways.BinPackParameters = FormatStyle::BPPS_OnePerLine; + ve