[clang] [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (PR #133212)

2025-03-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/133212 The instantiation of a VarDecl's initializer might be deferred until the variable is actually used. However, we were still building the DeclRefExpr with a type that could later be changed by the initializer's i

[clang] [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (PR #133212)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes The instantiation of a VarDecl's initializer might be deferred until the variable is actually used. However, we were still building the DeclRefExpr with a type that could later be changed by the initializer'

[clang-tools-extra] [clang-tidy][misc-const-correctness] fix fp when using const array type. (PR #133018)

2025-03-26 Thread Congcong Cai via cfe-commits
@@ -89,6 +89,8 @@ void ConstCorrectnessCheck::registerMatchers(MatchFinder *Finder) { const auto ConstReference = hasType(references(isConstQualified())); HerrCai0907 wrote: I think the comment means check the constness of pointer and array instead of const

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-03-26 Thread Sumit Agarwal via cfe-commits
https://github.com/sumitsays updated https://github.com/llvm/llvm-project/pull/131237 >From 6d5c4053c90975d64e378e52779dab9c3ffb64cd Mon Sep 17 00:00:00 2001 From: Sumit Agarwal Date: Thu, 13 Mar 2025 16:02:32 -0700 Subject: [PATCH 01/12] dot2add working for dxil without sema check --- clang/

[clang] [Driver] Use *Set::insert_range (NFC) (PR #133201)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes This patch uses a range constructor to collapse: llvm::StringSet<> Dest; for (const auto &S : Src) Dest.insert(S); down to: llvm::StringSet<> Dest(llvm::from_range, Src); --- Full diff: ht

[clang] [X86][AVX10] Re-target mavx10.1 and emit warning for mavx10.x-256/512 (PR #132542)

2025-03-26 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/132542 >From 9a8d9b7d5d3f07685579c3d1336e146755bb7efa Mon Sep 17 00:00:00 2001 From: "Wang, Phoebe" Date: Sat, 22 Mar 2025 19:15:01 +0800 Subject: [PATCH 1/2] [X86][AVX10] Re-target mavx10.1 and emit warning for ma

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-26 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. Looks good. Thanks for the updates! https://github.com/llvm/llvm-project/pull/131657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [llvm] [ADT] Remove old range constructors of SmallSet and StringSet (PR #133205)

2025-03-26 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/133205 This patch removes the old range constructors of SmallSet and StringSet that do not take the llvm::from_range tag. Since there are so few uses, this patch directly removes them without going through the d

[clang] [llvm] [ADT] Remove old range constructors of SmallSet and StringSet (PR #133205)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-adt Author: Kazu Hirata (kazutakahirata) Changes This patch removes the old range constructors of SmallSet and StringSet that do not take the llvm::from_range tag. Since there are so few uses, this patch directly removes them without going through

[clang] [llvm] [ADT] Remove old range constructors of SmallSet and StringSet (PR #133205)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes This patch removes the old range constructors of SmallSet and StringSet that do not take the llvm::from_range tag. Since there are so few uses, this patch directly removes them without going through the

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Ryotaro Kasuga via cfe-commits
@@ -44,23 +44,19 @@ MDNode *LoopInfo::createPipeliningMetadata(const LoopAttributes &Attrs, else if (Attrs.PipelineInitiationInterval != 0) Enabled = true; + SmallVector Args; + Args.append(LoopProperties.begin(), LoopProperties.end()); + if (Enabled != true) { -

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Ryotaro Kasuga via cfe-commits
@@ -44,23 +44,19 @@ MDNode *LoopInfo::createPipeliningMetadata(const LoopAttributes &Attrs, else if (Attrs.PipelineInitiationInterval != 0) Enabled = true; + SmallVector Args; + Args.append(LoopProperties.begin(), LoopProperties.end()); + if (Enabled != true) { -

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Ryotaro Kasuga via cfe-commits
https://github.com/kasuga-fj commented: Thanks for your review! https://github.com/llvm/llvm-project/pull/131985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Use a range constructor of StringSet (NFC) (PR #133201)

2025-03-26 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vls-2stage` running on `linaro-g3-02` while building `clang` at step 12 "ninja check 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/4/builds/5888 Here is the relevant piece of

[clang] Add guard to for loop test clang/test/Sema/for.c (PR #133169)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Ariel-Burton) Changes Commit 20b7f5982622f includes a case that checks diagnostics for for loops using thread locals. This fails on platforms which do not support TLS. This change adds guards to run this part of the test iff the feat

[clang] 80f216d - [C++20] [Modules] Add a test

2025-03-26 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-03-27T14:04:41+08:00 New Revision: 80f216db530eda98a444bc1994c7d69a7107c3c6 URL: https://github.com/llvm/llvm-project/commit/80f216db530eda98a444bc1994c7d69a7107c3c6 DIFF: https://github.com/llvm/llvm-project/commit/80f216db530eda98a444bc1994c7d69a7107c3c6.diff LO

[clang] [Clang] Improve subsumption. (PR #132849)

2025-03-26 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/132849 >From b5b5275093f6942238536834c6508551f7ceffd8 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 16 Mar 2025 23:34:19 +0100 Subject: [PATCH 01/10] [Clang] Improve subsumption. The main goal of this patc

[clang] [llvm] [AArch64] Add FEAT_FPAC to Grace (PR #133054)

2025-03-26 Thread Sjoerd Meijer via cfe-commits
@@ -1067,7 +1067,8 @@ def ProcessorFeatures { FeatureDotProd, FeatureFPARMv8, FeatureMatMulInt8, FeatureSSBS, FeatureCCIDX, FeatureJS, FeatureLSE, FeatureRAS, Featur

[clang] [llvm] [AArch64] Add FEAT_FPAC to Grace (PR #133054)

2025-03-26 Thread David Green via cfe-commits
@@ -1067,7 +1067,8 @@ def ProcessorFeatures { FeatureDotProd, FeatureFPARMv8, FeatureMatMulInt8, FeatureSSBS, FeatureCCIDX, FeatureJS, FeatureLSE, FeatureRAS, Featur

[clang] 0bc2c5b - Reapply "[clang][bytecode] Implement __builtin_{wcscmp,wcsncmp} (#132… (#132963)

2025-03-26 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-26T08:19:31+01:00 New Revision: 0bc2c5b2a4ca49011db27f7e8632d5d5ebc0ef5d URL: https://github.com/llvm/llvm-project/commit/0bc2c5b2a4ca49011db27f7e8632d5d5ebc0ef5d DIFF: https://github.com/llvm/llvm-project/commit/0bc2c5b2a4ca49011db27f7e8632d5d5ebc0ef5d.diff L

[clang] [RFC][clang] Fix for regression #130917 (PR #132214)

2025-03-26 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin edited https://github.com/llvm/llvm-project/pull/132214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Print more info in Block::dump() (PR #133062)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/133062.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Disasm.cpp (+8) ``diff diff --git a/clang/lib/AST/ByteCode/Disasm.cpp

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-26 Thread Eli Friedman via cfe-commits
@@ -1073,6 +1073,29 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [flang] [llvm] [AMDGPU] Add "lds-buffer-load-insts" attribute for all targets < gfx11 (PR #133055)

2025-03-26 Thread Jay Foad via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= Message-ID: In-Reply-To: jayfoad wrote: At the hardware level, GFX11 removed the ability for buffer, **scratch** and **global** instructions to return directly to LDS. So can we use one attribute that covers all three of those? https://github.com/llv

[clang] [clang] Placement new error when modifying consts (PR #132460)

2025-03-26 Thread marius doerner via cfe-commits
https://github.com/mariusdr created https://github.com/llvm/llvm-project/pull/132460 Closes #131432 Raise an error when placement new is used to modify a const-qualified variable in a constexpr function. Note that diag::note_constexpr_modify_const_type is used since the it is also raised wh

[clang] [clang][bytecode] Fix zero-init of atomic floating point objects (PR #132782)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We can't pass the AtomicType along to ASTContext::getFloatTypeSemantics. --- Full diff: https://github.com/llvm/llvm-project/pull/132782.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.

[clang] cca0f81 - [PATCH] [clang][modules] Fix serialization and de-serialization of PCH module file refs (#105994) (#132802)

2025-03-26 Thread via cfe-commits
Author: Paul Schwabauer Date: 2025-03-25T13:24:21+08:00 New Revision: cca0f8113e2f9a1bd662c62dd3ff7e1fa197e6b5 URL: https://github.com/llvm/llvm-project/commit/cca0f8113e2f9a1bd662c62dd3ff7e1fa197e6b5 DIFF: https://github.com/llvm/llvm-project/commit/cca0f8113e2f9a1bd662c62dd3ff7e1fa197e6b5.dif

[clang] [clang-tools-extra] Reland: [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #132317)

2025-03-26 Thread Alexander Kornienko via cfe-commits
alexfh wrote: The reduced test case: ``` template struct A; template struct A {}; template void e(T) { A f; } struct S { struct C { void h(int &, S *); }; void i() { e(&C::h); } }; ``` https://gcc.godbolt.org/z/8Pq9EWbTv https://github.com/llvm/llvm-project/pull/132317 __

[clang] [clang][analyzer] Ignore unnamed bitfields in UninitializedObjectChecker (PR #132427)

2025-03-26 Thread Abhinav Kumar via cfe-commits
https://github.com/kr-2003 updated https://github.com/llvm/llvm-project/pull/132427 >From 72aafcc255bbcfccb3fa5317e260faf97a3dfed5 Mon Sep 17 00:00:00 2001 From: kr-2003 Date: Fri, 21 Mar 2025 20:45:11 +0530 Subject: [PATCH 1/4] [clang][analyzer] Removed warnings for unnamed bitfields --- ...

[clang] [llvm] [AArch64] Add FEAT_FPAC to Neoverse V2 (PR #133054)

2025-03-26 Thread Ricardo Jesus via cfe-commits
https://github.com/rj-jesus edited https://github.com/llvm/llvm-project/pull/133054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-26 Thread Steven Perron via cfe-commits
https://github.com/s-perron approved this pull request. The SPV code looks good to me. I just want one small suggestion. https://github.com/llvm/llvm-project/pull/132288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-26 Thread Steven Perron via cfe-commits
@@ -0,0 +1,60 @@ +; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} s-perron wrote: I would like to start having the

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-26 Thread Daniel Chen via cfe-commits
DanielCChen wrote: @Meinersbur @MaskRay and all other reviewers, PR #132821 enables `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON` on AIX. As a result, I no longer need to "force" AIX to use `os_dirname` for flang-rt. The change in this PR is intact because I re-used the same code to handle the op

[clang] [flang] [llvm] [AMDGPU] Add "lds-buffer-load-insts" attribute for all targets < gfx11 (PR #133055)

2025-03-26 Thread Juan Manuel Martinez Caamaño via cfe-commits
jmmartinez wrote: > > Global load lds is available on gfx9 and gfx10. > > However, the __builtin_amdgcn_global_load_lds builtin is restricted to > > platforms with the attribute gfx940-insts; while it could be available on > > gfx90a for example. > > This doesn't sound right, it was new in 940

[clang] [llvm] [WIP] Clang ABI Types (PR #133080)

2025-03-26 Thread via cfe-commits
https://github.com/easyonaadit updated https://github.com/llvm/llvm-project/pull/133080 >From 16f156dbd83fe0b272f9d485584b1fb9d9a04015 Mon Sep 17 00:00:00 2001 From: easyonaadit Date: Fri, 21 Mar 2025 11:37:31 +0530 Subject: [PATCH 1/2] temp commit have annotated the code with some parts of un

[clang] [HLSL][NFC] Refactor HLSLExternalSemaSource (PR #131032)

2025-03-26 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/131032 >From 7ebfc826ca27c71ef80f4a1b38b2d3a2e155b777 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 12 Mar 2025 14:09:24 -0700 Subject: [PATCH 1/5] [HLSL][NFC] Refactoring HLSLExternalSemaSource Moving builder

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-26 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/132237 >From ccbcd77e5bd6712531a23bcd79fc9380fdc3d9bf Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 12 Mar 2025 21:26:36 -0700 Subject: [PATCH 1/3] [clang][DependencyScanning] Track dependencies from preb

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-26 Thread Paul Kirth via cfe-commits
ilovepi wrote: > Should I modify `HTMLGeneratorTest.cpp` to test `RepositoryLinePrefix`? > > https://github.com/llvm/llvm-project/blob/7a370748c0928b9ccfe26127e54eb3c1a1827d75/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp#L179 You can, but please make that its own test. https://g

[clang] [flang] [llvm] [AMDGPU] Add "lds-buffer-load-insts" attribute for all targets < gfx11 (PR #133055)

2025-03-26 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= Message-ID: In-Reply-To: arsenm wrote: > Global load lds is available on gfx9 and gfx10. > However, the __builtin_amdgcn_global_load_lds builtin is restricted to > platforms with the attribute gfx940-insts; while it could be available on > gfx90a for

[libclc] [libclc] Fix commands in compile_to_bc are executed sequentially (PR #130755)

2025-03-26 Thread Fraser Cormack via cfe-commits
@@ -256,19 +261,25 @@ function(add_libclc_builtin_set) get_filename_component( file_dir ${file} DIRECTORY ) +string( REPLACE "/" "-" replaced ${file} ) +set( tgt compile_tgt-${ARG_ARCH_SUFFIX}${replaced}) + compile_to_bc( + TARGET ${tgt} TRIPLE ${

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-03-26 Thread St. Muench via cfe-commits
https://github.com/stmuench edited https://github.com/llvm/llvm-project/pull/132924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c3e08c8 - [HLSL] Add new double overloads for math builtins (#132979)

2025-03-26 Thread via cfe-commits
Author: Sarah Spall Date: 2025-03-26T07:54:13-07:00 New Revision: c3e08c8f07ded9ef0d1ad2f3fb04e98d839479b1 URL: https://github.com/llvm/llvm-project/commit/c3e08c8f07ded9ef0d1ad2f3fb04e98d839479b1 DIFF: https://github.com/llvm/llvm-project/commit/c3e08c8f07ded9ef0d1ad2f3fb04e98d839479b1.diff L

[clang] 529c5b7 - [flang] Add -f[no-]slp-vectorize flags (#132801)

2025-03-26 Thread via cfe-commits
Author: Kajetan Puchalski Date: 2025-03-26T16:10:35Z New Revision: 529c5b71c608c18141432e6fd0ae89242d5f309d URL: https://github.com/llvm/llvm-project/commit/529c5b71c608c18141432e6fd0ae89242d5f309d DIFF: https://github.com/llvm/llvm-project/commit/529c5b71c608c18141432e6fd0ae89242d5f309d.diff

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-26 Thread Tom Eccles via cfe-commits
https://github.com/tblah closed https://github.com/llvm/llvm-project/pull/132801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -1073,6 +1073,28 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [NFC][clang] Remove superfluous header files after refactor in #132252 (PR #132495)

2025-03-26 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray closed https://github.com/llvm/llvm-project/pull/132495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PATCH] [clang][frontend] Fix AllocKind retrieving for `CXXConstructorDecl` refs #132794 (PR #133077)

2025-03-26 Thread Paul Schwabauer via cfe-commits
https://github.com/koplas edited https://github.com/llvm/llvm-project/pull/133077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. LGTM, great work! https://github.com/llvm/llvm-project/pull/131985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Michael Kruse via cfe-commits
@@ -44,23 +44,19 @@ MDNode *LoopInfo::createPipeliningMetadata(const LoopAttributes &Attrs, else if (Attrs.PipelineInitiationInterval != 0) Enabled = true; + SmallVector Args; + Args.append(LoopProperties.begin(), LoopProperties.end()); + if (Enabled != true) { -

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Michael Kruse via cfe-commits
@@ -44,23 +44,19 @@ MDNode *LoopInfo::createPipeliningMetadata(const LoopAttributes &Attrs, else if (Attrs.PipelineInitiationInterval != 0) Enabled = true; + SmallVector Args; + Args.append(LoopProperties.begin(), LoopProperties.end()); + if (Enabled != true) { -

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-26 Thread Amr Hesham via cfe-commits
@@ -67,6 +67,40 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return create(loc, attr.getType(), attr); } + mlir::TypedAttr getConstNullPtrAttr(mlir::Type t) { +assert(mlir::isa(t) && "expected cir.ptr"); +return getConstPtrAttr(t, 0); + } + + mlir::Typ

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-26 Thread Paul Kirth via cfe-commits
ilovepi wrote: The failures on the presubmit bot look unrelated, but you need to update your branch, since it looks like the base revision is broken. https://github.com/llvm/llvm-project/pull/131280 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Michael Kruse via cfe-commits
@@ -170,11 +161,10 @@ LoopInfo::createUnrollAndJamMetadata(const LoopAttributes &Attrs, MDNode::get(Ctx, MDString::get(Ctx, "llvm.loop.unroll_and_jam.disable"))); bool FollowupHasTransforms = false; - MDNode *Followup = createPartialUnrollMetadata(Attrs, FollowupLoo

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/131985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-03-26 Thread Jan Svoboda via cfe-commits
@@ -373,10 +373,10 @@ Module *HeaderSearch::lookupModule(StringRef ModuleName, StringRef SearchName, SmallString<128> NestedModuleMapDirName; NestedModuleMapDirName = Dir.getDirRef()->getName(); llvm::sys::path::append(NestedModuleMapDirName, ModuleName); -if (

[clang] [CIR] Add BinOpOverflowOp and basic pointer arithmetic support (PR #133118)

2025-03-26 Thread Morris Hafner via cfe-commits
mmha wrote: cc @andykaylor @erichkeane @dkolsen-pgi https://github.com/llvm/llvm-project/pull/133118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.RawPtrRefMemberChecker] The checker doesn't warn Objective-C types in ivars. (PR #132833)

2025-03-26 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/132833 This PR fixes the bug that we weren't generating warnings when a raw poiner is used to point to a NS type in Objective-C ivars. Also fix the bug that we weren't suppressing this warning in system headers. >From

[clang] [HLSL][NFC] Use method builder to create default resource constructor (PR #131384)

2025-03-26 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/131384 >From 7ebfc826ca27c71ef80f4a1b38b2d3a2e155b777 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 12 Mar 2025 14:09:24 -0700 Subject: [PATCH 1/6] [HLSL][NFC] Refactoring HLSLExternalSemaSource Moving builder

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - AaronBallman wrote: N2359 applies t

[clang] [llvm] [AArch64] Add FEAT_FPAC to Neoverse V2 (PR #133054)

2025-03-26 Thread Sjoerd Meijer via cfe-commits
https://github.com/sjoerdmeijer updated https://github.com/llvm/llvm-project/pull/133054 >From b1619f7b2835acafb4d76e6a16e678b17ddbe8b3 Mon Sep 17 00:00:00 2001 From: Sjoerd Meijer Date: Wed, 26 Mar 2025 04:38:48 -0700 Subject: [PATCH] [AArch64] Add FEAT_FPAC to Neoverse V2 This feature is sup

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-03-26 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > It would feel safer if the custom check was passed via command-line instead, > similar to --config good point. should we only support command line for this feature? for me it is enough. https://github.com/llvm/llvm-project/pull/131804 _

[clang] [llvm] cuda clang: Fix argument order for __reduce_max_sync (PR #132881)

2025-03-26 Thread Austin Schuh via cfe-commits
AustinSchuh wrote: > @AustinSchuh would you like me to merge the change for you, once the checks > are done? That would be wonderful. I don't know how to merge it (happy to learn, but I suspect I won't do it more than a couple of times) https://github.com/llvm/llvm-project/pull/132881 __

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-26 Thread James Y Knight via cfe-commits
@@ -0,0 +1,61 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c2y -pedantic -Wall -Wno-comment -verify %s + +/* WG14 N3369: Clang 21 + * _Lengthof operator + * + * Adds an operator to get the length of an array. Note that WG14 N3469 renamed + * this operator to _Countof. + */ + +int gl

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

2025-03-26 Thread Morris Hafner via cfe-commits
@@ -170,7 +170,7 @@ mlir::Value CIRGenFunction::evaluateExprAsBool(const Expr *e) { SourceLocation loc = e->getExprLoc(); assert(!cir::MissingFeatures::pgoUse()); - if (const MemberPointerType *MPT = e->getType()->getAs()) { + if (e->getType()->getAs()) { -

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to check_clang_tidy (PR #133140)

2025-03-26 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank created https://github.com/llvm/llvm-project/pull/133140 I'm looking to make some changes in this file, start by typing it. ``` > python3 -m mypy --strict clang-tools-extra/test/clang-tidy/check_clang_tidy.py Success: no issues found in 1 source file ``` >From ba5

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

2025-03-26 Thread Morris Hafner via cfe-commits
https://github.com/mmha approved this pull request. LGTM, just a few nits. https://github.com/llvm/llvm-project/pull/133134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to check_clang_tidy (PR #133140)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Nicolas van Kempen (nicovank) Changes I'm looking to make some changes in this file, start by typing it. ``` > python3 -m mypy --strict clang-tools-extra/test/clang-tidy/check_clang_tidy.py Suc

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-26 Thread Aaron Ballman via cfe-commits
@@ -16,3 +17,76 @@ def test_file(self): self.assertEqual(str(file), "t.c") self.assertEqual(file.name, "t.c") self.assertEqual(repr(file), "") + +def test_file_eq(self): +path = os.path.join(inputs_dir, "hello.cpp") +header_path = os.

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change adds zero initialization for global variables --- Full diff: https://github.com/llvm/llvm-project/pull/133100.diff 7 Files Affected: - (modified) clang/include/clang/CIR/Dialect/Builder/CI

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-26 Thread Cyndy Ishida via cfe-commits
@@ -5834,9 +5834,13 @@ bool ASTReader::readASTFileControlBlock( break; case INPUT_FILE: bool Overridden = static_cast(Record[3]); + size_t FilenameLen = ModuleDir.size() + Record[7] + 1; auto Filename = ResolveImportedPath(PathBuf

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-03-26 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: > @ilya-biryukov, would you mind giving this PR a test on your infrastructure > and if it works maybe share some performance results? Sure, let me try kicking it off. Note that our infrastructure is much better at detecting the compilations timing out than providing proper

[clang] [CIR] Add BinOpOverflowOp and basic pointer arithmetic support (PR #133118)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Morris Hafner (mmha) Changes This was part of #132420 originally but split off to reduce the diff size. This patch adds support for overflowing binary operators and all the plumbing required for pointer arithmetic except for the actual

[clang] [CIR] Add BinOpOverflowOp and basic pointer arithmetic support (PR #133118)

2025-03-26 Thread Morris Hafner via cfe-commits
@@ -1117,6 +1118,122 @@ mlir::LogicalResult CIRToLLVMBinOpLowering::matchAndRewrite( return mlir::LogicalResult::success(); } +mlir::LogicalResult CIRToLLVMBinOpOverflowOpLowering::matchAndRewrite( +cir::BinOpOverflowOp op, OpAdaptor adaptor, +mlir::ConversionPatter

[clang] [CIR] Add BinOpOverflowOp and basic pointer arithmetic support (PR #133118)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Morris Hafner (mmha) Changes This was part of #132420 originally but split off to reduce the diff size. This patch adds support for overflowing binary operators and all the plumbing required for pointer arithmetic except for the actual O

[clang] [CLANG][CUDA] Enable alignas after GNU attributes (PR #133105)

2025-03-26 Thread via cfe-commits
https://github.com/DenisGZM closed https://github.com/llvm/llvm-project/pull/133105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

2025-03-26 Thread Jean-Didier PAILLEUX via cfe-commits
@@ -4671,14 +4671,14 @@ def EB : Flag<["-"], "EB">, Alias; def m16 : Flag<["-"], "m16">, Group, Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, DXCOption]>; def m32 : Flag<["-"], "m32">, Group, Flags<[NoXarchOption]>, - Visibility<[ClangOption, CLOption, DXCOption

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-26 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: I also noticed that removing -DU_STATIC_IMPLEMENTATION macro passing fixes the crash. https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-26 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/131280 >From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001 From: hulxv Date: Fri, 14 Mar 2025 07:39:15 +0200 Subject: [PATCH 01/17] [clang-doc] [feat] add `--repository-line-prefix` argument (fix #59

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-26 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen edited https://github.com/llvm/llvm-project/pull/131041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Expose -m32 and -m64 options (PR #132409)

2025-03-26 Thread Jean-Didier PAILLEUX via cfe-commits
@@ -0,0 +1,6 @@ +! Check support of -m32 and -m64. JDPailleux wrote: Yes, of course https://github.com/llvm/llvm-project/pull/132409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [CIR] Implement lowering of int-to-bool casts (PR #132996)

2025-03-26 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/132996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix deduction of member pointers with dependent named classes (PR #133113)

2025-03-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/133113 >From 322838fdee8b751582e90d34b367d7877ee1dbf7 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 26 Mar 2025 12:26:40 -0300 Subject: [PATCH] [clang] fix deduction of member pointers with dependent named

[clang] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-03-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 commented: This now makes much more sense after the renames from the prep-commit. There are still some naming inconsistencies, though. For example `ModuleMap::loadModuleMapFile()` both **parses** and loads a module map file, but `ModuleMap::findOrLoadModule()` e

[clang] [clang] fix deduction of member pointers with dependent named classes (PR #133113)

2025-03-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/133113 >From d1831e84e62f5a100de193619cbfdf9a1d403674 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 26 Mar 2025 12:26:40 -0300 Subject: [PATCH] [clang] fix deduction of member pointers with dependent named

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

2025-03-26 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/133134 This fixes unused variable warnings that have crept into the ClangIR code. In some cases the variable will be needed later, but all unused variables are being removed here. They can be reintroduced when they

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-26 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Although C++ might have good alternatives, that's not so helpful for C > headers being included from C++ that might end up using this (e.g. some > static inline function in a system header). (i.e. if it's not too much effort > to do, I would encourage exposing it in C++)

[clang] [CLANG] Enable alignas after GNU attributes (PR #133107)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Denis.G (DenisGZM) Changes Enable parsing alignas attribute after GNU attributes, before ParseDeclaration This might be useful for cuda code where __shared__ and other specificators may be mixed with align. I'd be glad to see if there ar

[clang] [clang-tools-extra] Reland: [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #132317)

2025-03-26 Thread Alexander Kornienko via cfe-commits
alexfh wrote: > @alexfh Are you sure the original crashes were due to #132977 ? I thought so, but your explanation below also seems reasonable. I can try to verify. > Looking at the patch, it seems unlikely it could cause a crash in itself. > > What I think happened is that your compilation p

[clang] [PATCH] [clang][frontend] Fix AllocKind retrieving for `CXXConstructorDecl` refs #132794 (PR #133077)

2025-03-26 Thread Paul Schwabauer via cfe-commits
https://github.com/koplas edited https://github.com/llvm/llvm-project/pull/133077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Update Mach-O ptrauth driver defaults (PR #132834)

2025-03-26 Thread Francis Visoiu Mistrih via cfe-commits
francisvm wrote: > Looks like @ahmedbougacha might be out. @francisvm, could you take a look? @rjmccall / @jroelofs might be able to help! https://github.com/llvm/llvm-project/pull/132834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This fixes unused variable warnings that have crept into the ClangIR code. In some cases the variable will be needed later, but all unused variables are being removed here. They can be reintroduced when th

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This fixes unused variable warnings that have crept into the ClangIR code. In some cases the variable will be needed later, but all unused variables are being removed here. They can be reintroduced when

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

2025-03-26 Thread Andy Kaylor via cfe-commits
andykaylor wrote: @mmha https://github.com/llvm/llvm-project/pull/133134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Allow `Language: Cpp` for C files (PR #133033)

2025-03-26 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/133033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Override complex number calculation method by -fno-fa… (PR #132680)

2025-03-26 Thread via cfe-commits
@@ -177,14 +177,45 @@ // RUN: %clang -### -target x86_64 -ffast-math -fcomplex-arithmetic=basic -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=BASIC %s -// BASIC: -complex-range=basic -// FULL: -complex-range=full -// PRMTD: -complex-range=promoted -// BASIC-NOT: -complex-

[libclc] [libclc] Fix commands in compile_to_bc are executed sequentially (PR #130755)

2025-03-26 Thread Fraser Cormack via cfe-commits
@@ -63,13 +65,15 @@ function(compile_to_bc) ${ARG_DEPENDENCIES} DEPFILE ${ARG_OUTPUT}.d ) + add_custom_target( ${ARG_TARGET} DEPENDS ${ARG_OUTPUT}${TMP_SUFFIX} ) frasercrmck wrote: I don't think the (possibly) "temp" output (in the case of `.ll` f

[libclc] [libclc] Fix commands in compile_to_bc are executed sequentially (PR #130755)

2025-03-26 Thread Fraser Cormack via cfe-commits
@@ -283,7 +294,7 @@ function(add_libclc_builtin_set) set( builtins_comp_lib_tgt builtins.comp.${ARG_ARCH_SUFFIX} ) add_custom_target( ${builtins_comp_lib_tgt} -DEPENDS ${bytecode_files} +DEPENDS ${compile_tgts} frasercrmck wrote: Do we not need to

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

2025-03-26 Thread Morris Hafner via cfe-commits
@@ -1251,13 +1236,12 @@ void ConvertCIRToLLVMPass::runOnOperation() { patterns.add(converter, patterns.getContext(), dl); patterns.add(converter, patterns.getContext(), dl); patterns.add(converter, patterns.getContext(), dl); - patterns.add(converter, patterns.getContex

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

2025-03-26 Thread Morris Hafner via cfe-commits
@@ -1366,8 +1366,7 @@ mlir::Value ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( const mlir::Location loc = cgf.getLoc(e->getSourceRange()); if (auto kind = e->getKind(); kind == UETT_SizeOf || kind == UETT_DataSizeOf) { -if (const VariableArrayType *variableA

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

2025-03-26 Thread Morris Hafner via cfe-commits
https://github.com/mmha edited https://github.com/llvm/llvm-project/pull/133134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   >