[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-31 Thread James Y Knight via cfe-commits
jyknight wrote: Just to say again, I think the discussion may be crisper if we consider this as two entirely-distinct features: 1. An expansion of "compatible type" for purposes of pointer casts/non-UB/etc. 2. The ability to provide two definitions of the same struct type in the same scope, to

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

2025-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited 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][CGObjC] Remove unused ExternalProtocolPtrTy (NFC) (PR #133870)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Mats Jun Larsen (junlarsen) Changes This function was previously used to get a type to the protocol that was used to bitcast the initializer of GenerateProtocol. This bitcast has later been removed (thanks to opaque pointers), but t

[clang] [clang][CGObjC] Remove unused ExternalProtocolPtrTy (NFC) (PR #133870)

2025-03-31 Thread Mats Jun Larsen via cfe-commits
junlarsen wrote: * **#133870** https://app.graphite.dev/github/pr/llvm/llvm-project/133870?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/13

[clang] [clang][CGObjC] Remove unused ExternalProtocolPtrTy (NFC) (PR #133870)

2025-03-31 Thread Mats Jun Larsen via cfe-commits
https://github.com/junlarsen created https://github.com/llvm/llvm-project/pull/133870 This function was previously used to get a type to the protocol that was used to bitcast the initializer of GenerateProtocol. This bitcast has later been removed (thanks to opaque pointers), but the member was

[clang] [clang-format] Recognize TableGen paste operator on separate line (PR #133722)

2025-03-31 Thread Owen Pan via cfe-commits
@@ -2832,6 +2832,23 @@ TEST_F(TokenAnnotatorTest, UnderstandTableGenTokens) { Tokens = Annotate("!cond"); EXPECT_TOKEN(Tokens[0], tok::identifier, TT_TableGenCondOperator); + // The paste operator should not be treated as a preprocessor directive even + // if it is on a

[clang] d3be296 - [clang-format] Correctly annotate pointer/reference in _Generic (#133673)

2025-03-31 Thread via cfe-commits
Author: Owen Pan Date: 2025-03-31T23:16:41-07:00 New Revision: d3be29642fa65e5ade434d860cfcc193f8278d4e URL: https://github.com/llvm/llvm-project/commit/d3be29642fa65e5ade434d860cfcc193f8278d4e DIFF: https://github.com/llvm/llvm-project/commit/d3be29642fa65e5ade434d860cfcc193f8278d4e.diff LOG:

[clang] [clang-format] Correctly annotate pointer/reference in _Generic (PR #133673)

2025-03-31 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/133673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Recognize TableGen paste operator on separate line (PR #133722)

2025-03-31 Thread Owen Pan via cfe-commits
@@ -4853,9 +4853,16 @@ void UnwrappedLineParser::readToken(int LevelDifference) { PreviousWasComment = FormatTok->is(tok::comment); while (!Line->InPPDirective && FormatTok->is(tok::hash) && - (!Style.isVerilog() || -Keywords.isVerilogPPDirective

[clang] [clang-format] Recognize TableGen paste operator on separate line (PR #133722)

2025-03-31 Thread Owen Pan via cfe-commits
@@ -4853,9 +4853,16 @@ void UnwrappedLineParser::readToken(int LevelDifference) { PreviousWasComment = FormatTok->is(tok::comment); while (!Line->InPPDirective && FormatTok->is(tok::hash) && - (!Style.isVerilog() || -Keywords.isVerilogPPDirective

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-31 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: > I am wondering if we can add such CI for llvm, too... maybe you can discuss > that at the llvm discord's infrastructure channel... Absolutely, I shall do that and get back to you on this (I think there are people at llvm looking into llvm+emscripten use cases and should sup

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

2025-03-31 Thread Younan Zhang via cfe-commits
@@ -14354,6 +14584,17 @@ ExprResult Sema::BuildOverloadedCallExpr(Scope *S, Expr *Fn, OverloadingResult OverloadResult = CandidateSet.BestViableFunction(*this, Fn->getBeginLoc(), Best); + // [C++23][over.call.func] + // if overload resolution selects a non-static me

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

2025-03-31 Thread Younan Zhang via cfe-commits
@@ -1126,7 +1208,8 @@ class Sema; OperatorRewriteInfo RewriteInfo; constexpr static unsigned NumInlineBytes = -24 * sizeof(ImplicitConversionSequence); +32 * sizeof(ImplicitConversionSequence); zyn0217 wrote: Can we add some comments?

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

2025-03-31 Thread Younan Zhang via cfe-commits
@@ -10933,27 +11096,100 @@ OverloadCandidateSet::BestViableFunction(Sema &S, SourceLocation Loc, // -fgpu-exclude-wrong-side-overloads is off. When // -fgpu-exclude-wrong-side-overloads is on, all candidates are compared // uniformly in isBetterOverloadCandidate. - if (

[clang] [cmake] Refactor clang unittest cmake (PR #133545)

2025-03-31 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. This is definitely an improvement over status quo! Ideally, developers wouldn't have to list Clang libraries separately from other libraries but that would require some non-trivial build system refactoring that would be better done in fo

[clang] [llvm] Define LLVM_ABI and CLANG_ABI for __EMSCRIPTEN__ builds (PR #131578)

2025-03-31 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev milestoned https://github.com/llvm/llvm-project/pull/131578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-31 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. Lgtm! https://github.com/llvm/llvm-project/pull/127467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-31 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: > We really need to figure out how to add in-tree tests. Yupp sadly I was only able to test this through cppinterop and xeus-cpp as I've commented above (https://github.com/llvm/llvm-project/pull/133037#discussion_r2015819533) where it works as expected :\ I shall take out

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-31 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: We really need to figure out how to add in-tree tests. https://github.com/llvm/llvm-project/pull/133037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Check `std::initializer_list` more strictly (PR #133822)

2025-03-31 Thread Timm Baeder via cfe-commits
@@ -12071,6 +12071,37 @@ NamespaceDecl *Sema::getOrCreateStdNamespace() { return getStdNamespace(); } +/// Check that the template-head of this class template is acceptable for +/// a declaration of 'std::initializer_list', and optionally diagnose if +/// it is not. +/// \re

[clang-tools-extra] ee3c892 - [clang-tidy] Use DenseMap::insert_range (NFC) (#133844)

2025-03-31 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-03-31T22:11:06-07:00 New Revision: ee3c892b3570281698170130a435f9c6b32c3ef5 URL: https://github.com/llvm/llvm-project/commit/ee3c892b3570281698170130a435f9c6b32c3ef5 DIFF: https://github.com/llvm/llvm-project/commit/ee3c892b3570281698170130a435f9c6b32c3ef5.diff L

[clang-tools-extra] [clang-tidy] Use DenseMap::insert_range (NFC) (PR #133844)

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

[clang] [clang-format] Correctly annotate pointer/reference in _Generic (PR #133673)

2025-03-31 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/133673 >From 1ab37d1726be943206c9e1b576468a9d02594783 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 30 Mar 2025 19:29:39 -0700 Subject: [PATCH 1/2] [clang-format] Correctly annotate pointer/reference in _Generic

[clang] Reland [Clang][Cmake] fix libtool duplicate member name warnings (PR #133850)

2025-03-31 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/133850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Use DenseMap::insert_range (NFC) (PR #133844)

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

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-31 Thread Oliver Hunt via cfe-commits
@@ -1098,12 +1098,39 @@ static TypeSourceInfo *getTypeSourceInfoForStdAlignValT(Sema &S, return S.Context.getTrivialTypeSourceInfo(StdAlignValDecl); } +// When searching for custom allocators on the PromiseType we want to +// warn that we will ignore type aware allocators.

[clang] [clang] Fix crash on invalid `std::initializer_list` template-id (PR #132284)

2025-03-31 Thread via cfe-commits
offsetof wrote: > Will you need me to merge that for you? Yes please, thank you @cor3ntin https://github.com/llvm/llvm-project/pull/132284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [llvm] [HLSL][RootSignature] Implement parsing of a DescriptorTable with empty clauses (PR #133302)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-win` running on `as-worker-93` while building `clang,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/2619 Here is the releva

[clang] [clang][bytecode] Fix comparing the addresses of union members (PR #133852)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Union members get the same address, so we can't just use `Pointer::getByteOffset()`. --- Full diff: https://github.com/llvm/llvm-project/pull/133852.diff 4 Files Affected: - (modified) clang/lib/AST/ByteC

[clang] [clang] Implement CWG2611 (PR #133747)

2025-03-31 Thread Vlad Serebrennikov via cfe-commits
@@ -35,6 +35,29 @@ namespace std { template T declval(); } // namespace std +namespace cwg2611 { // cwg2611: 21 +#if __cpp_fold_expressions >= 201603 Endilll wrote: ```suggestion #if __cplusplus >= 201703L ``` https://github.com/llvm/llvm-project/pull/1337

[clang] Reland [Clang][Cmake] fix libtool duplicate member name warnings (PR #133850)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Farzon Lotfi (farzonl) Changes fixes https://github.com/llvm/llvm-project/issues/133199 The fix to reland was moving `Targets/DirectX.cpp` from `clang/lib/CodeGen/Targets/CMakeLists.txt` back to `clang/

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-03-31 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/133710 >From 81c45d6226d217197ae7b6c35e9ace22027cb7a5 Mon Sep 17 00:00:00 2001 From: Wang Pengcheng Date: Mon, 31 Mar 2025 20:12:40 +0800 Subject: [PATCH 1/2] [RISCV][NFC] Make generated intrinsic records more human

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-31 Thread Matheus Izvekov via cfe-commits
@@ -1098,12 +1098,39 @@ static TypeSourceInfo *getTypeSourceInfoForStdAlignValT(Sema &S, return S.Context.getTrivialTypeSourceInfo(StdAlignValDecl); } +// When searching for custom allocators on the PromiseType we want to +// warn that we will ignore type aware allocators.

[clang] [Driver] Add linker options to support statical linking to shared flang-rt on AIX. (PR #131822)

2025-03-31 Thread Daniel Chen via cfe-commits
DanielCChen wrote: Note that the reason `aio.exp` is not needed is because flang-rt currently doesn't do asynchronous I/O. Once it is enabled using POSIX `aio_*` system calls, it will need to export those calls. https://github.com/llvm/llvm-project/pull/131822

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-03-31 Thread Justin Cai via cfe-commits
https://github.com/jzc edited https://github.com/llvm/llvm-project/pull/133194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Check `std::initializer_list` more strictly (PR #133822)

2025-03-31 Thread Timm Baeder via cfe-commits
@@ -12071,6 +12071,37 @@ NamespaceDecl *Sema::getOrCreateStdNamespace() { return getStdNamespace(); } +/// Check that the template-head of this class template is acceptable for +/// a declaration of 'std::initializer_list', and optionally diagnose if +/// it is not. +/// \re

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2025-03-31 Thread Shilei Tian via cfe-commits
shiltian wrote: > @shiltian Could you update MLIR infrastructure for the new default as well? > `mlir/lib/Target/LLVM/ROCDL/Target.cpp` and > `mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp`, which both keep an ear on the > ABI version, partly for linking in device libraries https://github.com/l

[clang] [clang] Check `std::initializer_list` more strictly (PR #133822)

2025-03-31 Thread Timm Baeder via cfe-commits
@@ -12071,6 +12071,37 @@ NamespaceDecl *Sema::getOrCreateStdNamespace() { return getStdNamespace(); } +/// Check that the template-head of this class template is acceptable for +/// a declaration of 'std::initializer_list', and optionally diagnose if +/// it is not. +/// \re

[clang] 32f2402 - Reapply "[EquivalenceClasses] Replace findValue with contains (NFC)."

2025-03-31 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2025-03-31T22:27:59+01:00 New Revision: 32f24029c72dae175c9e2cc81f931f065a2ba347 URL: https://github.com/llvm/llvm-project/commit/32f24029c72dae175c9e2cc81f931f065a2ba347 DIFF: https://github.com/llvm/llvm-project/commit/32f24029c72dae175c9e2cc81f931f065a2ba347.diff

[clang-tools-extra] [clang-tidy] Use DenseMap::insert_range (NFC) (PR #133844)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes We can safely switch to insert_range here because SyntheticStmtSourceMap starts out empty in the constructor. Also TheCFG->synthetic_stmts() comes from DenseMap, so we know that the keys are

[clang-tools-extra] [clang-tidy] Use DenseMap::insert_range (NFC) (PR #133844)

2025-03-31 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/133844 We can safely switch to insert_range here because SyntheticStmtSourceMap starts out empty in the constructor. Also TheCFG->synthetic_stmts() comes from DenseMap, so we know that the keys are unique. That

[clang] [clang] Check `std::initializer_list` more strictly (PR #133822)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (offsetof) Changes Require `std::initializer_list` to be a class template with a template-head equivalent to `template` and no default arguments. --- Full diff: https://github.com/llvm/llvm-project/pull/133822.diff 3 Files A

[clang] [CIR] Generate the nsw flag correctly for unary ops (PR #133815)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes A previous checkin used a workaround to generate the nsw flag where needed for unary ops. This change upstreams a subsequent change that was made in the incubator to generate the flag correctly. --- Ful

[clang] Disable alias template CTAD for C++17 (PR #133597)

2025-03-31 Thread via cfe-commits
https://github.com/GeorgeKA closed https://github.com/llvm/llvm-project/pull/133597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMAKE][AMDGPU] fix build failure caused by PR #133619 (PR #133776)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa edited https://github.com/llvm/llvm-project/pull/133776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add warning message for C++17 alias template CTAD (PR #133806)

2025-03-31 Thread via cfe-commits
https://github.com/GeorgeKA deleted https://github.com/llvm/llvm-project/pull/133806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] add emit -Wignored-base-class-qualifiers diagnostic for cv-qualified base classes (PR #132116)

2025-03-31 Thread Lyle Dean via cfe-commits
https://github.com/lyledean1 edited https://github.com/llvm/llvm-project/pull/132116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-31 Thread Oliver Hunt via cfe-commits
@@ -16327,79 +16531,181 @@ static CanQualType RemoveAddressSpaceFromPtr(Sema &SemaRef, PtrTy->getPointeeType().getUnqualifiedType(), PtrQuals))); } -static inline bool -CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, -C

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-31 Thread Oliver Hunt via cfe-commits
@@ -1098,12 +1098,39 @@ static TypeSourceInfo *getTypeSourceInfoForStdAlignValT(Sema &S, return S.Context.getTrivialTypeSourceInfo(StdAlignValDecl); } +// When searching for custom allocators on the PromiseType we want to +// warn that we will ignore type aware allocators.

[clang] [clang][Modules] Fix the Size of `RecordDecl`'s `BitCodeAbbrevOp` (PR #133500)

2025-03-31 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/133500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Generate the nsw flag correctly for unary ops (PR #133815)

2025-03-31 Thread Sirui Mu via cfe-commits
https://github.com/Lancern approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/133815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Mark CXX module initializer with PACBTI attributes (PR #133716)

2025-03-31 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: LGTM. I'll leave the formal approval to @efriedma-quic https://github.com/llvm/llvm-project/pull/133716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [modules] Handle friend function that was a definition but became only a declaration during AST deserialization (PR #132214)

2025-03-31 Thread Chuanqi Xu via cfe-commits
@@ -1390,7 +1390,19 @@ class ASTReader /// predefines buffer may contain additional definitions. std::string SuggestedPredefines; - llvm::DenseMap DefinitionSource; + struct DefinitionSourceFlags { +ExtKind HasExternalDefinitions : 2; + +/// Indicates if given fu

[clang] [Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (PR #130990)

2025-03-31 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > > The ubsan handler cannot be eliminated because inaccessiblemem: readwrite > > indicates that it has externally observable side effects. > > That is not how things work. For example: > > ``` > $ echo "declare void @g() define void @f() nounwind { call void @g() > memory(argm

[clang] [Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (PR #130990)

2025-03-31 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/130990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Handle incomplete array types (PR #133508)

2025-03-31 Thread Sarah Spall via cfe-commits
@@ -3249,166 +3249,204 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl *VD) { } } } - -static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E, -llvm::SmallVectorImpl &List, -llvm::SmallVectorImpl &Des

[clang] [Clang][SYCL] Add support AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Please remove redundant 'support' from PR topic https://github.com/llvm/llvm-project/pull/133194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [HIP] fix host min/max in header (PR #133590)

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

[clang] 0248d27 - Reland [HIP] fix host min/max in header (#133590)

2025-03-31 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-03-31T20:28:29-04:00 New Revision: 0248d277cabab370b48114cc62aff393b273971b URL: https://github.com/llvm/llvm-project/commit/0248d277cabab370b48114cc62aff393b273971b DIFF: https://github.com/llvm/llvm-project/commit/0248d277cabab370b48114cc62aff393b273971b.dif

[clang] Reland [HIP] fix host min/max in header (PR #133590)

2025-03-31 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/15227 Here is the relevant piece of the

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-03-31 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,274 @@ +//===--- CIRGenExprAgg.cpp - Emit CIR Code from Aggregate Expressions -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-03-31 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,274 @@ +//===--- CIRGenExprAgg.cpp - Emit CIR Code from Aggregate Expressions -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-03-31 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,274 @@ +//===--- CIRGenExprAgg.cpp - Emit CIR Code from Aggregate Expressions -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-03-31 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,274 @@ +//===--- CIRGenExprAgg.cpp - Emit CIR Code from Aggregate Expressions -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-03-31 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,274 @@ +//===--- CIRGenExprAgg.cpp - Emit CIR Code from Aggregate Expressions -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-03-31 Thread Andy Kaylor via cfe-commits
@@ -327,4 +337,4 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { } // namespace cir -#endif +#endif andykaylor wrote: This indicates that you (or some tool you're using) removed the newline character at the end of the file. It's a good practice to conf

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-03-31 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,274 @@ +//===--- CIRGenExprAgg.cpp - Emit CIR Code from Aggregate Expressions -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-03-31 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,274 @@ +//===--- CIRGenExprAgg.cpp - Emit CIR Code from Aggregate Expressions -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [alpha.webkit.NoUnretainedMemberChecker] Ignore system-header-defined ivar / property of a forward declared type (PR #133755)

2025-03-31 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/133755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] add emit -Wignored-base-class-qualifiers diagnostic for cv-qualified base classes (PR #132116)

2025-03-31 Thread via cfe-commits
MagentaTreehouse wrote: > Happy to adjust this @MagentaTreehouse for LLVM 20 - what would that require? @lyledean1 I think the process is that the release notes are left unchanged in this PR; after it is merged we add this to [LLVM 20.X Release](https://github.com/llvm/llvm-project/milestone/2

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-31 Thread David Truby via cfe-commits
=?utf-8?q?Iñaki?= Amatria Barral Message-ID: In-Reply-To: @@ -863,6 +863,12 @@ static void parsePreprocessorArgs(Fortran::frontend::PreprocessorOptions &opts, (currentArg->getOption().matches(clang::driver::options::OPT_cpp)) ? PPMacrosFlag::Include

[clang] [CIR] Upstream support for promoted types with unary plus/minus (PR #133829)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes The initial upstreaming of unary operations left promoted types unhandled for the unary plus and minus operators. This change implements support for promoted types and performs a bit of related code cleanu

[clang] [CIR] Generate the nsw flag correctly for unary ops (PR #133815)

2025-03-31 Thread Andy Kaylor via cfe-commits
andykaylor wrote: @mmha https://github.com/llvm/llvm-project/pull/133815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for promoted types with unary plus/minus (PR #133829)

2025-03-31 Thread Andy Kaylor via cfe-commits
andykaylor wrote: @mmha https://github.com/llvm/llvm-project/pull/133829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for promoted types with unary plus/minus (PR #133829)

2025-03-31 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/133829 The initial upstreaming of unary operations left promoted types unhandled for the unary plus and minus operators. This change implements support for promoted types and performs a bit of related code cleanup.

[clang] [clang][deps] Do check for relocated modules (PR #133827)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes This essentially reverts commit 227f71995804 (https://reviews.llvm.org/D150320). The original change to disable checking for relocated modules was built on the assumption that the file system is immutabl

[clang] Hlsl dst function (PR #133828)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: None (metkarpoonam) Changes Implement dst algorithm in the hlsl_intrinsics.h and added test cases for HLSL codegen and sema fixes: https://github.com/llvm/llvm-project/issues/99108 --- Full diff: https://github.com/llvm/llvm-project

[clang] [clang][deps] Do check for relocated modules (PR #133827)

2025-03-31 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/133827 This essentially reverts commit 227f71995804 (https://reviews.llvm.org/D150320). The original change to disable checking for relocated modules was built on the assumption that the file system is immutable

[clang] [Clang] Introduce '--offload-targets=' to generically target toolchains (PR #125556)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Hi @jhuber6 Just a quick ping to check if this PR is still alive. I can take a look if it is. Thanks https://github.com/llvm/llvm-project/pull/125556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [Clang] Disable RTTI for offloading at the frontend level (PR #127082)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
@@ -7117,6 +7117,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } } + // The offloading devices do not support RTTI. asudarsa wrote: I see that IsHIPDevice has been added to the check here (compared to what was deleted inside Cod

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-31 Thread Oliver Hunt via cfe-commits
@@ -7353,6 +7354,69 @@ void Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) { else if (Record->hasAttr()) checkCUDADeviceBuiltinTextureClassTemplate(*this, Record); } + + llvm::SmallVector TypeAwareNewDecls; + llvm::SmallVector TypeAwareDeleteDecls;

[clang] [clang] Fix crash on invalid `std::initializer_list` template-id (PR #132284)

2025-03-31 Thread via cfe-commits
@@ -12182,10 +12182,14 @@ QualType Sema::BuildStdInitializerList(QualType Element, SourceLocation Loc) { Args.addArgument(TemplateArgumentLoc(TemplateArgument(Element), Context.getTrivialTypeSourceInfo(Element,

[clang] [clang] Check `std::initializer_list` more strictly (PR #133822)

2025-03-31 Thread via cfe-commits
https://github.com/offsetof created https://github.com/llvm/llvm-project/pull/133822 Require `std::initializer_list` to be a class template with a template-head equivalent to `template` and no default arguments. >From b5798e04281fb6d9475a1ae6af8b94bc0ed85a43 Mon Sep 17 00:00:00 2001 From: offs

[clang] [Clang][Cmake] fix libtool duplicate member name warnings (PR #133619)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `polly-x86_64-linux-shared-plugin` running on `polly-x86_64-gce2` while building `clang` at step 4 "cmake-configure". Full details are available at: https://lab.llvm.org/buildbot/#/builders/118/builds/5516 Here is the releva

[clang] [alpha.webkit.NoUnretainedMemberChecker] Ignore system-header-defined ivar / property of a forward declared type (PR #133755)

2025-03-31 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/133755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][SPIR-V] Fix convergence tokens for dtor (PR #133469)

2025-03-31 Thread Steven Perron via cfe-commits
https://github.com/s-perron approved this pull request. https://github.com/llvm/llvm-project/pull/133469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-sycl-linker] Replace llvm-link with API calls (PR #133797)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/133797 >From 675595e453b2452e49847ba3b949909367c7942a Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Mon, 31 Mar 2025 13:04:47 -0700 Subject: [PATCH 1/2] [clang-sycl-linker] Replace llvm-link with API calls T

[clang] [CIR] Generate the nsw flag correctly for unary ops (PR #133815)

2025-03-31 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/133815 A previous checkin used a workaround to generate the nsw flag where needed for unary ops. This change upstreams a subsequent change that was made in the incubator to generate the flag correctly. >From a96e0

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

2025-03-31 Thread Tom Honermann via cfe-commits
tahonermann wrote: @Fznamznon, @frasercrmck, any further review feedback? @erichkeane, would you like to weigh in on this change before it lands? https://github.com/llvm/llvm-project/pull/133030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-sycl-linker] Replace llvm-link with API calls (PR #133797)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: @jhuber6 Can you please take a look? This is one of the many changes we are making to upstream SYCL. Thanks https://github.com/llvm/llvm-project/pull/133797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-03-31 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,212 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -std=c99 -Wno-dangling -emit-llvm -o - %s | FileCheck %s --check-prefix=C99 +// RUN: %clang_cc1 -std=c11 -Wno-dangling -emit-llvm -o - %s |

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-03-31 Thread James Y Knight via cfe-commits
jyknight wrote: - In C89: it's impossible to get the address of a temporary struct, so the lifetime is irrelevant. - In C99: you now can get the address (from an array subobject), but the lifetime was defined as "until the next sequence point". This made it technically illegal to access even n

[clang] [llvm] Revert "[HLSL][RootSignature] Implement parsing of a DescriptorTable with empty clauses" (PR #133790)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vls` running on `linaro-g3-03` while building `clang,llvm` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/143/builds/6581 Here is the relevant piece of th

[clang] [clang-sycl-linker] Replace llvm-link with API calls (PR #133797)

2025-03-31 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: > Shouldn't we be able to just use LTO after the SPIR-V backend left > experimental? Hi @jhuber6 Thanks for the ping back. That is the eventual path for us. However, we would like to do it in stages. Replacing llvm-link tool with linkInModule call helps us to achieve one of

[clang] [Clang] add emit -Wignored-base-class-qualifiers diagnostic for cv-qualified base classes (PR #132116)

2025-03-31 Thread Lyle Dean via cfe-commits
lyledean1 wrote: Thanks for the review @AaronBallman , I've updated the PR from your comments and the CI has passed - is this good to merge now? https://github.com/llvm/llvm-project/pull/132116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Add warning message for C++17 alias template CTAD (PR #133806)

2025-03-31 Thread via cfe-commits
https://github.com/GeorgeKA updated https://github.com/llvm/llvm-project/pull/133806 >From dd978982b2ab41d3d2a55abb448e653a80158ecd Mon Sep 17 00:00:00 2001 From: George Asante Date: Mon, 31 Mar 2025 17:41:20 -0400 Subject: [PATCH 1/2] Add warning message for C++17 alias template CTAD --- cla

[clang] [alpha.webkit.NoUnretainedMemberChecker] Ignore system-header-defined ivar / property of a forward declared type (PR #133755)

2025-03-31 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the quick review! https://github.com/llvm/llvm-project/pull/133755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-31 Thread marius doerner via cfe-commits
@@ -1646,7 +1646,6 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // Set up the return result. Tok.setIdentifierInfo(nullptr); - Tok.clearFlag(Token::NeedsCleaning); mariusdr wrote: True, my bad. If the flag is removed we can get asserts on __DAT

[clang] [llvm] [HLSL][RootSignature] Implement parsing of a DescriptorTable with empty clauses (PR #133302)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-linux-multistage` running on `ppc64le-clang-multistage-test` while building `clang,llvm` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/8327 Here i

[clang] [alpha.webkit.ForwardDeclChecker] Ignore forward declared struct. (PR #133804)

2025-03-31 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/133804 >From f5d2ab90f34cf2d7323e9c3c2e37680c35f411d6 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 31 Mar 2025 14:38:22 -0700 Subject: [PATCH 1/3] [alpha.webkit.ForwardDeclChecker] Ignore forward declared stru

  1   2   3   4   >