[clang] [Clang][CodeGen] Check `isUnderlyingBasePointerConstantNull` in `emitPointerArithmetic` (PR #137849)

2025-04-30 Thread Nikita Popov via cfe-commits
@@ -4238,7 +4238,8 @@ static Value *emitPointerArithmetic(CodeGenFunction &CGF, else elemTy = CGF.ConvertTypeForMem(elementType); - if (CGF.getLangOpts().PointerOverflowDefined) + if (CGF.getLangOpts().PointerOverflowDefined || + CGF.isUnderlyingBasePointerConstan

[clang] [clang][ASTImporter] Fix AST import if anonymous namespaces are merged (PR #128735)

2025-04-30 Thread Balázs Kéri via cfe-commits
balazske wrote: I am now not really sure what happens, if there is a single anonymous namespace for a TU or there are separate ones for the anonymous namespaces in for example `extern "C"` blocks (and how it should work according to the C++ standard). Probably adding more tests where there is

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-04-30 Thread Urvi Rav via cfe-commits
@@ -1,105 +1,33 @@ -// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-linux -emit-llvm %s -o - | FileCheck %s -// expected-no-diagnostics - +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=52 -DOMP52 -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCh

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-04-30 Thread Urvi Rav via cfe-commits
@@ -1660,6 +1660,10 @@ def err_omp_expected_colon : Error<"missing ':' in %0">; def err_omp_missing_comma : Error< "missing ',' after %0">; def err_omp_expected_context_selector : Error<"expected valid context selector in %0">; +def err_omp_unknown_clause +: Error<"expe

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-04-30 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/127290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Add workaround for old glibc `__PTR_ALIGN` macro (PR #137851)

2025-04-30 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/137851 >From f1db3a540ec1383451955efab62b64ed8d180349 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Wed, 30 Apr 2025 01:26:41 +0800 Subject: [PATCH 1/4] [Clang][CodeGen] Check `isUnderlyingBasePointerConstantNull

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-30 Thread Marco Elver via cfe-commits
https://github.com/melver edited https://github.com/llvm/llvm-project/pull/137133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Add workaround for old glibc `__PTR_ALIGN` macro (PR #137851)

2025-04-30 Thread Yingwei Zheng via cfe-commits
@@ -4820,6 +4820,9 @@ bool CodeGenFunction::isUnderlyingBasePointerConstantNull(const Expr *E) { const Expr *UnderlyingBaseExpr = E->IgnoreParens(); while (auto *BaseMemberExpr = dyn_cast(UnderlyingBaseExpr)) UnderlyingBaseExpr = BaseMemberExpr->getBase()->IgnoreParens

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-30 Thread Marco Elver via cfe-commits
https://github.com/melver updated https://github.com/llvm/llvm-project/pull/137133 >From a8319028f08192ca6140beed7f27a83a829c6d84 Mon Sep 17 00:00:00 2001 From: Marco Elver Date: Wed, 23 Apr 2025 11:31:25 +0200 Subject: [PATCH 1/2] Thread Safety Analysis: Convert CapabilityExpr::CapExpr to hol

[clang] f62f36b - [clang][NFC] Avoid a duplicate variable in SemaExprCXX.cpp (#137464)

2025-04-30 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2025-04-30T10:30:08+02:00 New Revision: f62f36b91de684ddfe129532e3a5086009b16f34 URL: https://github.com/llvm/llvm-project/commit/f62f36b91de684ddfe129532e3a5086009b16f34 DIFF: https://github.com/llvm/llvm-project/commit/f62f36b91de684ddfe129532e3a5086009b16f

[clang] [clang][NFC] Avoid a duplicate variable in SemaExprCXX.cpp (PR #137464)

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

[clang] [RISCV] Fix generation of DWARF info for vector segmented types (PR #137941)

2025-04-30 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/137941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

2025-04-30 Thread Fraser Cormack via cfe-commits
@@ -9,15 +9,31 @@ #define __CLC_DST_ADDR_SPACE local #define __CLC_SRC_ADDR_SPACE global #define __CLC_BODY -#include +#include +#undef __CLC_DST_ADDR_SPACE frasercrmck wrote: We probably don't need to `undef` and re-`define` here, when `local/global` isn'

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

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

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. Thanks. We could probably come up with some kind of combined `gentype.inc` that does them both at once (though both currently `undef` `__CLC_BODY` after they finish so we'd need to be able to stop that, or preserve `__CLC_BODY` across

[clang] [clang] ownership_returns attribute takes no more than 2 arguments (PR #137897)

2025-04-30 Thread Iris Shi via cfe-commits
https://github.com/el-ev approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7752e0a - Revert "[clang-format] Add OneLineFormatOffRegex option (#137577)"

2025-04-30 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2025-04-30T00:12:41-07:00 New Revision: 7752e0a10b25da2f2eadbed10606bd5454dbca05 URL: https://github.com/llvm/llvm-project/commit/7752e0a10b25da2f2eadbed10606bd5454dbca05 DIFF: https://github.com/llvm/llvm-project/commit/7752e0a10b25da2f2eadbed10606bd5454dbca05.diff LOG:

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-04-30 Thread Oliver Stannard via cfe-commits
ostannard wrote: That looks like the expected consequence of this change: * Previously, the anonymous bitfield was erroneously given a 64-bit container, so it occupied 7 copies of the container type, starting at byte 8 of the struct and ending at 64. * Now, it is given a 128-bit container, as r

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-30 Thread Nathan Ridge via cfe-commits
@@ -223,33 +226,26 @@ SymbolSlab indexStandardLibrary(llvm::StringRef HeaderSources, return Symbols; } - SymbolCollector::Options IndexOpts; - IndexOpts.Origin = SymbolOrigin::StdLib; - IndexOpts.CollectMainFileSymbols = false; - IndexOpts.CollectMainFileRefs = fals

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/133681 >From 451a88947bda87daa5934cc5c2d55f9e57a5cfda Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 31 Mar 2025 02:25:45 -0400 Subject: [PATCH] [clangd] Store documentation when indexing standard librar

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-30 Thread Nathan Ridge via cfe-commits
@@ -158,6 +158,43 @@ TEST(StdLibTests, EndToEnd) { UnorderedElementsAre(StdlibSymbol("list"), StdlibSymbol("vector"))); } +TEST(StdLibTests, StdLibDocComments) { + Config Cfg; + Cfg.Index.StandardLibrary = true; + WithContextValue Enabled(Config::Key, std::move(Cfg));

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
@@ -231,6 +231,13 @@ namespace DeprecatedVolatile { a = c = a; b += a; } + + volatile struct amber jurassic(); Fznamznon wrote: As I can see, if the return type is not a struct/class, the warning is issued. Could you please add a test case with vol

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
@@ -5056,13 +5056,13 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, S.Diag(DeclType.Loc, diag::err_func_returning_qualified_void) << T; } else diagnoseRedundantReturnTypeQualifiers(S, T, D, chunkIndex); - -//

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Thank you for the fix, could you please also add a release note? https://github.com/llvm/llvm-project/pull/137899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

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

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-30 Thread Matt Arsenault via cfe-commits
@@ -23,4 +23,20 @@ #define _CLC_DEF __attribute__((always_inline)) #endif +#if __OPENCL_C_VERSION__ == CL_VERSION_2_0 || \ +(__OPENCL_C_VERSION__ >= CL_VERSION_3_0 && \ + defined(__opencl_c_generic_addr

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. LGTM. I see there's a note in the spec: `async_work_group_copy and async_work_group_strided_copy for 3-component vector types behave as async_work_group_copy and async_work_group_strided_copy respectively for 4-component vector types.

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-30 Thread Marco Elver via cfe-commits
https://github.com/melver edited https://github.com/llvm/llvm-project/pull/137133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-30 Thread Marco Elver via cfe-commits
https://github.com/melver edited https://github.com/llvm/llvm-project/pull/137133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NVPTX] Support the OpenCL generic addrspace feature by default (PR #137940)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/137940 As best as I can see, all NVPTX architectures support the generic address space. I note there's a FIXME in the target's address space map about 'generic' still having to be added to the target but we haven'

[clang] [NVPTX] Support the OpenCL generic addrspace feature by default (PR #137940)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fraser Cormack (frasercrmck) Changes As best as I can see, all NVPTX architectures support the generic address space. I note there's a FIXME in the target's address space map about 'generic' still having to be added to the target but we h

[clang] 04aa5a8 - [OMPIRBuilder] Don't discard the debug record from entry block. (#135161)

2025-04-30 Thread via cfe-commits
Author: Abid Qadeer Date: 2025-04-30T10:25:35+01:00 New Revision: 04aa5a88d17f5c1cab7acde2e87de05a405e60f1 URL: https://github.com/llvm/llvm-project/commit/04aa5a88d17f5c1cab7acde2e87de05a405e60f1 DIFF: https://github.com/llvm/llvm-project/commit/04aa5a88d17f5c1cab7acde2e87de05a405e60f1.diff L

[clang] [llvm] [mlir] [OMPIRBuilder] Don't discard the debug record from entry block. (PR #135161)

2025-04-30 Thread Abid Qadeer via cfe-commits
https://github.com/abidh closed https://github.com/llvm/llvm-project/pull/135161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-30 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/19] [C] Diagnose use of C++ keywords in C This adds a ne

[clang] [Clang][OpenCL][AMDGPU] OpenCL Kernel stubs should be assigned alwaysinline attribute (PR #137769)

2025-04-30 Thread Aniket Lal via cfe-commits
https://github.com/lalaniket8 updated https://github.com/llvm/llvm-project/pull/137769 >From 8fd3b0cafa7ddd260d073232f93e262a6d508d52 Mon Sep 17 00:00:00 2001 From: anikelal Date: Tue, 29 Apr 2025 13:59:48 +0530 Subject: [PATCH] add alwaysinline attribute to stubs --- clang/lib/CodeGen/CodeGe

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-04-30 Thread Urvi Rav via cfe-commits
https://github.com/ravurvi20 updated https://github.com/llvm/llvm-project/pull/128640 >From 6ebd5991788608fbd104ea9c23230912044462d3 Mon Sep 17 00:00:00 2001 From: Urvi Rav Date: Tue, 25 Feb 2025 00:49:07 -0600 Subject: [PATCH 1/7] default clause replaced by otherwise clause for metadirective

[clang] [clang] ownership_returns attribute takes no more than 2 arguments (PR #137897)

2025-04-30 Thread Iris Shi via cfe-commits
el-ev wrote: ### Merge activity * **Apr 30, 7:27 AM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/137897). https://github.com/llvm/llvm-project/pull/137897 __

[clang] 6dfd354 - [clang] ownership_returns attribute takes no more than 2 arguments (#137897)

2025-04-30 Thread via cfe-commits
Author: halbi2 Date: 2025-04-30T19:29:37+08:00 New Revision: 6dfd35457123089b3506899c8bc522f3dfa6e959 URL: https://github.com/llvm/llvm-project/commit/6dfd35457123089b3506899c8bc522f3dfa6e959 DIFF: https://github.com/llvm/llvm-project/commit/6dfd35457123089b3506899c8bc522f3dfa6e959.diff LOG: [

[clang] [clang] ownership_returns attribute takes no more than 2 arguments (PR #137897)

2025-04-30 Thread Iris Shi via cfe-commits
https://github.com/el-ev closed https://github.com/llvm/llvm-project/pull/137897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Clean up unnecessary #undef __CLC_BODYs (PR #137959)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/137959 This macro is automatically undefined by the various gentype-like helpers. >From ef6433ffa32a8f4ced865382bfd45de61f5aef53 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Wed, 30 Apr 2025 13:48:16 +0100

[clang] [Clang][AArch64] make bitperm intrinsics available in streaming mode (PR #129700)

2025-04-30 Thread via cfe-commits
https://github.com/CarolineConcatto approved this pull request. https://github.com/llvm/llvm-project/pull/129700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-04-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/137958 >From 2d3db51939ec6ca2dfb2e327bce0f33bd2532ff9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 30 Apr 2025 13:00:19 +0200 Subject: [PATCH] [IR] Do not store Function inside BlockAddress Currently BlockAddr

[clang] Fix crash when an attribute is applied to pragma attribute/pragma dump (PR #137880)

2025-04-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, but the changes should come with a release note, right? https://github.com/llvm/llvm-project/pull/137880 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [llvm] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-04-30 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 cpp,h -- clang/lib/CodeGen/CodeGenFunction.cpp llvm/include/

[libclc] [libclc] Clean up unnecessary #undef __CLC_BODYs (PR #137959)

2025-04-30 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: CC @wenju-he https://github.com/llvm/llvm-project/pull/137959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenCL][AMDGPU] OpenCL Kernel stubs should be assigned alwaysinline attribute (PR #137769)

2025-04-30 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > > In practice this should be a single use of an internal function and should > > not require this hint. Is this papering over a different issue? > > Why do you think it is an internal function? I thought it's an externally > callable stub. Agree. OpenCL allows calling an ext

[clang] [Clang][AArch64] make bitperm intrinsics available in streaming mode (PR #129700)

2025-04-30 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/129700 >From 4b7b5a05b918e644559319f10e6635643a2ee2e7 Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Tue, 4 Mar 2025 12:48:19 + Subject: [PATCH] [Clang][AArch64] update bitperm intrinsics to be available in str

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

2025-04-30 Thread Nico Weber via cfe-commits
nico wrote: `BasicTests` and `FormatTests` had fairly few deps (they didn't need Sema etc) and compiled much fewer files than they presumably now do. Does it make sense to keep those as distinct binaries? https://github.com/llvm/llvm-project/pull/134196

[libclc] [libclc] Clean up unnecessary #undef __CLC_BODYs (PR #137959)

2025-04-30 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 inc,h,cl -- libclc/clc/include/clc/common/clc_degrees.h lib

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

2025-04-30 Thread Nico Weber via cfe-commits
@@ -304,7 +304,7 @@ getCodeModel(const CodeGenOptions &CodeGenOpts) { .Case("kernel", llvm::CodeModel::Kernel) .Case("medium", llvm::CodeModel::Medium) .Case("large", llvm::CodeModel::Large) -

[clang] [C] Modify -Wdefault-const-init (PR #137961)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes Post-commit review feedback on https://github.com/llvm/llvm-project/pull/137166 raised a concern from the Linux kernel about wanting to silence the new diagnostic when the uninitialized object is a con

[clang] [C] Warn on uninitialized const objects (PR #137166)

2025-04-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > This case might be reasonable to handle differently, but I'm on the fence > > too. There's two cases for structure members, broadly: > > > > 1. Don't initialize the `const` field, don't ever read the `const` field. > > 2. Rely on the fact that you can overwrite a `const`

[clang] [C] Modify -Wdefault-const-init (PR #137961)

2025-04-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/137961 Post-commit review feedback on https://github.com/llvm/llvm-project/pull/137166 raised a concern from the Linux kernel about wanting to silence the new diagnostic when the uninitialized object is a const m

[clang] [OpenACC][CIR] Start work to lower 'loop' (PR #137972)

2025-04-30 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 cpp -- clang/test/CIR/CodeGenOpenACC/loop.cpp clang/lib/CIR

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: > It is not clear to me why this is a specifically a problem when called from > `Profile(...)` can you elaborate a bit more in the summary. I've added a bit more details - it's basically the fact that the "get most recent" operation triggered the load of new nodes from the

[clang] [OpenACC][CIR] Start work to lower 'loop' (PR #137972)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes As can be seen by the comment, this ends up being a construct that is going to be quite a lot of work in the future to make sure we properly identify the upperbound, lowerbound, and step. For now, we just

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
@@ -3610,7 +3611,7 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode { } void Profile(llvm::FoldingSetNodeID &ID) { -Profile(ID, getPointeeType(), getQualifier(), getMostRecentCXXRecordDecl()); +Profile(ID, getPointeeType(), getQualifier(), ge

[clang] [OpenACC][CIR] Start work to lower 'loop' (PR #137972)

2025-04-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/137972 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

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

2025-04-30 Thread Baranov Victor via cfe-commits
@@ -39,6 +39,29 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) { return FD ? FD->isMain() : false; } +AST_MATCHER(clang::TypeLoc, isInImplicitTemplateInstantiation) { + const auto IsImplicitTemplateInstantiation = [](const auto *Node) { +return (Node != nullptr) && +

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/137910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2025-04-30 Thread via cfe-commits
@@ -235,7 +237,8 @@ Changes in existing checks - Improved :doc:`bugprone-unsafe-functions ` check to allow specifying - additional functions to match. + additional functions to match. Added `ctime` and `localtime` + to unsafe functions check in clang-tidy. ---

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

2025-04-30 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-30 Thread Baranov Victor via cfe-commits
@@ -39,6 +39,29 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) { return FD ? FD->isMain() : false; } +AST_MATCHER(clang::TypeLoc, isInImplicitTemplateInstantiation) { + const auto IsImplicitTemplateInstantiation = [](const auto *Node) { +return (Node != nullptr) && +

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

2025-04-30 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: Maybe previous devs did not cover all cases, so you didn't have

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2025-04-30 Thread Zishan Mirza via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Erich Keane via cfe-commits
@@ -3610,7 +3611,7 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode { } void Profile(llvm::FoldingSetNodeID &ID) { -Profile(ID, getPointeeType(), getQualifier(), getMostRecentCXXRecordDecl()); +Profile(ID, getPointeeType(), getQualifier(), ge

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2025-04-30 Thread Gedare Bloom via cfe-commits
https://github.com/gedare updated https://github.com/llvm/llvm-project/pull/108332 >From 8846ff045f969b258554c3cfb72161e9f61dda19 Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Thu, 20 Jun 2024 17:35:39 -0600 Subject: [PATCH 1/2] Format: add AlignAfterControlStatement Introduce new style op

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2025-04-30 Thread Zishan Mirza via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [llvm] [mlir] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-04-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/137958 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-ser

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
@@ -3610,7 +3611,7 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode { } void Profile(llvm::FoldingSetNodeID &ID) { -Profile(ID, getPointeeType(), getQualifier(), getMostRecentCXXRecordDecl()); +Profile(ID, getPointeeType(), getQualifier(), ge

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

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

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

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

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > LGTM! Do you need me to land the changes on your behalf? > > > > > > Yup, I don't have access yet > > I'll push the changes once precommit CI goes green. Thank you for the > improvement! FYI: it looks like precommit CI found a failure with one of the tests https://

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2025-04-30 Thread Zishan Mirza via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[libclc] 75f040a - [libclc] Clean up unnecessary #undef __CLC_BODYs (#137959)

2025-04-30 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-04-30T16:13:04+01:00 New Revision: 75f040ab3e119e0ee87963ec9d2a01b1e6d4039e URL: https://github.com/llvm/llvm-project/commit/75f040ab3e119e0ee87963ec9d2a01b1e6d4039e DIFF: https://github.com/llvm/llvm-project/commit/75f040ab3e119e0ee87963ec9d2a01b1e6d4039e.diff

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I'm still not sure I understand the problem this is solving, but I also don't see any harm in it, so I'm leaning towards accept here. Aaron can be the final approval though. https://github.com/llvm/llvm-project/pull/137910

[libclc] [libclc] Clean up unnecessary #undef __CLC_BODYs (PR #137959)

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

[clang] [clang AST] move mangling API to namespace clang to allow calls from swift-frontend (PR #137884)

2025-04-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137884 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

2025-04-30 Thread Wenju He via cfe-commits
https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/137932 3-component vector type is supported for them per OpenCL spec. >From cafb374de8d77c82fa450b732a122663090f6e34 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Wed, 30 Apr 2025 00:44:50 -0700 Subject: [PATCH] [lib

[clang] [flang] [llvm] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-30 Thread via cfe-commits
@@ -19,6 +21,7 @@ template class Expected; template class IntrusiveRefCntPtr; class Module; class MemoryBufferRef; +extern cl::opt ClPGOColdFuncAttr; fanju110 wrote: I think you're right, I'll just put it back in BackendUtil.cpp. I'm going to leave this exp

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

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

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-30 Thread Erich Keane via cfe-commits
@@ -5024,3 +5024,9 @@ def OpenACCRoutineDecl :InheritableAttr { void printPrettyPragma(raw_ostream &OS, const PrintingPolicy &Policy) const; }]; } + +def NonString : InheritableAttr { + let Spellings = [GCC<"nonstring">]; erichkeane wrote: No interest

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

2025-04-30 Thread Nico Weber via cfe-commits
nico wrote: > What is the warning? => #137247 https://github.com/llvm/llvm-project/pull/137247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -0,0 +1,364 @@ +// expected-no-diagnostics alexey-bataev wrote: The tests with classes and function members are required, as well as classes, used in conditions https://github.com/llvm/llvm-project/pull/131838 ___

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -10554,6 +10687,8 @@ SemaOpenMP::ActOnOpenMPDispatchDirective(ArrayRef Clauses, return StmtError(); Stmt *S = cast(AStmt)->getCapturedStmt(); + if (isa(S)) +S = cast(S)->getCapturedStmt(); alexey-bataev wrote: ```suggestion if (auto *CS = dyn

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4280,6 +4282,15 @@ getTargetRegionParams(Sema &SemaRef) { return Params; } +static SmallVector +getDispatchRegionParams(Sema &SemaRef) { + ASTContext &Context = SemaRef.getASTContext(); + SmallVector Params; + + Params.push_back(std::make_pair(StringRef(), QualType())

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [llvm] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-04-30 Thread Nikita Popov via cfe-commits
@@ -912,6 +912,11 @@ class BlockAddress final : public Constant { /// block must be embedded into a function. static BlockAddress *get(BasicBlock *BB); + /// Return a BlockAddress for the specified basic block, which may not be + /// part of a function. The specified typ

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/132991 >From c476948593a80ed31765cdd711a626e4e03930ab Mon Sep 17 00:00:00 2001 From: hulxv Date: Tue, 25 Mar 2025 22:56:51 +0200 Subject: [PATCH 1/8] [include-cleaner] rename enabled flags to `disable-*` --- .../includ

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Erich Keane via cfe-commits
@@ -3610,7 +3611,7 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode { } void Profile(llvm::FoldingSetNodeID &ID) { -Profile(ID, getPointeeType(), getQualifier(), getMostRecentCXXRecordDecl()); +Profile(ID, getPointeeType(), getQualifier(), ge

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Aaron Ballman via cfe-commits
@@ -183,9 +195,26 @@ class Action : public clang::ASTFrontendAction { auto Results = analyze(AST.Roots, PP.MacroReferences, PP.Includes, &PI, getCompilerInstance().getPreprocessor(), HeaderFilter); -if (!Insert) + +if (!Insert) { + llvm:

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/132991 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-ser

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Mohamed Emad via cfe-commits
hulxv wrote: I think all is fine now https://github.com/llvm/llvm-project/pull/132991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Aaron Ballman via cfe-commits
@@ -183,9 +195,26 @@ class Action : public clang::ASTFrontendAction { auto Results = analyze(AST.Roots, PP.MacroReferences, PP.Includes, &PI, getCompilerInstance().getPreprocessor(), HeaderFilter); -if (!Insert) + +if (!Insert) { + llvm:

[clang] 01e0296 - [clang] Temporarily silence noisy warning for FPEvalMethod

2025-04-30 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2025-04-30T09:39:19-04:00 New Revision: 01e029602a8ae860852ad2dd8c6ea347c9200066 URL: https://github.com/llvm/llvm-project/commit/01e029602a8ae860852ad2dd8c6ea347c9200066 DIFF: https://github.com/llvm/llvm-project/commit/01e029602a8ae860852ad2dd8c6ea347c9200066.diff LO

  1   2   3   4   5   >