[clang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-16 Thread via cfe-commits
https://github.com/jofrn updated https://github.com/llvm/llvm-project/pull/123609 >From 7b8cde7a99dddcca04921a5e15dc7f1e4793928b Mon Sep 17 00:00:00 2001 From: jofernau Date: Mon, 20 Jan 2025 04:51:26 -0800 Subject: [PATCH 1/4] [TargetVerifier][AMDGPU] Add TargetVerifier. This pass verifies th

[clang] 2e9ab7c - [NFC][Driver][CFI] Update boolean expression (#135881)

2025-04-16 Thread via cfe-commits
Author: Vitaly Buka Date: 2025-04-16T08:09:34-07:00 New Revision: 2e9ab7cf96d802a906de342f32bc844036152ada URL: https://github.com/llvm/llvm-project/commit/2e9ab7cf96d802a906de342f32bc844036152ada DIFF: https://github.com/llvm/llvm-project/commit/2e9ab7cf96d802a906de342f32bc844036152ada.diff L

[clang] [NFC][CFI] Don't mix CFI and non-CFI flags on the same line (PR #135890)

2025-04-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/135890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Driver][CFI] Rename to clarify purpose of CFI runtime (PR #135885)

2025-04-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/135885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d131351 - [NFC][Driver][CFI] Rename to clarify purpose of CFI runtime (#135885)

2025-04-16 Thread via cfe-commits
Author: Vitaly Buka Date: 2025-04-16T08:12:27-07:00 New Revision: d13135134c43af674584780b1494316f6fdaf027 URL: https://github.com/llvm/llvm-project/commit/d13135134c43af674584780b1494316f6fdaf027 DIFF: https://github.com/llvm/llvm-project/commit/d13135134c43af674584780b1494316f6fdaf027.diff L

[clang] [NFC][Driver][CFI] Rename to clarify purpose of CFI runtime (PR #135885)

2025-04-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/135885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Add missing __builtin_memcpy checks (PR #135975)

2025-04-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/135975 Add a test for type punning and tests and the necessary checks for non-trivially-copyable types and incomplete types. >From 16a4869d46a33d60d12e53a27daad9e742605f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim

[clang] [NFC][CFI] Don't mix CFI and non-CFI flags on the same line (PR #135890)

2025-04-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/135890 >From 701e1fc31766d4608814191673ce50ffec6da1f0 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 15 Apr 2025 17:34:49 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?

[clang] [NFC][CFI] Add test to check for '-flto' and '-fvisibility=' flags (PR #135892)

2025-04-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/135892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [driver] return in `addArchSpecificRPath` for AIX and also get the triple without the OS on AIX in `getArchSpecificLibPaths`. (PR #134520)

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

[clang] [clang][bytecode] Add missing __builtin_memcpy checks (PR #135975)

2025-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Add a test for type punning and tests and the necessary checks for non-trivially-copyable types and incomplete types. --- Full diff: https://github.com/llvm/llvm-project/pull/135975.diff 2 Files Affected:

[clang] b73e541 - [NFC][CFI] Don't mix CFI and non-CFI flags on the same line (#135890)

2025-04-16 Thread via cfe-commits
Author: Vitaly Buka Date: 2025-04-16T08:13:47-07:00 New Revision: b73e5419f66a2501b4491514a72c7e361c25d57e URL: https://github.com/llvm/llvm-project/commit/b73e5419f66a2501b4491514a72c7e361c25d57e DIFF: https://github.com/llvm/llvm-project/commit/b73e5419f66a2501b4491514a72c7e361c25d57e.diff L

[clang] [NFC][CFI] Don't mix CFI and non-CFI flags on the same line (PR #135890)

2025-04-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/135890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] [NFC][CFI] Add test to check for '-flto' and '-fvisibility=' flags (PR #135892)

2025-04-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/135892 >From f6364f053b273dd48261cd0397e50d383d8b2029 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 15 Apr 2025 17:37:37 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?

[clang] [NFC][Clang] Introduce type aliases to replace use of auto in clang/lib/CodeGen/CGCall.cpp. (PR #135861)

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

[clang] aca710a - [NFC][Clang] Introduce type aliases to replace use of auto in clang/lib/CodeGen/CGCall.cpp. (#135861)

2025-04-16 Thread via cfe-commits
Author: Tom Honermann Date: 2025-04-16T11:28:09-04:00 New Revision: aca710ac3655fcd3f057edc1382ceec7fc58ef19 URL: https://github.com/llvm/llvm-project/commit/aca710ac3655fcd3f057edc1382ceec7fc58ef19 DIFF: https://github.com/llvm/llvm-project/commit/aca710ac3655fcd3f057edc1382ceec7fc58ef19.diff

[clang] [Serialization] Use llvm::map_range (NFC) (PR #135990)

2025-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/135990.diff 1 Files Affected: - (modified) clang/lib/Serialization/MultiOnDiskHashTable.h (+3-5) ``diff diff --git a/clang/lib/Ser

[clang] [Modules] Fix the inconsistency of which `Decl` should be serialized for an identifier. (PR #135887)

2025-04-16 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. https://github.com/llvm/llvm-project/pull/135887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 726a5c2 - [NFC][CFI] Avoid clang error in CFI tests (#135981)

2025-04-16 Thread via cfe-commits
Author: Vitaly Buka Date: 2025-04-16T09:54:27-07:00 New Revision: 726a5c2c57c486e69df2dfc296482e1d8014ab62 URL: https://github.com/llvm/llvm-project/commit/726a5c2c57c486e69df2dfc296482e1d8014ab62 DIFF: https://github.com/llvm/llvm-project/commit/726a5c2c57c486e69df2dfc296482e1d8014ab62.diff L

[clang] [clang][OpenMP] Fix/enforce order-concurrent-nestable rules (PR #135463)

2025-04-16 Thread Ernesto Su via cfe-commits
@@ -411,9 +411,11 @@ bool isOpenMPCapturingDirective(OpenMPDirectiveKind DKind); /// directive that can be nested within region corresponding to construct /// on which order clause was specified with concurrent as ordering argument. /// \param DKind Specified directive. +/// \p

[clang] [NFC][CFI] Avoid clang error in CFI tests (PR #135981)

2025-04-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/135981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Matheus Izvekov via cfe-commits
@@ -1938,6 +1938,17 @@ TagDecl *Type::getAsTagDecl() const { return nullptr; } +const TemplateSpecializationType * +Type::getAsNonAliasTemplateSpecializationType() const { + for (const auto *T = this; /**/; /**/) { +const TemplateSpecializationType *TST = +T->ge

[clang] [clang][NFC] Refactor CodeGen's hasBooleanRepresentation (PR #134159)

2025-04-16 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > Given that there are already similar functions in the `Type` class -- e.g. > `has{Signed,Unsigned,}IntegerRepresentation`, `hasFloatingRepresentation` -- > it seems a bit inconsistent the definition of `hasBooleanRepresentation`. I > would expect that "vector of booleans" t

[clang] facc57f - [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (#133426)

2025-04-16 Thread via cfe-commits
Author: cor3ntin Date: 2025-04-16T19:09:45+02:00 New Revision: facc57fc25d0f05f5834fed421662dbad3ec5b50 URL: https://github.com/llvm/llvm-project/commit/facc57fc25d0f05f5834fed421662dbad3ec5b50 DIFF: https://github.com/llvm/llvm-project/commit/facc57fc25d0f05f5834fed421662dbad3ec5b50.diff LOG:

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

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

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-16 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 commented: On a second thought, what's the current intent for build system integration? I'm curious why we're emitting a diagnostic here rather than just passing the list of paths back to the build system and letting it decide how to report these. https://githu

[clang] 81739c3 - [Modules] Fix an identifier hiding a function-like macro definition. (#135471)

2025-04-16 Thread via cfe-commits
Author: Volodymyr Sapsai Date: 2025-04-16T10:14:05-07:00 New Revision: 81739c39db11b7f9a4f3528c1c66b552e57b47e4 URL: https://github.com/llvm/llvm-project/commit/81739c39db11b7f9a4f3528c1c66b552e57b47e4 DIFF: https://github.com/llvm/llvm-project/commit/81739c39db11b7f9a4f3528c1c66b552e57b47e4.di

[clang] [HLSL][OpenCL] Strip addrspace from implicit cast diags (PR #135830)

2025-04-16 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/135830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 52e0337 - [HLSL][OpenCL] Strip addrspace from implicit cast diags (#135830)

2025-04-16 Thread via cfe-commits
Author: Chris B Date: 2025-04-16T12:13:19-05:00 New Revision: 52e0337ea34142f55c427493e9ca2be5fce2dd38 URL: https://github.com/llvm/llvm-project/commit/52e0337ea34142f55c427493e9ca2be5fce2dd38 DIFF: https://github.com/llvm/llvm-project/commit/52e0337ea34142f55c427493e9ca2be5fce2dd38.diff LOG:

[clang] [Modules] Fix an identifier hiding a function-like macro definition. (PR #135471)

2025-04-16 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/135471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Use llvm::map_range (NFC) (PR #135990)

2025-04-16 Thread Jakub Kuderski via cfe-commits
@@ -103,11 +103,9 @@ template class MultiOnDiskHashTable { /// The current set of on-disk tables. table_range tables() { -auto Begin = Tables.begin(), End = Tables.end(); -if (getMergedTable()) - ++Begin; -return llvm::make_range(llvm::map_iterator(Begin,

[clang] [Frontend] Use StringRef::ends_with (NFC) (PR #135988)

2025-04-16 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar approved this pull request. https://github.com/llvm/llvm-project/pull/135988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-16 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > On a second thought, what's the current intent for build system integration? > I'm curious why we're emitting a diagnostic here rather than just passing the > list of paths back to the build system and letting it decide how to report > these. This is a good point. Additiona

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-16 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/135683 >From 597fda606efbcf10304fed4adc5dd85da34b3de3 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Mon, 14 Apr 2025 14:16:05 -0700 Subject: [PATCH 1/3] [SYCL] Add clang-linker-wrapper changes to call clang-

[clang] [HLSL] Don't invoke `dxv` from `clang-dxc` for text output (PR #135876)

2025-04-16 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/135876 >From de6d197193e758d649cbebe6d96cd8e5af95d9ac Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Tue, 15 Apr 2025 15:05:21 -0700 Subject: [PATCH 1/2] [HLSL] Don't invoke `dxv` from `clang-dxc` for text output

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-16 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Hi @jhuber6 https://github.com/llvm/llvm-project/pull/135809 has been merged. I have refactored this change on top of that. Kindly take a look whenever convenient. Sincerely https://github.com/llvm/llvm-project/pull/135683 ___ cfe-

[clang] Disable -fdollars-in-identifiers by default (PR #135407)

2025-04-16 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: We should disable the warning if we're preprocessing asm, which should mostly solve the issue with warnings. For the Linux kernel, does anything break other than the warnings? https://github.com/llvm/llvm-project/pull/135407 ___

[clang] [llvm] [NVPTX] Cleanup and document nvvm.fabs intrinsics, adding f16 support (PR #135644)

2025-04-16 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/135644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Erich Keane via cfe-commits
@@ -1938,6 +1938,17 @@ TagDecl *Type::getAsTagDecl() const { return nullptr; } +const TemplateSpecializationType * +Type::getAsNonAliasTemplateSpecializationType() const { + for (const auto *T = this; /**/; /**/) { +const TemplateSpecializationType *TST = --

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-16 Thread Sirui Mu via cfe-commits
@@ -14,9 +14,14 @@ using namespace clang::CIRGen; CIRGenTypes::CIRGenTypes(CIRGenModule &genModule) : cgm(genModule), astContext(genModule.getASTContext()), - builder(cgm.getBuilder()) {} + builder(cgm.getBuilder()), + theABIInfo(cgm.getTargetCIRGenInfo().ge

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-16 Thread Sirui Mu via cfe-commits
@@ -0,0 +1,92 @@ +//==-- ABIArgInfo.h - Abstract info regarding ABI-specific arguments ---==// +// +// 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: Apa

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-16 Thread Sirui Mu via cfe-commits
Lancern wrote: > I'd still love it if we could get one of the Code gen owners to let us know > what is going on with this/see if this is somethign they want for classic > codegen, but they can RAC. Could we open an issue to track this? https://github.com/llvm/llvm-project/pull/135552

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-16 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/135957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenACC] Switch Clang to use the Flang 'appertainment' rules for cla… (PR #135372)

2025-04-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/135372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-16 Thread Mariya Podchishchaeva via cfe-commits
@@ -4049,5 +4050,13 @@ void Preprocessor::HandleEmbedDirective(SourceLocation HashLoc, Token &EmbedTok, if (Callbacks) Callbacks->EmbedDirective(HashLoc, Filename, isAngled, MaybeFileRef, *Params); - HandleEmbedDirectiveImpl(HashLoc, *Param

[clang] [llvm] [OpenACC] Switch Clang to use the Flang 'appertainment' rules for cla… (PR #135372)

2025-04-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/135372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-16 Thread via cfe-commits
@@ -293,15 +293,14 @@ class LineJoiner { auto ShouldMergeShortFunctions = [this, &I, &NextLine, PreviousLine, TheLine]() { - if (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All) + if (Style.AllowShortFunctionsO

[clang] [llvm] [OpenACC] Switch Clang to use the Flang 'appertainment' rules for cla… (PR #135372)

2025-04-16 Thread Erich Keane via cfe-commits
erichkeane wrote: Updated list: ``` Disagreements on 'num_gangs' appearing >1x on kernels/kernels-loop (justification for kernels-loop should apply to kernels as well?) (UNK way forward right now) Clang :: SemaOpenACC/compute-construct-num_gangs-clause.c FLANG: prohibits device_num >1x

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Matheus Izvekov via cfe-commits
@@ -1938,6 +1938,17 @@ TagDecl *Type::getAsTagDecl() const { return nullptr; } +const TemplateSpecializationType * +Type::getAsNonAliasTemplateSpecializationType() const { + for (const auto *T = this; /**/; /**/) { +const TemplateSpecializationType *TST = +T->ge

[clang] [CIR] Upstream initial support for complete record types (PR #135844)

2025-04-16 Thread Amr Hesham via cfe-commits
@@ -95,6 +95,8 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return getZeroAttr(arrTy); if (auto ptrTy = mlir::dyn_cast(ty)) return getConstNullPtrAttr(ptrTy); +if (auto RecordTy = mlir::dyn_cast(ty)) AmrDeveloper wrote: NIT `if (au

[clang] [CIR] Upstream initial support for complete record types (PR #135844)

2025-04-16 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper approved this pull request. https://github.com/llvm/llvm-project/pull/135844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-16 Thread via cfe-commits
circl-lastname wrote: LGTM https://github.com/llvm/llvm-project/pull/135957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2025-04-16 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/118026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM] Adding diagnostics for mcmodel=tiny when used in invalid targets (PR #125643)

2025-04-16 Thread Fangrui Song via cfe-commits
@@ -1755,6 +1755,18 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { << TC.getTriple().str(); } + // Throw diagnosis if mcmodel=tiny option is passed for targets other than ARM + // or AArch64. + if (Arg *A = UArgs->getLastArg(options::OPT_mcmodel_EQ)

[clang] [clang] Constant-evaluate format strings as last resort (PR #135864)

2025-04-16 Thread via cfe-commits
@@ -3,6 +3,11 @@ // RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wformat-nonliteral -isystem %S/Inputs -triple=x86_64-unknown-fuchsia %s // RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wformat-nonliteral -isystem %S/Inputs -triple=x86_64-linux-android %s +// expected-n

[clang] [NFC][CFI] Add test to check for '-flto' and '-fvisibility=' flags (PR #135892)

2025-04-16 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/135892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Matheus Izvekov via cfe-commits
@@ -1938,6 +1938,17 @@ TagDecl *Type::getAsTagDecl() const { return nullptr; } +const TemplateSpecializationType * +Type::getAsNonAliasTemplateSpecializationType() const { + for (const auto *T = this; /**/; /**/) { +const TemplateSpecializationType *TST = +T->ge

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Erich Keane via cfe-commits
@@ -1938,6 +1938,17 @@ TagDecl *Type::getAsTagDecl() const { return nullptr; } +const TemplateSpecializationType * +Type::getAsNonAliasTemplateSpecializationType() const { + for (const auto *T = this; /**/; /**/) { +const TemplateSpecializationType *TST = +T->ge

[clang] [HLSL] Don't invoke `dxv` from `clang-dxc` for text output (PR #135876)

2025-04-16 Thread Deric C. via cfe-commits
https://github.com/Icohedron approved this pull request. This is great! Now I don't have to specify `-Vd` when I run clang-dxc without `-Fo` :) https://github.com/llvm/llvm-project/pull/135876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [llvm] [ARM] Adding diagnostics for mcmodel=tiny when used in invalid targets (PR #125643)

2025-04-16 Thread Fangrui Song via cfe-commits
@@ -1755,6 +1755,18 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { << TC.getTriple().str(); } + // Throw diagnosis if mcmodel=tiny option is passed for targets other than ARM + // or AArch64. + if (Arg *A = UArgs->getLastArg(options::OPT_mcmodel_EQ)

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Matheus Izvekov via cfe-commits
@@ -2838,6 +2838,18 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { /// immediately following this class. template const T *getAs() const; + /// Look through sugar for an instance of TemplateSpecializationType which + /// is not a type alias. +

[clang] [NFC][CFI] Add test to check for '-flto' and '-fvisibility=' flags (PR #135892)

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

[clang] [CIR] Upstream initial support for complete record types (PR #135844)

2025-04-16 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/135844 >From 6ffd93ef63e068b73f451af0a05cc471d5cca9fb Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 15 Apr 2025 12:08:37 -0700 Subject: [PATCH 1/4] [CIR] Upstream initial support for complete record types T

[clang] [NFC][CFI] Avoid failing CFI tests (PR #135981)

2025-04-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/135981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-16 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/133030 >From 606c9f3bdd1bed9631002d2bd51ef2fc3475ecfe Mon Sep 17 00:00:00 2001 From: Elizabeth Andrews Date: Tue, 25 Mar 2025 09:31:11 -0700 Subject: [PATCH 1/6] [SYCL] Basic code generation for SYCL kernel caller

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Matheus Izvekov via cfe-commits
@@ -2838,6 +2838,18 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { /// immediately following this class. template const T *getAs() const; + /// Look through sugar for an instance of TemplateSpecializationType which + /// is not a type alias. +

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-16 Thread Tom Honermann via cfe-commits
@@ -732,6 +732,16 @@ CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType, RequiredArgs::All); } +const CGFunctionInfo & +CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType, +

[clang] [Frontend] Use StringRef::ends_with (NFC) (PR #135988)

2025-04-16 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/135988 None >From 3edcc619a046381e65027257bb6f3f821cfa7b95 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 16 Apr 2025 09:41:33 -0700 Subject: [PATCH] [Frontend] Use StringRef::ends_with (NFC) --- clang

[clang] [llvm] [HLSL] Implement the `faceforward` intrinsic (PR #135878)

2025-04-16 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng updated https://github.com/llvm/llvm-project/pull/135878 >From 69aee464d31dcf585c355808053b0c4d1c7d7f3c Mon Sep 17 00:00:00 2001 From: kmpeng Date: Mon, 7 Apr 2025 14:46:07 -0700 Subject: [PATCH 1/2] create int_spv_faceforward intrinsic, create faceforward lowering &

[clang] [Frontend] Use StringRef::ends_with (NFC) (PR #135988)

2025-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/135988.diff 1 Files Affected: - (modified) clang/lib/Frontend/InitPreprocessor.cpp (+1-1) ``diff diff --git a/clang/lib/Frontend/I

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Erich Keane via cfe-commits
@@ -2838,6 +2838,18 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { /// immediately following this class. template const T *getAs() const; + /// Look through sugar for an instance of TemplateSpecializationType which + /// is not a type alias. +

[clang] [Serialization] Use llvm::map_range (NFC) (PR #135990)

2025-04-16 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/135990 None >From 65ea8b9f426b37d62a9178f1b076b723471afe88 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 15 Apr 2025 03:20:39 -0700 Subject: [PATCH] [Serialization] Use llvm::map_range (NFC) --- clang

[clang] [NFC][CFI] Avoid clang error in CFI tests (PR #135981)

2025-04-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/135981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP] Fix/enforce order-concurrent-nestable rules (PR #135463)

2025-04-16 Thread Ernesto Su via cfe-commits
https://github.com/ErnestoSu updated https://github.com/llvm/llvm-project/pull/135463 >From 51a9237094437e0b9db57fd071e295939234a3ac Mon Sep 17 00:00:00 2001 From: Ernesto Su Date: Fri, 11 Apr 2025 16:12:10 -0700 Subject: [PATCH 1/2] [clang][OpenMP] Fix/enforce order-concurrent-nestable rules

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Erich Keane via cfe-commits
@@ -1938,6 +1938,17 @@ TagDecl *Type::getAsTagDecl() const { return nullptr; } +const TemplateSpecializationType * +Type::getAsNonAliasTemplateSpecializationType() const { + for (const auto *T = this; /**/; /**/) { +const TemplateSpecializationType *TST = +T->ge

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Erich Keane via cfe-commits
@@ -1938,6 +1938,17 @@ TagDecl *Type::getAsTagDecl() const { return nullptr; } +const TemplateSpecializationType * +Type::getAsNonAliasTemplateSpecializationType() const { + for (const auto *T = this; /**/; /**/) { +const TemplateSpecializationType *TST = +T->ge

[clang] [clang-tools-extra] [clang] Unify `SourceLocation` and `IdentifierInfo*` pair-like data structures to `IdentifierLoc` (PR #135808)

2025-04-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-tools-extra,clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Can fix up the formatting issues found by precommit CI, and the change should also come with a release note. https://github.com/llvm/llvm-project/pull/135957 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

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

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-16 Thread Aaron Ballman via cfe-commits
@@ -4049,5 +4050,13 @@ void Preprocessor::HandleEmbedDirective(SourceLocation HashLoc, Token &EmbedTok, if (Callbacks) Callbacks->EmbedDirective(HashLoc, Filename, isAngled, MaybeFileRef, *Params); - HandleEmbedDirectiveImpl(HashLoc, *Param

[clang] [clang] Implement StmtPrinter for EmbedExpr (PR #135957)

2025-04-16 Thread Aaron Ballman via cfe-commits
@@ -1284,7 +1284,11 @@ void StmtPrinter::VisitSourceLocExpr(SourceLocExpr *Node) { } void StmtPrinter::VisitEmbedExpr(EmbedExpr *Node) { - llvm::report_fatal_error("Not implemented"); + // Embed parameters are not reflected in the AST, so there is no way to print --

[clang] [clang][bytecode] Implement __builtin_wmem{cpy, move} (PR #135969)

2025-04-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/135969 None >From 3e925a2b07d7720137b0a525b66782f6869cea58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 16 Apr 2025 16:25:44 +0200 Subject: [PATCH] [clang][bytecode] Implement __builtin_wme

[clang] [clang][bytecode] Implement __builtin_wmem{cpy, move} (PR #135969)

2025-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/135969.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+22-8) - (modified) clang/test/AST/ByteCode/builtin-functions

[clang-tools-extra] [clang-tidy] Fix bugprone-tagged-union-member-count false-positive (PR #135831)

2025-04-16 Thread via cfe-commits
@@ -9,6 +9,9 @@ different from the number of data members inside the union. A struct or a class is considered to be a tagged union if it has exactly one union data member and exactly one enum data member and any number of other data members that are neither unions or enums. +Th

[clang-tools-extra] [clang-tidy] Fix bugprone-tagged-union-member-count false-positive (PR #135831)

2025-04-16 Thread via cfe-commits
EugeneZelenko wrote: Please mention changes in Release Notes. https://github.com/llvm/llvm-project/pull/135831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Offload][SYCL] Refactor OffloadKind implementation (PR #135809)

2025-04-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,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/16286

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Erich Keane via cfe-commits
@@ -2838,6 +2838,18 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { /// immediately following this class. template const T *getAs() const; + /// Look through sugar for an instance of TemplateSpecializationType which + /// is not a type alias. +

[clang] Disable -fdollars-in-identifiers by default (PR #135407)

2025-04-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Doesn't the Linux kernel use it for syscall names? Might be wrong on this. CC @nathanchance @nickdesaulniers for more information, but even if the kernel does, is it a significant imposition to pass `-fdollars-in-identifiers` to enable the extension explicitly? https://g

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

2025-04-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > IMO, we are better served by a warning diagnostic if we detect these are > > misused. `ParseCXXCondition` (or the C equivalent, but since you are > > returning bool it seems you're not concerned about C?) might be a good > > place to set a variable to enable the warning

[clang] [HLSL] Use hlsl_device address space for getpointer. (PR #127675)

2025-04-16 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts approved this pull request. https://github.com/llvm/llvm-project/pull/127675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of global constants (PR #134399)

2025-04-16 Thread Nick Sarnie via cfe-commits
sarnex wrote: No, tbe string should have an address space. Do you have a reproduction? https://github.com/llvm/llvm-project/pull/134399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-16 Thread Erich Keane via cfe-commits
erichkeane wrote: > > I'd still love it if we could get one of the Code gen owners to let us know > > what is going on with this/see if this is somethign they want for classic > > codegen, but they can RAC. > > Could we open an issue to track this? Sure, feel free to file and reference this d

[clang-tools-extra] [clang-tidy] Fix bugprone-tagged-union-member-count false-positive (PR #135831)

2025-04-16 Thread via cfe-commits
https://github.com/EugeneZelenko deleted https://github.com/llvm/llvm-project/pull/135831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Offload][SYCL] Refactor OffloadKind implementation (PR #135809)

2025-04-16 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: AddressSanitizer test is passing in subsequent runs. Mostly a flaky issue. Thanks https://github.com/llvm/llvm-project/pull/135809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-16 Thread via cfe-commits
@@ -293,15 +293,14 @@ class LineJoiner { auto ShouldMergeShortFunctions = [this, &I, &NextLine, PreviousLine, TheLine]() { - if (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All) + if (Style.AllowShortFunctionsO

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Erich Keane via cfe-commits
@@ -2838,6 +2838,18 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { /// immediately following this class. template const T *getAs() const; + /// Look through sugar for an instance of TemplateSpecializationType which + /// is not a type alias. +

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: C++ DR test changes LGTM https://github.com/llvm/llvm-project/pull/135916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disable -fdollars-in-identifiers by default (PR #135407)

2025-04-16 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: > CC @nathanchance @nickdesaulniers for more information This will indeed break building the Linux kernel for x86_64 at least in my brief test, mainly because it uses the preprocessor for assembly files but there are some macros that are included in both C and assembly that

[clang] [NFC][CFI] Add test to check for '-flto' and '-fvisibility=' flags (PR #135892)

2025-04-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/135892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >