[clang] [Clang] Fix a regression introduced by #140073 (PR #140288)

2025-05-16 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/140288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] efa2833 - [Clang] Fix a regression introduced by #140073 (#140288)

2025-05-16 Thread via cfe-commits
Author: cor3ntin Date: 2025-05-16T21:04:08+02:00 New Revision: efa28338d858e1ea2bf705d50a0404bc602c8fe1 URL: https://github.com/llvm/llvm-project/commit/efa28338d858e1ea2bf705d50a0404bc602c8fe1 DIFF: https://github.com/llvm/llvm-project/commit/efa28338d858e1ea2bf705d50a0404bc602c8fe1.diff LOG:

[clang] [clang][AArch64] Move initialization of ptrauth-* function attrs (PR #140277)

2025-05-16 Thread Anatoly Trosinenko via cfe-commits
atrosinenko wrote: It seems that when I rebased this PR from an older version of `main` branch, some test failures came up. I'm investigating these now. An example is [clang/test/CodeGen/ptrauth-function-lvalue-cast.c](https://github.com/llvm/llvm-project/blob/00c5cd8a7a3f7e363d8f0d172ea88af916

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-16 Thread Daniel Thornburgh via cfe-commits
https://github.com/mysterymath approved this pull request. https://github.com/llvm/llvm-project/pull/138061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-16 Thread Daniel Thornburgh via cfe-commits
@@ -70,18 +70,116 @@ class MustacheTemplateFile : public Template { MustacheTemplateFile(StringRef TemplateStr) : Template(TemplateStr) {} }; +static std::unique_ptr NamespaceTemplate = nullptr; + +static std::unique_ptr RecordTemplate = nullptr; + +static Error setupTemplat

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-16 Thread Daniel Thornburgh via cfe-commits
@@ -70,18 +70,116 @@ class MustacheTemplateFile : public Template { MustacheTemplateFile(StringRef TemplateStr) : Template(TemplateStr) {} }; +static std::unique_ptr NamespaceTemplate = nullptr; + +static std::unique_ptr RecordTemplate = nullptr; + +static Error setupTemplat

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-16 Thread Daniel Thornburgh via cfe-commits
@@ -40,13 +42,43 @@ getClangDocContext(std::vector UserStylesheets = {}, return CDCtx; } +static void verifyFileContents(const Twine &Path, StringRef Contents) { + auto Buffer = MemoryBuffer::getFile(Path); + ASSERT_TRUE((bool)Buffer); + StringRef Data = Buffer.get()->ge

[clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-05-16 Thread Daniel Thornburgh via cfe-commits
@@ -70,18 +70,116 @@ class MustacheTemplateFile : public Template { MustacheTemplateFile(StringRef TemplateStr) : Template(TemplateStr) {} }; +static std::unique_ptr NamespaceTemplate = nullptr; + +static std::unique_ptr RecordTemplate = nullptr; + +static Error setupTemplat

[clang] [OpenACC][CIR] Implement beginning of 'copy' lowering for compute con… (PR #140304)

2025-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Erich Keane (erichkeane) Changes …structs This is a partial implementation of the 'copy' lowering. It is missing 3 things, which are coming in future patches: 1- does not handle subscript/subarrays for emission as variables 2- does not

[clang] [llvm] [SPIRV] Add PreLegalizer pattern matching for `faceforward` (PR #139959)

2025-05-16 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng edited https://github.com/llvm/llvm-project/pull/139959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC][CIR] Implement beginning of 'copy' lowering for compute con… (PR #140304)

2025-05-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/140304 …structs This is a partial implementation of the 'copy' lowering. It is missing 3 things, which are coming in future patches: 1- does not handle subscript/subarrays for emission as variables 2- does not ha

[clang] [OpenACC][CIR] Implement beginning of 'copy' lowering for compute con… (PR #140304)

2025-05-16 Thread Erich Keane via cfe-commits
@@ -157,6 +222,103 @@ class OpenACCClauseCIREmitter final computeEmitter.Visit(&c); } + template + void addDataOperand(const Expr *varOperand, mlir::acc::DataClause dataClause, + bool structured, bool implicit) { +DataOperandInfo opInfo = +

[clang] [OpenACC][CIR] Implement beginning of 'copy' lowering for compute con… (PR #140304)

2025-05-16 Thread Erich Keane via cfe-commits
@@ -250,14 +420,26 @@ class OpenACCClauseCIREmitter final } void VisitAsyncClause(const OpenACCAsyncClause &clause) { +hasAsyncClause = true; if constexpr (isOneOfTypes) { if (!clause.hasIntExpr()) operation.addAsyncOnly(builder.getContext(), lastD

[clang] [llvm] [SPIRV] Add PreLegalizer pattern matching for `faceforward` (PR #139959)

2025-05-16 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng edited https://github.com/llvm/llvm-project/pull/139959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Alex Voicu via cfe-commits
AlexVlx wrote: Gentle ping. https://github.com/llvm/llvm-project/pull/134016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e5f8998 - [clang][bytecode] Explicitly start variable lifetimes via placement new (#140221)

2025-05-16 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-16T12:48:22+02:00 New Revision: e5f8998ac86f3cbbc763f0a1a9e23824e70b4af7 URL: https://github.com/llvm/llvm-project/commit/e5f8998ac86f3cbbc763f0a1a9e23824e70b4af7 DIFF: https://github.com/llvm/llvm-project/commit/e5f8998ac86f3cbbc763f0a1a9e23824e70b4af7.diff L

[clang] [clang][bytecode] Explicitly start variable lifetimes via placement new (PR #140221)

2025-05-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/140221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] 299a278 - [libclc] Improving vector code generated from scalar code (#140008)

2025-05-16 Thread via cfe-commits
Author: Wenju He Date: 2025-05-16T10:20:32+01:00 New Revision: 299a278db16fa0944472af79bfec31dd678c5b37 URL: https://github.com/llvm/llvm-project/commit/299a278db16fa0944472af79bfec31dd678c5b37 DIFF: https://github.com/llvm/llvm-project/commit/299a278db16fa0944472af79bfec31dd678c5b37.diff LOG:

[libclc] [libclc] Improving vector code generated from scalar code (PR #140008)

2025-05-16 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/140008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Sycl builtin kernel name (PR #140230)

2025-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Mariya Podchishchaeva (Fznamznon) Changes --- Patch is 27.51 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/140230.diff 13 Files Affected: - (modified) cl

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in Expr.cpp/h (PR #140102)

2025-05-16 Thread Erich Keane via cfe-commits
@@ -5043,16 +5037,18 @@ PseudoObjectExpr::PseudoObjectExpr(QualType type, ExprValueKind VK, : Expr(PseudoObjectExprClass, type, VK, OK_Ordinary) { PseudoObjectExprBits.NumSubExprs = semantics.size() + 1; PseudoObjectExprBits.ResultIndex = resultIndex + 1; - - for (uns

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2025-05-16 Thread Emma Pilkington via cfe-commits
epilk wrote: Hello, apologies for jumping in here so late, but this commit is changing the device function ABI on AMDGPU. For instance, for a device function returning this struct: ``` struct Empty {}; struct RetTy { int f1[3]; Empty e; int f2; }; __device__ RetTy deviceFn() { ... } ```

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in Expr.cpp/h (PR #140102)

2025-05-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/140102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow vector and matrix type attributes for sub-byte _BitInt (PR #140253)

2025-05-16 Thread Dmitry Sidorov via cfe-commits
https://github.com/MrSidims created https://github.com/llvm/llvm-project/pull/140253 None >From 67935acd84b032209d45bad22db8e1a9e72c1dcd Mon Sep 17 00:00:00 2001 From: "Sidorov, Dmitry" Date: Fri, 16 May 2025 06:55:10 -0700 Subject: [PATCH] [Clang] Allow vector and matrix type attributes for s

[clang] [CUDA][HIP] add option -gpuinc (PR #140106)

2025-05-16 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > I thought we already added a generic -stdinc/nostdinc for this there is only -nostdinc but there is no -stdinc https://github.com/llvm/llvm-project/pull/140106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [clang][bytecode] Explicitly start variable lifetimes via placement new (PR #140221)

2025-05-16 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu` running on `sie-linux-worker3` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/17863 Her

[clang] [CUDA][HIP] add option -gpuinc (PR #140106)

2025-05-16 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > Being able to override a flag is a good thing to have, IMO. There are builds > where the owner of the leaf targets do not have much control over which > options are set by the "default" compilation, so they need to rely on being > able to override preceding options. > > The

[clang] [Clang] suggest headers on undeclared errors (#120388) (PR #140247)

2025-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jongmyeong Choi (jongmyeong-choi) Changes When a “use of undeclared identifier” error happens for a function listed in StdSymbolMap, emit a note telling the user which header to include. Because nested-name-specifier errors occur before th

[clang] [clang] Function type attribute to prevent CFI instrumentation (PR #135836)

2025-05-16 Thread Aaron Ballman via cfe-commits
@@ -1988,7 +1988,7 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { /// Extra information which affects how the function is called, like /// regparm and the calling convention. LLVM_PREFERRED_TYPE(CallingConv) -unsigned ExtInfo : 14; +

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Yaxun Liu via cfe-commits
@@ -585,6 +597,23 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Value *Env = EmitScalarExpr(E->getArg(0)); return Builder.CreateCall(F, {Env}); } + case AMDGPU::BI__builtin_amdgcn_processor_is: { +assert(CGM.getTriple().isSPIRV() &&

[clang] [Clang] suggest headers on undeclared errors (#120388) (PR #140247)

2025-05-16 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [Clang] suggest headers on undeclared errors (#120388) (PR #140247)

2025-05-16 Thread Jongmyeong Choi via cfe-commits
https://github.com/jongmyeong-choi created https://github.com/llvm/llvm-project/pull/140247 When a “use of undeclared identifier” error happens for a function listed in StdSymbolMap, emit a note telling the user which header to include. Because nested-name-specifier errors occur before the func

[clang] [flang] [flang] add -floop-interchange and enable it with opt levels (PR #140182)

2025-05-16 Thread Sebastian Pop via cfe-commits
@@ -421,7 +421,8 @@ static void CheckSubscripts( static void CheckSubscripts( semantics::SemanticsContext &context, CoarrayRef &ref) { - const Symbol &coarraySymbol{ref.GetBase().GetLastSymbol()}; + const auto &base = ref.GetBase(); + const Symbol &coarraySymbol{base.Ge

[clang] [HIP] diagnose -mwavefrontsize64 for gfx10+ (PR #140185)

2025-05-16 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > I don't think we should be introducing an additional option that behaves > identically to another option just differing by a warning. This also isn't > really a problem with the language, but the library support. The actual > codegen should work just fine. Is there some other

[clang] [Clang] suggest headers on undeclared errors (#120388) (PR #140247)

2025-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +void f(void) { + int_val2 = 0; // expected-error{{use of undeclared identifier}} + sin(0); // expected-error{{use of undeclared identifier 'sin'}} \ + // expected-note{{perhaps `#include ` is needed?}} + +

[clang] [Clang] suggest headers on undeclared errors (#120388) (PR #140247)

2025-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -1489,6 +1490,7 @@ namespace cwg387 { // cwg387: 2.8 a = gcd(a, b); b = gcd(3, 4); // expected-error@-1 {{use of undeclared identifier 'gcd'}} + // expected-note@-2 {{perhaps `#include ` is needed?}} Endilll wrote: ```suggestion

[clang] [Clang] suggest headers on undeclared errors (#120388) (PR #140247)

2025-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -26,14 +26,18 @@ void no_get_1() { auto [a0, a1] = A(); // expected-error {{decomposes into 3 elements}} auto [b0, b1] = B(); // expected-error {{decomposes into 3 elements}} } - auto [a0, a1, a2] = A(); // expected-error {{undeclared identifier 'get'}} expected-

[clang] [Clang] suggest headers on undeclared errors (#120388) (PR #140247)

2025-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +void f(void) { + int_val2 = 0; // expected-error{{use of undeclared identifier}} + sin(0); // expected-error{{use of undeclared identifier 'sin'}} \ + // expected-note{{perhaps `#include ` is needed?}} + +

[clang] [Clang] suggest headers on undeclared errors (#120388) (PR #140247)

2025-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -1474,6 +1474,7 @@ namespace cwg387 { // cwg387: 2.8 a = gcd(a, b); b = gcd(3, 4); // expected-error@-1 {{use of undeclared identifier 'gcd'}} + // expected-note@-2 {{perhaps `#include ` is needed?}} Endilll wrote: ```suggestion

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Aaron Ballman via cfe-commits
@@ -4966,6 +4966,89 @@ If no address spaces names are provided, all address spaces are fenced. __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local") __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local", "global") +__builtin_amdgcn_processor_is and __buil

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I think the proposed approach is a reasonable direction. WDYT @erichkeane ? https://github.com/llvm/llvm-project/pull/134016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [Clang] suggest headers on undeclared errors (#120388) (PR #140247)

2025-05-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: You should put "Fixes #120388" in the description, and remove the issue number from the title, because it will be confusing after merging, when number of this PR will be added to the title. https://github.com/llvm/llvm-project/pull/140247 ___

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/134016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Separate implicit int conversion on negation sign to new diagnostic group (PR #139429)

2025-05-16 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu updated https://github.com/llvm/llvm-project/pull/139429 >From b5a1833d97a77692d25d3f60d347da62bd8db7c1 Mon Sep 17 00:00:00 2001 From: Yutong Zhu Date: Fri, 16 May 2025 09:12:40 -0400 Subject: [PATCH] Separate implicit int conversion on negation sign to new diagno

[clang] [llvm] [Sanitizer] Convert SpecialCaseList::Sections from StringMap to vector. (PR #140127)

2025-05-16 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao updated https://github.com/llvm/llvm-project/pull/140127 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [llvm] [NFCI][Sanitizer] Convert SpecialCaseList::Sections from StringMap to vector. (PR #140127)

2025-05-16 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/140127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Use std::binary_search (NFC) (PR #140263)

2025-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/140263.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp (+3-6) ``diff diff

[clang] [llvm] [SPIRV] Add PreLegalizer instCombine for `faceforward` (PR #139959)

2025-05-16 Thread Steven Perron via cfe-commits
https://github.com/s-perron commented: I have a minor concern about how specific the `N` and `0-N` checks are. Otherwise this looks good to me. https://github.com/llvm/llvm-project/pull/139959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-16 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > I think the order is deterministic, and due to how checker dependencies are > resolved, the backend checker would be always the one that is registered > first. I have not checked this. You're correct wrt the current state of the code but I'm planning to get rid of many "bac

[clang] 8696d16 - [OpenACC][CIR] Implement 'async' lowering for combined constructs

2025-05-16 Thread via cfe-commits
Author: erichkeane Date: 2025-05-16T08:17:29-07:00 New Revision: 8696d16242d220373460ab17f9fc10b2dd5d38dc URL: https://github.com/llvm/llvm-project/commit/8696d16242d220373460ab17f9fc10b2dd5d38dc DIFF: https://github.com/llvm/llvm-project/commit/8696d16242d220373460ab17f9fc10b2dd5d38dc.diff LO

[clang] [HLSL][SPIRV] Implement the SPIR-V target type for cbuffers. (PR #140061)

2025-05-16 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/140061 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [HIP] diagnose -mwavefrontsize64 for gfx10+ (PR #140185)

2025-05-16 Thread via cfe-commits
b-sumner wrote: > > > > I don't think we should be introducing an additional option that > > > > behaves identically to another option just differing by a warning. This > > > > also isn't really a problem with the language, but the library support. > > > > The actual codegen should work just f

[clang] [clang] Fix assertion failure in constexpr union deserialization (PR #140179)

2025-05-16 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh closed https://github.com/llvm/llvm-project/pull/140179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] Add PreLegalizer instCombine for `faceforward` (PR #139959)

2025-05-16 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/139959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] Add PreLegalizer instCombine for `faceforward` (PR #139959)

2025-05-16 Thread Steven Perron via cfe-commits
@@ -98,21 +110,98 @@ void applySPIRVDistance(MachineInstr &MI, MachineRegisterInfo &MRI, SPIRVGlobalRegistry *GR = MI.getMF()->getSubtarget().getSPIRVGlobalRegistry(); - auto RemoveAllUses = [&](Register Reg) { -SmallVector UsesToErase( -llvm::make_pointe

[clang] [llvm] [SPIRV] Add PreLegalizer instCombine for `faceforward` (PR #139959)

2025-05-16 Thread Steven Perron via cfe-commits
@@ -98,21 +110,98 @@ void applySPIRVDistance(MachineInstr &MI, MachineRegisterInfo &MRI, SPIRVGlobalRegistry *GR = MI.getMF()->getSubtarget().getSPIRVGlobalRegistry(); - auto RemoveAllUses = [&](Register Reg) { -SmallVector UsesToErase( -llvm::make_pointe

[clang] [clang] Use llvm::replace (NFC) (PR #140264)

2025-05-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/140264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] Add PreLegalizer instCombine for `faceforward` (PR #139959)

2025-05-16 Thread Matt Arsenault via cfe-commits
@@ -98,21 +110,98 @@ void applySPIRVDistance(MachineInstr &MI, MachineRegisterInfo &MRI, SPIRVGlobalRegistry *GR = MI.getMF()->getSubtarget().getSPIRVGlobalRegistry(); - auto RemoveAllUses = [&](Register Reg) { -SmallVector UsesToErase( -llvm::make_pointe

[clang] [llvm] [NFCI][Sanitizer] Convert SpecialCaseList::Sections from StringMap to vector. (PR #140127)

2025-05-16 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao updated https://github.com/llvm/llvm-project/pull/140127 >From 4628b851c94c83c3d8fdbaa650a5c2aedf35d26c Mon Sep 17 00:00:00 2001 From: Qinkun Bao Date: Thu, 15 May 2025 19:28:42 + Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [HLSL][SPIRV] Implement the SPIR-V target type for cbuffers. (PR #140061)

2025-05-16 Thread Steven Perron via cfe-commits
https://github.com/s-perron ready_for_review https://github.com/llvm/llvm-project/pull/140061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-16 Thread Alexey Bataev via cfe-commits
@@ -4898,6 +4898,274 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, const Expr *Privates, +const Expr *LHSExprs, const Expr *RHSExprs, const Expr

[clang] 3931566 - [-Wunsafe-buffer-usage] Fix false warnings when const sized array is safely accessed (array [idx %const]) (#140113)

2025-05-16 Thread via cfe-commits
Author: Malavika Samak Date: 2025-05-16T18:33:51-07:00 New Revision: 39315663a40a261772df94218fd33e205e888e54 URL: https://github.com/llvm/llvm-project/commit/39315663a40a261772df94218fd33e205e888e54 DIFF: https://github.com/llvm/llvm-project/commit/39315663a40a261772df94218fd33e205e888e54.diff

[clang] [-Wunsafe-buffer-usage] Fix false warnings when const sized array is safely accessed (array [idx %const]) (PR #140113)

2025-05-16 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak closed https://github.com/llvm/llvm-project/pull/140113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] libcxx: std::ostream::sentry should be exported (PR #140169)

2025-05-16 Thread via cfe-commits
https://github.com/jeremyd2019 updated https://github.com/llvm/llvm-project/pull/140169 >From 47f81a804a36a5b685f130f22d2ab5d330170861 Mon Sep 17 00:00:00 2001 From: kikairoya Date: Mon, 21 Apr 2025 23:30:13 +0900 Subject: [PATCH 1/3] [Cygwin][MinGW] Internal class in explicitly-instantiation-

[clang] [Frontend] Avoid creating a temporary instance of std::string (NFC) (PR #140326)

2025-05-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/140326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Use `llvm::sort()` (PR #140337)

2025-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Iris Shi (el-ev) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/140337.diff 6 Files Affected: - (modified) clang/lib/APINotes/APINotesWriter.cpp (+7-7) - (modified) clang/lib/Analysis/FlowSensitive/SimplifyCon

[clang] [Clang][NFC] Use `llvm::sort()` (PR #140337)

2025-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Iris Shi (el-ev) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/140337.diff 6 Files Affected: - (modified) clang/lib/APINotes/APINotesWriter.cpp (+7-7) - (modified) clang/lib/Analysis/FlowSensitive/SimplifyConstraints

[clang] [Clang][NFC] Use `llvm::sort()` (PR #140337)

2025-05-16 Thread Iris Shi via cfe-commits
https://github.com/el-ev created https://github.com/llvm/llvm-project/pull/140337 None >From 935633e4e6b290bbf7f83a559a3cd36c049186c7 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Sat, 17 May 2025 10:46:46 +0800 Subject: [PATCH] [Clang][NFC] Use `llvm::sort()` --- clang/lib/APIN

[clang] [Driver] Use llvm::is_contained (NFC) (PR #140310)

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

[clang] bda8c50 - [Driver] Use llvm::is_contained (NFC) (#140310)

2025-05-16 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-16T20:01:31-07:00 New Revision: bda8c502bffa4f526bc3a7d22179ebfe398351c7 URL: https://github.com/llvm/llvm-project/commit/bda8c502bffa4f526bc3a7d22179ebfe398351c7 DIFF: https://github.com/llvm/llvm-project/commit/bda8c502bffa4f526bc3a7d22179ebfe398351c7.diff L

[clang] [flang] [flang] add -floop-interchange and enable it with opt levels (PR #140182)

2025-05-16 Thread Sebastian Pop via cfe-commits
https://github.com/sebpop updated https://github.com/llvm/llvm-project/pull/140182 >From b0a6935e8439bc5b4f742f55eb3bb090790a8f95 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Wed, 7 May 2025 01:14:49 + Subject: [PATCH 1/4] [flang] fix Werror=dangling-reference MIME-Version: 1.0 Conten

[clang] 6963309 - [Frontend] Avoid creating a temporary instance of std::string (NFC) (#140326)

2025-05-16 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-16T20:02:50-07:00 New Revision: 6963309af12f8d1a688fa2c42019d83e78a0024c URL: https://github.com/llvm/llvm-project/commit/6963309af12f8d1a688fa2c42019d83e78a0024c DIFF: https://github.com/llvm/llvm-project/commit/6963309af12f8d1a688fa2c42019d83e78a0024c.diff L

[clang] [Driver] Use llvm::is_contained (NFC) (PR #140310)

2025-05-16 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu` running on `sie-linux-worker3` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/17905 Her

[clang] [Frontend] Avoid creating a temporary instance of std::string (NFC) (PR #140326)

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

[clang] [Frontend] Avoid creating a temporary instance of std::string (NFC) (PR #140326)

2025-05-16 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-4` 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/20134 Here is th

[clang] [Frontend] Avoid creating a temporary instance of std::string (NFC) (PR #140326)

2025-05-16 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-b-1` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/15331 Here is the relevant

[clang] [Driver] Use llvm::is_contained (NFC) (PR #140310)

2025-05-16 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-windows` running on `premerge-windows-1` while building `clang` at step 5 "clean-build-dir". Full details are available at: https://lab.llvm.org/buildbot/#/builders/35/builds/10150 Here is the relevant p

[clang] Add sycl_external attribute (PR #140282)

2025-05-16 Thread Tom Honermann via cfe-commits
@@ -12926,6 +12929,10 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) { // FIXME: Functions declared with SYCL_EXTERNAL are required during // device compilation. +// Functions definitions with sycl_external attribute are required during +// device compila

[clang] Add sycl_external attribute (PR #140282)

2025-05-16 Thread Tom Honermann via cfe-commits
@@ -100,11 +100,10 @@ int main() { // Verify that SYCL kernel caller functions are emitted for each device target. // -// FIXME: The following set of matches are used to skip over the declaration of -// main(). main() shouldn't be emitted in device code, but that pruning isn't

[clang] Add sycl_external attribute (PR #140282)

2025-05-16 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann requested changes to this pull request. Thanks for working on this @schittir! I completed an initial pass of all of the code, but still need to look more closely at the documentation updates. https://github.com/llvm/llvm-project/pull/140282 ___

[clang] Add sycl_external attribute (PR #140282)

2025-05-16 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,52 @@ +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify -DSYCL %s +// RUN: %clang_cc1 -fsycl-is-host -fsyntax-only -verify -DHOST %s +// RUN: %clang_cc1 -verify %s + +// Semantic tests for sycl_external attribute + +#ifdef SYCL + +__attribute__((sycl_external(3

[clang] Add sycl_external attribute (PR #140282)

2025-05-16 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,52 @@ +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify -DSYCL %s +// RUN: %clang_cc1 -fsycl-is-host -fsyntax-only -verify -DHOST %s tahonermann wrote: Since SYCL applies to both host and device, let's differentiate by "host" and "device" (wi

[clang] Add sycl_external attribute (PR #140282)

2025-05-16 Thread Tom Honermann via cfe-commits
@@ -12909,6 +12909,9 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) { if (D->hasAttr()) return false; + if (LangOpts.SYCLIsDevice && !D->hasAttr()) +return false; tahonermann wrote: This will also need to check for the new `SYCLExternalAttr`

[clang] Add sycl_external attribute (PR #140282)

2025-05-16 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann edited https://github.com/llvm/llvm-project/pull/140282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add sycl_external attribute (PR #140282)

2025-05-16 Thread Tom Honermann via cfe-commits
@@ -62,6 +62,7 @@ class SemaSYCL : public SemaBase { ParsedType ParsedTy); void handleKernelAttr(Decl *D, const ParsedAttr &AL); + void handleSYCLExternalAttr(Decl *D, const ParsedAttr &AL); tahonermann wrote: Since t

[clang] Add sycl_external attribute (PR #140282)

2025-05-16 Thread Tom Honermann via cfe-commits
@@ -12746,6 +12746,11 @@ def err_sycl_special_type_num_init_method : Error< "types with 'sycl_special_class' attribute must have one and only one '__init' " "method defined">; +//SYCL external attribute diagnostics +def err_sycl_attribute_internal_decl +: Error<"%0 at

[clang] Add sycl_external attribute (PR #140282)

2025-05-16 Thread Tom Honermann via cfe-commits
@@ -1545,6 +1550,18 @@ def SYCLKernel : InheritableAttr { let Documentation = [SYCLKernelDocs]; } +def GlobalStorageNonLocalVar : SubsetSubjecthasGlobalStorage() && + !S->isLocalVarDeclOrParm()}], +

[clang] Add sycl_external attribute (PR #140282)

2025-05-16 Thread Tom Honermann via cfe-commits
@@ -408,10 +408,14 @@ class SubjectList subjects, SubjectDiag diag = WarnDiag, string CustomDiag = customDiag; } -class LangOpt { +class LangOpt { // The language option to test; ignored when custom code is supplied. string Name = name; + // If set to 1, the attrib

[clang] Add sycl_external attribute (PR #140282)

2025-05-16 Thread Tom Honermann via cfe-commits
@@ -12926,6 +12929,10 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) { // FIXME: Functions declared with SYCL_EXTERNAL are required during // device compilation. tahonermann wrote: ```suggestion ``` https://github.com/llvm/llvm-project/pull/140

[clang] Add sycl_external attribute (PR #140282)

2025-05-16 Thread Tom Honermann via cfe-commits
@@ -1545,6 +1550,18 @@ def SYCLKernel : InheritableAttr { let Documentation = [SYCLKernelDocs]; } +def GlobalStorageNonLocalVar : SubsetSubjecthasGlobalStorage() && + !S->isLocalVarDeclOrParm()}], +

[clang] [Driver] Use llvm::is_contained (NFC) (PR #140310)

2025-05-16 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-03` while building `clang` at step 12 "ninja check 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/4/builds/6836 Here is the relevant piece of

[clang-tools-extra] 38e0f98 - [CLANGD] [NFC] Fix proposed by static analyzer. (#140116)

2025-05-16 Thread via cfe-commits
Author: Zahira Ammarguellat Date: 2025-05-16T07:56:36-04:00 New Revision: 38e0f983ada4cb753bcaafaf8fa9e2f2dfdef2ba URL: https://github.com/llvm/llvm-project/commit/38e0f983ada4cb753bcaafaf8fa9e2f2dfdef2ba DIFF: https://github.com/llvm/llvm-project/commit/38e0f983ada4cb753bcaafaf8fa9e2f2dfdef2ba

[clang-tools-extra] [CLANGD] [NFC] Fix proposed by static analyzer. (PR #140116)

2025-05-16 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam closed https://github.com/llvm/llvm-project/pull/140116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Fix HandleLValueBase to deal with references (PR #140105)

2025-05-16 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 136f2ba2a7bca015ef831c91fb0db5e5e31b7632 https://github.com/llvm/llvm-project/actions/runs/15067591667 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-proje

[clang-tools-extra] [CLANGD] [NFC] Fix proposed by static analyzer. (PR #140116)

2025-05-16 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/140116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Diagnose exceptions only in non-dependent context in discarded `try/catch/throw` blocks (PR #139859)

2025-05-16 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/139859 >From 46a9b0193bb5bdb9a082582f19e7a32ac2a3973d Mon Sep 17 00:00:00 2001 From: Rajveer Date: Wed, 14 May 2025 13:44:31 +0530 Subject: [PATCH] [clang][Sema] Diagnose exceptions only in non-dependent context in

[clang] [Clang] Fix parsing of expressions of the form (T())[/*...*/] (PR #140053)

2025-05-16 Thread via cfe-commits
cor3ntin wrote: Copy of a mail I sent to CWG --- This issue comes from an old LLVM issue reported by Richard, which I thought I could fix in a few minutes. I was wrong. Consider the following: ```cpp (S())[]->A; // #1 (S())[]->A {return {};}; //#2 ``` **

[clang] [clang][NFC] Clean up Expr::isTemporaryObject() (PR #140229)

2025-05-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140229 None >From ed50778c68265d3e77f853b1d0409ef795512c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 16 May 2025 11:42:53 +0200 Subject: [PATCH] [clang][NFC] Clean up Expr::isTemporaryOb

[clang] [clang][bytecode] Explicitly start variable lifetimes via placement new (PR #140221)

2025-05-16 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/140221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix assertion failure in constexpr union deserialization (PR #140179)

2025-05-16 Thread via cfe-commits
@@ -414,7 +414,7 @@ let Class = PropertyTypeCase in { let Read = [{ node.getUnionValue() }]; } def : Creator<[{ -return APValue(cast(fieldDecl), std::move(value)); +return APValue(cast_if_present(fieldDecl), std::move(value)); cor3ntin wrote:

<    1   2   3   4   5   >