[clang] 7417b4c - [clang] Add a new test for CWG2091 (#104573)

2024-08-16 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-08-16T16:35:34+04:00 New Revision: 7417b4cd138f7384bba83f7eb62a890303f82600 URL: https://github.com/llvm/llvm-project/commit/7417b4cd138f7384bba83f7eb62a890303f82600 DIFF: https://github.com/llvm/llvm-project/commit/7417b4cd138f7384bba83f7eb62a890303f82600.

[clang] [clang] Add a new test for CWG2091 (PR #104573)

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

[clang] 1cdf1e6 - [clang][Interp] Fix classifying enum types (#104582)

2024-08-16 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-16T14:37:45+02:00 New Revision: 1cdf1e693425ae6830883d2fc0eaaa601a8250d8 URL: https://github.com/llvm/llvm-project/commit/1cdf1e693425ae6830883d2fc0eaaa601a8250d8 DIFF: https://github.com/llvm/llvm-project/commit/1cdf1e693425ae6830883d2fc0eaaa601a8250d8.diff L

[clang] [clang][Interp] Fix classifying enum types (PR #104582)

2024-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/104582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-08-16 Thread Jeremy Bennett via cfe-commits
@@ -59,16 +59,26 @@ let TargetPrefix = "riscv" in { [IntrNoMem, IntrWillReturn, IntrSpeculatable, ImmArg>, ImmArg>]>; + def int_riscv_cv_alu_slet : ScalarCoreVAluGprGprIntrinsic; jeremybennett wrote: >

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-08-16 Thread Jeremy Bennett via cfe-commits
@@ -59,16 +59,26 @@ let TargetPrefix = "riscv" in { [IntrNoMem, IntrWillReturn, IntrSpeculatable, ImmArg>, ImmArg>]>; + def int_riscv_cv_alu_slet : ScalarCoreVAluGprGprIntrinsic; jeremybennett wrote: >

[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)

2024-08-16 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/104586 In C++26 and as an extension in C++20. The implementation follows the resolution of CWG2922 >From 67028aa8afddf033dbe50f5df08c854c29e7eaae Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 9 Jul 2024 08

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-08-16 Thread Jeremy Bennett via cfe-commits
@@ -59,16 +59,26 @@ let TargetPrefix = "riscv" in { [IntrNoMem, IntrWillReturn, IntrSpeculatable, ImmArg>, ImmArg>]>; + def int_riscv_cv_alu_slet : ScalarCoreVAluGprGprIntrinsic; jeremybennett wrote: >

[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)

2024-08-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes In C++26 and as an extension in C++20. The implementation follows the resolution of CWG2922 --- Full diff: https://github.com/llvm/llvm-project/pull/104586.diff 12 Files Affected: - (modified) clang/docs/Lang

[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)

2024-08-16 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/104586 >From 36eb12a12db45ca345fe9a3945431c19eff2a6cf Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 9 Jul 2024 08:37:18 +0200 Subject: [PATCH] [Clang] Implement P2747 constexpr placement new In C++26 and a

[clang] [Clang] Do not allow `[[clang::lifetimebound]]` on explicit object member functions (PR #96113)

2024-08-16 Thread via cfe-commits
https://github.com/cor3ntin commented: Missing a release note. Looks okay otherwise https://github.com/llvm/llvm-project/pull/96113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Add handling for new/delete expressions (PR #104033)

2024-08-16 Thread David Spickett via cfe-commits
DavidSpickett wrote: Note that that bot is 32 bit, so size_t is 32 bit there. https://github.com/llvm/llvm-project/pull/104033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement '__builtin_is_intangible' type trait (PR #104544)

2024-08-16 Thread Aaron Ballman via cfe-commits
@@ -660,6 +660,9 @@ KEYWORD(out , KEYHLSL) #define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) KEYWORD(Name, KEYHLSL) #include "clang/Basic/HLSLIntangibleTypes.def" +// HLSL Type traits +TYPE_TRAIT_1(__builtin_is_intangible, IsIntangibleType, KEYHLSL) -

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-08-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Clang bits LGTM; accepting but please wait to land until someone accepts the LLVM changes as well. https://github.com/llvm/llvm-project/pull/101228 ___ cfe-commits mailing list cfe-commits@li

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-08-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: @earnol -- given the amount of breakage, can you revert the changes to get all bots back to green, then we can re-land once you have everything fixed up? https://github.com/llvm/llvm-project/pull/96240 ___ cfe-commits mailing list

[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)

2024-08-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/104586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)

2024-08-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: DR testing side looks good https://github.com/llvm/llvm-project/pull/104586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)

2024-08-16 Thread Vlad Serebrennikov via cfe-commits
@@ -23,3 +23,29 @@ struct S { friend class C::Nested...; // expected-error {{friend declaration expands pack 'Ts' that is declared it its own template parameter list}} }; } // namespace cwg2917 + +#if __cplusplus >= 202002 + +namespace std { + using size_t = decltype(sizeof

[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)

2024-08-16 Thread Vlad Serebrennikov via cfe-commits
@@ -10030,22 +10021,32 @@ bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) { // (which should presumably be valid only if N is a multiple of // alignof(int), and in any case can't be deallocated unless N is // alignof(X) and X has new-extended alignm

[clang] [clang] Rename all AST/Interp stuff to AST/ByteCode (PR #104552)

2024-08-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM thank you for the rename, I'm one of those people who gets confused by this sometimes. :-D https://github.com/llvm/llvm-project/pull/104552 ___ cfe-commits mailing list cfe-commits@lists

[clang] [llvm] [Coroutines] Change `llvm.coro.noop` to accept `llvm_anyptr_ty` instead (PR #102096)

2024-08-16 Thread Matt Arsenault via cfe-commits
@@ -123,6 +123,17 @@ bool coro::declaresIntrinsics(const Module &M, return false; } +// Verifies if a module has any intrinsics. +bool coro::declaresIntrinsics(const Module &M, + const DenseSet &Identifiers) { + for (const Function &F : M.functi

[clang] [llvm] [AArch64] Add a check for invalid default features (PR #104435)

2024-08-16 Thread Lucas Duarte Prates via cfe-commits
https://github.com/pratlucas approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/104435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Change BinPackParameters to an enum to add a BreakAlways (PR #101882)

2024-08-16 Thread via cfe-commits
https://github.com/VolatileAcorn updated https://github.com/llvm/llvm-project/pull/101882 >From ddb5bad1cd1bed8781b9156e1058a9cc1347 Mon Sep 17 00:00:00 2001 From: Tom Pottage Date: Fri, 2 Aug 2024 20:26:47 +0100 Subject: [PATCH] [clang-format] Change BinPackParameters to an enum and intro

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-08-16 Thread Janek van Oirschot via cfe-commits
@@ -40,12 +41,20 @@ class AMDGPUAsmPrinter final : public AsmPrinter { AMDGPUResourceUsageAnalysis *ResourceUsage; + std::unique_ptr RI; JanekvO wrote: It requires a class inherited member for its constructor (in this case, `OutContext`). https://github

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-08-16 Thread Janek van Oirschot via cfe-commits
@@ -3025,8 +3025,8 @@ define amdgpu_kernel void @dyn_extract_v5f64_s_s(ptr addrspace(1) %out, i32 %sel ; GPRIDX-NEXT: amd_machine_version_stepping = 0 ; GPRIDX-NEXT: kernel_code_entry_byte_offset = 256 ; GPRIDX-NEXT: kernel_code_prefetch_byte_size = 0 -; GPRIDX-NEX

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-08-16 Thread Janek van Oirschot via cfe-commits
@@ -75,10 +75,10 @@ bb.2: store volatile i32 0, ptr addrspace(1) undef ret void } -; DEFAULTSIZE: .amdhsa_private_segment_fixed_size 16 +; DEFAULTSIZE: .amdhsa_private_segment_fixed_size kernel_non_entry_block_static_alloca_uniformly_reached_align4.private_seg_size ; DEFA

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-08-16 Thread Matt Arsenault via cfe-commits
@@ -40,12 +41,20 @@ class AMDGPUAsmPrinter final : public AsmPrinter { AMDGPUResourceUsageAnalysis *ResourceUsage; + std::unique_ptr RI; arsenm wrote: But OutContext is a reference in the parent already, so you can use it? https://github.com/llvm/llvm-p

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-08-16 Thread Matt Arsenault via cfe-commits
@@ -3025,8 +3025,8 @@ define amdgpu_kernel void @dyn_extract_v5f64_s_s(ptr addrspace(1) %out, i32 %sel ; GPRIDX-NEXT: amd_machine_version_stepping = 0 ; GPRIDX-NEXT: kernel_code_entry_byte_offset = 256 ; GPRIDX-NEXT: kernel_code_prefetch_byte_size = 0 -; GPRIDX-NEX

[clang] [clang][driver] Fix -print-target-triple OS version for apple targets (PR #104037)

2024-08-16 Thread Louis Dionne via cfe-commits
ldionne wrote: @mstorsjo I think you put the finger on something I don't really understand at the moment. What is the relationship between `armv7` and `thumbv7` as a target triple? Is there any documentation on what an "effective triple" is in comparison to a "non-effective triple"? Separatel

[clang] [clang][dataflow] Collect local variables referenced within a functio… (PR #104459)

2024-08-16 Thread Samira Bazuzi via cfe-commits
bazuzi wrote: The new `Locals` field can be, and is by default, ignored, as the existing uses iterate individually through each of the sets in `ReferencedDecls`. https://github.com/llvm/llvm-project/pull/104459 ___ cfe-commits mailing list cfe-commits

[clang] [clang][dataflow] Collect local variables referenced within a functio… (PR #104459)

2024-08-16 Thread Yitzhak Mandelbaum via cfe-commits
ymand wrote: Looks good, but please add a test. Thanks! https://github.com/llvm/llvm-project/pull/104459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-16 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/101738 >From f25e4ab65ed16a1e1a3bde91efe24bd0d52e0e74 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 2 Aug 2024 13:58:37 -0400 Subject: [PATCH 01/14] [PowerPC] Fix codegen for transparent_union function params Up

[clang] [HLSL] Add __is_scalarized_layout_compatible (PR #102227)

2024-08-16 Thread Aaron Ballman via cfe-commits
@@ -6188,6 +6189,23 @@ static bool EvaluateBinaryTypeTrait(Sema &Self, TypeTrait BTT, const TypeSourceI TSTToBeDeduced->getTemplateName().getAsTemplateDecl(), RhsT, Info) == TemplateDeductionResult::Success; } + case BTT_IsScalarizedLayoutCompa

[clang] [HLSL] Add __is_scalarized_layout_compatible (PR #102227)

2024-08-16 Thread Aaron Ballman via cfe-commits
@@ -1142,3 +1142,85 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { } return false; } + +static void BuildFlattenedTypeList(QualType BaseTy, + llvm::SmallVectorImpl &List) { + llvm::SmallVector WorkList

[clang] [HLSL] Add __is_scalarized_layout_compatible (PR #102227)

2024-08-16 Thread Aaron Ballman via cfe-commits
@@ -6188,6 +6189,23 @@ static bool EvaluateBinaryTypeTrait(Sema &Self, TypeTrait BTT, const TypeSourceI TSTToBeDeduced->getTemplateName().getAsTemplateDecl(), RhsT, Info) == TemplateDeductionResult::Success; } + case BTT_IsScalarizedLayoutCompa

[clang] [llvm] [AArch64] Add a check for invalid default features (PR #104435)

2024-08-16 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm updated https://github.com/llvm/llvm-project/pull/104435 >From f79eb28441491f1625691886cc92bd05d3b3cb6a Mon Sep 17 00:00:00 2001 From: Tomas Matheson Date: Thu, 15 Aug 2024 13:41:31 +0100 Subject: [PATCH 01/16] [AArch64] Add a check for invalid default features

[clang] [llvm] [AArch64] Add a check for invalid default features (PR #104435)

2024-08-16 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 e8e88873ab528eb9a44804e6e68953bb058eceb7 e79e2cad5ed69baa1e1c886e3e2f77d7bfd16dd9 --e

[clang] [llvm] [AArch64] Add a check for invalid default features (PR #104435)

2024-08-16 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm updated https://github.com/llvm/llvm-project/pull/104435 >From f79eb28441491f1625691886cc92bd05d3b3cb6a Mon Sep 17 00:00:00 2001 From: Tomas Matheson Date: Thu, 15 Aug 2024 13:41:31 +0100 Subject: [PATCH 01/17] [AArch64] Add a check for invalid default features

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-CONVERT new instructions. (PR #101600)

2024-08-16 Thread Phoebe Wang via cfe-commits
@@ -847,6 +847,91 @@ def X86vcvttp2iubs : SDNode<"X86ISD::CVTTP2IUBS", SDTFloatToInt>; def X86vcvttp2ibsSAE : SDNode<"X86ISD::CVTTP2IBS_SAE", SDTFloatToInt>; def X86vcvttp2iubsSAE : SDNode<"X86ISD::CVTTP2IUBS_SAE", SDTFloatToInt>; +def SDTAVX10CONVERT_I82F16 : SDTypeProfile<

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-CONVERT new instructions. (PR #101600)

2024-08-16 Thread Phoebe Wang via cfe-commits
@@ -847,6 +847,91 @@ def X86vcvttp2iubs : SDNode<"X86ISD::CVTTP2IUBS", SDTFloatToInt>; def X86vcvttp2ibsSAE : SDNode<"X86ISD::CVTTP2IBS_SAE", SDTFloatToInt>; def X86vcvttp2iubsSAE : SDNode<"X86ISD::CVTTP2IUBS_SAE", SDTFloatToInt>; +def SDTAVX10CONVERT_I82F16 : SDTypeProfile<

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-CONVERT new instructions. (PR #101600)

2024-08-16 Thread Phoebe Wang via cfe-commits
@@ -7089,3 +7089,133 @@ def int_x86_avx10_mask_vcvttps2iubs512 : ClangBuiltin<"__builtin_ia32_vcvttps2iu DefaultAttrsIntrinsic<[llvm_v16i32_ty], [llvm_v16f32_ty, llvm_v16i32_ty, llvm_i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg>]>; } + +//===

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-CONVERT new instructions. (PR #101600)

2024-08-16 Thread Phoebe Wang via cfe-commits
@@ -847,6 +847,91 @@ def X86vcvttp2iubs : SDNode<"X86ISD::CVTTP2IUBS", SDTFloatToInt>; def X86vcvttp2ibsSAE : SDNode<"X86ISD::CVTTP2IBS_SAE", SDTFloatToInt>; def X86vcvttp2iubsSAE : SDNode<"X86ISD::CVTTP2IUBS_SAE", SDTFloatToInt>; +def SDTAVX10CONVERT_I82F16 : SDTypeProfile<

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-CONVERT new instructions. (PR #101600)

2024-08-16 Thread Phoebe Wang via cfe-commits
@@ -847,6 +847,91 @@ def X86vcvttp2iubs : SDNode<"X86ISD::CVTTP2IUBS", SDTFloatToInt>; def X86vcvttp2ibsSAE : SDNode<"X86ISD::CVTTP2IBS_SAE", SDTFloatToInt>; def X86vcvttp2iubsSAE : SDNode<"X86ISD::CVTTP2IUBS_SAE", SDTFloatToInt>; +def SDTAVX10CONVERT_I82F16 : SDTypeProfile<

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-CONVERT new instructions. (PR #101600)

2024-08-16 Thread Phoebe Wang via cfe-commits
@@ -624,3 +624,328 @@ defm VCVTTPS2IUBS : avx10_sat_cvt_base<0x6a, "vcvttps2iubs", SchedWriteVecIMul, avx512vl_i32_info, avx512vl_f32_info, X86vcvttp2iubsSAE>, AVX512PDIi8Base, T_MA

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-CONVERT new instructions. (PR #101600)

2024-08-16 Thread Phoebe Wang via cfe-commits
@@ -617,7 +617,7 @@ constexpr FeatureBitset ImpliedFeaturesAVX10_1 = FeatureAVX512CD | FeatureAVX512VBMI | FeatureAVX512IFMA | FeatureAVX512VNNI | FeatureAVX512BF16 | FeatureAVX512VPOPCNTDQ | FeatureAVX512VBMI2 | FeatureAVX512BITALG | FeatureVAES | FeatureVPCLMULQDQ

[clang] [llvm] [X86][AVX10.2] Support AVX10.2-CONVERT new instructions. (PR #101600)

2024-08-16 Thread Phoebe Wang via cfe-commits
@@ -847,6 +847,91 @@ def X86vcvttp2iubs : SDNode<"X86ISD::CVTTP2IUBS", SDTFloatToInt>; def X86vcvttp2ibsSAE : SDNode<"X86ISD::CVTTP2IBS_SAE", SDTFloatToInt>; def X86vcvttp2iubsSAE : SDNode<"X86ISD::CVTTP2IUBS_SAE", SDTFloatToInt>; +def SDTAVX10CONVERT_I82F16 : SDTypeProfile<

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/104594 Fixes #104570 >From e1821933a1670353c396ada17b82d5bb41599c14 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 16 Aug 2024 17:21:38 +0300 Subject: [PATCH] [Clang] fix crash by avoiding invalidation of ex

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #104570 --- Full diff: https://github.com/llvm/llvm-project/pull/104594.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1) - (modified) clang/lib/Sema/SemaDecl.cpp (-1) - (modi

[clang] [llvm] [AArch64] Add a check for invalid default features (PR #104435)

2024-08-16 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm milestoned https://github.com/llvm/llvm-project/pull/104435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Rename all AST/Interp stuff to AST/ByteCode (PR #104552)

2024-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/104552 >From 28ff098c7627adc052f90d968f449afb8cb38d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 16 Aug 2024 08:42:16 +0200 Subject: [PATCH] [clang] Rename all AST/Interp stuff to AST/Byte

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-08-16 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag created https://github.com/llvm/llvm-project/pull/104599 Current MalloChecker logic suppresses FP caused by refcounting only for C++ destructors. The same pattern occurs a lot in C in objects with intrusive refcounting. See #104229 for code example. To extend curren

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-08-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Pavel Skripkin (pskrgag) Changes Current MalloChecker logic suppresses FP caused by refcounting only for C++ destructors. The same pattern occurs a lot in C in objects with intrusive refcounting. See #104229 for code exa

[clang] [analyzer] [MallocChecker] suspect all release functions as candite for supression (PR #104599)

2024-08-16 Thread Pavel Skripkin via cfe-commits
@@ -0,0 +1,80 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.Malloc -verify %s +// + +typedef unsigned long size_t; + +typedef enum memory_order { + memory_order_relaxed = __ATOMIC_RELAXED, +} memory_order; + +void *calloc(size_t, size_t); +void free(void *); + +struc

[clang] [clang][ExtractAPI] Stop dropping fields of nested anonymous record types when they aren't attached to variable declaration (PR #104600)

2024-08-16 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/104600 - Introduce primitives for removing records from `APISet` and managing the record chain of `RecordContext` - Detect nested anonymous record types and remove them from the `APISet` after they have been f

[clang] [clang][ExtractAPI] Stop dropping fields of nested anonymous record types when they aren't attached to variable declaration (PR #104600)

2024-08-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Grumberg (daniel-grumberg) Changes - Introduce primitives for removing records from `APISet` and managing the record chain of `RecordContext` - Detect nested anonymous record types and remove them from the `APISet` after they have

[clang] [clang][ExtractAPI] Stop dropping fields of nested anonymous record types when they aren't attached to variable declaration (PR #104600)

2024-08-16 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 2fc7a72733762d685a07f846b44dc17a0585098e e4a4ff0649bac9710b8e77416b77526f16d4762b --e

[clang] [clang][test] Split invalid-cpu-note tests (PR #104601)

2024-08-16 Thread Sam Elliott via cfe-commits
https://github.com/lenary created https://github.com/llvm/llvm-project/pull/104601 This change does two kinds of splits: - Splits each target into a different file. Some targets are left in the same files, such as riscv32/64 and x86/_64 as these tests and lists are very similar. - Splits up the

[clang] [clang][test] Split invalid-cpu-note tests (PR #104601)

2024-08-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sam Elliott (lenary) Changes This change does two kinds of splits: - Splits each target into a different file. Some targets are left in the same files, such as riscv32/64 and x86/_64 as these tests and lists are very similar. - Splits up t

[clang] [clang][test] Split invalid-cpu-note tests (PR #104601)

2024-08-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Sam Elliott (lenary) Changes This change does two kinds of splits: - Splits each target into a different file. Some targets are left in the same files, such as riscv32/64 and x86/_64 as these tests and lists are very similar. - Sp

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/104594 >From 9ffe47795d3fa25d6ac020b5cebace0c2e758285 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 16 Aug 2024 17:21:38 +0300 Subject: [PATCH] [Clang] fix crash by avoiding invalidation of extern main decl

[clang] [clang][ExtractAPI] Stop dropping fields of nested anonymous record types when they aren't attached to variable declaration (PR #104600)

2024-08-16 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/104600 >From 61b8014d418867e0108bf4513227d9a8fdad63f8 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Thu, 15 Aug 2024 17:42:02 +0100 Subject: [PATCH 1/4] [clang][ExtractAPI] Implement Record removal from

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
@@ -264,6 +264,7 @@ Bug Fixes to C++ Support - Properly reject defaulted copy/move assignment operators that have a non-reference explicit object parameter. - Clang now properly handles the order of attributes in `extern` blocks. (#GH101990). - Fixed an assertion failure by p

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh approved this pull request. Looks good with one nit. https://github.com/llvm/llvm-project/pull/104594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh edited https://github.com/llvm/llvm-project/pull/104594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test] Split invalid-cpu-note tests (PR #104601)

2024-08-16 Thread Tomas Matheson via cfe-commits
@@ -0,0 +1,382 @@ +// Use --implicit-check-not={{[a-zA-Z0-9]}} to ensure no additional CPUs are in these lists + +// RUN: not %clang_cc1 -triple i386--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix X86 --implicit-check-not={{[a-zA-Z0-9]}} +// X86: er

[clang] [clang][test] Split invalid-cpu-note tests (PR #104601)

2024-08-16 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm approved this pull request. Thanks. This will make downstream maintenance much easier after the initial merge. https://github.com/llvm/llvm-project/pull/104601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang][test] Split invalid-cpu-note tests (PR #104601)

2024-08-16 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/104601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Allow YAML file to control multilib selection (PR #98856)

2024-08-16 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. I'm happy with this as a good first step to adopting the multilib YAML. Have you, using this patch, managed to reimplement the hardcoded multilib behaviour? This is not a blocking question, but it might give an indication of whether more wo

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh commented: One more comment, actually. https://github.com/llvm/llvm-project/pull/104594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh edited https://github.com/llvm/llvm-project/pull/104594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
@@ -12233,7 +12233,6 @@ void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) { FD->getDeclContext()->getRedeclContext()->isTranslationUnit())) { Diag(FD->getLocation(), diag::ext_main_invalid_linkage_specification) << FD->getLanguageLinkage(); -FD-

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh edited https://github.com/llvm/llvm-project/pull/104594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test] Split invalid-cpu-note tests (PR #104601)

2024-08-16 Thread Sam Elliott via cfe-commits
@@ -0,0 +1,382 @@ +// Use --implicit-check-not={{[a-zA-Z0-9]}} to ensure no additional CPUs are in these lists + +// RUN: not %clang_cc1 -triple i386--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix X86 --implicit-check-not={{[a-zA-Z0-9]}} +// X86: er

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/104594 >From 9ffe47795d3fa25d6ac020b5cebace0c2e758285 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 16 Aug 2024 17:21:38 +0300 Subject: [PATCH 1/2] [Clang] fix crash by avoiding invalidation of extern main

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
@@ -12233,7 +12233,6 @@ void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) { FD->getDeclContext()->getRedeclContext()->isTranslationUnit())) { Diag(FD->getLocation(), diag::ext_main_invalid_linkage_specification) << FD->getLanguageLinkage(); -FD-

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-08-16 Thread Doug Wyatt via cfe-commits
@@ -10941,6 +10941,55 @@ def warn_imp_cast_drops_unaligned : Warning< InGroup>; // Function effects +def warn_func_effect_allocates : Warning< + "'%0' function must not allocate or deallocate memory">, + InGroup; +def note_func_effect_allocates : Note< + "function cannot

[clang] a07aba5 - [clang] Rename all AST/Interp stuff to AST/ByteCode (#104552)

2024-08-16 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-16T17:13:12+02:00 New Revision: a07aba5d44204a7ca0d891a3da05af9960081e4c URL: https://github.com/llvm/llvm-project/commit/a07aba5d44204a7ca0d891a3da05af9960081e4c DIFF: https://github.com/llvm/llvm-project/commit/a07aba5d44204a7ca0d891a3da05af9960081e4c.diff L

[clang] [clang] Rename all AST/Interp stuff to AST/ByteCode (PR #104552)

2024-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/104552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Support ObjC blocks (PR #104551)

2024-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/104551 >From e4e5a35bf25f8f95ea39765692d0280b906dd625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 Aug 2024 20:31:38 +0200 Subject: [PATCH] [clang][Interp] Support blocks --- clang/lib/

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
@@ -264,6 +264,7 @@ Bug Fixes to C++ Support - Properly reject defaulted copy/move assignment operators that have a non-reference explicit object parameter. - Clang now properly handles the order of attributes in `extern` blocks. (#GH101990). - Fixed an assertion failure by p

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/104594 >From 9ffe47795d3fa25d6ac020b5cebace0c2e758285 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 16 Aug 2024 17:21:38 +0300 Subject: [PATCH 1/2] [Clang] fix crash by avoiding invalidation of extern main

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
@@ -122,6 +119,26 @@ namespace ns2 { extern "C++" void main() {} // ok } +#elif TEST14 +extern "C" { + int main(); // expected-warning {{'main' should not be 'extern "C"'}} +} + +extern "C" int main(); // expected-warning {{'main' should not be 'extern "C"'}} + +#elif TEST

[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)

2024-08-16 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/104586 >From 36eb12a12db45ca345fe9a3945431c19eff2a6cf Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 9 Jul 2024 08:37:18 +0200 Subject: [PATCH 1/2] [Clang] Implement P2747 constexpr placement new In C++26 a

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/104594 >From 9ffe47795d3fa25d6ac020b5cebace0c2e758285 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 16 Aug 2024 17:21:38 +0300 Subject: [PATCH 1/3] [Clang] fix crash by avoiding invalidation of extern main

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Oleksandr T. via cfe-commits
@@ -122,6 +119,26 @@ namespace ns2 { extern "C++" void main() {} // ok } +#elif TEST14 +extern "C" { + int main(); // expected-warning {{'main' should not be 'extern "C"'}} +} + +extern "C" int main(); // expected-warning {{'main' should not be 'extern "C"'}} + +#elif TEST

[clang] [llvm] [RISCV] Add Hazard3 CPU (PR #102452)

2024-08-16 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/102452 >From 0e9579c91242fc63eb2cb686adc105fd248fef91 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Fri, 16 Aug 2024 07:52:53 -0700 Subject: [PATCH 1/2] [clang][test] Split invalid-cpu-note tests This change does tw

[clang] [APINotes] Support fields of C/C++ structs (PR #104088)

2024-08-16 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/104088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [test] Prevent generation of the bigendian code inside clang test CodeGen/bit-int-ubsan.c (PR #104607)

2024-08-16 Thread via cfe-commits
https://github.com/earnol created https://github.com/llvm/llvm-project/pull/104607 Add missing -triple x86_64-pc-linux-gnu line into RUN line, which should be here. >From 98d3d539c84c917ba7369f688ba26ff172c9d89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=C3=A4nolituri=20L=C3=B3mitaur=C3=AB?=

[clang] [compiler-rt] [test] Prevent generation of the bigendian code inside clang test CodeGen/bit-int-ubsan.c (PR #104607)

2024-08-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (earnol) Changes Add missing -triple x86_64-pc-linux-gnu line into RUN line, which should be here. --- Full diff: https://github.com/llvm/llvm-project/pull/104607.diff 3 Files Affected: - (modified) clang/test/CodeGen/bit-int-ubsa

[clang] [compiler-rt] [test] Prevent generation of the bigendian code inside clang test CodeGen/bit-int-ubsan.c (PR #104607)

2024-08-16 Thread via cfe-commits
https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/104607 >From 98d3d539c84c917ba7369f688ba26ff172c9d89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=C3=A4nolituri=20L=C3=B3mitaur=C3=AB?= Date: Wed, 7 Aug 2024 17:29:35 -0400 Subject: [PATCH 1/6] [ubsan] Display correct r

[clang-tools-extra] [clang-tidy] Workaround for cppcoreguidelines-pro-type-union-access if memLoc is invalid (PR #104540)

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

[clang-tools-extra] [clang-tidy] Workaround for cppcoreguidelines-pro-type-union-access if memLoc is invalid (PR #104540)

2024-08-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Missing release notes entry, about what's fixed in check. For me this is an full-fix, not an workaround. https://github.com/llvm/llvm-project/pull/104540 ___ cfe-commits mailing list c

[clang-tools-extra] [clang-tidy] Workaround for cppcoreguidelines-pro-type-union-access if memLoc is invalid (PR #104540)

2024-08-16 Thread Piotr Zegar via cfe-commits
@@ -23,8 +23,12 @@ void ProTypeUnionAccessCheck::registerMatchers(MatchFinder *Finder) { void ProTypeUnionAccessCheck::check(const MatchFinder::MatchResult &Result) { const auto *Matched = Result.Nodes.getNodeAs("expr"); - diag(Matched->getMemberLoc(), - "do not acce

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-08-16 Thread via cfe-commits
earnol wrote: How i can see the full amount of breakage on different platforms proactively? I have created a PR: https://github.com/llvm/llvm-project/pull/104607 to address the big endian issue with the test as my // REQUIRES: x86-registered-target turned out not to be enough to exclude running

[clang] [llvm] [RISCV] Add Hazard3 CPU (PR #102452)

2024-08-16 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/102452 >From 0e9579c91242fc63eb2cb686adc105fd248fef91 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Fri, 16 Aug 2024 07:52:53 -0700 Subject: [PATCH 1/2] [clang][test] Split invalid-cpu-note tests This change does tw

[clang] [llvm] [RISCV] Add Hazard3 CPU (PR #102452)

2024-08-16 Thread Sam Elliott via cfe-commits
lenary wrote: I've updated this and gone with `rp2350-hazard3` as that's the prevailing consensus. This is stacked on #104601 because i got fed up with the invalid cpu note tests. Otherwise it's ready to review. https://github.com/llvm/llvm-project/pull/102452

[clang] [llvm] [RISCV] Add Hazard3 CPU (PR #102452)

2024-08-16 Thread Sam Elliott via cfe-commits
https://github.com/lenary ready_for_review https://github.com/llvm/llvm-project/pull/102452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)

2024-08-16 Thread Alexander Kornienko via cfe-commits
@@ -264,6 +264,7 @@ Bug Fixes to C++ Support - Properly reject defaulted copy/move assignment operators that have a non-reference explicit object parameter. - Clang now properly handles the order of attributes in `extern` blocks. (#GH101990). - Fixed an assertion failure by p

[clang] [clang][test] Split invalid-cpu-note tests (PR #104601)

2024-08-16 Thread Lucas Duarte Prates via cfe-commits
https://github.com/pratlucas approved this pull request. LGTM. Thanks for splitting these! https://github.com/llvm/llvm-project/pull/104601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-16 Thread Chris B via cfe-commits
@@ -1121,3 +1121,99 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { } return false; } + +bool SemaHLSL::CheckCompatibleParameterABI(FunctionDecl *New, + FunctionDecl *Old) { + if (New->getNumPar

<    1   2   3   4   >