[clang-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)

2024-08-30 Thread Ilya Biryukov via cfe-commits
@@ -534,6 +534,8 @@ TEST(WalkAST, Enums) { testWalk(R"(namespace ns { enum E { A = 42 }; } struct S { using ns::E::A; };)", "int e = S::^A;"); + testWalk(R"(namespace ns { enum E { $explicit^A = 42 }; })", + "namespace z = ns; int e = z::^A

[clang-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)

2024-08-30 Thread Ilya Biryukov via cfe-commits
@@ -146,9 +148,24 @@ class ASTWalker : public RecursiveASTVisitor { // // If it's an enum constant, it must be due to prior decl. Report references // to it when qualifier isn't a type. -if (llvm::isa(FD)) { - if (!DRE->getQualifier() || DRE->getQualifier(

[clang] [clang-tools-extra] Add function check for windows platform (PR #106581)

2024-08-30 Thread via cfe-commits
https://github.com/fawdlstty updated https://github.com/llvm/llvm-project/pull/106581 >From f169f3c57a0a55c1a0dbb8f965bc17a87ceb98d7 Mon Sep 17 00:00:00 2001 From: fawdlstty Date: Fri, 30 Aug 2024 00:23:39 +0800 Subject: [PATCH 1/2] add check for windows platforms api --- .../bugprone/NotNull

[clang] [clang][bytecode] Diagnose comparisons with literals (PR #106734)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/106734 This requires adding a new opcode for PointerToBoolean casts, since we otherwise emit too many diagnostics. But that fixes an older problem when casting weak pointers to bool. >From 0517f11ddbe4fda0f71692e800

[clang] [clang][bytecode] Diagnose comparisons with literals (PR #106734)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This requires adding a new opcode for PointerToBoolean casts, since we otherwise emit too many diagnostics. But that fixes an older problem when casting weak pointers to bool. --- Full diff: https://github.

[clang-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)

2024-08-30 Thread via cfe-commits
=?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3Ro

[clang] [clang] Catch missing format attributes (PR #105479)

2024-08-30 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovichtec updated https://github.com/llvm/llvm-project/pull/105479 From e57e2fbea7a7bb8f447ec2755e2bd8b27e2f930d Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribute

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-08-30 Thread Chris Apple via cfe-commits
https://github.com/cjappl created https://github.com/llvm/llvm-project/pull/106736 Follows #106650 - that's why that change is in this PR, that will disappear when that is approved and merged. To disable rtsan, we are following the same approach as lsan: https://github.com/llvm/llvm-project/

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris Apple (cjappl) Changes Follows #106650 - that's why that change is in this PR, that will disappear when that is approved and merged. To disable rtsan, we are following the same approach as lsan: https://github.com/llvm/llvm-projec

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-08-30 Thread Chris Apple via cfe-commits
cjappl wrote: CC @davidtrevelyan for review https://github.com/llvm/llvm-project/pull/106736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in templat… (PR #106730)

2024-08-30 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: RFC for this change: https://discourse.llvm.org/t/rfc-adding-builtin-for-deduplicating-type-lists/80986 https://github.com/llvm/llvm-project/pull/106730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang-tools-extra] Add clang-tidy external examples (PR #106675)

2024-08-30 Thread via cfe-commits
@@ -0,0 +1,32 @@ +=== +External Clang-Tidy Examples +=== + +Introduction + + +This page provides examples of what people have done with `clang-tidy` that +might serve as useful guides (or starting points) to develop your own che

[clang-tools-extra] Add clang-tidy external examples (PR #106675)

2024-08-30 Thread via cfe-commits
https://github.com/MichelleCDjunaidi deleted https://github.com/llvm/llvm-project/pull/106675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add clang-tidy external examples (PR #106675)

2024-08-30 Thread via cfe-commits
@@ -0,0 +1,32 @@ +=== +External Clang-Tidy Examples +=== + +Introduction + + +This page provides examples of what people have done with `clang-tidy` that +might serve as useful guides (or starting points) to develop your own che

[clang-tools-extra] Add clang-tidy external examples (PR #106675)

2024-08-30 Thread via cfe-commits
@@ -0,0 +1,32 @@ +=== +External Clang-Tidy Examples +=== + +Introduction + + +This page provides examples of what people have done with `clang-tidy` that +might serve as useful guides (or starting points) to develop your own che

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-30 Thread David Truby via cfe-commits
DavidTruby wrote: For what it's worth, MSVC and icc/icx also build @jeanPerier's example without complaint, so I think it should probably be accepted by clang as well even if it is ambiguous per the standard. https://github.com/llvm/llvm-project/pull/100692

[clang-tools-extra] Add clang-tidy external examples (PR #106675)

2024-08-30 Thread via cfe-commits
https://github.com/MichelleCDjunaidi updated https://github.com/llvm/llvm-project/pull/106675 >From 08324e3586acb16cbf010fd6013c21f2b5faa64e Mon Sep 17 00:00:00 2001 From: MichelleCDjunaidi <87893361+michellecdjuna...@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:55:16 +0800 Subject: [PATC

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-30 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > Also, do you plan to fix #102320 in this or the follow-up patches? @zyn0217 This patch (in its current state) fixes #102320 :) https://github.com/llvm/llvm-project/pull/106585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] Add clang-tidy external examples (PR #106675)

2024-08-30 Thread via cfe-commits
@@ -0,0 +1,32 @@ +=== +External Clang-Tidy Examples +=== + +Introduction + + +This page provides examples of what people have done with `clang-tidy` that +might serve as useful guides (or starting points) to develop your own che

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-08-30 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/106585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-08-30 Thread Kevin Wolf via cfe-commits
kevmw wrote: > But as a rule of thumb, static analysis attributes always belong on the > publicly visible declaration. Otherwise, the caller can't see them. Yes, the theory is obvious and easy to understand, at least once you think of it. Applying it in practice is where I made the experience

[clang-tools-extra] Update clang tidy Contributing guide (PR #106672)

2024-08-30 Thread via cfe-commits
MichelleCDjunaidi wrote: >From another pull #106675, why is this failing the build-bot? Any ideas? ``` -- Build files have been written to: /home/runner/work/llvm-project/llvm-project/clang-tools-extra-build ninja: Entering directory `clang-tools-extra-build' [1/2] Generating man Sphinx documen

[clang] 0c4cf79 - [clang] Install scan-build-py into plain "lib" directory (#106612)

2024-08-30 Thread Michał Górny via cfe-commits
Author: Michał Górny Date: 2024-08-30T16:30:19+02:00 New Revision: 0c4cf79defe30d43279bf4526cdf32b6c7f8a197 URL: https://github.com/llvm/llvm-project/commit/0c4cf79defe30d43279bf4526cdf32b6c7f8a197 DIFF: https://github.com/llvm/llvm-project/commit/0c4cf79defe30d43279bf4526cdf32b6c7f8a197.diff

[clang] [clang] Install scan-build-py into plain "lib" directory (#106608) (PR #106612)

2024-08-30 Thread Michał Górny via cfe-commits
https://github.com/mgorny closed https://github.com/llvm/llvm-project/pull/106612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Split FeatureLS64 to LS64_ACCDATA and LS64_V. (PR #101712)

2024-08-30 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/101712 >From 2fe8ef63846989952a1c72b83114aabe6f36637a Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Fri, 2 Aug 2024 17:32:23 +0100 Subject: [PATCH] [AArch64] Split FeatureLS64 to LS64_ACCDATA and LS64_V.

[clang] [llvm] Reapply "[HWASan] remove incorrectly inferred attributes" (#106622) (PR #106624)

2024-08-30 Thread David Spickett via cfe-commits
DavidSpickett wrote: The added test is timing out on Linaro's bots, before we had this many tests: ``` PASS: lit :: shtest-define.py (92379 of 92379) ``` And after this patch we have: ``` PASS: lit :: shtest-define.py (92379 of 92380) ``` So it's the one that's timing out. These bots are AArch64

[clang] 369d814 - [ValueTracking] use KnownBits to compute fpclass from bitcast (#97762)

2024-08-30 Thread via cfe-commits
Author: Alex MacLean Date: 2024-08-30T07:34:49-07:00 New Revision: 369d8148e09c2b91174ec01e845bc504cf622c45 URL: https://github.com/llvm/llvm-project/commit/369d8148e09c2b91174ec01e845bc504cf622c45 DIFF: https://github.com/llvm/llvm-project/commit/369d8148e09c2b91174ec01e845bc504cf622c45.diff

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-08-30 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean closed https://github.com/llvm/llvm-project/pull/97762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "[HWASan] remove incorrectly inferred attributes" (#106622) (PR #106624)

2024-08-30 Thread David Spickett via cfe-commits
DavidSpickett wrote: I'm wary of reverting because I'm not 100% sure your later commit isn't related to this. So I'll leave it to you to decide. I/ we (Linaro) can look into this on the hardware but I myself will be finished work for the week by the time you start I expect. Feel free to ping m

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/106657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -480,6 +480,9 @@ struct RegisterBindingFlags { bool ContainsNumeric = false; bool DefaultGlobals = false; + + // used only when Resource == true + llvm::dxil::ResourceClass ResourceClass = llvm::dxil::ResourceClass::UAV; damyanp wrote: What is this w

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -480,6 +480,9 @@ struct RegisterBindingFlags { bool ContainsNumeric = false; bool DefaultGlobals = false; + + // used only when Resource == true + llvm::dxil::ResourceClass ResourceClass = llvm::dxil::ResourceClass::UAV; damyanp wrote: Along with thi

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -612,57 +588,61 @@ static RegisterBindingFlags HLSLFillRegisterBindingFlags(Sema &S, return Flags; } - if (!isDeclaredWithinCOrTBuffer(TheDecl)) { -// make sure the type is a basic / numeric type -if (TheVarDecl) { - QualType TheQualTy = TheVarDecl->get

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-30 Thread David Spickett via cfe-commits
DavidSpickett wrote: The flang failure also came up on Linaro's 2 stage bots: https://lab.llvm.org/buildbot/#/builders/4/builds/1670 https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang] Catch missing format attributes (PR #105479)

2024-08-30 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovichtec updated https://github.com/llvm/llvm-project/pull/105479 From 11aef7cefc23fc3d9e3086ec5daf07bcdc0a857b Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribute

[clang] [clang][bytecode][NFC] Cache the BuiltinID in Function (PR #106745)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/106745 FunctionDecl::getBuiltinID() is surprisingly slow and we tend to call it quite a bit, especially when interpreting builtin functions. Caching the BuiltinID here reduces the time I need to compile the floating_

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/106657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Cache the BuiltinID in Function (PR #106745)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes FunctionDecl::getBuiltinID() is surprisingly slow and we tend to call it quite a bit, especially when interpreting builtin functions. Caching the BuiltinID here reduces the time I need to compile the floatin

[clang] [flang] [llvm] [mlir] Make MMIWP not have ownership over MMI + Make MMI Only Use an External MCContext (PR #105541)

2024-08-30 Thread Matin Raayai via cfe-commits
matinraayai wrote: @aeubanks should be ready for review again. https://github.com/llvm/llvm-project/pull/105541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

2024-08-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/106732 >From 50efbbd59ed639d9604f3b13faf1fb8be60161e7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 30 Aug 2024 12:46:53 +0200 Subject: [PATCH 1/2] [SCCP] Infer return attributes in SCCP as well We can infer th

[clang] [Driver] Normalize the baremetal handling of libc++ and runtimes (PR #101259)

2024-08-30 Thread Peter Smith via cfe-commits
https://github.com/smithp35 approved this pull request. LGTM too, I've checked that the `-DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON` works. We, and other bare-metal driver using toolchains can adopt that. https://github.com/llvm/llvm-project/pull/101259 _

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-08-30 Thread Chris Apple via cfe-commits
https://github.com/cjappl updated https://github.com/llvm/llvm-project/pull/106736 >From c9d3d6c256b763bc99e7bf2d2dca43cb1e88adb8 Mon Sep 17 00:00:00 2001 From: Chris Apple Date: Thu, 29 Aug 2024 17:16:37 -0700 Subject: [PATCH 1/3] [clang][rtsan] Add realtime sanitizer to Features.def --- cla

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-08-30 Thread Chris Apple via cfe-commits
@@ -0,0 +1,117 @@ +//===-- sanitizer/rtsan_interface.h -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)

2024-08-30 Thread via cfe-commits
=?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3Ro

[clang] [HLSL] Implement TransformHLSLAttributedResourceType (PR #106673)

2024-08-30 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: Tests? https://github.com/llvm/llvm-project/pull/106673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-08-30 Thread Chris Apple via cfe-commits
https://github.com/cjappl updated https://github.com/llvm/llvm-project/pull/106736 >From c9d3d6c256b763bc99e7bf2d2dca43cb1e88adb8 Mon Sep 17 00:00:00 2001 From: Chris Apple Date: Thu, 29 Aug 2024 17:16:37 -0700 Subject: [PATCH 1/4] [clang][rtsan] Add realtime sanitizer to Features.def --- cla

[clang] [llvm] [AArch64] Split FeatureLS64 to LS64_ACCDATA and LS64_V. (PR #101712)

2024-08-30 Thread Alexandros Lamprineas via cfe-commits
@@ -3682,6 +3682,8 @@ static const struct Extension { {"sve2-bitperm", {AArch64::FeatureSVE2BitPerm}}, {"sve2p1", {AArch64::FeatureSVE2p1}}, {"ls64", {AArch64::FeatureLS64}}, +{"ls64_v", {AArch64::FeatureLS64_V}}, +{"ls64_accdata", {AArch64::FeatureLS64_ACCD

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-08-30 Thread Chris Apple via cfe-commits
https://github.com/cjappl deleted https://github.com/llvm/llvm-project/pull/106736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash in code with StmtExpr and atomic char load in Expr::EvaluateAsRValue. (PR #106751)

2024-08-30 Thread via cfe-commits
https://github.com/c8ef created https://github.com/llvm/llvm-project/pull/106751 Fixes #106576. In the `IntExprEvaluator::VisitCastExpr` function, we handle `CK_NonAtomicToAtomic` in the same way as `CK_AtomicToNonAtomic`. This resolves the issue of converting non-atomic to atomic for integral

[clang] [clang] Fix crash in code with StmtExpr and atomic char load in Expr::EvaluateAsRValue. (PR #106751)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (c8ef) Changes Fixes #106576. In the `IntExprEvaluator::VisitCastExpr` function, we handle `CK_NonAtomicToAtomic` in the same way as `CK_AtomicToNonAtomic`. This resolves the issue of converting non-atomic to atomic for integral val

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-08-30 Thread Chris Apple via cfe-commits
@@ -0,0 +1,117 @@ +//===-- sanitizer/rtsan_interface.h -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-08-30 Thread Chris Apple via cfe-commits
@@ -0,0 +1,117 @@ +//===-- sanitizer/rtsan_interface.h -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [WebAssembly] Add intrinsics to wasm_simd128.h for all FP16 instructions (PR #106465)

2024-08-30 Thread Brendan Dahl via cfe-commits
https://github.com/brendandahl closed https://github.com/llvm/llvm-project/pull/106465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Add intrinsics to wasm_simd128.h for all FP16 instructions (PR #106465)

2024-08-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `mlir-nvidia-gcc7` running on `mlir-nvidia` while building `clang,cross-project-tests,llvm` at step 6 "test-build-check-mlir-build-only-check-mlir". Full details are available at: https://lab.llvm.org/buildbot/#/builders/116/b

[clang] [clang] Fix crash in code with StmtExpr and atomic char load in Expr::EvaluateAsRValue. (PR #106751)

2024-08-30 Thread via cfe-commits
c8ef wrote: This was introduced in a23ab514c2a126bcdfd30f3edaf4da6800bcd534, and I'm not sure if changing it back will cause any issues👀 https://github.com/llvm/llvm-project/pull/106751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [compiler-rt] [llvm] [CMake][compiler-rt] Support for using compiler-rt atomic library (PR #106603)

2024-08-30 Thread Chris Apple via cfe-commits
cjappl wrote: Ok, it appears that on Apple systems, we would catch this, as we intercept OSSpinLockLock used by compiler-rt atomics: https://github.com/llvm/llvm-project/blob/c55e24b8507d47a8cc04b5d9570e8e3d02be1ca3/compiler-rt/lib/builtins/atomic.c#L95-L102 But, in the non-darwin case this is

[clang-tools-extra] Update clang tidy Contributing guide (PR #106672)

2024-08-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > From another pull #106675, why is this failing the build-bot? Any ideas? Do I > have to create a new PR just to fix this? @AaronBallman > > ``` > -- Build files have been written to: > /home/runner/work/llvm-project/llvm-project/clang-tools-extra-build > ninja: Entering d

[clang-tools-extra] 9712255 - Fix a minor issue with the documentation; NFC

2024-08-30 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-08-30T12:02:46-04:00 New Revision: 97122550961944f2376f0e84a73cdd5b9e042bc4 URL: https://github.com/llvm/llvm-project/commit/97122550961944f2376f0e84a73cdd5b9e042bc4 DIFF: https://github.com/llvm/llvm-project/commit/97122550961944f2376f0e84a73cdd5b9e042bc4.diff

[clang-tools-extra] Update clang tidy Contributing guide (PR #106672)

2024-08-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: This should now be resolved in 97122550961944f2376f0e84a73cdd5b9e042bc4 https://github.com/llvm/llvm-project/pull/106672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] fix kcfi doesn't take effect when callee function has no input parameter (PR #106677)

2024-08-30 Thread Sami Tolvanen via cfe-commits
@@ -2813,6 +2813,11 @@ void CodeGenFunction::EmitKCFIOperandBundle( Callee.getAbstractInfo().getCalleeFunctionProtoType(); if (FP) Bundles.emplace_back("kcfi", CGM.CreateKCFITypeId(FP->desugar())); + else { +ASTContext &context = this->getContext(); +QualTy

[clang] [clang] Catch missing format attributes (PR #105479)

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

[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

2024-08-30 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw approved this pull request. LG. After this patch, some redundant null checks/error handlings are eliminated :) https://github.com/llvm/llvm-project/pull/106732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

2024-08-30 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/106732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

2024-08-30 Thread Yingwei Zheng via cfe-commits
@@ -354,6 +354,36 @@ bool SCCPSolver::removeNonFeasibleEdges(BasicBlock *BB, DomTreeUpdater &DTU, return true; } +void SCCPSolver::inferReturnAttributes() const { + for (const auto &I : getTrackedRetVals()) { +Function *F = I.first; +const ValueLatticeElement &Retu

[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

2024-08-30 Thread Yingwei Zheng via cfe-commits
@@ -277,34 +277,12 @@ static bool runIPSCCP( // whether other functions are optimizable. SmallVector ReturnsToZap; + Solver.inferReturnAttributes(); for (const auto &I : Solver.getTrackedRetVals()) { Function *F = I.first; const ValueLatticeElement &ReturnVal

[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

2024-08-30 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > This causes some compile-time regression on lencod with LTO > (https://llvm-compile-time-tracker.com/compare.php?from=eaf87d32754beb5bec10bab517bf56e25575b48e&to=b03af0f9bc4e83de8ed78b55b1e0fc0abb9af24e&stat=instructions%3Au). > I've seen a similar regression when testing a sim

[clang] [clang-tools-extra] [clang] Hide the `DiagnosticOptions` pointer from `CompilerInvocation` (PR #106274)

2024-08-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > yes turning diagnosticoptions to be a ThreadSafeRefCountedBase pointer > > should ensure we have similar guarantees. so LG from clangd side > > Thanks for confirming! > > > I am not sure about implications on using thread-aware structs in core > > parts of clang. so it

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-08-30 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 commented: I didn't really look at the tests. Rather than saying the new options are "incompatible" with -O0, I'd say they are "ignored" at -O0, which is in fact how they are implemented. "Incompatible" suggests to me that there'd be a diagnostic, and there's no need

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-08-30 Thread Paul T Robinson via cfe-commits
@@ -3558,15 +3562,26 @@ static llvm::StoreInst *findDominatingStoreToReturnValue(CodeGenFunction &CGF) { llvm::BasicBlock *IP = CGF.Builder.GetInsertBlock(); if (IP->empty()) return nullptr; -// Look at directly preceding instruction, skipping bitcasts and lifetim

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-08-30 Thread Paul T Robinson via cfe-commits
@@ -2523,6 +2575,15 @@ llvm::Function *CodeGenModule::getLLVMLifetimeEndFn() { return LifetimeEndFn; } +/// Lazily declare the @llvm.fake.use intrinsic. +llvm::Function *CodeGenModule::getLLVMFakeUseFn() { + if (FakeUseFn) +return FakeUseFn; + FakeUseFn = + llvm::

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-08-30 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/106724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-08-30 Thread Paul T Robinson via cfe-commits
@@ -1412,6 +1420,39 @@ void CodeGenFunction::EmitAndRegisterVariableArrayDimensions( } } +/// Return the maximum size of an aggregate for which we generate a fake use +/// intrinsic when -fextend-lifetimes is in effect. +static uint64_t maxFakeUseAggregateSize(const ASTCont

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-08-30 Thread Paul T Robinson via cfe-commits
@@ -2543,6 +2543,10 @@ void CodeGenModule::ConstructAttributeList(StringRef Name, if (shouldDisableTailCalls()) FuncAttrs.addAttribute("disable-tail-calls", "true"); +// Suppress the machine instruction scheduler when -fextend-lifetimes is on. +if (CodeGenO

[clang] [llvm] Revert "Reapply "[HWASan] remove incorrectly inferred attributes" (#106622)" (PR #106758)

2024-08-30 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/106758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "Reapply "[HWASan] remove incorrectly inferred attributes" (#106622)" (PR #106758)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-compiler-rt-sanitizer @llvm/pr-subscribers-clang Author: Florian Mayer (fmayer) Changes Reverts llvm/llvm-project#106624 caused timeouts --- Patch is 183.04 KiB, truncated to 20.00 KiB below, full version: https:/

[clang] [HLSL] Implement TransformHLSLAttributedResourceType (PR #106673)

2024-08-30 Thread Helena Kotas via cfe-commits
hekota wrote: > Tests? There are tests yet because the code that creates HLSLAttributedResourceType is not in yet. There will be tests for this included in the PR that switches resource attributes to be on types. I understand this is not ideal. I am just trying to reduce the size of that PR b

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-08-30 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From 002027b04bdac5699c990de56cbedb8497f4f1ba Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH] Add Clang attribute to ensure that fields are ini

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-30 Thread Xiang Li via cfe-commits
https://github.com/python3kgae updated https://github.com/llvm/llvm-project/pull/101240 >From 65b4ab94bc533c8dee9733761947671a4d326e90 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Tue, 30 Jul 2024 16:34:40 -0400 Subject: [PATCH 1/5] [HLSL] AST support for WaveSize attribute. First step for su

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-08-30 Thread via cfe-commits
@@ -1472,3 +1472,25 @@ template struct Outer { }; }; Outer::Inner outerinner; + +void aggregate() { + struct B { +[[clang::explicit_init]] int f1; + }; + + struct S : B { // expected-warning {{uninitialized}} +int f2; +int f3 [[clang::explicit_init]]; + }; + +

[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

2024-08-30 Thread via cfe-commits
@@ -354,6 +354,36 @@ bool SCCPSolver::removeNonFeasibleEdges(BasicBlock *BB, DomTreeUpdater &DTU, return true; } +void SCCPSolver::inferReturnAttributes() const { + for (const auto &I : getTrackedRetVals()) { +Function *F = I.first; +const ValueLatticeElement &Retu

[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

2024-08-30 Thread via cfe-commits
@@ -354,6 +354,36 @@ bool SCCPSolver::removeNonFeasibleEdges(BasicBlock *BB, DomTreeUpdater &DTU, return true; } +void SCCPSolver::inferReturnAttributes() const { + for (const auto &I : getTrackedRetVals()) { +Function *F = I.first; +const ValueLatticeElement &Retu

[clang] [llvm] [AArch64] Implement NEON vscale intrinsics (PR #100347)

2024-08-30 Thread via cfe-commits
@@ -5985,6 +5985,27 @@ multiclass SIMDThreeSameVectorFP opc, [(set (v2f64 V128:$Rd), (OpNode (v2f64 V128:$Rn), (v2f64 V128:$Rm)))]>; } +// As above, but only floating point elements supported. SpencerAbson wrote: I think the wrong comment was removed

[clang] [llvm] [AArch64] Implement NEON vscale intrinsics (PR #100347)

2024-08-30 Thread via cfe-commits
@@ -2096,3 +2096,9 @@ let ArchGuard = "defined(__aarch64__) || defined(__arm64ec__)", TargetGuard = "r def VLDAP1_LANE : WInst<"vldap1_lane", ".(c*!).I", "QUlQlUlldQdPlQPl">; def VSTL1_LANE : WInst<"vstl1_lane", "v*(.!)I", "QUlQlUlldQdPlQPl">; } + +let ArchGuard = "define

[clang] [llvm] [AArch64] Implement NEON vscale intrinsics (PR #100347)

2024-08-30 Thread via cfe-commits
@@ -5985,6 +5984,27 @@ multiclass SIMDThreeSameVectorFP opc, [(set (v2f64 V128:$Rd), (OpNode (v2f64 V128:$Rn), (v2f64 V128:$Rm)))]>; } +// As above, but only floating point elements supported. +let mayRaiseFPException = 1, Uses = [FPCR] in +multiclass SIMDThreeVectorF

[clang] [llvm] [AArch64] Implement NEON vscale intrinsics (PR #100347)

2024-08-30 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/100347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement NEON vscale intrinsics (PR #100347)

2024-08-30 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/100347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement NEON vscale intrinsics (PR #100347)

2024-08-30 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/100347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement NEON vscale intrinsics (PR #100347)

2024-08-30 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/100347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP] Add initial support for arc hyperbolic intrinsics (PR #106766)

2024-08-30 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/106766 None >From 6567d4b48c492a054fcbbfb0f0826d32bbb29404 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 30 Aug 2024 18:34:27 +0100 Subject: [PATCH] [WIP] Add initial support for arc hyperbolic intrinsics -

[clang] [llvm] [WIP] Add initial support for arc hyperbolic intrinsics (PR #106766)

2024-08-30 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 5500e21942f7047344b6fee62d3e08c0ba2f9182 6567d4b48c492a054fcbbfb0f0826d32bbb29404 --e

[clang] [llvm] [Offload] Introduce the concept of "default streams" (PR #95371)

2024-08-30 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/95371 >From 34c8bf739040b9d3d0bf625cdadf12b282249ccf Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Fri, 7 Jun 2024 17:06:02 -0700 Subject: [PATCH 1/2] [Offload][CUDA] Add initial cuda_runtime.h overlay This

[clang] [clang][Sema] Fix diagnostic for function overloading in extern "C" (PR #106033)

2024-08-30 Thread David Blaikie via cfe-commits
dwblaikie wrote: > This make sense to me, @dwblaikie wdyt? Seems OK to me https://github.com/llvm/llvm-project/pull/106033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix diagnostic for function overloading in extern "C" (PR #106033)

2024-08-30 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. https://github.com/llvm/llvm-project/pull/106033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-30 Thread Chris B via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.8-pixel -x hlsl %s -verify +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.8-vertex -x hlsl %s -verify +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.8-geometry -x hlsl %s -verify +// RUN: %clang_cc1 -triple d

[clang-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)

2024-08-30 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/106706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Report refs for enum constants used through namespace aliases (PR #106706)

2024-08-30 Thread Haojian Wu via cfe-commits
@@ -146,9 +148,24 @@ class ASTWalker : public RecursiveASTVisitor { // // If it's an enum constant, it must be due to prior decl. Report references // to it when qualifier isn't a type. -if (llvm::isa(FD)) { - if (!DRE->getQualifier() || DRE->getQualifier(

[clang] [llvm] [WIP] Add initial support for arc hyperbolic intrinsics (PR #106766)

2024-08-30 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon updated https://github.com/llvm/llvm-project/pull/106766 >From 64f9eecea8e3b5cbdd53b0a6f494e1a7c9f7c781 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 30 Aug 2024 18:34:27 +0100 Subject: [PATCH] [WIP] Add initial support for arc hyperbolic intrinsics --- cl

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-30 Thread Chris B via cfe-commits
@@ -357,6 +398,74 @@ void SemaHLSL::handleNumThreadsAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +static bool isValidWaveSizeValue(unsigned Value) { + return (Value >= 4 && Value <= 128 && ((Value & (Value - 1)) == 0)); llvm-beanz wrote:

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-30 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. A few minor suggestions, but otherwise looks good. https://github.com/llvm/llvm-project/pull/101240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/106772 This patch reduces the memory usage for import lists by employing memory-efficient data structures. With this patch, an import list for a given destination module is basically DenseSet with each element i

<    1   2   3   4   5   >