[clang] [OpenCL] Fix an infinite loop in builidng AddrSpaceQualType (PR #92612)

2024-05-18 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,25 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +//RUN: %clang_cc1 %s -emit-llvm -O1 -o - | FileCheck %s arsenm wrote: codegen tests need an explicit target https://github.com/llvm/llvm-proj

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-18 Thread Dan Liew via cfe-commits
delcypher wrote: Ok. Now I see what's happening. These lines here are basically giving ownership of `LateParsedAttribute` to the `LateParsedAttrList` ``` // Handle attributes with arguments that require late parsing. LateParsedAttribute *LA = new LateParsedAttribute(this,

[clang] [clang][ThreadSafety] Skip past implicit cast in `translateAttrExpr` (PR #92277)

2024-05-18 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/92277 >From 2c2e0507e92bdb77a01828f899ff59e44492b537 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 15 May 2024 17:03:02 +0200 Subject: [PATCH] [clang][ThreadSafety] Skip past implicit cast in `t

[clang] 2c2e050 - [clang][ThreadSafety] Skip past implicit cast in `translateAttrExpr`

2024-05-18 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2024-05-18T09:49:10+02:00 New Revision: 2c2e0507e92bdb77a01828f899ff59e44492b537 URL: https://github.com/llvm/llvm-project/commit/2c2e0507e92bdb77a01828f899ff59e44492b537 DIFF: https://github.com/llvm/llvm-project/commit/2c2e0507e92bdb77a01828f899ff59e44492b537.d

[clang] [clang][ThreadSafety] Skip past implicit cast in `translateAttrExpr` (PR #92277)

2024-05-18 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto closed https://github.com/llvm/llvm-project/pull/92277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-05-18 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/86652 >From 90f88bdac3dc40635c58f3f67e29354e6a32896e Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 26 Mar 2024 12:23:24 +0100 Subject: [PATCH] [Clang] Fix __is_array returning true for zero-sized arrays

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-05-18 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/86652 >From 90f88bdac3dc40635c58f3f67e29354e6a32896e Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 26 Mar 2024 12:23:24 +0100 Subject: [PATCH] [Clang] Fix __is_array returning true for zero-sized arrays

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-05-18 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/86652 >From 90f88bdac3dc40635c58f3f67e29354e6a32896e Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 26 Mar 2024 12:23:24 +0100 Subject: [PATCH] [Clang] Fix __is_array returning true for zero-sized arrays

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-18 Thread Vikram Hegde via cfe-commits
@@ -243,11 +243,16 @@ def VOP_READFIRSTLANE : VOPProfile <[i32, i32, untyped, untyped]> { // FIXME: Specify SchedRW for READFIRSTLANE_B32 // TODO: There is VOP3 encoding also def V_READFIRSTLANE_B32 : VOP1_Pseudo <"v_readfirstlane_b32", VOP_READFIRSTLANE, -

[clang] f7b0b99 - [clang][NFC] Further improvements to const-correctness

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-18T12:10:39+03:00 New Revision: f7b0b99c52ee36ed6ca8abcce74a752e483768d6 URL: https://github.com/llvm/llvm-project/commit/f7b0b99c52ee36ed6ca8abcce74a752e483768d6 DIFF: https://github.com/llvm/llvm-project/commit/f7b0b99c52ee36ed6ca8abcce74a752e483768d6.

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-18 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH edited https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedLocalVarsChecker] Detect assignments to uncounted local variable and parameters. (PR #92639)

2024-05-18 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/92639 This PR updates alpha.webkit.UncountedLocalVarsChecker to emit warnings for assignments to uncounted local variable and parameters instead of just the initialization during the declaration. >From 5ae3b193a6ec3617c

[clang] [alpha.webkit.UncountedLocalVarsChecker] Detect assignments to uncounted local variable and parameters. (PR #92639)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes This PR updates alpha.webkit.UncountedLocalVarsChecker to emit warnings for assignments to uncounted local variable and parameters instead of just the initialization during the declaration.

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-18 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH edited https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Remove unneeded multiply in RISCV CodeGenTypes (PR #92644)

2024-05-18 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/92644 The NumVectors other than 1 is handled by the code above. >From 4dbcf6e577d5f1aea0cde72e3a5a7fd73620b2d9 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Sat, 18 May 2024 03:07:43 -0700 Subject: [PATCH] [RISCV]

[clang] [RISCV] Remove unneeded multiply in RISCV CodeGenTypes (PR #92644)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Brandon Wu (4vtomat) Changes The NumVectors other than 1 is handled by the code above. --- Full diff: https://github.com/llvm/llvm-project/pull/92644.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CodeGenTypes.cpp (+1-2)

[clang] [RISCV] Remove unneeded multiply in RISCV CodeGenTypes (PR #92644)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brandon Wu (4vtomat) Changes The NumVectors other than 1 is handled by the code above. --- Full diff: https://github.com/llvm/llvm-project/pull/92644.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CodeGenTypes.cpp (+1-2)

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92645 This patch moves coroutines-specific `Sema` functions into the new `SemaCoroutine` class. This continues previous efforts to split `Sema` up. Additional context can be found in #84184. As usual, in order to help

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines Author: Vlad Serebrennikov (Endilll) Changes This patch moves coroutines-specific `Sema` functions into the new `SemaCoroutine` class. This continues previous efforts to split `Sema` up. Additional context can be found in #84184. As usual, i

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92645 >From 4fe09a3411e54561857d2f9d8c1808cb2728e299 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 18 May 2024 13:33:04 +0300 Subject: [PATCH 1/3] [clang] Introduce `SemaCoroutine` --- clang/include/cl

[clang] [clang] Introduce `SemaPseudoObject` (PR #92646)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92646 This patch moves `Sema` functions that handle pseudo-objects into the new `SemaPseudoObject` class. This continues previous efforts to split `Sema` up. Additional context can be found in #84184. As usual, in ord

[clang] [clang] Introduce `SemaPseudoObject` (PR #92646)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch moves `Sema` functions that handle pseudo-objects into the new `SemaPseudoObject` class. This continues previous efforts to split `Sema` up. Additional context can be found in #84184. As usu

[clang] [llvm] [AArch64] Merge duplicate extension information. (PR #92319)

2024-05-18 Thread Alexandros Lamprineas via cfe-commits
@@ -56,43 +52,64 @@ class Extension< // The FMV priority int FMVPriority = _FMVPriority; + +// Indicates if the extension is available on the command line. +string IsFMVOnly = _IsFMVOnly; } // Some extensions are available for FMV but can not be controlled

[clang] [llvm] [AArch64] Merge duplicate extension information. (PR #92319)

2024-05-18 Thread Alexandros Lamprineas via cfe-commits
@@ -56,43 +52,64 @@ class Extension< // The FMV priority int FMVPriority = _FMVPriority; + +// Indicates if the extension is available on the command line. +string IsFMVOnly = _IsFMVOnly; labrinea wrote: We want the ExtensionInfo field to be o

[clang] [llvm] [AArch64] Merge duplicate extension information. (PR #92319)

2024-05-18 Thread Alexandros Lamprineas via cfe-commits
@@ -94,19 +94,21 @@ static void EmitARMTargetDef(RecordKeeper &RK, raw_ostream &OS) { else OS << ", \"" << Alias << "\""; OS << ", AArch64::" << AEK; -if (AEK == "AEK_NONE") { +auto Name = Rec->getValueAsString("Name"); +if (Name.empty()) { --

[clang] [clang][analyzer] Move checker alpha.security.cert.pos.34c into security.PutenvWithAuto (PR #92424)

2024-05-18 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -2792,6 +2792,31 @@ Warn on mmap() calls that are both writable and executable. // code } +.. _alpha-security-putenv-stack-array: + +alpha.security.PutenvStackArray +""" +Finds calls

[clang] [clang][analyzer] Move checker alpha.security.cert.pos.34c into security.PutenvWithAuto (PR #92424)

2024-05-18 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -2792,6 +2792,31 @@ Warn on mmap() calls that are both writable and executable. // code } +.. _alpha-security-putenv-stack-array: + +alpha.security.PutenvStackArray +""" -

[clang] [clang][analyzer] Move checker alpha.security.cert.pos.34c into security.PutenvWithAuto (PR #92424)

2024-05-18 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/92424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move checker alpha.security.cert.pos.34c into security.PutenvWithAuto (PR #92424)

2024-05-18 Thread Balazs Benics via cfe-commits
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/92424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [Bounds-Safety] Reserve slot in SanitizerHandler enum for Bounds-Safety (PR #91032)

2024-05-18 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka commented: LGTM https://github.com/llvm/llvm-project/pull/91032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread via cfe-commits
cor3ntin wrote: Thanks! However, I am fairly against moving C and C++ features out of Sema, especially when the outcome is 50 Loc kess, at the cost of not knowing where to put or find things in the long term (as we add coroutines adjacent features, or code related to both coroutines and someth

[clang] [clang] Introduce `SemaExceptionSpec` (PR #92653)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch moves `Sema` functions that handle exception specification into the new `SemaExceptionSpec` class. This continues previous efforts to split `Sema` up. Additional context can be found in htt

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: As @erichkeane described it, we're clearing the woods of "core" C++ functionality before dealing with the hard parts, like `SemaDeclCXX.cpp` or `SemaChecking.cpp`. Actual LoC wins are secondary, as they have been all along. https://github.com/llvm/llvm-project/pull/92645 ___

[clang] [clang][AST] Fix end location of DeclarationNameInfo on instantiated methods (PR #92654)

2024-05-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/92654 Fixes #71161 [D64087](https://reviews.llvm.org/D64087) updated some locations of the instantiated method but forgot `DNLoc`. `FunctionDecl::getNameInfo()` constructs a `DeclarationNameInfo` using `Decl::Loc`

[clang] [clang][AST] Fix end location of DeclarationNameInfo on instantiated methods (PR #92654)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balazs Benics (steakhal) Changes Fixes #71161 [D64087](https://reviews.llvm.org/D64087) updated some locations of the instantiated method but forgot `DNLoc`. `FunctionDecl::getNameInfo()` constructs a `DeclarationNameInfo` using `Decl::

[clang] [clang][AST] Fix end location of DeclarationNameInfo on instantiated methods (PR #92654)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: LGTM, but wait for more reviews. https://github.com/llvm/llvm-project/pull/92654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread via cfe-commits
cor3ntin wrote: What is the goal here? there is a lot of code reuse in C++ and C. and having a file per feature is going to make thing worse (maintenance, unboarding, compile times). There are a lot more low-hamging fruits we should do before considering that sort of split. Wasm, AMD, Builtin

[clang] [clang][AST] Fix end location of DeclarationNameInfo on instantiated methods (PR #92654)

2024-05-18 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/92654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix P2564 handling of variable initializers (PR #89565)

2024-05-18 Thread Daniel M. Katz via cfe-commits
katzdm wrote: > @katzdm Does it make sense to file an issue so we don't forget to bring the > warning back? Yep, for sure - I've opened #92656. https://github.com/llvm/llvm-project/pull/89565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > What is the goal here? there is a lot of code reuse in C++ and C. and having > a file per feature is going to make thing worse (maintenance, unboarding, > compile times). Maintenance: one big blob of code which is `Sema` makes it virtually impossible to approach long-standing

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-18 Thread via cfe-commits
@@ -1352,20 +1352,43 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, auto &Context = CalledFunction->getContext(); // Collect valid attributes for all params. - SmallVector ValidParamAttrs; + SmallVector ValidObjParamAttrs, ValidExactParamAttrs; bool

[clang] [llvm] [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF (PR #91423)

2024-05-18 Thread via cfe-commits
yonghong-song wrote: Okay, I see. Thanks for explanation. I checked the top commit and it looks good to me. it is very similar to https://reviews.llvm.org/D143967 except a few additions like new llvm internal flag and a couple of places to generate type tags based on v1 format. Test "buildkit

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread via cfe-commits
https://github.com/cor3ntin requested changes to this pull request. As said in previous comments, I don't think this is the right direction https://github.com/llvm/llvm-project/pull/92645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang-tools-extra] [clang-tidy] Optimize realpath in readability-identifier-naming (PR #92659)

2024-05-18 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/92659 - Reduce disk IO usage by adding cache to an realpath introduced by #81985 - Refactor HungarianNotation::getDeclTypeName to remove some string copies and use more safe string API. >From 45bce19a4852ab95c882948e

[clang-tools-extra] [clang-tidy] Optimize realpath in readability-identifier-naming (PR #92659)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Piotr Zegar (PiotrZSL) Changes - Reduce disk IO usage by adding cache to an realpath introduced by #81985 - Refactor HungarianNotation::getDeclTypeName to remove some string copies and use more safe string API. --- Full diff:

[clang-tools-extra] [clang-tidy] Optimize realpath in readability-identifier-naming (PR #92659)

2024-05-18 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/92659 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Optimize realpath in readability-identifier-naming (PR #92659)

2024-05-18 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/92659 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Optimize realpath in readability-identifier-naming (PR #92659)

2024-05-18 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/92659 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-18 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92207 >From 3df0ba0fd2171a0115427bc6ba5e3f8e84831747 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 14 May 2024 19:06:59 -0700 Subject: [PATCH 1/8] HLSL Availability Diagnostics Design Document - initial commit

[clang] [-Wunsafe-buffer-usage] Fix false positives for constant cases (PR #92432)

2024-05-18 Thread via cfe-commits
@@ -420,25 +420,63 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { //already duplicated // - call both from Sema and from here - const auto *BaseDRE = - dyn_cast(Node.getBase()->IgnoreParenImpCasts()); - if (!BaseDRE) + if (const auto *BaseDRE = +

[clang] [-Wunsafe-buffer-usage] Fix false positives for constant cases (PR #92432)

2024-05-18 Thread via cfe-commits
@@ -420,25 +420,63 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { //already duplicated // - call both from Sema and from here - const auto *BaseDRE = - dyn_cast(Node.getBase()->IgnoreParenImpCasts()); - if (!BaseDRE) + if (const auto *BaseDRE = +

[clang] [llvm] [inline] Clone return range attribute on the callsite into inlined call (PR #92666)

2024-05-18 Thread Andreas Jonson via cfe-commits
https://github.com/andjo403 created https://github.com/llvm/llvm-project/pull/92666 CC @goldsteinn @nikic >From 6dd513a670e813a5e6745044bc69fdd7a7b7c4d9 Mon Sep 17 00:00:00 2001 From: Andreas Jonson Date: Sat, 18 May 2024 19:42:03 +0200 Subject: [PATCH 1/2] [inline] Tests for clone return ran

[clang] [llvm] [inline] Clone return range attribute on the callsite into inlined call (PR #92666)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andreas Jonson (andjo403) Changes CC @goldsteinn @nikic --- Full diff: https://github.com/llvm/llvm-project/pull/92666.diff 3 Files Affected: - (modified) clang/test/Headers/__clang_hip_math.hip (+3-3) - (modified) llvm/lib/Transforms

[clang] [OpenCL] Fix an infinite loop in builidng AddrSpaceQualType (PR #92612)

2024-05-18 Thread Eli Friedman via cfe-commits
@@ -3054,6 +3054,13 @@ QualType ASTContext::removeAddrSpaceQualType(QualType T) const { if (!T.hasAddressSpace()) return T; + // For arrays, strip the qualifier off the element type, then reconstruct the + // array type + if (T.getTypePtr()->isArrayType()) { +Qua

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-18 Thread Doug Wyatt via cfe-commits
@@ -1870,6 +1870,28 @@ bool Sema::IsFunctionConversion(QualType FromType, QualType ToType, FromFn = QT->getAs(); Changed = true; } + +// For C, when called from checkPointerTypesForAssignment, +// we need not to alter FromFn, or else even an innocuous c

[clang] [clang] Introduce `SemaConcept` (PR #92672)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch moves `Sema` functions that handle C++20 concepts into the new `SemaConcept` class. This continues previous efforts to split `Sema` up. Additional context can be found in #84184. This patch

[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92645 >From 4fe09a3411e54561857d2f9d8c1808cb2728e299 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 18 May 2024 13:33:04 +0300 Subject: [PATCH 1/3] [clang] Introduce `SemaCoroutine` --- clang/include/cl

[clang] [clang] Introduce `SemaConcept` (PR #92672)

2024-05-18 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 58c778565cd64a69ea86e7e67e6a87fff3b0b224 354e8ff9f82d26b3611766d6b78b5da76ec87e69 --

[clang] [clang] Introduce `SemaPseudoObject` (PR #92646)

2024-05-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92646 >From 81b2c7dbb6fb9cb24d560b6069f60ba3452bbf2a Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 18 May 2024 14:20:43 +0300 Subject: [PATCH 1/2] [clang] Introduce `SemaPseudoObject` --- clang/include

[clang] [llvm] [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF (PR #91423)

2024-05-18 Thread via cfe-commits
eddyz87 wrote: > Test "buildkite/github-pull-requests " failed and I don't know what is the > reason. I think it is worthwhile to rerun the test to ensure all tests > passed. > CI failure seems to be a fluke as it is reported for DataFlowSanitizer-x86_64 :: release_shadow_space.c which is complet

[clang] [llvm] [BPF] Generate BTF info using 'btf:type_tag' annotation (PR #91424)

2024-05-18 Thread via cfe-commits
https://github.com/yonghong-song approved this pull request. LGTM. The change mostly the same as previous approved patch https://reviews.llvm.org/D145891 except adding some BTF Type Tag V1 handling. I tried a few examples as well as bpf selftest with both V1 and V2. All tests are passed. https

[clang] [clang-format] Fix bad spacing of macro after lambda introducer (PR #92673)

2024-05-18 Thread Matthew Olsson via cfe-commits
https://github.com/mattco98 created https://github.com/llvm/llvm-project/pull/92673 Fixes #92661. Also fixes the same problem applied to function-style macros, which I didn't consider when creating that issue. >From 8fe985951273af784588265f5883be03d907744a Mon Sep 17 00:00:00 2001 From: Matt

[clang] [clang-format] Fix bad spacing of macro after lambda introducer (PR #92673)

2024-05-18 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang-format] Fix bad spacing of macro after lambda introducer (PR #92673)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Matthew Olsson (mattco98) Changes Fixes #92661. Also fixes the same problem applied to function-style macros, which I didn't consider when creating that issue. --- Full diff: https://github.com/llvm/llvm-project/pull/92673.diff

[clang] [clang] Introduce `SemaAccess` (PR #92674)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch moves `Sema` functions that handle access checking into the new `SemaAccess` class. This continues previous efforts to split Sema up. Additional context can be found in https://github.com/l

[clang] [OpenCL] Fix an infinite loop in builidng AddrSpaceQualType (PR #92612)

2024-05-18 Thread Changpeng Fang via cfe-commits
@@ -3054,6 +3054,13 @@ QualType ASTContext::removeAddrSpaceQualType(QualType T) const { if (!T.hasAddressSpace()) return T; + // For arrays, strip the qualifier off the element type, then reconstruct the + // array type + if (T.getTypePtr()->isArrayType()) { +Qua

[clang] [OpenCL] Fix an infinite loop in builidng AddrSpaceQualType (PR #92612)

2024-05-18 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng edited https://github.com/llvm/llvm-project/pull/92612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenCL] Fix an infinite loop in builidng AddrSpaceQualType (PR #92612)

2024-05-18 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng updated https://github.com/llvm/llvm-project/pull/92612 >From 2468a85a47499d90a99610846c632332eb7307b8 Mon Sep 17 00:00:00 2001 From: Changpeng Fang Date: Fri, 17 May 2024 15:13:07 -0700 Subject: [PATCH 1/3] [OpenCL] Fix an infinite loop in builidng AddrSpaceQualTy

[clang] [OpenCL] Fix an infinite loop in builidng AddrSpaceQualType (PR #92612)

2024-05-18 Thread Changpeng Fang via cfe-commits
@@ -0,0 +1,25 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +//RUN: %clang_cc1 %s -emit-llvm -O1 -o - | FileCheck %s changpeng wrote: add "triple spir", same as other tests in the same directory https://

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-05-18 Thread via cfe-commits
@@ -1950,8 +1950,22 @@ ConstantLValueEmitter::tryEmitBase(const APValue::LValueBase &base) { if (D->hasAttr()) return CGM.GetWeakRefReference(D).getPointer(); -if (auto FD = dyn_cast(D)) - return CGM.GetAddrOfFunction(FD); +if (auto FD = dyn_cast(D)) {

[clang] [llvm] [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF (PR #91423)

2024-05-18 Thread via cfe-commits
yonghong-song wrote: > Test "buildkite/github-pull-requests " failed and I don't know what is the > reason. I think it is worthwhile to rerun the test to ensure all tests passed. > CI failure seems to be a fluke as it is reported for DataFlowSanitizer-x86_64 > :: release_shadow_space.c which is

[clang] [llvm] [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF (PR #91423)

2024-05-18 Thread via cfe-commits
https://github.com/yonghong-song approved this pull request. https://github.com/llvm/llvm-project/pull/91423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-05-18 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > Some more thought is needed on how to handle the non-`__builtin_`-prefixed > cases under non-C++23-or-higher language modes. The specific implications of > those functions being non-`constexpr` under said modes (as required, for C++, > by https://wg21.link/const

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-05-18 Thread Hubert Tong via cfe-commits
@@ -3452,9 +3452,10 @@ def Fmod : FPMathTemplate, LibBuiltin<"math.h"> { def Frexp : FPMathTemplate, LibBuiltin<"math.h"> { let Spellings = ["frexp"]; - let Attributes = [NoThrow]; + let Attributes = [NoThrow, Constexpr]; hubert-reinterpretcast wrote: The

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

2024-05-18 Thread via cfe-commits
https://github.com/whitequark created https://github.com/llvm/llvm-project/pull/92677 This patch is the first in a series that makes it possible to build LLVM, Clang, and LLD for WASI/WebAssembly. This patch does not introduce conditionals of the form `defined(__wasi__)` or `defined(__wasm__)`

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support @llvm/pr-subscribers-clang-driver Author: Catherine (whitequark) Changes This patch is the first in a series that makes it possible to build LLVM, Clang, and LLD for WASI/WebAssembly. This patch does not introduce conditionals of the form

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

2024-05-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Catherine (whitequark) Changes This patch is the first in a series that makes it possible to build LLVM, Clang, and LLD for WASI/WebAssembly. This patch does not introduce conditionals of the form `defined(__wasi__)` or `defined(__wasm__)

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

2024-05-18 Thread via cfe-commits
https://github.com/whitequark edited https://github.com/llvm/llvm-project/pull/92677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

2024-05-18 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 577785c5ca78a9714584b5c99ec085f8aea0a5c0 289750cd78979e4811d6fd943c0a6c3b5bd3b5dd --

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

2024-05-18 Thread via cfe-commits
https://github.com/whitequark updated https://github.com/llvm/llvm-project/pull/92677 >From 4110cfe39bde72f0a0c1ed3187811db5548ecd99 Mon Sep 17 00:00:00 2001 From: Catherine Date: Sun, 19 May 2024 04:41:27 + Subject: [PATCH] Conditionalize use of POSIX features missing on WASI/WebAssembly.

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

2024-05-18 Thread via cfe-commits
https://github.com/whitequark updated https://github.com/llvm/llvm-project/pull/92677 >From 0a86da8896ccc32c82e045828e28d2f39de991f9 Mon Sep 17 00:00:00 2001 From: Catherine Date: Sun, 19 May 2024 04:41:27 + Subject: [PATCH] Conditionalize use of POSIX features missing on WASI/WebAssembly.

[clang] HLSL availability diagnostics design doc (PR #92207)

2024-05-18 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/92207 >From 3df0ba0fd2171a0115427bc6ba5e3f8e84831747 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 14 May 2024 19:06:59 -0700 Subject: [PATCH 1/9] HLSL Availability Diagnostics Design Document - initial commit

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

2024-05-18 Thread via cfe-commits
https://github.com/whitequark edited https://github.com/llvm/llvm-project/pull/92677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits