[clang] Fix extra parenthesis in diagnostic (PR #122055)

2025-01-08 Thread via cfe-commits
https://github.com/hstk30-hw closed https://github.com/llvm/llvm-project/pull/122055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix extra parenthesis in diagnostic (PR #122055)

2025-01-08 Thread via cfe-commits
https://github.com/hstk30-hw approved this pull request. https://github.com/llvm/llvm-project/pull/122055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] de67ca1 - Fix extra parenthesis in diagnostic (#122055)

2025-01-08 Thread via cfe-commits
Author: Hubert Tong Date: 2025-01-08T16:00:15+08:00 New Revision: de67ca12183787414869f8426a3bb65a6615e945 URL: https://github.com/llvm/llvm-project/commit/de67ca12183787414869f8426a3bb65a6615e945 DIFF: https://github.com/llvm/llvm-project/commit/de67ca12183787414869f8426a3bb65a6615e945.diff L

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-08 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -1228,35 +1228,45 @@ bool Sema::AttachTypeConstraint(AutoTypeLoc TL, NonTypeTemplateParmDecl *NewConstrainedParm, NonTypeTemplateParmDecl *OrigConstrainedParm, SourceLocation Elli

[clang] [X86] Return illegal vectors in memory (PR #121944)

2025-01-08 Thread Phoebe Wang via cfe-commits
phoebewang wrote: This is a long existing problem and LLVM community doesn't make consensus about it, see https://reviews.llvm.org/D53919 My point is the case of returning illegal vectors is not well defined by psABI, and we have already warned this case in frontend. Considering the backward

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-08 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb edited https://github.com/llvm/llvm-project/pull/122029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-08 Thread Boaz Brickner via cfe-commits
@@ -3115,7 +3115,19 @@ class FieldDecl : public DeclaratorDecl, public Mergeable { /// Returns the index of this field within its record, /// as appropriate for passing to ASTRecordLayout::getFieldOffset. - unsigned getFieldIndex() const; + unsigned getFieldIndex() cons

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-08 Thread Boaz Brickner via cfe-commits
@@ -3115,7 +3115,19 @@ class FieldDecl : public DeclaratorDecl, public Mergeable { /// Returns the index of this field within its record, /// as appropriate for passing to ASTRecordLayout::getFieldOffset. - unsigned getFieldIndex() const; + unsigned getFieldIndex() cons

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-08 Thread Boaz Brickner via cfe-commits
@@ -3115,7 +3115,19 @@ class FieldDecl : public DeclaratorDecl, public Mergeable { /// Returns the index of this field within its record, /// as appropriate for passing to ASTRecordLayout::getFieldOffset. - unsigned getFieldIndex() const; + unsigned getFieldIndex() cons

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-08 Thread Boaz Brickner via cfe-commits
@@ -3115,7 +3115,19 @@ class FieldDecl : public DeclaratorDecl, public Mergeable { /// Returns the index of this field within its record, /// as appropriate for passing to ASTRecordLayout::getFieldOffset. - unsigned getFieldIndex() const; + unsigned getFieldIndex() cons

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-08 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb approved this pull request. https://github.com/llvm/llvm-project/pull/122029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use range-based for to iterate over fields in record layout, NFC (PR #122029)

2025-01-08 Thread Boaz Brickner via cfe-commits
bricknerb wrote: Thanks for doing this! FWIW, I think splitting this to smaller PRs would be easier. For example: 1. `getFieldIndex()` inlining. 2. Passing fields instead of their indexes and iterate over fields. 3. Use `std::next()` instead of defining a `Next` variable. 4. Rename `isNoUniqueAdd

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-08 Thread Younan Zhang via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -1228,35 +1228,45 @@ bool Sema::AttachTypeConstraint(AutoTypeLoc TL, NonTypeTemplateParmDecl *NewConstrainedParm,

[clang-tools-extra] [clang-tidy] fix false positives when using name-independent variables after C++26 for bugprone-unused-local-non-trivial-variable (PR #121783)

2025-01-08 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/121783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #122035)

2025-01-08 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` > running on `fuchsia-debian-64-us-central1-a-1` while building `clang,llvm` at > step 4 "annotate". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/11/builds/10651 > >

[clang] [llvm] [Arm] Regenerate tests (NFC) (PR #121801)

2025-01-08 Thread David Green via cfe-commits
davemgreen wrote: sroa would be ideal if it works, I know a number of test cases use it and it shouldn't update too often. https://github.com/llvm/llvm-project/pull/121801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [Clang] Don't form a type constraint if the concept is invalid (PR #122065)

2025-01-08 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/122065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
@@ -938,6 +938,37 @@ struct CounterCoverageMappingBuilder return Counter::getCounter(CounterMap[S]); } + struct BranchCounterPair { chapuni wrote: `BranchCounterPair` is a local type and only `getBranchCounterPair()` emits it for now. I think it'd be

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112702 >From fc697f04fd6c9f3c217ce04e3f1dd082c1f1a705 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 16 Oct 2024 23:16:53 +0900 Subject: [PATCH 01/11] [Coverage] Introduce `getBranchCounterPair()`. NFC. Thi

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
@@ -939,8 +939,17 @@ struct CounterCoverageMappingBuilder Counter Skipped; }; - BranchCounterPair getBranchCounterPair(const Stmt *S, Counter ParentCnt) { + BranchCounterPair + getBranchCounterPair(const Stmt *S, Counter ParentCnt, + std::optiona

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
@@ -939,8 +939,17 @@ struct CounterCoverageMappingBuilder Counter Skipped; }; - BranchCounterPair getBranchCounterPair(const Stmt *S, Counter ParentCnt) { + BranchCounterPair + getBranchCounterPair(const Stmt *S, Counter ParentCnt, + std::optiona

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
@@ -938,6 +938,37 @@ struct CounterCoverageMappingBuilder return Counter::getCounter(CounterMap[S]); } + struct BranchCounterPair { +Counter Executed; +Counter Skipped; + }; + + BranchCounterPair getBranchCounterPair(const Stmt *S, Counter ParentCnt) { ---

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
@@ -939,8 +939,17 @@ struct CounterCoverageMappingBuilder Counter Skipped; }; - BranchCounterPair getBranchCounterPair(const Stmt *S, Counter ParentCnt) { + BranchCounterPair + getBranchCounterPair(const Stmt *S, Counter ParentCnt, + std::optiona

[clang] [Driver][SPIR-V] Use consistent tools to convert between text and binary form (PR #120266)

2025-01-08 Thread Sven van Haastregt via cfe-commits
https://github.com/svenvh requested changes to this pull request. Thanks for drawing this to my attention! The output produced by llvm-spirv's `-to-text` is an internal textual format, intended for testing llvm-spirv only (@MrSidims please correct me if I'm wrong). I don't think we should be

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2025-01-08 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx commented: > In this case I think just using the hardcoded 0 is less wrong than using the > "LangAS::Default". This just happens to work out correctly for the OpenCL 1.x > hack on amdgpu I don't have a strong preference / that makes sense-ish but I was actually le

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2025-01-08 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/114062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Refine the temporay object member access filtering for GSL pointer (PR #122088)

2025-01-08 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/122088 We currently have ad-hoc filtering logic for temporary object member access in `VisitGSLPointerArg`. This logic filters out more cases than it should, leading to false negatives. Furthermore, this location lacks

[clang] [clang] Refine the temporay object member access filtering for GSL pointer (PR #122088)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes We currently have ad-hoc filtering logic for temporary object member access in `VisitGSLPointerArg`. This logic filters out more cases than it should, leading to false negatives. Furthermore, this location lack

[clang] [llvm] [HLSL] Add SPIR-V version of getPointer. (PR #121963)

2025-01-08 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts approved this pull request. Maybe the renaming shall be done in another PR for both DXIL and SPV, but if it's a small change, might want to do it now no? https://github.com/llvm/llvm-project/pull/121963 ___ cfe-commits maili

[clang] [llvm] [HLSL] Add SPIR-V version of getPointer. (PR #121963)

2025-01-08 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts edited https://github.com/llvm/llvm-project/pull/121963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add SPIR-V version of getPointer. (PR #121963)

2025-01-08 Thread Nathan Gauër via cfe-commits
@@ -118,6 +118,10 @@ let TargetPrefix = "spv" in { : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_any_ty, llvm_i8_ty], [IntrInaccessibleMemOrArgMemOnly]>; + def int_spv_resource_getpointer Keenuts wrote: Shall it be `int_spv

[clang] [Clang] Don't form a type constraint if the concept is invalid (PR #122065)

2025-01-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/122065 >From 312776183068b84ddfea38ea7158c44c1926160a Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 8 Jan 2025 15:40:23 +0800 Subject: [PATCH 1/2] [Clang] Don't form a type constraint if the concept is invali

[clang] [clang] constexpr atomic builtins (__c11_atomic_OP and __atomic_OP) (PR #98756)

2025-01-08 Thread Hana Dusíková via cfe-commits
@@ -1921,6 +1921,22 @@ static bool EvaluateFixedPointOrInteger(const Expr *E, APFixedPoint &Result, static bool EvaluateFixedPoint(const Expr *E, APFixedPoint &Result, EvalInfo &Info); +/// Support for atomic builtins +static bool EvaluateAtomic

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-08 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/121921 >From 785c6eca701edbd42686a4adaa2099b55b5271a0 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 7 Jan 2025 11:37:32 + Subject: [PATCH 1/4] [FMV][AArch64] Simplify version selection according

[clang] [clang] constexpr atomic builtins (__c11_atomic_OP and __atomic_OP) (PR #98756)

2025-01-08 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/98756 From 7d65b133b5f04e078b3b26cee2b4be0fe78d01e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Mon, 6 Jan 2025 21:06:10 +0100 Subject: [PATCH 1/2] [clang] implement P3309 atomic bui

[clang] [Driver][SPIR-V] Use consistent tools to convert between text and binary form (PR #120266)

2025-01-08 Thread Dmitry Sidorov via cfe-commits
MrSidims wrote: I agree with Sven. We mustn't reuse llvm-spirv's tests format in other repositories. https://github.com/llvm/llvm-project/pull/120266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang][bytecode] Implement __builtin_constant_p differently (PR #122099)

2025-01-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/122099 See the comment at the beginning of `InterpBuiltinConstantP.h` for an explanation. >From 7fe5944ed5f072c0e74202fd01aa65d87aea3787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 7 Jan

[clang] [clang][bytecode] Implement __builtin_constant_p differently (PR #122099)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes See the comment at the beginning of `InterpBuiltinConstantP.h` for an explanation. --- Full diff: https://github.com/llvm/llvm-project/pull/122099.diff 10 Files Affected: - (modified) clang/lib/AST/ByteCo

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2025-01-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/117732 >From 953ee08b6e8ae9c0b16916e7f31cb9d2f3d5dd8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 27 Nov 2024 08:54:51 +0100 Subject: [PATCH] Save FieldDecl BitWidth as a ConstantExpr ---

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2025-01-08 Thread Timm Baeder via cfe-commits
tbaederr wrote: Python binding tests fail for unrelated reasons: ``` curl: (23) Failure writing output to destination Error: Restoring cache failed: Error: The process '/usr/bin/sh' failed with exit code 2 ``` https://github.com/llvm/llvm-project/pull/117732

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/121789 >From 596d1346eb806e4c276042e50cca7514d3335f54 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Mon, 6 Jan 2025 13:39:55 + Subject: [PATCH 1/2] [Clang] Add __builtin_assume_dereferenceable to encode deref as

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Florian Hahn via cfe-commits
@@ -2761,6 +2761,41 @@ etc.). Query for this feature with ``__has_builtin(__builtin_assume_separate_storage)``. +``__builtin_assume_dereferenceable`` +- + +``__builtin_assume_derefernceable`` is used to provide the optimizer with the +know

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Florian Hahn via cfe-commits
@@ -3726,6 +3726,16 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, AlignmentCI, OffsetValue); return RValue::get(PtrValue); } + case Builtin::BI__builtin_assume_dereferenceable: { +const Expr *Ptr = E-

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Florian Hahn via cfe-commits
@@ -839,6 +839,12 @@ def BuiltinAssumeAligned : Builtin { let Prototype = "void*(void const*, size_t, ...)"; } +def BuiltinAssumeDereferenceable : Builtin { + let Spellings = ["__builtin_assume_dereferenceable"]; + let Attributes = [NoThrow, Const, Constexpr];

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Florian Hahn via cfe-commits
@@ -2761,6 +2761,41 @@ etc.). Query for this feature with ``__has_builtin(__builtin_assume_separate_storage)``. +``__builtin_assume_dereferenceable`` +- + +``__builtin_assume_derefernceable`` is used to provide the optimizer with the +know

[clang] [clang] Emit @llvm.assume before streaming_compatible functions when the streaming mode is known (PR #121917)

2025-01-08 Thread Sander de Smalen via cfe-commits
sdesmalen-arm wrote: @efriedma-quic a motivating example is https://godbolt.org/z/aW9zTrdf9 With @NickGuy-Arm's patch, this would compile to: ``` _Z1xv: rdvlx0, #1 ret _Z1yv: rdsvl x0, #1 ret ``` https://github.com/llvm/llvm-project/pull/121917 ___

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 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 32bc029be6265838833623fdd88cc665d5658dc7 0711638af02e7680d35ac7647e96e5778e921320 --e

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2025-01-08 Thread via cfe-commits
cor3ntin wrote: > @cor3ntin Do we need to revert it for now? I'd like us to figure out if it's a conformance issue first - but bearing resolution we should revert before end of week imo https://github.com/llvm/llvm-project/pull/102857 ___ cfe-commit

[clang] [clang] Infer capture_by for insert_or_assign (PR #122109)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Utkarsh Saxena (usx95) Changes Useful for maps: https://en.cppreference.com/w/cpp/container/map/insert_or_assign --- Full diff: https://github.com/llvm/llvm-project/pull/122109.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaA

[clang] [clang] Infer capture_by for insert_or_assign (PR #122109)

2025-01-08 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/122109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2025-01-08 Thread via cfe-commits
cor3ntin wrote: > > We've started seeing libc++ test failures in the Fuchsia toolchain > > buildbots for Windows > > We're hitting the same error in Chromium builds. Here is a stand-alone > reproducer: https://crbug.com/388428503#comment4 Thanks. @Endilll is working on a reduction, so that we

[clang] [OpenMP] [Debug] Debug support for work sharing iterator variable (PR #122047)

2025-01-08 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: Maybe it fixes debug info, but definitely breaks some of the OpenMP support https://github.com/llvm/llvm-project/pull/122047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] Revert "[Clang] Implement CWG2369 "Ordering between constraints and substitution"" (PR #122130)

2025-01-08 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. :cry: https://github.com/llvm/llvm-project/pull/122130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add QtEnabled option to modernize-use-integer-sign-comprison (PR #122127)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: None (qt-tatiana) Changes - add an option ``QtEnabled``, that makes C++17 ``q20::cmp_*`` alternative available for Qt-based applications. --- Full diff: https://github.com/llvm/llvm-project/pull

[clang-tools-extra] [clang-tidy] Add QtEnabled option to modernize-use-integer-sign-comprison (PR #122127)

2025-01-08 Thread via cfe-commits
https://github.com/qt-tatiana ready_for_review https://github.com/llvm/llvm-project/pull/122127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add SPIR-V version of getPointer. (PR #121963)

2025-01-08 Thread Steven Perron via cfe-commits
https://github.com/s-perron reopened https://github.com/llvm/llvm-project/pull/121963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix overriding of constexpr virtual function (PR #121986)

2025-01-08 Thread Yaxun Liu via cfe-commits
@@ -1309,6 +1309,16 @@ Sema::CheckOverload(Scope *S, FunctionDecl *New, const LookupResult &Old, return Ovl_Overload; } +template static bool hasExplicitAttr(const FunctionDecl *D) { + if (!D) +return false; + if (auto *A = D->getAttr()) +return !A->isImplicit();

[clang] 92e575d - [HLSL] Add SPIR-V version of getPointer. (#121963)

2025-01-08 Thread via cfe-commits
Author: Steven Perron Date: 2025-01-08T10:51:17-05:00 New Revision: 92e575d7e44b0230a27cfb8f6f2e2e3367b19967 URL: https://github.com/llvm/llvm-project/commit/92e575d7e44b0230a27cfb8f6f2e2e3367b19967 DIFF: https://github.com/llvm/llvm-project/commit/92e575d7e44b0230a27cfb8f6f2e2e3367b19967.diff

[clang] [llvm] [HLSL] Add SPIR-V version of getPointer. (PR #121963)

2025-01-08 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/121963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Thanks, this is awesome! A non-constant version would be even more so :) https://github.com/llvm/llvm-project/pull/121789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Erich Keane via cfe-commits
@@ -839,6 +839,12 @@ def BuiltinAssumeAligned : Builtin { let Prototype = "void*(void const*, size_t, ...)"; } +def BuiltinAssumeDereferenceable : Builtin { + let Spellings = ["__builtin_assume_dereferenceable"]; + let Attributes = [NoThrow, Const, Constexpr];

[clang] [clang] Propagate -ftime-report to offload lto (PR #122143)

2025-01-08 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/122143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 35c5e56 - Clean up -Wdangling-assignment-gsl in clang and mlir

2025-01-08 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2025-01-08T14:46:15+01:00 New Revision: 35c5e56b6113b468b521c071ac141b4bb94da1d7 URL: https://github.com/llvm/llvm-project/commit/35c5e56b6113b468b521c071ac141b4bb94da1d7 DIFF: https://github.com/llvm/llvm-project/commit/35c5e56b6113b468b521c071ac141b4bb94da1d7.dif

[clang] [OpenMP] Change default version to OMP6.0. (PR #122108)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Zahira Ammarguellat (zahiraam) Changes In https://github.com/llvm/llvm-project/pull/119891 we are introducing the support for `#pragma omp stripe` which is an OMP6.0 feature (see https://github.com/llvm/llvm-project/pull/119891/files#r189

[clang] [OpenMP] Change default version to OMP6.0. (PR #122108)

2025-01-08 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam ready_for_review https://github.com/llvm/llvm-project/pull/122108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Change default version to OMP6.0. (PR #122108)

2025-01-08 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam converted_to_draft https://github.com/llvm/llvm-project/pull/122108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

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

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2025-01-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang-tools-extra,clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/9471 Here is the relevant pie

[clang] [OpenMP] Change default version to OMP6.0. (PR #122108)

2025-01-08 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: Not sure this level of support is enough to make 6.0 the default version. We're missing support for some 5.2 features still https://github.com/llvm/llvm-project/pull/122108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 1 more question on the semantics + a typo, but the code LGTM. https://github.com/llvm/llvm-project/pull/121789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-08 Thread Erich Keane via cfe-commits
@@ -2761,6 +2761,41 @@ etc.). Query for this feature with ``__has_builtin(__builtin_assume_separate_storage)``. +``__builtin_assume_dereferenceable`` +- + +``__builtin_assume_derefernceable`` is used to provide the optimizer with the -

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2025-01-08 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-tools-extra,clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/10743 Here is the rel

[clang] [llvm] [HLSL] Add SPIR-V version of getPointer. (PR #121963)

2025-01-08 Thread Steven Perron via cfe-commits
@@ -118,6 +118,10 @@ let TargetPrefix = "spv" in { : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_any_ty, llvm_i8_ty], [IntrInaccessibleMemOrArgMemOnly]>; + def int_spv_resource_getpointer s-perron wrote: That proposal is st

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-01-08 Thread Dan Liew via cfe-commits
@@ -19,13 +19,12 @@ struct on_member_pointer_complete_ty { }; struct on_member_pointer_incomplete_ty { - struct size_unknown * buf __counted_by(count); // expected-error{{'counted_by' cannot be applied to a pointer with pointee of unknown size because 'struct size_unknown'

[clang] [llvm] [HLSL] Add SPIR-V version of getPointer. (PR #121963)

2025-01-08 Thread Steven Perron via cfe-commits
@@ -118,6 +118,10 @@ let TargetPrefix = "spv" in { : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_any_ty, llvm_i8_ty], [IntrInaccessibleMemOrArgMemOnly]>; + def int_spv_resource_getpointer s-perron wrote: Also, the current n

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-01-08 Thread Dan Liew via cfe-commits
@@ -0,0 +1,584 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fexperimental-late-parse-attributes -fsyntax-only -verify %s + +#define __counted_by(f) __attribute__((counted_by(f))) + +// =

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2025-01-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang-tools-extra,clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/13647 Here is the relevant pi

[clang] [clang] constexpr atomic builtins (__c11_atomic_OP and __atomic_OP) (PR #98756)

2025-01-08 Thread Aaron Ballman via cfe-commits
Hana =?utf-8?q?Dusíková?= , Hana =?utf-8?q?Dusíková?= Message-ID: In-Reply-To: @@ -17893,4 +18005,425 @@ std::optional EvaluateBuiltinIsWithinLifetime(IntExprEvaluator &IEE, IsWithinLifetimeHandler handler{Info}; return findSubobject(Info, E, CO, Val.getLValueDesigna

[clang] [clang] constexpr atomic builtins (__c11_atomic_OP and __atomic_OP) (PR #98756)

2025-01-08 Thread Aaron Ballman via cfe-commits
Hana =?utf-8?q?Dusíková?= , Hana =?utf-8?q?Dusíková?= Message-ID: In-Reply-To: https://github.com/AaronBallman commented: Thank you for working on this! Please be sure to also add release notes to `clang/docs/ReleaseNotes.rst` so users know about the new functionality. Also, this should

[clang] b66f6b2 - Revert #116331 & #121852 (#122105)

2025-01-08 Thread via cfe-commits
Author: Chris B Date: 2025-01-08T08:55:02-06:00 New Revision: b66f6b25cb5107d4c8f78d13b08d2bdba39ad919 URL: https://github.com/llvm/llvm-project/commit/b66f6b25cb5107d4c8f78d13b08d2bdba39ad919 DIFF: https://github.com/llvm/llvm-project/commit/b66f6b25cb5107d4c8f78d13b08d2bdba39ad919.diff LOG:

[clang] [llvm] Revert #116331 & #121852 (PR #122105)

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

[clang] [llvm] [Arm] Generate explicit bitcasts in NeonEmitter (PR #121802)

2025-01-08 Thread Momchil Velikov via cfe-commits
@@ -1382,14 +1382,15 @@ void Intrinsic::emitBodyAsBuiltinCall() { Type CastToType = T; // Check if an explicit cast is needed. -if (CastToType.isVector() && -(LocalCK == ClassB || (T.isHalf() && !T.isScalarForMangling( { - CastToType.makeInteger(8,

[clang] [CUDA][HIP] Fix overriding of constexpr virtual function (PR #121986)

2025-01-08 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/121986 >From ae55b59e9e7d944b02ce0059f879718fd733c301 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Tue, 7 Jan 2025 13:52:09 -0500 Subject: [PATCH] [CUDA][HIP] Fix overriding of constexpr virtual function In

[clang] [OpenMP] Allow GPUs to be targeted directly via `-fopenmp`. (PR #122149)

2025-01-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/122149 >From 3329b7ae7dc6044f6563f218c65f6af7498290f0 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 8 Jan 2025 12:19:53 -0600 Subject: [PATCH] [OpenMP] Allow GPUs to be targeted directly via `-fopenmp`. Summa

[clang] [OpenMP] Allow GPUs to be targeted directly via `-fopenmp`. (PR #122149)

2025-01-08 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > What code generation path would be used in this case? The GPU code generation > or regular host OpenMP? gpu device code https://github.com/llvm/llvm-project/pull/122149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [test][Driver][clang] Fix darwin-embedded-search-paths.c when CLANG_DEFAULT_CXX_STDLIB is libc++ (PR #122145)

2025-01-08 Thread Ian Anderson via cfe-commits
@@ -1,3 +1,4 @@ +// REQUIRES: default-cxx-stdlib=libstdc++ ian-twilightcoder wrote: I guess if there was a different cxxlib we would want another version of the test to check its paths anyway https://github.com/llvm/llvm-project/pull/122145

[clang] [Driver][UEFI] Enable Microsoft extensions (PR #121875)

2025-01-08 Thread Tristan Ross via cfe-commits
RossComputerGuy wrote: > @RossComputerGuy FYI Already have seen this, I'm not sure I understand what the flag does exactly. I've got LLVM libc PR subscriptions so I'll see any future PR's. https://github.com/llvm/llvm-project/pull/121875 ___ cfe-comm

[clang] [test][Driver][clang] Fix darwin-embedded-search-paths.c when CLANG_DEFAULT_CXX_STDLIB is libc++ (PR #122145)

2025-01-08 Thread Jon Roelofs via cfe-commits
@@ -1,3 +1,4 @@ +// REQUIRES: default-cxx-stdlib=libstdc++ jroelofs wrote: I think it's fine. I'm not sure `REQUIRES` has a `!=` https://github.com/llvm/llvm-project/pull/122145 ___ cfe-commits mailing list cfe-commits

[clang] [OpenMP] Allow GPUs to be targeted directly via `-fopenmp`. (PR #122149)

2025-01-08 Thread Shilei Tian via cfe-commits
shiltian wrote: I don't think it should be GPU code generation path as there is no explicit `target` region used. https://github.com/llvm/llvm-project/pull/122149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [OpenMP] Allow GPUs to be targeted directly via `-fopenmp`. (PR #122149)

2025-01-08 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I don't think it should be GPU code generation path as there is no explicit > `target` region used. it needs to be, otherwise the code generation for things like `#pragma omp parallel` will be wrong. The way I see it, the DeviceRTL is `libomp.a` for the GPU target, so we need

[libunwind] [libunwind][cmake] Compile _Unwind* routines with -fexceptions (PR #121819)

2025-01-08 Thread Alex Rønne Petersen via cfe-commits
alexrp wrote: > > I wonder if it would be less bug-prone in the long term to just build the > > whole library with `-fexceptions` instead of trying to apply `-fexceptions` > > to _just_ the right files at this point in time. Feels like a brittle > > optimization for not much gain? > > This wi

[clang] [OpenMP] Allow GPUs to be targeted directly via `-fopenmp`. (PR #122149)

2025-01-08 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > ~I don't think it should be GPU code generation path as there is no explicit > `target` region used.~ Probably I missed something here. Do you expect > regular OpenMP stuff such as `parallel` region to be emitted in the same way > as offloading code? Yes, the example in the d

[clang] 8e65940 - [FMV][AArch64] Simplify version selection according to ACLE. (#121921)

2025-01-08 Thread via cfe-commits
Author: Alexandros Lamprineas Date: 2025-01-08T18:59:07Z New Revision: 8e65940161cd5a7dea5896fe4ae057d4cc07c703 URL: https://github.com/llvm/llvm-project/commit/8e65940161cd5a7dea5896fe4ae057d4cc07c703 DIFF: https://github.com/llvm/llvm-project/commit/8e65940161cd5a7dea5896fe4ae057d4cc07c703.di

[clang] [clang] [ARM] Explicitly enable NEON for Windows/Darwin targets (PR #122095)

2025-01-08 Thread Dan Albert via cfe-commits
DanAlbert wrote: It's over 4 years old so unfortunately I'm probably not much help beyond what's already written on the old review/commit. At the time we were still using GAS though, so perhaps that made it more meaningful? If vfpv3 was already the default FPU for armv7 at the time then it's p

[clang] [flang] [Flang][Driver] Add a flag to control zero initialization of global v… (PR #122144)

2025-01-08 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: > Is the name of the flag alrite? Haha. You read my mind. I spent some time thinking about it and even consulted the Fortran standard. They refer to default initialization as well, so I eventually decided that it was ok. Maybe `-fno-init-global-without-default-init` is clea

[clang] [Clang] disallow attributes after namespace identifier (PR #121614)

2025-01-08 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/121614 >From b8f6ffc0a98a0d3ac55fba4e6ee680f1edea4571 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 4 Jan 2025 02:24:26 +0200 Subject: [PATCH 1/4] [Clang] disallow attributes after namespace identifier ---

[clang] [flang] [Flang][Driver] Add a flag to control zero initialization of global v… (PR #122144)

2025-01-08 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Perhaps leave this up for a bit longer to see if we can think of something better. Or others may have some suggestions https://github.com/llvm/llvm-project/pull/122144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [CUDA][HIP] improve error message for missing cmath (PR #122155)

2025-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes One common error seen in CUDA/HIP compilation is: fatal error: 'cmath' file not found which is due to inproper installation of standard C++ libraries. Since it happens w

[clang] [CUDA][HIP] improve error message for missing cmath (PR #122155)

2025-01-08 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/122155 One common error seen in CUDA/HIP compilation is: fatal error: 'cmath' file not found which is due to inproper installation of standard C++ libraries. Since it happens with #include_next, users may feel confu

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes with test fixes (PR #122157)

2025-01-08 Thread via cfe-commits
https://github.com/joaosaffran created https://github.com/llvm/llvm-project/pull/122157 - Adding the changes from PRs: - #116331 - #121852 - Fixes test `tools/dxil-dis/debug-info.ll` - Address some missed comments in the previous PR >From 636802e324be5b51a96b88b0e72a03ab6fa051c5 Mon Sep

  1   2   3   4   5   6   >