[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -57,7 +57,7 @@ UNION(char[2], short) u2 = { .one = { 'a', 'b' } }; // ext-warning 3 {{'_Static_ typedef UNION(char, short) U3; // expected-error {{static assertion failed due to requirement 'sizeof(char) == sizeof(short)': type size mismatch}} \

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > New intrinsic sounds right - a constant frequency counter is a different > thing to a variable frequency counter. > > "Steady" implies unchanging, so I'd agree with `readfixedfreqtimer` or > similar. I think `steady` has sufficient context here, (i.e. https://en.cppreference

[clang] [clang][AArch64] multilib: fix deduction of "-march=" option (PR #81474)

2024-02-12 Thread Dominik Wójt via cfe-commits
https://github.com/domin144 updated https://github.com/llvm/llvm-project/pull/81474 From 8f8d2b304aa90c0aea00d67e86d285ecd870e443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20W=C3=B3jt?= Date: Mon, 12 Feb 2024 13:38:14 +0100 Subject: [PATCH 1/2] [clang][AArch64] multilib: fix deduction of

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -2031,6 +2031,13 @@ def AMDGPUNumVGPR : InheritableAttr { let Subjects = SubjectList<[Function], ErrorDiag, "kernel functions">; } +def AMDGPUNumWorkGroups : InheritableAttr { + let Spellings = [Clang<"amdgpu_num_work_groups", 0>]; + let Args = [UnsignedArgument<"NumWor

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel +is dispatched. + +Clang suppor

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel erichkeane wro

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel +is dispatched. + +Clang suppor

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -8069,6 +8069,25 @@ static void handleAMDGPUNumVGPRAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) AMDGPUNumVGPRAttr(S.Context, AL, NumVGPR)); } +static void handleAMDGPUNumWorkGroupsAttr(Sema &S, Decl *D, +

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel +is dispatched. + +Clang suppor

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -356,6 +356,19 @@ void AMDGPUTargetCodeGenInfo::setFunctionDeclAttributes( if (NumVGPR != 0) F->addFnAttr("amdgpu-num-vgpr", llvm::utostr(NumVGPR)); } + + if (const auto *Attr = FD->getAttr()) { +uint32_t X = Attr->getNumWorkGroupsX(); +uint32_t Y = Attr

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-02-12 Thread Michael Buch via cfe-commits
@@ -9896,9 +9903,13 @@ Expected ASTImporter::Import(FileID FromID, bool IsBuiltin) { // FIXME: The filename may be a virtual name that does probably not // point to a valid file and we get no Entry here. In this case try with // the memory buffer below

[clang] [Clang][Sema] Don't consider top-level cv-qualifiers in template partial orderings (PR #81449)

2024-02-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/81449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-02-12 Thread Michael Buch via cfe-commits
@@ -9896,9 +9903,13 @@ Expected ASTImporter::Import(FileID FromID, bool IsBuiltin) { // FIXME: The filename may be a virtual name that does probably not // point to a valid file and we get no Entry here. In this case try with // the memory buffer below

[clang-tools-extra] [clangd] Clean formatting modernize-use-override (PR #81435)

2024-02-12 Thread Kevin Joseph via cfe-commits
kevinjoseph1995 wrote: > Release notes entry (for clang-tidy) is also missing. Added a small entry to the Release notes. I wasn't sure about which section to add it to. Please let me know me if that isn't the right one. https://github.com/llvm/llvm-project/pull/81435 _

[clang] c9afeaa - [format] Remove an unused variable.

2024-02-12 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2024-02-12T16:19:42+01:00 New Revision: c9afeaa6434a61b3b3a57c8eda6d2cfb25ab675b URL: https://github.com/llvm/llvm-project/commit/c9afeaa6434a61b3b3a57c8eda6d2cfb25ab675b DIFF: https://github.com/llvm/llvm-project/commit/c9afeaa6434a61b3b3a57c8eda6d2cfb25ab675b.diff LO

[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/81490 The motivation here was a suggestion over in Compiler Explorer. You can use `-mllvm` already to do this but since gfortran supports `-masm`, I figured I'd try to add it. This is done by flang expanding `-

[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: David Spickett (DavidSpickett) Changes The motivation here was a suggestion over in Compiler Explorer. You can use `-mllvm` already to do this but since gfortran supports `-masm`, I figured I'd try to add it. This is done by flang

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 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 6a7cf806a66c67df01818fda01116a2dd2d90b0d 4111afb81d798f9d8141adc634e617c34b5a --

[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/81490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
@@ -11445,11 +11452,16 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, (ParamD = Param.dyn_cast()) || (ParamD = Param.dyn_cast()) || (ParamD = Param.dyn_cast()); - switch (DeductionFailure.Result) { - case Sema::TDK_Success: -llvm_un

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
@@ -33,6 +33,7 @@ namespace clang { class Decl; struct DeducedPack; class Sema; +enum class TemplateDeductionResult; Endilll wrote: This is far from the first time we do unscoped enum → scoped enum refactoring so that we can forward declare enums. Me and @Aar

[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/81490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ObjC] Check entire chain of superclasses to see if class layout can be statically known (PR #81335)

2024-02-12 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81335 >From 498111805cc17469522bd5e8f40856b241eac799 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:51:15 -0500 Subject: [PATCH 1/2] [ObjC] Add pre-commi

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: A few suggestions, but I REALLY would like @cor3ntin to take a final pass, it mostly LGTM. https://github.com/llvm/llvm-project/pull/80802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/80802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -1614,7 +1614,19 @@ bool TemplateInstantiator::AlreadyTransformed(QualType T) { if (T.isNull()) return true; - if (T->isInstantiationDependentType() || T->isVariablyModifiedType()) + bool DependentLambdaType = false; + QualType DesugaredType = T.getDesugaredType(S

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -1614,7 +1614,19 @@ bool TemplateInstantiator::AlreadyTransformed(QualType T) { if (T.isNull()) return true; - if (T->isInstantiationDependentType() || T->isVariablyModifiedType()) + bool DependentLambdaType = false; + QualType DesugaredType = T.getDesugaredType(S

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -11445,11 +11452,16 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, (ParamD = Param.dyn_cast()) || (ParamD = Param.dyn_cast()) || (ParamD = Param.dyn_cast()); - switch (DeductionFailure.Result) { - case Sema::TDK_Success: -llvm_un

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -33,6 +33,7 @@ namespace clang { class Decl; struct DeducedPack; class Sema; +enum class TemplateDeductionResult; erichkeane wrote: Ok then, I'm ok sticking to our existing practice if this is a policy that was already made. https://github.com/llvm/llvm-p

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/81398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG] Full control of range reduction for complex multiplication and division. (PR #81316)

2024-02-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/81316 >From 5cf9dd1073ce6ae72aebbbd8fc4723ec48b39816 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Fri, 9 Feb 2024 12:38:34 -0800 Subject: [PATCH 1/3] Full control of range reduction for complex multiplication an

[clang] [CLANG] Full control of range reduction for complex multiplication and division. (PR #81316)

2024-02-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/81316 >From 5cf9dd1073ce6ae72aebbbd8fc4723ec48b39816 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Fri, 9 Feb 2024 12:38:34 -0800 Subject: [PATCH 1/3] Full control of range reduction for complex multiplication an

[clang] [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (PR #81268)

2024-02-12 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81268 >From 82a631017a114a15a6ba3376c049b7a85707973a Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 16:21:28 -0800 Subject: [PATCH 1/4] [clang][sema][FMV] Forbid multi-versioning arm_streaming funct

[clang] d08d315 - [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (#81268)

2024-02-12 Thread via cfe-commits
Author: Jon Roelofs Date: 2024-02-12T07:46:50-08:00 New Revision: d08d3159d5ee0ee127d3581776ef569b8a6113af URL: https://github.com/llvm/llvm-project/commit/d08d3159d5ee0ee127d3581776ef569b8a6113af DIFF: https://github.com/llvm/llvm-project/commit/d08d3159d5ee0ee127d3581776ef569b8a6113af.diff L

[clang] [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (PR #81268)

2024-02-12 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/81268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Clean formatting modernize-use-override (PR #81435)

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

[clang-tools-extra] [clangd] Clean formatting modernize-use-override (PR #81435)

2024-02-12 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Small fix in release notes needed. If with this change tests are passing, then it's looking fine for me. https://github.com/llvm/llvm-project/pull/81435 ___ cfe-commits mailing list cfe-commits@li

[clang-tools-extra] [clangd] Clean formatting modernize-use-override (PR #81435)

2024-02-12 Thread Piotr Zegar via cfe-commits
@@ -160,6 +160,10 @@ Changes in existing checks `AllowStringArrays` option, enabling the exclusion of array types with deduced length initialized from string literals. +- Improved :doc:` PiotrZSL wrote: fine, but missing check name here https://github.c

[clang] [clang] Do less advertising for unresolved issues in `cxx_dr_status.html` (PR #78836)

2024-02-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/78836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] __ARM_ARCH macro definition fix (PR #81493)

2024-02-12 Thread James Westwood via cfe-commits
https://github.com/jwestwood921 created https://github.com/llvm/llvm-project/pull/81493 This patch changes how the macro __ARM_ARCH is defined to match its defintion in the ACLE. In ACLE 5.4.1, __ARM_ARCH is defined as equal to the major architecture version for ISAs up to and including v8. Fr

[clang] [llvm] __ARM_ARCH macro definition fix (PR #81493)

2024-02-12 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] [llvm] __ARM_ARCH macro definition fix (PR #81493)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-backend-arm Author: James Westwood (jwestwood921) Changes This patch changes how the macro __ARM_ARCH is defined to match its defintion in the ACLE. In ACLE 5.4.1, __ARM_ARCH is defined as equal to the major archite

[clang] [llvm] __ARM_ARCH macro definition fix (PR #81493)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: James Westwood (jwestwood921) Changes This patch changes how the macro __ARM_ARCH is defined to match its defintion in the ACLE. In ACLE 5.4.1, __ARM_ARCH is defined as equal to the major architecture version for ISAs up to and including

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-12 Thread zhijian lin via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-12 Thread zhijian lin via cfe-commits
@@ -0,0 +1,83 @@ +// RUN: echo "int main() { return __builtin_cpu_is(\"ppc970\");}" > %t.c +// RUN: %clang_cc1 -triple powerpc-ibm-aix7.2.0.0 -emit-llvm -o - %t.c | FileCheck %s \ +// RUN: --check-prefix=CHECKBOOL + +// RUN: echo "int main() { return __builtin_cpu_is(\"ppc-cel

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-12 Thread zhijian lin via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" diggerlin wrote: I think the function is too short, It not worth to hav

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-12 Thread zhijian lin via cfe-commits
@@ -10347,6 +10347,8 @@ def err_x86_builtin_tile_arg_duplicate : Error< def err_builtin_target_unsupported : Error< "builtin is not supported on this target">; +def err_builtin_aix_os_unsupported : Error< + "this builtin is available only in AIX 7.2 and later operating syst

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-12 Thread zhijian lin via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] [RISCV] Add canonical ISA string as Module metadata in IR. (PR #80760)

2024-02-12 Thread Philip Reames via cfe-commits
preames wrote: I agree with @asb's framing above. Assuming this doesn't commit us to something which is hard to forward version for some reason, I support addressing this in a target specific manner for the moment. https://github.com/llvm/llvm-project/pull/80760 _

[clang] [llvm] __ARM_ARCH macro fix (PR #81466)

2024-02-12 Thread James Westwood via cfe-commits
https://github.com/jwestwood921 closed https://github.com/llvm/llvm-project/pull/81466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 76eb8e3 - [clang][Interp] Fix marking results as nullptr

2024-02-12 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-12T17:10:19+01:00 New Revision: 76eb8e35d6631827c0450e9d5f4743e410d4151a URL: https://github.com/llvm/llvm-project/commit/76eb8e35d6631827c0450e9d5f4743e410d4151a DIFF: https://github.com/llvm/llvm-project/commit/76eb8e35d6631827c0450e9d5f4743e410d4151a.diff LO

[clang] [llvm] [ARM] __ARM_ARCH macro definition fix (PR #81493)

2024-02-12 Thread James Westwood via cfe-commits
https://github.com/jwestwood921 edited https://github.com/llvm/llvm-project/pull/81493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-12 Thread Aaron Ballman via cfe-commits
@@ -57,7 +57,7 @@ UNION(char[2], short) u2 = { .one = { 'a', 'b' } }; // ext-warning 3 {{'_Static_ typedef UNION(char, short) U3; // expected-error {{static assertion failed due to requirement 'sizeof(char) == sizeof(short)': type size mismatch}} \

[clang] [Headers][X86] Editorial fixes to ia32intrin.h descriptions (PR #80490)

2024-02-12 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/80490 >From c068144b1e372aec29f268edf7184ee3d3dc7d54 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Fri, 2 Feb 2024 12:38:16 -0800 Subject: [PATCH 1/2] [Headers][X86] Editorial fixes to ia32intrin.h descriptions U

[clang] 1da7f41 - [Headers][X86] Editorial fixes to ia32intrin.h descriptions (#80490)

2024-02-12 Thread via cfe-commits
Author: Paul T Robinson Date: 2024-02-12T08:17:30-08:00 New Revision: 1da7f410bcd831d4b2c3166b672d93c8110edfc0 URL: https://github.com/llvm/llvm-project/commit/1da7f410bcd831d4b2c3166b672d93c8110edfc0 DIFF: https://github.com/llvm/llvm-project/commit/1da7f410bcd831d4b2c3166b672d93c8110edfc0.dif

[clang] [Headers][X86] Editorial fixes to ia32intrin.h descriptions (PR #80490)

2024-02-12 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/80490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clangCodeGen: Introduce `mcdc::State` with `MCDCState.h` (PR #81497)

2024-02-12 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/81497 This packs; * `BitmapBytes` * `BitmapMap` * `CondIDMap` Also imports `mcdc::ConditionID` and `mcdc::Parameters`. >From 80db8d1d054933a204b8b551687f65a80ea9cafa Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Dat

[clang] clangCodeGen: Introduce `mcdc::State` with `MCDCState.h` (PR #81497)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: NAKAMURA Takumi (chapuni) Changes This packs; * `BitmapBytes` * `BitmapMap` * `CondIDMap` Also imports `mcdc::ConditionID` and `mcdc::Parameters`. --- Patch is 22.05 KiB, truncated to 20.00 KiB below, full version: https://github.com/ll

[clang] [clang][analyzer] Change default value of checker option in unix.StdCLibraryFunctions. (PR #80457)

2024-02-12 Thread via cfe-commits
NagyDonat wrote: I analyzed the results uploaded by @balazske and found the following: ### memcached The new ModelPosix=true produces two new bug reports [(1) assuming that fileno() can fail](https://codechecker-demo.eastus.cloudapp.azure.com/Default/report-detail?run=memcached_1.6.8_modelpos

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I think the changes make sense in as much as relocatable is supposed to be a subset of copyable (I continue to think `volatile`-qualified objects should not be trivially copyable... because they aren't... but that's WG21's issue, not ours). I'm addin

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-12 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: This isn't ABI breaking for us currently (at least in a non-benign way). We only use it to optimize `vector` growing currently, and just define it to `is_trivially_copyable` if `__is_trivially_relocatable` isn't available. https://github.com/llvm/llvm-project/pull/77092 _

[clang] Reapply "[Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (#78274)" (PR #79683)

2024-02-12 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @cor3ntin https://github.com/llvm/llvm-project/pull/79683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose declarative nested-name-specifiers naming alias templates (PR #80842)

2024-02-12 Thread Krystian Stasiowski via cfe-commits
@@ -6295,22 +6297,36 @@ bool Sema::diagnoseQualifiedDeclaration(CXXScopeSpec &SS, DeclContext *DC, << FixItHint::CreateRemoval(TemplateId->TemplateKWLoc); NestedNameSpecifierLoc SpecLoc(SS.getScopeRep(), SS.location_data()); - while (SpecLoc.getPrefix()) { + do {

[clang] 3033822 - [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (#71709)

2024-02-12 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-02-12T20:40:57+04:00 New Revision: 30338223e461a00463cef665ec29d8f5a8ef2cda URL: https://github.com/llvm/llvm-project/commit/30338223e461a00463cef665ec29d8f5a8ef2cda DIFF: https://github.com/llvm/llvm-project/commit/30338223e461a00463cef665ec29d8f5a8ef2cda.

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/71709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > This isn't ABI breaking for us currently (at least in a non-benign way). We > only use it to optimize `vector` growing currently, and just define it to > `is_trivially_copyable` if `__is_trivially_relocatable` isn't available. Excellent, thank you for the confirmation! h

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/80040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose declarative nested-name-specifiers naming alias templates (PR #80842)

2024-02-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/80842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-02-12 Thread Jeremy Morse via cfe-commits
jmorse wrote: ``` https://github.com/llvm/llvm-project/pull/75385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-12 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @erichkeane @cor3ntin https://github.com/llvm/llvm-project/pull/80171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/80171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fixes of builtin definitions after PR #68324. (PR #81022)

2024-02-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > There are still some differences that I haven't addressed here as they might > be ok to have: > > * `__builtin_rint{,f,l}` were defined with the `const` attribute, now > they use the `const when FP exceptions are ignored` -- this seems due to the > definition of thes

[clang] [llvm] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-02-12 Thread Jeremy Morse via cfe-commits
jmorse wrote: Several decades later; I applied this check to the verifier and reduced around it: ``` diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index b1cf81a3dbdc..9e2250b584b1 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -1421,6 +1421,9 @@ void V

[clang] f559c2e - [clang][Sema][NFC] Use auto for dyn_cast<>

2024-02-12 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-12T18:00:39+01:00 New Revision: f559c2efe195b54ebc0f0a0077918483a25a6ae4 URL: https://github.com/llvm/llvm-project/commit/f559c2efe195b54ebc0f0a0077918483a25a6ae4 DIFF: https://github.com/llvm/llvm-project/commit/f559c2efe195b54ebc0f0a0077918483a25a6ae4.diff LO

[clang] [Clang] Fixes of builtin definitions after PR #68324. (PR #81022)

2024-02-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, these fixes all look correct to me. The only thing that seemed somewhat off was with the `sync` functions taking a pointer to a `volatile` (that's not documented in GCC's docs, but I think the signature does make sense). Thank yo

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/80040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Reformat code of BoolAssignmentChecker (NFC). (PR #81461)

2024-02-12 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. This is just trivial cleanup, I think you can merge this PR whenever you want. https://github.com/llvm/llvm-project/pull/81461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang][dataflow] Add `Environment::initializeFieldsWithValues()`. (PR #81239)

2024-02-12 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/81239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add `Environment::initializeFieldsWithValues()`. (PR #81239)

2024-02-12 Thread Gábor Horváth via cfe-commits
@@ -943,6 +919,50 @@ Environment::createLocAndMaybeValue(QualType Ty, return Loc; } +void Environment::initializeFieldsWithValues(RecordStorageLocation &Loc, + llvm::DenseSet &Visited, +

[clang] [clang][dataflow] Add `Environment::initializeFieldsWithValues()`. (PR #81239)

2024-02-12 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/81239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/81398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add some CodeGen tests for CWG 1xx issues (PR #80338)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/80338 >From 9c434c59a1b09a3d1217bbab4e44112a92bf6360 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 1 Feb 2024 23:44:53 +0300 Subject: [PATCH 1/2] [clang] Add some CodeGen tests for CWG 1xx issues Covers

[clang] 5fdd094 - [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (#73176)

2024-02-12 Thread via cfe-commits
Author: Logikable Date: 2024-02-12T09:33:09-08:00 New Revision: 5fdd094837c6d8437803ebf3ccc91c3d494a2ac8 URL: https://github.com/llvm/llvm-project/commit/5fdd094837c6d8437803ebf3ccc91c3d494a2ac8 DIFF: https://github.com/llvm/llvm-project/commit/5fdd094837c6d8437803ebf3ccc91c3d494a2ac8.diff LOG

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-02-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/73176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2024-02-12 Thread Zaara Syeda via cfe-commits
syzaara wrote: Ping. https://github.com/llvm/llvm-project/pull/67999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fb48fd1 - [Driver, test] Fix hlsl-lang-targets.hlsl after #78655

2024-02-12 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-02-12T10:05:22-08:00 New Revision: fb48fd18c240574841378defacadff34238089bb URL: https://github.com/llvm/llvm-project/commit/fb48fd18c240574841378defacadff34238089bb DIFF: https://github.com/llvm/llvm-project/commit/fb48fd18c240574841378defacadff34238089bb.diff

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/81506 This patch implements `__is_layout_compatible`, which backs up `std::is_layout_compatible` type trait introduced in C++20 ([P0466R5](https://wg21.link/p0466r5) "Layout-compatibility and Pointer-interconvertibil

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch implements `__is_layout_compatible`, which backs up `std::is_layout_compatible` type trait introduced in C++20 ([P0466R5](https://wg21.link/p0466r5) "Layout-compatibility and Pointer-interc

[clang] [Driver] Remove "-android" from compiler-rt library names for legacy LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=off (PR #81044)

2024-02-12 Thread Fangrui Song via cfe-commits
MaskRay wrote: Thanks for the response, so it seems that we need to keep this for a while. https://github.com/llvm/llvm-project/pull/81044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-12 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 b45de48be24695b613f48ed21bb35f844454193b 5599465e3c3921571fd22d18a5854ced3a752d80 --

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 1/3] Initial implementation --- clang/include/clang/Basic/T

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Formatting suggestions to `ParseDeclCXX.cpp` are too disruptive. I'm not going to commit them. https://github.com/llvm/llvm-project/pull/81506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/80823 >From 560713b5d45236956198654a10e0795eb56cad7b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 6 Feb 2024 13:23:36 +0300 Subject: [PATCH 1/4] [Clang] Add some CodeGen tests for CWG 2xx issues This p

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-12 Thread Shilei Tian via cfe-commits
@@ -79,17 +79,17 @@ define amdgpu_ps void @test_llvm_amdgcn_fdot2_bf16_bf16_sis( ; GFX11: ; %bb.0: ; %entry ; GFX11-NEXT:v_mov_b32_e32 v2, s1 ; GFX11-NEXT:s_delay_alu instid0(VALU_DEP_1) -; GFX11-NEXT:v_dot2_bf16_bf16 v2, s0, 0x10001, v2 +; GFX11-NEXT:v_do

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-12 Thread Jun Wang via cfe-commits
@@ -356,6 +356,19 @@ void AMDGPUTargetCodeGenInfo::setFunctionDeclAttributes( if (NumVGPR != 0) F->addFnAttr("amdgpu-num-vgpr", llvm::utostr(NumVGPR)); } + + if (const auto *Attr = FD->getAttr()) { +uint32_t X = Attr->getNumWorkGroupsX(); +uint32_t Y = Attr

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-12 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/80069 >From a82a60e3af041f50b833d241a284e09a883e849a Mon Sep 17 00:00:00 2001 From: zhijian Date: Tue, 30 Jan 2024 15:13:39 -0500 Subject: [PATCH 1/2] support builtin_cpu_is() for aix --- .../clang/Basic/Diagnostic

[clang] a9845d6 - [clang] Add some CodeGen tests for CWG 1xx issues (#80338)

2024-02-12 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-02-12T22:36:06+04:00 New Revision: a9845d602288263a5e2c260ac1a9655ae6b7b119 URL: https://github.com/llvm/llvm-project/commit/a9845d602288263a5e2c260ac1a9655ae6b7b119 DIFF: https://github.com/llvm/llvm-project/commit/a9845d602288263a5e2c260ac1a9655ae6b7b119.

[clang] [clang] Add some CodeGen tests for CWG 1xx issues (PR #80338)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/80338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-12 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/80069 >From a82a60e3af041f50b833d241a284e09a883e849a Mon Sep 17 00:00:00 2001 From: zhijian Date: Tue, 30 Jan 2024 15:13:39 -0500 Subject: [PATCH 1/3] support builtin_cpu_is() for aix --- .../clang/Basic/Diagnostic

<    1   2   3   4   5   >