[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,236 @@ +//===- X86SuppressAPXForReloc.cpp - Suppress APX features for relocations -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,236 @@ +//===- X86SuppressAPXForReloc.cpp - Suppress APX features for relocations -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,236 @@ +//===- X86SuppressAPXForReloc.cpp - Suppress APX features for relocations -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-04-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: LGTM. Let's land this in individual commits after the large test in google finish. https://github.com/llvm/llvm-project/pull/133057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang-tools-extra] [clang-doc] Add start and end line numbers (PR #137732)

2025-04-28 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/137732 ___ 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 start and end line numbers (PR #137732)

2025-04-28 Thread Petr Hosek via cfe-commits
@@ -795,43 +787,52 @@ emitInfo(const CXXMethodDecl *D, const FullComment *FC, int LineNumber, } std::pair, std::unique_ptr> -emitInfo(const TypedefDecl *D, const FullComment *FC, int LineNumber, - StringRef File, bool IsFileInRootDir, bool PublicOnly) { - TypedefInfo

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

2025-04-28 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor 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-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-04-28 Thread Baranov Victor via cfe-commits
@@ -39,6 +39,30 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) { return FD ? FD->isMain() : false; } +bool isWithinImplicitTemplateInstantiation(const TypeLoc *MatchedTypeLoc, vbvictor wrote: Also, if this function is still needed, we should move it to ma

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

2025-04-28 Thread Baranov Victor via cfe-commits
@@ -39,6 +39,30 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) { return FD ? FD->isMain() : false; } +bool isWithinImplicitTemplateInstantiation(const TypeLoc *MatchedTypeLoc, vbvictor wrote: Could you please elaborate what is this function for? I deleted

[clang] [llvm] [RISCV] Add processor definition for SiFive P870 (PR #137725)

2025-04-28 Thread Pengcheng Wang via cfe-commits
@@ -365,6 +365,32 @@ def SIFIVE_P670 : RISCVProcessorModel<"sifive-p670", SiFiveP600Model, TuneVXRMPipelineFlush, TunePostRAScheduler]>; +def SIFIVE_P870 : RISCVProcessorModel<"sifive-p870", NoSched

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-04-28 Thread via cfe-commits
https://github.com/Noustaa updated https://github.com/llvm/llvm-project/pull/137613 >From 7e715447d242d7e409e02059d2948fb3417fb00f Mon Sep 17 00:00:00 2001 From: Noustaa Date: Mon, 28 Apr 2025 12:38:36 +0200 Subject: [PATCH] [clangd] Add CodePatterns config option under Completion Allows enabl

[clang] [clang][bytecode] Remove base casts before doing memcpy (PR #137754)

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

[clang] 0ddb579 - [clang][bytecode] Remove base casts before doing memcpy (#137754)

2025-04-28 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-29T08:06:31+02:00 New Revision: 0ddb5794b7b47481ed713af0add392de324d5cd2 URL: https://github.com/llvm/llvm-project/commit/0ddb5794b7b47481ed713af0add392de324d5cd2 DIFF: https://github.com/llvm/llvm-project/commit/0ddb5794b7b47481ed713af0add392de324d5cd2.diff L

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
@@ -254,11 +256,20 @@ static bool CompressEVEXImpl(MachineInstr &MI, const X86Subtarget &ST) { } } + bool IsWithReloc = false; + if (X86EnableAPXForRelocation) { +int MemOpNo = X86II::getMemoryOperandNo(MI.getDesc().TSFlags) + + X86II::getOperandB

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > This solution can not handle post-RA optimizations. Could we implement it in > MC stage for this workaround? We cannot change the register after RA. I don't see any problem for now expect NF optimizations, which we can skip them for now. https://github.com/llvm/llvm-projec

[clang] [clang-format] Add OneLineFormatOffRegex option (PR #137577)

2025-04-28 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/137577 >From ce33e11aedf297e9cfb5e20efb4ce316886e6cb1 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 27 Apr 2025 21:18:03 -0700 Subject: [PATCH 1/2] [clang-format] Add OneLineFormatOffRegex option Close #54334 ---

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Feng Zou via cfe-commits
fzou1 wrote: > > > > Suppress EGPR/NDD instructions for relocations to avoid APX relocation > > > > types emitted. This is to keep backward compatibility with old version > > > > of ld and other linkers without APX support. If there are APX > > > > relocation types, old version of linkers woul

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Feng Zou via cfe-commits
https://github.com/fzou1 edited https://github.com/llvm/llvm-project/pull/136660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments option (PR #137544)

2025-04-28 Thread Owen Pan via cfe-commits
owenca wrote: > Introduce a new FormatStyle option, > `ApplyAlwaysOnePerLineToTemplateArguments`, which controls whether > `BinPackParameters=AlwaysOnePerLine` also applies to template argument lists. > > This allows users to enforce one-per-line formatting for function parameters > without u

[clang] [CIR] Upstream cir.call with scalar arguments (PR #136810)

2025-04-28 Thread Sirui Mu via cfe-commits
@@ -68,20 +168,70 @@ static cir::CIRCallOpInterface emitCallLikeOp(CIRGenFunction &cgf, assert(builder.getInsertionBlock() && "expected valid basic block"); assert(!cir::MissingFeatures::opCallIndirect()); - return builder.createCallOp(callLoc, directFuncOp); + return b

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Shengchen Kan via cfe-commits
KanRobert wrote: > > > Suppress EGPR/NDD instructions for relocations to avoid APX relocation > > > types emitted. This is to keep backward compatibility with old version of > > > ld and other linkers without APX support. If there are APX relocation > > > types, old version of linkers would ra

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Feng Zou via cfe-commits
fzou1 wrote: > > Suppress EGPR/NDD instructions for relocations to avoid APX relocation > > types emitted. This is to keep backward compatibility with old version of > > ld and other linkers without APX support. If there are APX relocation > > types, old version of linkers would raise "unsuppo

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Shengchen Kan via cfe-commits
KanRobert wrote: > Suppress EGPR/NDD instructions for relocations to avoid APX relocation types > emitted. This is to keep backward compatibility with old version of ld and > other linkers without APX support. If there are APX relocation types, old > version of linkers would raise "unsupported

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-04-28 Thread Reid Kleckner via cfe-commits
rnk wrote: If anyone is looking for stories about the value of premerge testing, I was all set to push this tonight, but I saw the linux premerge test failure. I debugged it, and it turns out to be a subtle interaction where if you run Clang codegen with registered targets but no registered Ta

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-28 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/137087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2f1ef1d - [Clang] Add new -header-include-filtering=direct-per-file option (#137087)

2025-04-28 Thread via cfe-commits
Author: Bob Wilson Date: 2025-04-28T21:54:45-07:00 New Revision: 2f1ef1d18334629bf7c6be1951092f3974b40f0e URL: https://github.com/llvm/llvm-project/commit/2f1ef1d18334629bf7c6be1951092f3974b40f0e DIFF: https://github.com/llvm/llvm-project/commit/2f1ef1d18334629bf7c6be1951092f3974b40f0e.diff LO

[clang] [clang][bytecode] Remove base casts before doing memcpy (PR #137754)

2025-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We have to copy the entire thing, not just one of the bases. --- Full diff: https://github.com/llvm/llvm-project/pull/137754.diff 3 Files Affected: - (modified) clang/lib/AST/ByteCode/Disasm.cpp (+1) - (m

[clang] [clang][bytecode] Remove base casts before doing memcpy (PR #137754)

2025-04-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/137754 We have to copy the entire thing, not just one of the bases. >From e73345a59ec62a79e709bcf91f17855df8f118e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 29 Apr 2025 06:33:09 +0200 Su

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-04-28 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/134196 >From 528be44ebae8ea5cd7f23c51ad11c314a73f152b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 22:11:05 -0700 Subject: [PATCH 1/9] [clang] Merge gtest binaries into AllClangUnitTests This reduces

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Owen Pan via cfe-commits
https://github.com/owenca requested changes to this pull request. This looks confusing. I would expect `-disable-format` to mean what it says. (But then why run clang-format?) If we allow turning on `SortIncludes` only, people will start asking for `QualifierAlignment` only, `IntegerLiteralSep

[clang] [clang][bytecode] Check array sizes against step limit (PR #137679)

2025-04-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-latest-gcc` running on `linaro-flang-aarch64-latest-gcc` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/130/builds/12900 Here is

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-28 Thread Michael Spencer via cfe-commits
@@ -322,3 +372,81 @@ void HeaderIncludesJSONCallback::FileSkipped( IncludedHeaders.push_back(SkippedFile.getName().str()); } + +void HeaderIncludesDirectPerFileCallback::EndOfMainFile() { + if (Dependencies.empty()) +return; + + // Sort the files so that the output doe

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-28 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese edited https://github.com/llvm/llvm-project/pull/137087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-28 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm. https://github.com/llvm/llvm-project/pull/137087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Feng Zou via cfe-commits
fzou1 wrote: > > > Any comments? > > > > > > Still not understand the requirement... > > I'm confused by the test cases too. I understood the code as we replace the > EGPR or NDD instructions with non-APX ones, which meets my expection. But the > option and tests are in MC phase, which means

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
@@ -127,6 +127,7 @@ ; CHECK-NEXT: X86 LEA Optimize ; CHECK-NEXT: X86 Optimize Call Frame ; CHECK-NEXT: X86 Avoid Store Forwarding Block +; CHECK-NEXT: X86 Suppress APX features for relocation phoebewang wrote: Ok, we don't need to move

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Phoebe Wang via cfe-commits
@@ -242,8 +244,18 @@ static EFLAGSClobber getClobberType(const MachineInstr &MI) { MI.findRegisterDefOperand(X86::EFLAGS, /*TRI=*/nullptr); if (!FlagDef) return NoClobber; - if (FlagDef->isDead() && X86::getNFVariant(MI.getOpcode())) + + if (FlagDef->isDead() &&

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-28 Thread Feng Zou via cfe-commits
fzou1 wrote: > > Any comments? > > Still not understand the requirement... I've update commit message with an example. Please take a look. https://github.com/llvm/llvm-project/pull/136660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [clang][bytecode] Check array sizes against step limit (PR #137679)

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

[clang] 15579a8 - [clang][bytecode] Check array sizes against step limit (#137679)

2025-04-28 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-29T05:47:22+02:00 New Revision: 15579a8e72589b4fdf45c8f5bca52e58dcc9ce1d URL: https://github.com/llvm/llvm-project/commit/15579a8e72589b4fdf45c8f5bca52e58dcc9ce1d DIFF: https://github.com/llvm/llvm-project/commit/15579a8e72589b4fdf45c8f5bca52e58dcc9ce1d.diff L

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-28 Thread Farzon Lotfi via cfe-commits
@@ -71,6 +71,27 @@ constexpr vector reflect_vec_impl(vector I, vector N) { #endif } +template constexpr T refract_impl(T I, T N, T eta) { + T k = 1 - eta * eta * (1 - (N * I * N *I)); + if(k < 0) farzonl wrote: I feel like we can simplify these conditiona

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-28 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,356 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -finclude-default-header -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -O1 -o - | FileChe

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-28 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,356 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -finclude-default-header -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -O1 -o - | FileChe

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

2025-04-28 Thread Brian Bi via cfe-commits
t3nsor wrote: No opinions about the code, but on the reflector we did agree that rejecting those initialization cases was the right thing to do. https://github.com/llvm/llvm-project/pull/132990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] Fix crash with -ast-dump=json (PR #137324)

2025-04-28 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak approved this pull request. https://github.com/llvm/llvm-project/pull/137324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream enum support (PR #136807)

2025-04-28 Thread Ankur Ahir via cfe-commits
@@ -399,6 +399,14 @@ mlir::Type CIRGenTypes::convertType(QualType type) { break; } + case Type::Enum: { +const EnumDecl *ED = cast(ty)->getDecl(); +if (ED->isCompleteDefinition() || ED->isFixed()) + return convertType(ED->getIntegerType());

[clang] [CIR] Upstream enum support (PR #136807)

2025-04-28 Thread Ankur Ahir via cfe-commits
@@ -399,6 +399,14 @@ mlir::Type CIRGenTypes::convertType(QualType type) { break; } + case Type::Enum: { +const EnumDecl *ED = cast(ty)->getDecl(); +if (ED->isCompleteDefinition() || ED->isFixed()) + return convertType(ED->getIntegerType());

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-28 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: @aeubanks this PR doesn't implement redirecting the output to a file, but I figured I'd implement that in another PR to keep things organized. https://github.com/llvm/llvm-project/pull/137737 ___ cfe-commits mailing list cfe-commits@l

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alan Zhao (alanzhao1) Changes This patch adds a new flag, -ftime-report-json, which outputs the same information as -ftime-report but as JSON instead of -ftime-report's pretty printed format. --- Full diff: https://github.com/llvm/llvm-p

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-28 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 created https://github.com/llvm/llvm-project/pull/137737 This patch adds a new flag, -ftime-report-json, which outputs the same information as -ftime-report but as JSON instead of -ftime-report's pretty printed format. >From 1f0529aa5fbf9c4c1b3f0e58eaf5e527dc1605f

[clang] [llvm] User/raoanag/refract (PR #136026)

2025-04-28 Thread via cfe-commits
https://github.com/raoanag updated https://github.com/llvm/llvm-project/pull/136026 >From 3221715ed9c06f6ef05414ae79a6e3bc576d4ba8 Mon Sep 17 00:00:00 2001 From: Anagha Rajendra Rao Date: Wed, 16 Apr 2025 11:47:27 -0700 Subject: [PATCH 1/4] Refract implementation --- clang/test/CodeGenHLSL/bu

[clang] [llvm] [RISCV] Add processor definition for SiFive P870 (PR #137725)

2025-04-28 Thread Craig Topper via cfe-commits
@@ -365,6 +365,32 @@ def SIFIVE_P670 : RISCVProcessorModel<"sifive-p670", SiFiveP600Model, TuneVXRMPipelineFlush, TunePostRAScheduler]>; +def SIFIVE_P870 : RISCVProcessorModel<"sifive-p870", NoSched

[clang] [Clang] raise extension warning for unknown namespaced attributes (PR #120925)

2025-04-28 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @erichkeane @AaronBallman @cor3ntin, just checking if there are any updates on this, as the `Clang 20` release was landed. https://github.com/llvm/llvm-project/pull/120925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-04-28 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: can we add a llvm-test-suite test for these builtin functions? we can compare their value with host results for typical and corner inputs, like the test added in this PR https://github.com/llvm/llvm-test-suite/pull/230 . This will give us some confidence that the clang codegen

[clang] [CIR] Upstream global initialization for VectorType (PR #137511)

2025-04-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -215,6 +215,37 @@ def ConstArrayAttr : CIR_Attr<"ConstArray", "const_array", [TypedAttrInterface]> }]; } +//===--===// +// ConstVectorAttr +//===--

[clang] [CodeGen] Fix handling of nullptr in initializers (PR #137364)

2025-04-28 Thread Alexander Kornienko via cfe-commits
@@ -121,6 +121,7 @@ CAST_OPERATION(FunctionToPointerDecay) /// CK_NullToPointer - Null pointer constant to pointer, ObjC /// pointer, or block pointer. /// (void*) 0 +/// (void*) nullptr alexfh wrote: Sure. Done in b509f7cca58c8db060eebea6fb5b28c3d0b3727b.

[clang] [CodeGen] Fix handling of nullptr in initializers (PR #137364)

2025-04-28 Thread Eli Friedman via cfe-commits
@@ -121,6 +121,7 @@ CAST_OPERATION(FunctionToPointerDecay) /// CK_NullToPointer - Null pointer constant to pointer, ObjC /// pointer, or block pointer. /// (void*) 0 +/// (void*) nullptr efriedma-quic wrote: Maybe we can simplify it to just: ``` /// CK_Nu

[clang] [clang][modules] Validate input file format for GenerateModuleInterfaceAction (#132692) (PR #137711)

2025-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Naveen Seth Hanig (naveen-seth) Changes Fixes #132692. `clang -cc1` crashes when generating a module interface with `emit-module-interface` or `emit-reduced-module-interface` using an input file which is already a precompiled module (`.p

[clang] [clang][modules] Validate input file format for GenerateModuleInterfaceAction (#132692) (PR #137711)

2025-04-28 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/137711 Fixes #132692. `clang -cc1` crashes when generating a module interface with `emit-module-interface` or `emit-reduced-module-interface` using an input file which is already a precompiled module (`.pcm`) fil

[clang] [HLSL] Treat classes and structs as packed by default (PR #137391)

2025-04-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/15194 Here is the relevant piece of the build lo

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-28 Thread Aaron Ballman via cfe-commits
@@ -6107,6 +6109,43 @@ static bool isFromSystemHeader(SourceManager &SM, const Decl *D) { SM.isInSystemMacro(D->getLocation()); } +constexpr unsigned countCPlusPlusKeywords() { + unsigned Ret = 0; +#define MODULES_KEYWORD(NAME) +#define KEYWORD(NAME, FLAGS) ++Ret; +

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/137234 >From 56a3f3cd282e9bd5ef9014e4125380e0d9685121 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 24 Apr 2025 14:17:42 -0400 Subject: [PATCH 01/14] [C] Diagnose use of C++ keywords in C This adds a ne

[clang] [CIR] Standardize element type name between Array and Vector Types (PR #137465)

2025-04-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/137465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e12ff33 - [CIR] Standardize element type name between Array and Vector Types (#137465)

2025-04-28 Thread via cfe-commits
Author: Amr Hesham Date: 2025-04-28T22:50:48+02:00 New Revision: e12ff331f14c766904c930054bcc94527f220212 URL: https://github.com/llvm/llvm-project/commit/e12ff331f14c766904c930054bcc94527f220212 DIFF: https://github.com/llvm/llvm-project/commit/e12ff331f14c766904c930054bcc94527f220212.diff LO

[clang] [llvm] [clang][amdgpu] Add builtins for raw/struct buffer lds load (PR #137678)

2025-04-28 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu tahiti -S -verify -o - %s +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu bonaire -S -verify -o - %s +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu carrizo -S -verify

[clang] [llvm] [clang][amdgpu] Add builtins for raw/struct buffer lds load (PR #137678)

2025-04-28 Thread Jon Chesterfield via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu tahiti -S -verify -o - %s +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu bonaire -S -verify -o - %s +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu carrizo -S -verify

[clang] [llvm] Retain type information for nested unused enum (PR #137682)

2025-04-28 Thread via cfe-commits
https://github.com/ykhatav updated https://github.com/llvm/llvm-project/pull/137682 >From 0647828990d9ec89554c016e4e016f28b9a2931d Mon Sep 17 00:00:00 2001 From: "Khatavkar, Yashasvi" Date: Mon, 28 Apr 2025 10:53:53 -0700 Subject: [PATCH 1/4] Retain unused nested enum type information --- cla

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-04-28 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/137690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-04-28 Thread via cfe-commits
choikwa wrote: Gentle ping https://github.com/llvm/llvm-project/pull/129347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-04-28 Thread Filip Milosevic via cfe-commits
https://github.com/MightyFilipns edited https://github.com/llvm/llvm-project/pull/137610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-04-28 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s -verify + +// Attr test + +[RootSignature()] // expected-error {{expected string literal as argument of 'RootSignature' attribute}} +void bad_root_signature_0() {} + +// expected-error@+2

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-04-28 Thread Finn Plummer via cfe-commits
@@ -949,6 +950,23 @@ void SemaHLSL::emitLogicalOperatorFixIt(Expr *LHS, Expr *RHS, << NewFnName << FixItHint::CreateReplacement(FullRange, OS.str()); } +void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) { + if (AL.getNumArgs() != 1) { +Diag(AL.g

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-04-28 Thread Finn Plummer via cfe-commits
@@ -3037,6 +3037,11 @@ void TextNodeDumper::VisitHLSLBufferDecl(const HLSLBufferDecl *D) { dumpName(D); } +void TextNodeDumper::VisitHLSLRootSignatureDecl( +const HLSLRootSignatureDecl *D) { + dumpName(D); inbelic wrote: We could extend this to dump m

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-04-28 Thread Vladimir Vereschaka via cfe-commits
vvereschaka wrote: Thank you @lenary! https://github.com/llvm/llvm-project/pull/132481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-04-28 Thread Sam Elliott via cfe-commits
lenary wrote: I pushed an xfail as `31bd7a507152` and will look into the failures now. https://github.com/llvm/llvm-project/pull/132481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream cir.call with scalar arguments (PR #136810)

2025-04-28 Thread Andy Kaylor via cfe-commits
@@ -68,20 +168,70 @@ static cir::CIRCallOpInterface emitCallLikeOp(CIRGenFunction &cgf, assert(builder.getInsertionBlock() && "expected valid basic block"); assert(!cir::MissingFeatures::opCallIndirect()); - return builder.createCallOp(callLoc, directFuncOp); + return b

[clang] [HLSL] Treat classes and structs as packed by default (PR #137391)

2025-04-28 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/137391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove FEM_Indeterminable (PR #137661)

2025-04-28 Thread Oliver Hunt via cfe-commits
ojhunt wrote: although, what happens currently? Per the warning we should be producing the wrong value if there's a direct enum value to code visible value mapping https://github.com/llvm/llvm-project/pull/137661 ___ cfe-commits mailing list cfe-commi

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-28 Thread via cfe-commits
YexuanXiao wrote: > Hey, chiming in here since I've been silently following this thread and I > think you've been doing great. The conversation might seem intimidating but > once we converge on an approach, the code change should be straightforward. > Don't question your own capabilities. I

[clang] [clang] Remove FEM_Indeterminable (PR #137661)

2025-04-28 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Ah, slot FLT_EVAL_METHOD is used in source as well, in that case I think the fix is to make signed options an option (pun intended) https://github.com/llvm/llvm-project/pull/137661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-04-28 Thread Filip Milosevic via cfe-commits
@@ -17630,6 +17630,13 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) { verifyFormat("int x = int (y);", SomeSpace2); verifyFormat("auto lambda = []() { return 0; };", SomeSpace2); + FormatStyle SpaceAfterOperatorKeyword = getLLVMStyle(); + SpaceAfterOperatorKeyword

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-04-28 Thread Filip Milosevic via cfe-commits
@@ -4471,6 +4471,14 @@ struct FormatStyle { /// \version 4 bool SpaceAfterTemplateKeyword; + /// If \c true, a space will be inserted after the ``operator`` keyword. + /// \code + ///true:false: + ///bool operator == (int a)

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-28 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 closed https://github.com/llvm/llvm-project/pull/136386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-04-28 Thread Filip Milosevic via cfe-commits
https://github.com/MightyFilipns updated https://github.com/llvm/llvm-project/pull/137610 >From ea19ffc6fd470d39d51dee7b5eb33178c023b246 Mon Sep 17 00:00:00 2001 From: MightyFilipns Date: Mon, 28 Apr 2025 11:54:20 +0200 Subject: [PATCH] clang-format: Add SpaceAfterOperatorKeyword option --- c

[clang] [flang] [driver] return immediately in `addArchSpecificRPath` and `getArchSpecificLibPaths` on AIX (PR #134520)

2025-04-28 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/134520 >From 0287e939669dafd0b6f2467f88d1e7f8a4aa22e2 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Sat, 5 Apr 2025 23:24:09 -0400 Subject: [PATCH 1/3] [driver] return in addArchSpecificRPath for AIX and also g

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-28 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/136386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove FEM_Indeterminable (PR #137661)

2025-04-28 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > > > @zahiraam @AaronBallman a different option would be to add a signed vs > > > unsigned storage option to the `OPTION` and `BENIGN_ENUM_LANGOPT` macros > > > so we can store negative enumerations safely > > > > > > I think I would prefer this solution. We need to be able t

[clang] cebaf0c - [clang] Make the `AnalyzerOptions` reference count non-intrusive (#137680)

2025-04-28 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-04-28T12:42:03-07:00 New Revision: cebaf0cea1f2cf9d71b4d965104e08a7ff6c89c4 URL: https://github.com/llvm/llvm-project/commit/cebaf0cea1f2cf9d71b4d965104e08a7ff6c89c4 DIFF: https://github.com/llvm/llvm-project/commit/cebaf0cea1f2cf9d71b4d965104e08a7ff6c89c4.diff L

[clang] [clang] Make the `AnalyzerOptions` reference count non-intrusive (PR #137680)

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

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-04-28 Thread Filip Milosevic via cfe-commits
https://github.com/MightyFilipns updated https://github.com/llvm/llvm-project/pull/137610 >From 2602b45c8d334b49e38998273e281f3b372a246a Mon Sep 17 00:00:00 2001 From: MightyFilipns Date: Mon, 28 Apr 2025 11:54:20 +0200 Subject: [PATCH] clang-format: Add SpaceAfterOperatorKeyword option --- c

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-04-28 Thread Filip Milosevic via cfe-commits
https://github.com/MightyFilipns updated https://github.com/llvm/llvm-project/pull/137610 >From 169633c6bc571ce8fcc58a5e796398c8007e97b4 Mon Sep 17 00:00:00 2001 From: MightyFilipns Date: Mon, 28 Apr 2025 11:54:20 +0200 Subject: [PATCH 1/2] clang-format: Add SpaceAfterOperatorKeyword option --

[clang] [driver] return immediately in `addArchSpecificRPath` and `getArchSpecificLibPaths` on AIX (PR #134520)

2025-04-28 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/134520 >From 0287e939669dafd0b6f2467f88d1e7f8a4aa22e2 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Sat, 5 Apr 2025 23:24:09 -0400 Subject: [PATCH 1/2] [driver] return in addArchSpecificRPath for AIX and also g

[clang] [llvm] Retain type information for nested unused enum (PR #137682)

2025-04-28 Thread via cfe-commits
https://github.com/ykhatav edited https://github.com/llvm/llvm-project/pull/137682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Retain type information for nested unused enum (PR #137682)

2025-04-28 Thread via cfe-commits
https://github.com/ykhatav edited https://github.com/llvm/llvm-project/pull/137682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-28 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137617 >From ab0fe63baf2044a4768835c359f7068dfba7d81d Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 28 Apr 2025 13:07:50 +0200 Subject: [PATCH] clang-format: Add -disable-format option When https://githu

[clang] [clang][headers][Apple] Don't include_next float.h to avoid an unnecessary module dependency (PR #137432)

2025-04-28 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. AFAICT this seems like a good cleanup for detangling sdk dependencies where its safe to. https://github.com/llvm/llvm-project/pull/137432 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [llvm] Retain type information for Unused enum (PR #137682)

2025-04-28 Thread via cfe-commits
https://github.com/ykhatav edited https://github.com/llvm/llvm-project/pull/137682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIR-V] Fix OpenCL addrspace mapping when using non-zero default AS (PR #137187)

2025-04-28 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/137187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f9ee5ce - [clang][SPIR-V] Fix OpenCL addrspace mapping when using non-zero default AS (#137187)

2025-04-28 Thread via cfe-commits
Author: Nick Sarnie Date: 2025-04-28T19:26:01Z New Revision: f9ee5ce605f94d905d3112fd0923a5fd23e48dd3 URL: https://github.com/llvm/llvm-project/commit/f9ee5ce605f94d905d3112fd0923a5fd23e48dd3 DIFF: https://github.com/llvm/llvm-project/commit/f9ee5ce605f94d905d3112fd0923a5fd23e48dd3.diff LOG: [

[clang] [clang-format] Add OneLineFormatOffRegex option (PR #137577)

2025-04-28 Thread Björn Schäpers via cfe-commits
@@ -24954,6 +24954,82 @@ TEST_F(FormatTest, DisableRegions) { "// clang-format on"); } +TEST_F(FormatTest, OneLineFormatOffRegex) { + auto Style = getLLVMStyle(); + Style.OneLineFormatOffRegex = "// format off$"; + + verifyFormat("// format off\n" +

  1   2   3   4   5   6   >