[clang] [WebKit checkers] Treat ref() and incrementCheckedPtrCount() as trivial (PR #115695)

2024-11-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes Treat member function calls to ref() and incrementCheckedPtrCount() as trivial so that a function which returns RefPtr/Ref out of a raw reference / pointer is also considered trivial. --- Fu

[clang] [lldb] [llvm] [AArch64] Reduce +sve2-aes to an alias of +sve-aes+sve2 (PR #114293)

2024-11-11 Thread Alexandros Lamprineas via cfe-commits
@@ -6,10 +6,10 @@ tbx z0.b, z1.b, z2.b // CHECK: error: instruction requires: sve2 or sme // CHECK-NEXT: tbx z0.b, z1.b, z2.b -.arch_extension sve2-aes -.arch_extension nosve2-aes +.arch_extension sve-aes +.arch_extension nosve-aes labrinea wrote: > all sve2-

[clang] Reject half vector types without cl_khr_fp16 (PR #96640)

2024-11-11 Thread Pedro Olsen Ferreira via cfe-commits
silverclaw wrote: I'd love to see this finally committed. https://github.com/llvm/llvm-project/pull/96640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenCL] Diagnose block references in selection operator (PR #114824)

2024-11-11 Thread Pedro Olsen Ferreira via cfe-commits
silverclaw wrote: Would be great to see this upstreamed before it just gets ignored... https://github.com/llvm/llvm-project/pull/114824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [AArch64] Reduce +sve2-aes to an alias of +sve-aes+sve2 (PR #114293)

2024-11-11 Thread via cfe-commits
@@ -6,10 +6,10 @@ tbx z0.b, z1.b, z2.b // CHECK: error: instruction requires: sve2 or sme // CHECK-NEXT: tbx z0.b, z1.b, z2.b -.arch_extension sve2-aes -.arch_extension nosve2-aes +.arch_extension sve-aes +.arch_extension nosve-aes SpencerAbson wrote: I see,

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-11 Thread Donát Nagy via cfe-commits
@@ -39,6 +39,10 @@ enum class StructuralEquivalenceKind { }; struct StructuralEquivalenceContext { + /// Store declaration pairs already found to be non-equivalent. + /// key: (from, to, IgnoreTemplateParmDepth) + using NonEquivalentDeclSet = llvm::DenseSet>; --

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-11 Thread Donát Nagy via cfe-commits
@@ -2511,7 +2512,8 @@ bool StructuralEquivalenceContext::Finish() { if (!Equivalent) { // Note that these two declarations are not equivalent (and we already // know about it). - NonEquivalentDecls.insert(P); + NonEquivalentDecls.insert( + std

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/115518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Wunsafe-buffer-usage] Fix false positives in handling string literals. (PR #115552)

2024-11-11 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak edited https://github.com/llvm/llvm-project/pull/115552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/115518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] da78ac5 - [Clang] Fix GPU intrinsics test on different range metadata

2024-11-11 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2024-11-11T12:38:27-06:00 New Revision: da78ac5d331953d3386fd56cd7979022be7400cf URL: https://github.com/llvm/llvm-project/commit/da78ac5d331953d3386fd56cd7979022be7400cf DIFF: https://github.com/llvm/llvm-project/commit/da78ac5d331953d3386fd56cd7979022be7400cf.diff

[clang] [clang][serialization] Enable `ASTWriter` to work with `Preprocessor` only (PR #115237)

2024-11-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/115237 >From 24f60890a4a1cef2c9387040fce6d0864fcb01f4 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 6 Nov 2024 11:18:09 -0800 Subject: [PATCH 1/3] [clang][serialization] Make `ASTWriter` accept `Preproces

[clang] [analyzer][NFC] Make RegionStore dumps deterministic (PR #115615)

2024-11-11 Thread Donát Nagy via cfe-commits
@@ -67,9 +67,10 @@ class BindingKey { isa(r)) && "Not a base"); } -public: +public: bool isDirect() const { return P.getInt() & Direct; } + bool isDefault() const { return !isDirect(); } NagyDonat wrote: ```suggestion ``` This is

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-11-11 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > Using cc1 options looks fine. Thanks! > Sorry, I made a mistake by approving #85235, which added a lot of driver > options. It's not clear who are the initial ELF ptrauth users, but I am not > sure with a very small user base, there are a lot of demands to customize the > p

[clang] Emit constrained atan2 intrinsic for clang builtin (PR #113636)

2024-11-11 Thread Farzon Lotfi via cfe-commits
@@ -13,7 +13,7 @@ using size_t = unsigned long; #endif // SPIR } // namespace std -float __builtin_atan2f(float, float); +float __builtin_erff(float); farzonl wrote: Just want to put a note here we are doing this because atan2 would no longer test the callin

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-11-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/9263 Here is the

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-11-11 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/7589 Here is the relevant piec

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-11-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/6621 Here is the relevant pie

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: > Another possible solution: Use two `NonEquivalentDecls` sets, one for > `IgnoreTemplateParmDepth = true` and one for `false`. This may use less > memory (no rarely used third value in the key) but requires more code changes. I like this idea, and I thi

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

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

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-11 Thread Donát Nagy via cfe-commits
@@ -1804,8 +1804,10 @@ struct StructuralEquivalenceCacheTest : public StructuralEquivalenceTest { } template - bool isInNonEqCache(std::pair D) { -return NonEquivalentDecls.count(D) > 0; + bool isInNonEqCache(std::pair D, + bool IgnoreTemplateP

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-11 Thread Donát Nagy via cfe-commits
@@ -62,7 +62,8 @@ class TypeSourceInfo; class ASTImporter { friend class ASTNodeImporter; public: -using NonEquivalentDeclSet = llvm::DenseSet>; +using NonEquivalentDeclSet = +llvm::DenseSet>; NagyDonat wrote: ```suggestion using No

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-11 Thread Donát Nagy via cfe-commits
@@ -2303,7 +2303,8 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, // Check whether we already know that these two declarations are not // structurally equivalent. - if (Context.NonEquivalentDecls.count(P)) + if (Context.NonEquivalentDecls

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-11 Thread Vigneshwar Jayakumar via cfe-commits
https://github.com/VigneshwarJ updated https://github.com/llvm/llvm-project/pull/113470 >From 0e2ee524f5b5c19169e446c55a386a00cfb0f6bc Mon Sep 17 00:00:00 2001 From: vigneshwar jayakumar Date: Wed, 23 Oct 2024 09:20:16 -0500 Subject: [PATCH 1/4] [Clang/AMDGPU] Zero sized arrays not allowed in H

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-11-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `clang` at step 6 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/10631 Here is

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

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

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-11 Thread Farzon Lotfi via cfe-commits
@@ -633,7 +633,8 @@ void RequirementHandler::initAvailableCapabilities(const SPIRVSubtarget &ST) { if (ST.isAtLeastSPIRVVer(VersionTuple(1, 6))) addAvailableCaps({Capability::DotProduct, Capability::DotProductInputAll, Capability::DotProductInput4x8

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-11-11 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Seems there's something *slightly* different from the autogenerated IR for the language test. I'll see if I can fix it. https://github.com/llvm/llvm-project/pull/110179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [Wunsafe-buffer-usage] Fix false positives in handling string literals. (PR #115552)

2024-11-11 Thread Malavika Samak via cfe-commits
@@ -38,3 +38,17 @@ void constant_idx_unsafe(unsigned idx) { // expected-note@-1{{change type of 'buffer' to 'std::array' to label it for hardening}} buffer[10] = 0; // expected-note{{used in buffer access here}} } + +void constant_id_string(unsi

[clang] [Wunsafe-buffer-usage] Fix false positives in handling string literals. (PR #115552)

2024-11-11 Thread Malavika Samak via cfe-commits
@@ -38,3 +38,17 @@ void constant_idx_unsafe(unsigned idx) { // expected-note@-1{{change type of 'buffer' to 'std::array' to label it for hardening}} buffer[10] = 0; // expected-note{{used in buffer access here}} } + +void constant_id_string(unsi

[clang] [analyzer][NFC] Make RegionStore dumps deterministic (PR #115615)

2024-11-11 Thread Donát Nagy via cfe-commits
@@ -232,27 +233,86 @@ class RegionBindingsRef : public llvm::ImmutableMapRef StringifyCache; +auto ToString = [&StringifyCache](const MemRegion *R) { + auto [Place, Inserted] = StringifyCache.try_emplace(R); + if (!Inserted) +return Place->second; + std

[clang] [clang][serialization] Enable `ASTWriter` to work with `Preprocessor` only (PR #115237)

2024-11-11 Thread Jan Svoboda via cfe-commits
@@ -4858,14 +4860,21 @@ time_t ASTWriter::getTimestampForOutput(const FileEntry *E) const { return IncludeTimestamps ? E->getModificationTime() : 0; } -ASTFileSignature ASTWriter::WriteAST(Sema &SemaRef, StringRef OutputFile, - Module *Wr

[clang] Emit constrained atan2 intrinsic for clang builtin (PR #113636)

2024-11-11 Thread Farzon Lotfi via cfe-commits
farzonl wrote: So the minute this lands our change is going to be visible across all backends. Should we add any constraint intrinsic tests to `PowerPC`, `RISCV`, `SystemZ`, etc? Here are just a handful of tests that we might want to update, but there are others: - llvm/test/CodeGen/PowerPC/

[clang] Emit constrained atan2 intrinsic for clang builtin (PR #113636)

2024-11-11 Thread Tex Riddell via cfe-commits
@@ -13,7 +13,7 @@ using size_t = unsigned long; #endif // SPIR } // namespace std -float __builtin_atan2f(float, float); +float __builtin_erff(float); tex3d wrote: Right, I hope I captured that in the PR description above. If that's not clear enough let me

[clang] [llvm] [RISCV] Support `svukte` extension (PR #115657)

2024-11-11 Thread Craig Topper via cfe-commits
topperc wrote: Missing RISCVUsage.rst https://github.com/llvm/llvm-project/pull/115657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Supply libraries and CRT objects to the linker (PR #115497)

2024-11-11 Thread Edd Dawson via cfe-commits
playstation-edd wrote: > Does the flipped order of library-option-names in > [100c3c2](https://github.com/llvm/llvm-project/commit/100c3c271437b3b6181a5a57381363f4b6e9e841) > have an actual effect on behaviour? Just curious. No effect. I accidentally flipped the order it in the initial commit

[clang] Emit constrained atan2 intrinsic for clang builtin (PR #113636)

2024-11-11 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/113636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][serialization] Enable `ASTWriter` to work with `Preprocessor` only (PR #115237)

2024-11-11 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/115237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Supply libraries and CRT objects to the linker (PR #115497)

2024-11-11 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/115497 >From 112e3e7ca9e3fd041fb0a1a0b7d97aa26740a908 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Thu, 7 Nov 2024 13:57:45 + Subject: [PATCH 1/5] [PS5][Driver] Supply libraries and CRT objects to the l

[clang] [clang][serialization] Enable `ASTWriter` to work with `Preprocessor` only (PR #115237)

2024-11-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/115237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a2f9d1d - [clang][serialization] Enable `ASTWriter` to work with `Preprocessor` only (#115237)

2024-11-11 Thread via cfe-commits
Author: Jan Svoboda Date: 2024-11-11T11:01:01-08:00 New Revision: a2f9d1d078cefc3ee7b19610f7117d1fb1369f18 URL: https://github.com/llvm/llvm-project/commit/a2f9d1d078cefc3ee7b19610f7117d1fb1369f18 DIFF: https://github.com/llvm/llvm-project/commit/a2f9d1d078cefc3ee7b19610f7117d1fb1369f18.diff L

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-11-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-darwin` running on `doug-worker-3` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/4705 Here is the r

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-11-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `arc-builder` running on `arc-worker` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/7462 Here is the relevant piece of

[clang] [clang][serialization] Enable `ASTWriter` to work with `Preprocessor` only (PR #115237)

2024-11-11 Thread Jan Svoboda via cfe-commits
@@ -661,8 +661,8 @@ class ASTWriter : public ASTDeserializationListener, /// Write a precompiled header for the given semantic analysis. /// - /// \param SemaRef a reference to the semantic analysis object that processed - /// the AST to be written into the precompiled h

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-11-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross` running on `suse-gary-m68k-cross` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/1868 Here is the relevant piece o

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-11 Thread Matt Arsenault via cfe-commits
@@ -322,22 +322,26 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) if ( ARCH STREQUAL spirv OR ARCH STREQUAL spirv64 ) set( build_flags -O0 -finline-hint-functions -DCLC_SPIRV ) - set( opt_flags ) + set( clc_opt_flags ) + # Inline CLC functions into OpenCL

[clang] [Wunsafe-buffer-usage] Fix false positives in handling string literals. (PR #115552)

2024-11-11 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak updated https://github.com/llvm/llvm-project/pull/115552 >From 94ba7d8b845f18b089e03c0fa41d9d1d20e79f0b Mon Sep 17 00:00:00 2001 From: MalavikaSamak Date: Fri, 8 Nov 2024 13:40:20 -0800 Subject: [PATCH] [Wunsafe-buffer-usage] Fix false positives in handling stri

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-11 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,38 @@ +#include +#include +#include + +#define CLC_SIGN(TYPE, F) \ + _CLC_DEF _CLC_OVERLOAD TYPE __clc_sign(TYPE x) { \ +if (__clc_isnan(x)) {

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-11 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/115699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Extend bugprone-use-after-move check to handle std::optional::reset() and std::any::reset() (PR #114255)

2024-11-11 Thread via cfe-commits
@@ -196,11 +196,13 @@ Any occurrence of the moved variable that is not a reinitialization (see below) is considered to be a use. An exception to this are objects of type ``std::unique_ptr``, -``std::shared_ptr`` and ``std::weak_ptr``, which have defined move behavior -(object

[clang-tools-extra] Extend bugprone-use-after-move check to handle std::optional::reset() and std::any::reset() (PR #114255)

2024-11-11 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/114255 >From d20ee5cb833df005856c8e466e4bfa21beb131ea Mon Sep 17 00:00:00 2001 From: higher-performance Date: Wed, 30 Oct 2024 12:01:00 -0400 Subject: [PATCH] Extend bugprone-use-after-move check to handle

[clang-tools-extra] Extend bugprone-use-after-move check to handle std::optional::reset() and std::any::reset() (PR #114255)

2024-11-11 Thread via cfe-commits
@@ -196,11 +196,13 @@ Any occurrence of the moved variable that is not a reinitialization (see below) is considered to be a use. An exception to this are objects of type ``std::unique_ptr``, -``std::shared_ptr`` and ``std::weak_ptr``, which have defined move behavior -(object

[clang] [clang][deps] Only write preprocessor info into PCMs (PR #115239)

2024-11-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/115239 >From 136e484907d24f1ba0efc4f658fabcdb95fa8498 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 6 Nov 2024 14:16:51 -0800 Subject: [PATCH 1/2] [clang][deps] Only write preprocessor info into PCMs ---

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #114897)

2024-11-11 Thread Rashmi Mudduluru via cfe-commits
@@ -89,7 +182,25 @@ class UncountedLambdaCapturesChecker } printQuotedQualifiedName(Os, Capture.getCapturedVar()); -Os << " to uncounted type is unsafe."; +Os << " to ref-counted / CheckedPtr capable type is unsafe."; + +PathDiagnosticLocation BSLoc(Capture

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-11 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/111499 >From 6ae72b7267193f6ee2f47c31d8a9542466d08ea4 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Sun, 10 Nov 2024 07:42:49 + Subject: [PATCH] Introduce [[clang::lifetime_capture_by]] --- clang/docs/Release

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-11 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 %s -ast-dump | FileCheck %s + +// Verify that we print the [[clang::lifetime_capture_by(X)]] attribute. + +struct S { +void foo(int &a, int &b) [[clang::lifetime_capture_by(a, b, global)]]; +}; + +// CHECK: CXXMethodDecl {{.*}}clang::lifetim

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-11 Thread Haojian Wu via cfe-commits
@@ -1760,6 +1760,10 @@ class Sema final : public SemaBase { /// Add [[gsl::Pointer]] attributes for std:: types. void inferGslPointerAttribute(TypedefNameDecl *TD); + LifetimeCaptureByAttr *ParseLifetimeCaptureByAttr(const ParsedAttr &AL, hokein wrote: a

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-11 Thread Gábor Horváth via cfe-commits
@@ -3967,6 +3967,69 @@ Attribute ``trivial_abi`` has no effect in the following cases: }]; } + +def LifetimeCaptureByDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``lifetime_capture_by(X)`` attribute on a function parameter or implic

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-11 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/111499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-11 Thread Tom Stellard via cfe-commits
https://github.com/tstellar commented: So is the sign function currently implemented in the OpenCL headers? https://github.com/llvm/llvm-project/pull/115699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

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

2024-11-11 Thread via cfe-commits
https://github.com/qt-tatiana updated https://github.com/llvm/llvm-project/pull/113144 >From 34ee6f5836efe3acddbdd1c9810af358b8c4f981 Mon Sep 17 00:00:00 2001 From: Tatiana Borisova Date: Thu, 17 Oct 2024 18:00:08 +0200 Subject: [PATCH 1/9] [clang-tidy] Create a check for signed and unsigned i

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-11 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > > So is the sign function currently implemented in the OpenCL headers? > > The sign function for SPIR-V/Mesa is currently implemented by libclc > [here](https://github.com/llvm/llvm-project/blob/main/libclc/generic/lib/common/sign.cl). > With this change, `sign` now calls

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

2024-11-11 Thread via cfe-commits
https://github.com/qt-tatiana 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-11-11 Thread via cfe-commits
qt-tatiana wrote: > Perhaps this has been discussed before, but I think the part about "add qt > module" should be added on a separate patch, since adding a brand-new tidy > module is a rather big thing. > > So this patch could be only about adding the `modernize` check, and a > follow-up pat

[clang] [clang][ASTImporter] Allow import of similar friend template with different depth (PR #115734)

2024-11-11 Thread Balázs Kéri via cfe-commits
balazske wrote: Currently one of the tests fail, the problem is fixed if #115518 is applied. https://github.com/llvm/llvm-project/pull/115734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang][ASTImporter] Allow import of similar friend template with different depth (PR #115734)

2024-11-11 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/115734 The fix applies to a case that occurs when the AST contains a friend template that is contained within another template and this (outer) template has specialization. (See the added test code in the commit.) Th

[clang] [clang][ASTImporter] Allow import of similar friend template with different depth (PR #115734)

2024-11-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes The fix applies to a case that occurs when the AST contains a friend template that is contained within another template and this (outer) template has specialization. (See the added test code in the commit.)

[clang] 8c4331c - [clang] Introduce [[clang::lifetime_capture_by(X)]] (#111499)

2024-11-11 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2024-11-11T17:18:29+01:00 New Revision: 8c4331c1abeb33eabf3cdbefa7f2b6e0540e7f4f URL: https://github.com/llvm/llvm-project/commit/8c4331c1abeb33eabf3cdbefa7f2b6e0540e7f4f DIFF: https://github.com/llvm/llvm-project/commit/8c4331c1abeb33eabf3cdbefa7f2b6e0540e7f4f.diff

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-11 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: I will proceed with landing this. Happy to address future comments in a followup. https://github.com/llvm/llvm-project/pull/111499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-11 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/111499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Wunsafe-buffer-usage] Fix false positives in handling string literals. (PR #115552)

2024-11-11 Thread via cfe-commits
@@ -38,3 +38,17 @@ void constant_idx_unsafe(unsigned idx) { // expected-note@-1{{change type of 'buffer' to 'std::array' to label it for hardening}} buffer[10] = 0; // expected-note{{used in buffer access here}} } + +void constant_id_string(unsi

[clang] [Wunsafe-buffer-usage] Fix false positives in handling string literals. (PR #115552)

2024-11-11 Thread via cfe-commits
@@ -38,3 +38,17 @@ void constant_idx_unsafe(unsigned idx) { // expected-note@-1{{change type of 'buffer' to 'std::array' to label it for hardening}} buffer[10] = 0; // expected-note{{used in buffer access here}} } + +void constant_id_string(unsi

[clang] [clang] Extend clang's to define *LONG_LONG*_ macros for bionic (PR #115406)

2024-11-11 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/115406 >From eda669f73765a957cc47d3d684a6443ed2f75edf Mon Sep 17 00:00:00 2001 From: Zijun Date: Fri, 8 Nov 2024 01:04:21 + Subject: [PATCH] Extend clang's to define *LONG_LONG*_ macros for bionic --- clan

[clang] [clang] Extend clang's to define *LONG_LONG*_ macros for bionic (PR #115406)

2024-11-11 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/115406 >From eda669f73765a957cc47d3d684a6443ed2f75edf Mon Sep 17 00:00:00 2001 From: Zijun Date: Fri, 8 Nov 2024 01:04:21 + Subject: [PATCH 1/2] Extend clang's to define *LONG_LONG*_ macros for bionic ---

[clang] [Clang][Comments] Make @relates an inline comment command (PR #115040)

2024-11-11 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/115040 >From cba8a46cd0dcbdf5079712354e5d0829199e0e08 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 5 Nov 2024 12:59:42 -0500 Subject: [PATCH 1/2] [Clang][Comments] Make @relates an inline comment co

[clang] [Clang][Comments] Make @relates an inline comment command (PR #115040)

2024-11-11 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @AaronBallman Test added https://github.com/llvm/llvm-project/pull/115040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][serialization] Enable `ASTWriter` to work with `Preprocessor` only (PR #115237)

2024-11-11 Thread Ben Langmuir via cfe-commits
@@ -661,8 +661,8 @@ class ASTWriter : public ASTDeserializationListener, /// Write a precompiled header for the given semantic analysis. /// - /// \param SemaRef a reference to the semantic analysis object that processed - /// the AST to be written into the precompiled h

[clang] [clang][serialization] Enable `ASTWriter` to work with `Preprocessor` only (PR #115237)

2024-11-11 Thread Ben Langmuir via cfe-commits
@@ -4858,14 +4860,21 @@ time_t ASTWriter::getTimestampForOutput(const FileEntry *E) const { return IncludeTimestamps ? E->getModificationTime() : 0; } -ASTFileSignature ASTWriter::WriteAST(Sema &SemaRef, StringRef OutputFile, - Module *Wr

[clang] 11cc826 - [Clang] Implement resource directory headers for common GPU intrinsics (#110179)

2024-11-11 Thread via cfe-commits
Author: Joseph Huber Date: 2024-11-11T10:09:55-08:00 New Revision: 11cc826c0a5802b03c85aa271b6fd16214f8f4d8 URL: https://github.com/llvm/llvm-project/commit/11cc826c0a5802b03c85aa271b6fd16214f8f4d8 DIFF: https://github.com/llvm/llvm-project/commit/11cc826c0a5802b03c85aa271b6fd16214f8f4d8.diff

[clang] [clang] Extend clang's to define *LONG_LONG*_ macros for bionic (PR #115406)

2024-11-11 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/115406 >From eda669f73765a957cc47d3d684a6443ed2f75edf Mon Sep 17 00:00:00 2001 From: Zijun Date: Fri, 8 Nov 2024 01:04:21 + Subject: [PATCH 1/2] Extend clang's to define *LONG_LONG*_ macros for bionic ---

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-11-11 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/110179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Only write preprocessor info into PCMs (PR #115239)

2024-11-11 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/115239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Use the 'B' extension in RISC-V profile definitions (PR #113942)

2024-11-11 Thread Sam Elliott via cfe-commits
lenary wrote: Sorry I didn't get to this over the weekend. LGTM. https://github.com/llvm/llvm-project/pull/113942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-11 Thread Balázs Kéri via cfe-commits
balazske wrote: I had another simple fix when the cache is used only if `IgnoreTemplateParmDepth` is false which is the often used case. During one structural equivalence comparison `IgnoreTemplateParmDepth` does not change, just one set of the cached values (for `IgnoreTemplateParmDepth`) is

[clang] [clang] Set FPOptions at the beginning of CompoundStmt (PR #111654)

2024-11-11 Thread Serge Pavlov via cfe-commits
@@ -1684,6 +1684,15 @@ class CompoundStmt final return hasStoredFPFeatures() ? getStoredFPFeatures() : FPOptionsOverride(); } + /// Get FPOptions inside this statement. They may differ from the outer + /// options due to pragmas. + /// \param CurFPOptions FPOptions ou

[clang] [Clang] Fix name lookup for dependent bases (PR #114978)

2024-11-11 Thread Vladislav Belov via cfe-commits
vbe-sc wrote: > @vbe-sc I can later today or tomorrow. That's would be great, thank you! https://github.com/llvm/llvm-project/pull/114978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] 1735291 - [TableGen] Use heterogenous lookups with std::map (NFC) (#115682)

2024-11-11 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-11-11T07:34:42-08:00 New Revision: 173529104d598785c2f8c36c047a6d0f1d0f060e URL: https://github.com/llvm/llvm-project/commit/173529104d598785c2f8c36c047a6d0f1d0f060e DIFF: https://github.com/llvm/llvm-project/commit/173529104d598785c2f8c36c047a6d0f1d0f060e.diff L

[clang] [TableGen] Use heterogenous lookups with std::map (NFC) (PR #115682)

2024-11-11 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/115682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Supply libraries and CRT objects to the linker (PR #115497)

2024-11-11 Thread Paul T Robinson via cfe-commits
pogo59 wrote: FWIW, IMO the implicit-check-not idea was worth trying, but not worth keeping. Up to @jmorse though. https://github.com/llvm/llvm-project/pull/115497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [llvm] Reland [clang][AArch64] Add getHostCPUFeatures to query for enabled f… (PR #115467)

2024-11-11 Thread Sjoerd Meijer via cfe-commits
https://github.com/sjoerdmeijer edited https://github.com/llvm/llvm-project/pull/115467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland [clang][AArch64] Add getHostCPUFeatures to query for enabled f… (PR #115467)

2024-11-11 Thread Sjoerd Meijer via cfe-commits
@@ -210,6 +210,9 @@ def have_host_clang_repl_cuda(): config.substitutions.append(("%host_cc", config.host_cc)) config.substitutions.append(("%host_cxx", config.host_cxx)) +# Determine whether the test target is compatible with execution on the host. +if config.host_arch in con

[clang] [llvm] Reland [clang][AArch64] Add getHostCPUFeatures to query for enabled f… (PR #115467)

2024-11-11 Thread Sjoerd Meijer via cfe-commits
https://github.com/sjoerdmeijer approved this pull request. Looks like a good fix to me. Please wait a day in case @davemgreen has comments, and it is better to commit in the morning anyway. :) For convenience, the diff with the previous version is this first line in the test: ``` // REQUIR

[clang] [StaticAnalyzer] early return if sym is concrete on assuming (PR #115579)

2024-11-11 Thread Ding Fei via cfe-commits
danix800 wrote: > > Thanks for the commit, I'm satisfied with it :) > > I actually like that these two related changes (the checker change and the > > constraint manager improvement) are handled together in a single commit -- > > this way somebody who browses the commit log can directly see the

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #114897)

2024-11-11 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! Left a couple nits, mainly about readability of the warning. https://github.com/llvm/llvm-project/pull/114897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #114897)

2024-11-11 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud edited https://github.com/llvm/llvm-project/pull/114897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #114897)

2024-11-11 Thread Rashmi Mudduluru via cfe-commits
@@ -45,32 +52,118 @@ class UncountedLambdaCapturesChecker bool shouldVisitTemplateInstantiations() const { return true; } bool shouldVisitImplicitCode() const { return false; } - bool VisitLambdaExpr(LambdaExpr *L) { -Checker->visitLambdaExpr(L); +

[clang] [Wunsafe-buffer-usage] Fix false positives in handling string literals. (PR #115552)

2024-11-11 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 approved this pull request. LGTM! Thank you @malavikasamak https://github.com/llvm/llvm-project/pull/115552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [Wunsafe-buffer-usage] Fix false positives in handling string literals. (PR #115552)

2024-11-11 Thread via cfe-commits
@@ -38,3 +38,17 @@ void constant_idx_unsafe(unsigned idx) { // expected-note@-1{{change type of 'buffer' to 'std::array' to label it for hardening}} buffer[10] = 0; // expected-note{{used in buffer access here}} } + +void constant_id_string(unsi

[clang] [Wunsafe-buffer-usage] Fix false positives in handling string literals. (PR #115552)

2024-11-11 Thread via cfe-commits
https://github.com/jkorous-apple approved this pull request. LGTM Thank you! https://github.com/llvm/llvm-project/pull/115552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AMX] Add AMX FP8 new APIs (PR #115829)

2024-11-11 Thread Feng Zou via cfe-commits
https://github.com/fzou1 created https://github.com/llvm/llvm-project/pull/115829 This is a follow-up to #113850. Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368 >From 9fd6e9e598423b6cc58a25fe70cc12a846483be5 Mon Sep 17 00:00:00 2001 From: Feng Zou Date: Thu, 7 Nov 2024 11:56:17 +0800

<    1   2   3   4   >