[clang] [libclang/C++] Fix clang_File_isEqual for in-memory files (PR #135773)

2025-04-23 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > LGTM, but how this fares against our stability guarantees for libclang APIs? > Do we need `clang_File_isEqual2`? I think this is a bug fix and so it meets our requirements. The ABI is stable, but we can fix logic bugs. https://github.com/llvm/llvm-project/pull/135773 ___

[clang] [llvm] Reland "[HLSL][RootSignature] Implement initial parsing of the descriptor table clause params" (PR #136740)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/8449 Here is the r

[clang] [llvm] [NFC][RootSignatures] Conform to new std::optional calling conventions (PR #136747)

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

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

2025-04-23 Thread John McCall via cfe-commits
rjmccall wrote: That is not possible, and this is exactly what I'm worried about with all this discussion about making `size_t` more "built-in". `size_t` is specified to be a typedef of a (platform-dependent) standard integer type, and it needs to continue to behave that way; we cannot actuall

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Where is this new API expected to be used? https://github.com/llvm/llvm-project/pull/136773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Upstream enum support (PR #136807)

2025-04-23 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/136807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (PR #137068)

2025-04-23 Thread Jan Svoboda via cfe-commits
@@ -3311,11 +3312,22 @@ ASTReader::ReadControlBlock(ModuleFile &F, SignatureBytes.end()); Blob = Blob.substr(ASTFileSignature::size); +// Use BaseDirectoryAsWritten to ensure we use the same path in the +

[clang] [Clang,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)

2025-04-23 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: rnk wrote: The actual underlying issue appears to come from ae0d224 / #91310 , which added `CodeGenModule::EmitExternalFunctionDeclaration`,

[clang] 0e0a166 - Revert unintentional diff from cd826d6e840ed33ad88458c862da5f9fcc6e908c

2025-04-23 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2025-04-23T22:30:44Z New Revision: 0e0a1665fa340b9f1934d12aff818064aaf289ef URL: https://github.com/llvm/llvm-project/commit/0e0a1665fa340b9f1934d12aff818064aaf289ef DIFF: https://github.com/llvm/llvm-project/commit/0e0a1665fa340b9f1934d12aff818064aaf289ef.diff LOG:

[clang] [llvm] [OpenMP] Update the bitcode library install and search path (PR #136754)

2025-04-23 Thread Michael Kruse via cfe-commits
@@ -2794,6 +2794,11 @@ void tools::addOpenMPDeviceRTL(const Driver &D, for (const auto &LibPath : HostTC.getFilePaths()) LibraryPaths.emplace_back(LibPath); + // Check the target specific library path for the triple as well. + SmallString<128> P(D.Dir); + llvm::sys::p

[clang-tools-extra] [clangd] Strip invalid fromRanges for outgoing calls (PR #134657)

2025-04-23 Thread Hampus Adolfsson via cfe-commits
HampusAdolfsson wrote: @HighCommander4 Thanks, looks good to me! I don't have commit access, so feel free to merge this if you're happy with it. https://github.com/llvm/llvm-project/pull/134657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)

2025-04-23 Thread Timm Baeder via cfe-commits
@@ -136,6 +136,17 @@ int main(void) { // Cleanup happens automatically -> no warning. } + /// Function pointers + { +int __attribute__((requires_capability(&mu1))) (*function_ptr)(int) = Foo_fun1; + +function_ptr(5); // expected-warning {{calling function 'fun

[clang-tools-extra] [clangd] Strip invalid fromRanges for outgoing calls (PR #134657)

2025-04-23 Thread Hampus Adolfsson via cfe-commits
https://github.com/HampusAdolfsson updated https://github.com/llvm/llvm-project/pull/134657 >From 162b0535fc2ae745441404231e6b3bf3882b974e Mon Sep 17 00:00:00 2001 From: Hampus Adolfsson Date: Mon, 7 Apr 2025 14:51:03 +0200 Subject: [PATCH 1/3] [clangd] Strip invalid fromRanges for outgoing cal

[clang] [llvm] [RISCV] Add Andes A45/AX45 processor definition (PR #136832)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Jim Lin (tclin914) Changes Andes A45/AX45 are 32/64bit in-order dual-issue 8-stage pipeline linux-capable CPU implementing the RV[32|64]IMAFDC_Zba_Zbb_Zbs ISA extensions. They are developed by Andes Technology https://www.andeste

[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

2025-04-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/122423 >From 56bacf47c53aca276ae4fa6aa2972b7eda152ddd Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 10 Jan 2025 09:46:24 +0800 Subject: [PATCH 1/9] Reapply "[Clang] Implement CWG2369 "Ordering between constra

[clang] [llvm] Checking scripts (PR #136829)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: None (blazie2004) Changes --- Patch is 75.64 MiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/136829.diff 4551 Files Affected: - (added) check_remote_class_check.py (+86) - (added)

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

2025-04-23 Thread Stephen Tozer via cfe-commits
SLTozer wrote: > Any ideas why we might be hitting this issue? This happens during a built > with `-Og`, and issue does not remove if I remove `-Og` flag. At a glance that looks like it could be related, we generate (no-op) cleanup as part of -fextend-variable-liveness. I'll look into this, bu

[clang] [llvm] [MIPS] Add FeatureMSA to i6400 and i6500 cores (PR #134985)

2025-04-23 Thread Mallikarjuna Gouda via cfe-commits
https://github.com/mgoudar updated https://github.com/llvm/llvm-project/pull/134985 >From 36a78bb9fe38781fa8ea126aeae5b7ed48140651 Mon Sep 17 00:00:00 2001 From: Mallikarjuna Gouda Date: Tue, 1 Apr 2025 12:35:27 +0530 Subject: [PATCH 1/6] [MIPS] Add FeatureMSA to i6400 and i6500 cores i6400 an

[clang] [llvm] Branch1 (PR #136834)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (blazie2004) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/136834.diff 1 Files Affected: - (modified) clang/lib/AST/ASTConsumer.cpp (+52-8) ``diff diff --git a/clang/lib/AST/ASTConsumer.cpp b/clang/li

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space [2/2] (PR #136768)

2025-04-23 Thread Guray Ozen via cfe-commits
grypp wrote: Can we please not merge anything without review? https://github.com/llvm/llvm-project/pull/136768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Branch1 (PR #136834)

2025-04-23 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja requested changes to this pull request. IIUC the changes should go to some test file, not `clang/lib/AST/ASTConsumer.cpp`. https://github.com/llvm/llvm-project/pull/136834 ___ cfe-commits mailing list cfe-commits@lis

[clang] 0de2f64 - [clang] XFAIL the `Xclangas.s` test on AIX. (#136744)

2025-04-23 Thread via cfe-commits
Author: Alex Rønne Petersen Date: 2025-04-23T11:40:36+02:00 New Revision: 0de2f64e652a1b8c1e051635c98fb2b69c6b2c62 URL: https://github.com/llvm/llvm-project/commit/0de2f64e652a1b8c1e051635c98fb2b69c6b2c62 DIFF: https://github.com/llvm/llvm-project/commit/0de2f64e652a1b8c1e051635c98fb2b69c6b2c62

[clang] [llvm] Branch1 (PR #136834)

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

[clang] [clang] XFAIL the `Xclangas.s` test on AIX. (PR #136744)

2025-04-23 Thread Alex Rønne Petersen via cfe-commits
https://github.com/alexrp closed https://github.com/llvm/llvm-project/pull/136744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ptrauth] add support for options parameter to __ptrauth (PR #136828)

2025-04-23 Thread via cfe-commits
@@ -8374,20 +8376,212 @@ static void HandlePtrAuthQualifier(ASTContext &Ctx, QualType &T, IsInvalid |= !S.checkPointerAuthDiscriminatorArg( ExtraDiscriminatorArg, Sema::PADAK_ExtraDiscPtrAuth, ExtraDiscriminator); - if (IsInvalid) { -Attr.setInvalid(); -retur

[clang] [llvm] Branch1 (PR #136834)

2025-04-23 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] Warning as error for fold expressions over comparison operators (PR #136836)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes We made chained comparisons an error. Fold-expressions over a comparison operator produce chained comparisons, so we should be consistent there too. We only emit the warning when instantiating the fold expressi

[clang] [clang][ptrauth] add support for options parameter to __ptrauth (PR #136828)

2025-04-23 Thread Oliver Hunt via cfe-commits
@@ -8374,20 +8376,212 @@ static void HandlePtrAuthQualifier(ASTContext &Ctx, QualType &T, IsInvalid |= !S.checkPointerAuthDiscriminatorArg( ExtraDiscriminatorArg, Sema::PADAK_ExtraDiscPtrAuth, ExtraDiscriminator); - if (IsInvalid) { -Attr.setInvalid(); -retur

[clang] [CIR] Create CIR_TypedAttr common class (PR #136852)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrich Lauko (xlauko) Changes Introduce common base class for attributes with single type parameter. This mirrors incubator changes introduced in https://github.com/llvm/clangir/pull/1583 --- Full diff: https://github.com/llvm/llvm-proje

[clang] [CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail() (PR #136133)

2025-04-23 Thread Juan Manuel Martinez Caamaño via cfe-commits
@@ -0,0 +1,35 @@ +// libstdc++ uses the non-constexpr function std::__glibcxx_assert_fail() +// to trigger compilation errors when the __glibcxx_assert(cond) macro +// is used in a constexpr context. +// Compilation fails when using code from the libstdc++ (such as std::array) on

[clang] [CIR] Create CIR_TypedAttr common class (PR #136852)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Henrich Lauko (xlauko) Changes Introduce common base class for attributes with single type parameter. This mirrors incubator changes introduced in https://github.com/llvm/clangir/pull/1583 --- Full diff: https://github.com/llvm/llvm-pro

[clang] [analyzer] Workaround for unintended slowdown (scope increase) (PR #136720)

2025-04-23 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource edited https://github.com/llvm/llvm-project/pull/136720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Workaround for unintended slowdown (scope increase) (PR #136720)

2025-04-23 Thread Balázs Benics via cfe-commits
@@ -0,0 +1,198 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify=expected,default %s +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config legacy-inlining-prevention=false -verify=expected,disabled %s + +int get

[clang] [analyzer] Workaround for unintended slowdown (scope increase) (PR #136720)

2025-04-23 Thread Balázs Benics via cfe-commits
balazs-benics-sonarsource wrote: One other note. We should backport this fix to clang-20 once it lands to main. https://github.com/llvm/llvm-project/pull/136720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [analyzer] Workaround for unintended slowdown (scope increase) (PR #136720)

2025-04-23 Thread Balázs Benics via cfe-commits
@@ -0,0 +1,198 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify=expected,default %s +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config legacy-inlining-prevention=false -verify=expected,disabled %s + +int get

[clang] [Clang] Warning as error for fold expressions over comparison operators (PR #136836)

2025-04-23 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM with a minor rewording and reformatting of the diagnostic message. https://github.com/llvm/llvm-project/pull/136836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang] Warning as error for fold expressions over comparison operators (PR #136836)

2025-04-23 Thread Aaron Ballman via cfe-commits
@@ -7138,6 +7138,13 @@ def warn_consecutive_comparison : Warning< "chained comparison 'X %0 Y %1 Z' does not behave the same as a mathematical expression">, InGroup, DefaultError; +def warn_comparison_in_fold_expression +: Warning< + "comparison in a fold exp

[clang] [AArch64] Update __gcsss intrinsic to match revised ACLE specification (PR #136850)

2025-04-23 Thread via cfe-commits
https://github.com/sivan-shani converted_to_draft https://github.com/llvm/llvm-project/pull/136850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-04-23 Thread Hans Wennborg via cfe-commits
zmodem wrote: I too had trouble understanding this change based on the description. Could you give a concrete example of how mingw and msvc disagree on where to put the attribute, and explain how this pr changes things? Taking a step back, how will this simplify libc++'s visibility annotations

[clang] [clang][ptrauth] add support for options parameter to __ptrauth (PR #136828)

2025-04-23 Thread Oliver Hunt via cfe-commits
@@ -8374,20 +8376,212 @@ static void HandlePtrAuthQualifier(ASTContext &Ctx, QualType &T, IsInvalid |= !S.checkPointerAuthDiscriminatorArg( ExtraDiscriminatorArg, Sema::PADAK_ExtraDiscPtrAuth, ExtraDiscriminator); - if (IsInvalid) { -Attr.setInvalid(); -retur

[clang] [Clang] diagnose deleted/default redeclaration of defined friend functions (PR #136717)

2025-04-23 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: LGTM https://github.com/llvm/llvm-project/pull/136717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail() (PR #136133)

2025-04-23 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/136133 From b433add1b7c2027b89cdd9be11680c0a9a59e807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 17 Apr 2025 13:41:55 +0200 Subject: [PATCH] [CUDA][HIP] Add a __devi

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Jan Svoboda via cfe-commits
@@ -107,15 +107,28 @@ CXString createCXString(CXStringBuf *buf) { return Str; } -CXStringSet *createSet(const std::vector &Strings) { +template +static CXStringSet *createSetImpl(ArrayRef Strings) { jansvoboda11 wrote: Nit: If you switched the order of tem

[clang] [llvm] [RISCV] Allow `Zicsr`/`Zifencei` to duplicate with `g` (PR #136842)

2025-04-23 Thread Luke Lau via cfe-commits
https://github.com/lukel97 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/136842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Allow `Zicsr`/`Zifencei` to duplicate with `g` (PR #136842)

2025-04-23 Thread Luke Lau via cfe-commits
@@ -717,6 +716,15 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension, } while (!Ext.empty()); } + // We add Zicsr/Zifenci as final to allow duplicated "zicsr"/"zifencei". lukel97 wrote: Nit, give an example that it's dup

[libclc] [libclc] Build for OpenCL 3.0 (PR #135733)

2025-04-23 Thread Wenju He via cfe-commits
https://github.com/wenju-he edited https://github.com/llvm/llvm-project/pull/135733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [OpenMP] Change build of OpenMP device runtime to be a separate runtime (PR #136729)

2025-04-23 Thread Joseph Huber via cfe-commits
@@ -122,35 +130,41 @@ else() get_clang_resource_dir(LIBOMP_HEADERS_INSTALL_PATH SUBDIR include) endif() -# Build host runtime library, after LIBOMPTARGET variables are set since they are needed -# to enable time profiling support in the OpenMP runtime. -add_subdirectory(run

[clang] Fix a crash in constant evaluation of ExtVectorElementExprs (PR #136771)

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

[clang] [C] Add (new) -Wimplicit-void-ptr-cast to -Wc++-compat (PR #136855)

2025-04-23 Thread Erich Keane via cfe-commits
@@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wimplicit-void-ptr-cast %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wc++-compat %s +// RUN: %clang_cc1 -fsyntax-only -verify=good %s +// RUN: %clang_cc1 -fsyntax-only -verify=good -Wc++-compat -Wno-implicit-void-ptr-ca

[clang] [llvm] [Clang][llvm] Implement fp8 FMOP4A intrinsics (PR #130127)

2025-04-23 Thread Virginia Cangelosi via cfe-commits
https://github.com/virginia-cangelosi closed https://github.com/llvm/llvm-project/pull/130127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix a crash in constant evaluation of ExtVectorElementExprs (PR #136771)

2025-04-23 Thread Erich Keane via cfe-commits
@@ -9197,7 +9197,10 @@ bool LValueExprEvaluator::VisitExtVectorElementExpr( if (Success) { Result.setFrom(Info.Ctx, Val); -const auto *VT = E->getBase()->getType()->castAs(); +QualType BaseType = E->getBase()->getType(); +if (E->isArrow()) er

[clang] [llvm] [OpenMP] Update the bitcode library install and search path (PR #136754)

2025-04-23 Thread Joseph Huber via cfe-commits
@@ -2794,6 +2794,11 @@ void tools::addOpenMPDeviceRTL(const Driver &D, for (const auto &LibPath : HostTC.getFilePaths()) LibraryPaths.emplace_back(LibPath); + // Check the target specific library path for the triple as well. + SmallString<128> P(D.Dir); + llvm::sys::p

[clang] 6d0d50f - [OpenMP] Update the bitcode library install and search path (#136754)

2025-04-23 Thread via cfe-commits
Author: Joseph Huber Date: 2025-04-23T08:20:15-05:00 New Revision: 6d0d50f0ac0cb108a06558cb178a68fb78cfa06f URL: https://github.com/llvm/llvm-project/commit/6d0d50f0ac0cb108a06558cb178a68fb78cfa06f DIFF: https://github.com/llvm/llvm-project/commit/6d0d50f0ac0cb108a06558cb178a68fb78cfa06f.diff

[clang] [llvm] [RISCV] Add support for Ziccamoc (PR #136694)

2025-04-23 Thread Pengcheng Wang via cfe-commits
@@ -167,6 +167,7 @@ Changes to the RISC-V Backend * Adds assembler support for ``.option exact``, which disables automatic compression, and branch and linker relaxation. This can be disabled with ``.option noexact``, which is also the default. +* Support was added for the

[clang] [analyzer] Workaround for unintended slowdown (scope increase) (PR #136720)

2025-04-23 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,198 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify=expected,default %s +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config legacy-inlining-prevention=false -verify=expected,disabled %s + +int get

[clang] [llvm] [MIPS] Add FeatureMSA to i6400 and i6500 cores (PR #134985)

2025-04-23 Thread Mallikarjuna Gouda via cfe-commits
@@ -0,0 +1,69 @@ +; Test the MSA intrinsics that are encoded with the SPECIAL instruction format. mgoudar wrote: I have enabled MSA feature from driver also when -mcpu i6500/i6400 is specified. Also I have added codegen test to verify MSA instructions when i650

[clang] [llvm] [openmp] [OpenMP] Change build of OpenMP device runtime to be a separate runtime (PR #136729)

2025-04-23 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I think using the LLVM_ENABLE_RUNTIMES-machanism is a great idea. Regarding > the move back to `openmp/device`, I don't really have an opinion. However, > there are some arguments to make: > > 1. The same arguments apply to `libomptarget` as well > > 2. Definitions su

[clang] [llvm] [MIPS] Add FeatureMSA to i6400 and i6500 cores (PR #134985)

2025-04-23 Thread Mallikarjuna Gouda via cfe-commits
@@ -0,0 +1,9 @@ +// Check target CPUs are correctly passed. + +// RUN: %clang --target=mips64 -### -c %s 2>&1 -mcpu=i6400 -mmsa | FileCheck -check-prefix=MCPU-I6400 %s +// MCPU-I6400: "-target-cpu" "i6400" mgoudar wrote: I modified test to verify abicalls featur

[clang] [llvm] [OpenMP] Update the bitcode library install and search path (PR #136754)

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

[clang] Control analysis-based diagnostics with #pragma (PR #136323)

2025-04-23 Thread Nikita Popov via cfe-commits
nikic wrote: FYI this introduces some overhead: https://llvm-compile-time-tracker.com/compare.php?from=2a9f77f6bd48d757b2d45aadcb6cf76ef4b4ef32&to=71ce9e26aec00e4af27a69ccfab8ca1773ed7018&stat=instructions:u About 0.3% on clang files. https://github.com/llvm/llvm-project/pull/136323 __

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/136773 >From 7f39ebcc34fe3f40c2554ff7fa93baca5b4634a0 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Tue, 22 Apr 2025 14:17:15 -0700 Subject: [PATCH 1/5] Adding CXStringSet *createSet that takes a vector of StringR

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
@@ -107,15 +107,28 @@ CXString createCXString(CXStringBuf *buf) { return Str; } -CXStringSet *createSet(const std::vector &Strings) { +template +static CXStringSet *createSetImpl(ArrayRef Strings) { CXStringSet *Set = new CXStringSet; Set->Count = Strings.size(); S

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
@@ -107,15 +107,28 @@ CXString createCXString(CXStringBuf *buf) { return Str; } -CXStringSet *createSet(const std::vector &Strings) { +template +static CXStringSet *createSetImpl(ArrayRef Strings) { qiongsiwu wrote: Ah yes this is good to keep in mind. I r

[clang-tools-extra] [clang-tidy] Add check 'bugprone-invalid-enum-default-initialization' (PR #136823)

2025-04-23 Thread Oliver Stöneberg via cfe-commits
firewave wrote: There's also a check in UBSAN which detects assignment of invalid values during run-time. So there's logic is various other places regarding this. https://github.com/llvm/llvm-project/pull/136823 ___ cfe-commits mailing list cfe-commit

[clang] [llvm] [RISCV] Allow `Zicsr`/`Zifencei` to duplicate with `g` (PR #136842)

2025-04-23 Thread Luke Lau via cfe-commits
https://github.com/lukel97 edited https://github.com/llvm/llvm-project/pull/136842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Build for OpenCL 3.0 (PR #135733)

2025-04-23 Thread Wenju He via cfe-commits
@@ -429,7 +411,9 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) set( LIBCLC_ARCH_OBJFILE_DIR "${LIBCLC_OBJFILE_DIR}/${arch_suffix}" ) file( MAKE_DIRECTORY ${LIBCLC_ARCH_OBJFILE_DIR} ) -list( APPEND build_flags -cl-std=${opencl_lang_std} ) +# Build for OpenCL 3.0 an

[libclc] [libclc] Build for OpenCL 3.0 (PR #135733)

2025-04-23 Thread Wenju He via cfe-commits
https://github.com/wenju-he edited https://github.com/llvm/llvm-project/pull/135733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Update __gcsss intrinsic to match revised ACLE specification (PR #136850)

2025-04-23 Thread via cfe-commits
https://github.com/sivan-shani created https://github.com/llvm/llvm-project/pull/136850 The original __gcsss intrinsic was implemented based on: https://github.com/ARM-software/acle/pull/260 with the signature: const void *__gcsss(const void *) Per the updated specification in: https://github.

[clang] [AArch64] Update __gcsss intrinsic to match revised ACLE specification (PR #136850)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: SivanShani-Arm (sivan-shani) Changes The original __gcsss intrinsic was implemented based on: https://github.com/ARM-software/acle/pull/260 with the signature: const void *__gcsss(const void *) Per the updated specification in: https://gi

[clang] [AArch64] Update __gcsss intrinsic to match revised ACLE specification (PR #136850)

2025-04-23 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions h -- clang/lib/Headers/arm_acle.h `` View the d

[clang] [analyzer] Workaround for unintended slowdown (scope increase) (PR #136720)

2025-04-23 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource requested changes to this pull request. Thank you for investigating this. At Sonar, we have not yet started the upgrade to clang-20. I suppose, you already did then, thus found this regression on trunk. Maybe we should also reflect of the quality c

[clang] [analyzer] Workaround for unintended slowdown (scope increase) (PR #136720)

2025-04-23 Thread Balázs Benics via cfe-commits
@@ -0,0 +1,198 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify=expected,default %s +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config legacy-inlining-prevention=false -verify=expected,disabled %s + +int get

[clang] [analyzer] Workaround for unintended slowdown (scope increase) (PR #136720)

2025-04-23 Thread Balázs Benics via cfe-commits
@@ -0,0 +1,198 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify=expected,default %s +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config legacy-inlining-prevention=false -verify=expected,disabled %s + +int get

[clang] [analyzer] Workaround for unintended slowdown (scope increase) (PR #136720)

2025-04-23 Thread Balázs Benics via cfe-commits
@@ -2523,6 +2523,20 @@ bool ExprEngine::replayWithoutInlining(ExplodedNode *N, return true; } +/// Return the innermost location context which is inlined at `Node`, unless +/// it's the top-level (entry point) location context. +static const LocationContext *getInlinedLocati

[clang] [llvm] [RISCV] Allow `Zicsr`/`Zifencei` to duplicate with `g` (PR #136842)

2025-04-23 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp created https://github.com/llvm/llvm-project/pull/136842 This matches GCC and we supported it in LLVM 17/18. Fixes #136803 >From e133a5fc0091ec045a0ea0114d553c72e8f33e51 Mon Sep 17 00:00:00 2001 From: Pengcheng Wang Date: Wed, 23 Apr 2025 18:19:41 +0800 Subject:

[clang] [llvm] [Clang][llvm] Implement fp8 FMOP4A intrinsics (PR #130127)

2025-04-23 Thread Virginia Cangelosi via cfe-commits
https://github.com/virginia-cangelosi updated https://github.com/llvm/llvm-project/pull/130127 >From f2a217606537b67a314f9e2b50d7edad5b6ca0cd Mon Sep 17 00:00:00 2001 From: Virginia Cangelosi Date: Thu, 6 Mar 2025 13:38:19 + Subject: [PATCH 1/4] [Clang][llvm] Implement fp8 FMOP4A intrinsics

[libclc] [libclc] Build for OpenCL 3.0 (PR #135733)

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

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-04-23 Thread via cfe-commits
@@ -3691,6 +3691,7 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc, DestructorsFlag = 0x8, PriorityFlag = 0x20, DetachableFlag = 0x40, +PoolFlag = 0x80, Ritanya-B-Bharadwaj wrote: Not yet, I have not added support for

[clang] [llvm] [clang] [OpenMP] New OpenMP 6.0 self_maps clause - CodeGen (PR #134131)

2025-04-23 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj edited https://github.com/llvm/llvm-project/pull/134131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-04-23 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj edited https://github.com/llvm/llvm-project/pull/135807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Allow `Zicsr`/`Zifencei` to duplicate with `g` (PR #136842)

2025-04-23 Thread Craig Topper via cfe-commits
@@ -717,6 +716,16 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension, } while (!Ext.empty()); } + // We add Zicsr/Zifenci as final to allow duplicated "zicsr"/"zifencei" like + // "rv64g_zicsr_zifencei". + if (Baseline == 'g') { +fo

[clang] [AArch64] Update __gcsss intrinsic to match revised ACLE specification (PR #136850)

2025-04-23 Thread via cfe-commits
https://github.com/sivan-shani ready_for_review https://github.com/llvm/llvm-project/pull/136850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-04-23 Thread via cfe-commits
@@ -101,9 +103,11 @@ T tmain(T argc, T *argv) { a = 2; #pragma omp task default(none), private(argc, b) firstprivate(argv) shared(d) if (argc > 0) final(S::TS > 0) priority(argc) affinity(argc, argv[b:argc], arr[:], ([argc][sizeof(T)])argv) foo(); +#ifndef OMP60 -

[clang-tools-extra] [clang-doc][NFC] Remove else after return (PR #136443)

2025-04-23 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/136443 >From 74b930e6af299e7887957a9758022c9a8865ff96 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Sat, 19 Apr 2025 11:11:40 -0700 Subject: [PATCH] [clang-doc][NFC] Remove else after return --- clang-tools-extra/c

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-04-23 Thread via cfe-commits
@@ -3700,6 +3701,11 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc, if (NeedsCleanup) Flags = Flags | DestructorsFlag; } + if (const auto *Clause = D.getSingleClause()) { Ritanya-B-Bharadwaj wrote: Sorry, but could you

[clang] [clang] Fix a use-after-free in expression evaluation (PR #118480)

2025-04-23 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: @kadircet and I have spent some time on this. The `LValueExprEvaluator` decides to "defer" the evaluation of compound literals to conversions, but does this in a way that assumes the evaluation happens inside the same expression. https://github.com/llvm/llvm-project/blob/

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-04-23 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj edited https://github.com/llvm/llvm-project/pull/135807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)

2025-04-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67095 >From 62f499be459107de97a697f42a04f1888af1218b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 22 Sep 2023 08:42:05 +0200 Subject: [PATCH] [clang][TSA] Make RequiresCapability a DeclOrTyp

[clang] [CUDA][HIP] capture possible ODR-used var (PR #136645)

2025-04-23 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/136645 >From 834f1eed2ffde0b15209fca6560191911151c9f6 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 16 Apr 2025 11:09:16 -0400 Subject: [PATCH] [CUDA][HIP] capture possible ODR-used var In a lambda func

[clang] [llvm] [RISCV] Allow `Zicsr`/`Zifencei` to duplicate with `g` (PR #136842)

2025-04-23 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/136842 >From 723976e74398e12252a599e3aabb05ec8f2515ab Mon Sep 17 00:00:00 2001 From: Pengcheng Wang Date: Wed, 23 Apr 2025 18:19:41 +0800 Subject: [PATCH 1/4] [RISCV] Allow `Zicsr`/`Zifencei` to duplicate with `g` T

[clang] [Clang] Warning as error for fold expressions over comparison operators (PR #136836)

2025-04-23 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/136836 >From 8d70f4bb100ad0dec57947ce0999a7f837d2646e Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 23 Apr 2025 11:50:10 +0200 Subject: [PATCH 1/3] [Clang] Warning as error for fold expressions over compar

[clang] [clang][bytecode] Refine diagnostics for volatile reads (PR #136857)

2025-04-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/136857 Differentiate between a volarile read via a lvalue-to-rvalue cast of a volatile qualified subexpression and a read from a pointer with a volatile base object. >From 3fd82eb6e494491e9621122db910a747682d3737 Mon

[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-04-23 Thread Fangyi Zhou via cfe-commits
fangyi-zhou wrote: Thanks for the review. I might have missed some comments since I was away from this pull request for quite a while and I probably forgot. I'll have another revision. https://github.com/llvm/llvm-project/pull/128251 ___ cfe-commits

[clang] [llvm] [OpenMP] Update the bitcode library install and search path (PR #136754)

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

[libclc] [libclc] Fix unguarded use of image types (PR #136871)

2025-04-23 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/136871 Commit 8292e05 which switched the OpenCL C version to 3.0 exposed this issue, which wasn't caught in pre-commit CI. >From 7c9285f52dde14c1d795c2100c10848876c899d9 Mon Sep 17 00:00:00 2001 From: Fraser Corma

[libclc] [libclc] Build for OpenCL 3.0 (PR #135733)

2025-04-23 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: See #136871 for a fix for the CI issues. https://github.com/llvm/llvm-project/pull/135733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add `noalias` to `this` pointer in C++ constructors (PR #136792)

2025-04-23 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: This isn't really the right place to add this code; we should be doing it alongside all the other attributes on function definitions... That said: - I'm not sure this matches the requirements for C++ semantics; noalias is very aggressive, so we might end up with undefined

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Jan Svoboda via cfe-commits
@@ -107,15 +107,28 @@ CXString createCXString(CXStringBuf *buf) { return Str; } -CXStringSet *createSet(const std::vector &Strings) { +template +static CXStringSet *createSetImpl(ArrayRef Strings) { CXStringSet *Set = new CXStringSet; Set->Count = Strings.size(); S

[clang] [CUDA][HIP] capture possible ODR-used var (PR #136645)

2025-04-23 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/136645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 83c309b - [CUDA][HIP] capture possible ODR-used var (#136645)

2025-04-23 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-04-23T12:50:28-04:00 New Revision: 83c309b90550aa768ff9aa11b70898ee2c56b71e URL: https://github.com/llvm/llvm-project/commit/83c309b90550aa768ff9aa11b70898ee2c56b71e DIFF: https://github.com/llvm/llvm-project/commit/83c309b90550aa768ff9aa11b70898ee2c56b71e.dif

<    1   2   3   4   5   >