[clang] [clang-format] Add new option: WrapNamespaceBodyWithNewlines (PR #106145)

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

[clang] Revert "[clang] Add nuw attribute to GEPs" (PR #106343)

2024-08-28 Thread via cfe-commits
zmodem wrote: > > Please let me know if you have a fix for that. I'll land revert in the > > morning by PDT. > > Thank you for flagging this up and opening this @vitalybuka - I'm taking a > look now to see if there's an easy enough fix to save reverting. No need to save reverting --- revertin

[clang] Revert "[clang] Add nuw attribute to GEPs" (PR #106343)

2024-08-28 Thread via cfe-commits
https://github.com/zmodem closed https://github.com/llvm/llvm-project/pull/106343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-08-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/102857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang] Add nuw attribute to GEPs" (PR #106343)

2024-08-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/4934 Here is the relevan

[clang] [clang][RISCV] Remove `experimental` for vector crypto intrinsics (PR #106359)

2024-08-28 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/106359 The C intrinsic spec is ratified: https://github.com/riscv-non-isa/rvv-intrinsic-doc/pull/234. >From 59157100eac32981821eb15bce55d58f5f964bac Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Wed, 28 Aug 2024 0

[clang] [clang][RISCV] Remove `experimental` for vector crypto intrinsics (PR #106359)

2024-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brandon Wu (4vtomat) Changes The C intrinsic spec is ratified: https://github.com/riscv-non-isa/rvv-intrinsic-doc/pull/234. --- Patch is 81.53 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/1

[clang-tools-extra] [clang-tidy] Extend `bugprone-sizeof-expression` with matching `P +- sizeof(T)` and `P +- N * sizeof(T)` cases, add `cert-arr39-c` alias (PR #106061)

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

[clang-tools-extra] [clang-tidy] Extend `bugprone-sizeof-expression` with matching `P +- sizeof(T)` and `P +- N * sizeof(T)` cases, add `cert-arr39-c` alias (PR #106061)

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

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

2024-08-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/102857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV] Remove `experimental` for vector crypto intrinsics (PR #106359)

2024-08-28 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp commented: Do we still need this? ``` def Experimental : SubtargetFeature<"experimental", "HasExperimental", "true", "Experimental intrinsics">; ``` https://github.com/llvm/llvm-project/pull/106359

[clang] [clang][RISCV] Remove `experimental` for vector crypto intrinsics (PR #106359)

2024-08-28 Thread Brandon Wu via cfe-commits
4vtomat wrote: > Do we still need this? > > ``` > def Experimental >: SubtargetFeature<"experimental", "HasExperimental", > "true", "Experimental intrinsics">; > ``` I guess we do in case there is any other extension that encounter the same situation lol~ https://git

[clang] [llvm] [AArch64] Attempt to further split the arch default and implied exts. (PR #106304)

2024-08-28 Thread Tomas Matheson via cfe-commits
tmatheson-arm wrote: This looks like the right direction to go. https://github.com/llvm/llvm-project/pull/106304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Minor updates to C++ DR page design (PR #106360)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/106360 This patch updates `make_cxx_dr_status` script to use the same spoiler-like way to hide additional details that `cxx_status.html` uses. This gives implemented yet unresolved DRs new but very familiar look: ![s9

[clang] [clang] Minor updates to C++ DR page design (PR #106360)

2024-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch updates `make_cxx_dr_status` script to use the same spoiler-like way to hide additional details that `cxx_status.html` uses. This gives implemented yet unresolved DRs new but very familiar l

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

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
@@ -101,6 +101,26 @@ static_assert(!__is_layout_compatible(StructWithAnonUnion, StructWithAnonUnion3) #endif } // namespace cwg2759 +#if __cplusplus >= 202002L +namespace cwg2770 { // cwg2770: 20 +template +struct B { + static_assert(sizeof(T) == 1); + using type = int; +};

[clang] 15405b3 - [Clang] [Docs] Document runtime config directory options (#66593)

2024-08-28 Thread via cfe-commits
Author: Reagan Date: 2024-08-28T12:54:28+02:00 New Revision: 15405b32b1cdbefab9ce1b1f301a51ae25404037 URL: https://github.com/llvm/llvm-project/commit/15405b32b1cdbefab9ce1b1f301a51ae25404037 DIFF: https://github.com/llvm/llvm-project/commit/15405b32b1cdbefab9ce1b1f301a51ae25404037.diff LOG: [

[clang] Document runtime config directory options (PR #66593)

2024-08-28 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/66593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
@@ -568,6 +568,80 @@ namespace cwg137 { // cwg137: yes const volatile int *cvqcv = static_cast(cvp); } +namespace cwg138 { // cwg138: partial +namespace example1 { +void foo(); // #cwg138-ex1-foo +namespace A { + using example1::foo; // #cwg138-ex1-using + class X { +s

[clang] [clang][bytecode] Diagnose array-to-pointer decays of dummy pointers (PR #106366)

2024-08-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/106366 We have type information for them now, so we can do this. >From 670598d602949cee9bc8cbfe563563aa699d8505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 28 Aug 2024 12:58:29 +0200 Subje

[clang] [clang][bytecode] Diagnose array-to-pointer decays of dummy pointers (PR #106366)

2024-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We have type information for them now, so we can do this. --- Full diff: https://github.com/llvm/llvm-project/pull/106366.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.h (+1-1) - (modi

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

2024-08-28 Thread Younan Zhang via cfe-commits
@@ -101,6 +101,26 @@ static_assert(!__is_layout_compatible(StructWithAnonUnion, StructWithAnonUnion3) #endif } // namespace cwg2759 +#if __cplusplus >= 202002L +namespace cwg2770 { // cwg2770: 20 +template +struct B { + static_assert(sizeof(T) == 1); + using type = int; +};

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-08-28 Thread via cfe-commits
https://github.com/nebulark created https://github.com/llvm/llvm-project/pull/106369 This change moves the flattening of commandline arguments for LF_BUILDINFO into the compiler frontend. This way other compiler frontends that use LLVM can do that flattening in a way that makes sense for them.

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-08-28 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] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-28 Thread via cfe-commits
Sirraide wrote: (Unassigning myself because I’m not familiar enough w/ the details of substitution to review this in a meaningful way). That said, I think this is still missing a release note isn’t it? :) https://github.com/llvm/llvm-project/pull/102857

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (nebulark) Changes This change moves the flattening of commandline arguments for LF_BUILDINFO into the compiler frontend. This way other compiler frontends that use LLVM can do that flattening in a way that makes sense for them. E.g.

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (nebulark) Changes This change moves the flattening of commandline arguments for LF_BUILDINFO into the compiler frontend. This way other compiler frontends that use LLVM can do that flattening in a way that makes sense for th

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo Author: None (nebulark) Changes This change moves the flattening of commandline arguments for LF_BUILDINFO into the compiler frontend. This way other compiler frontends that use LLVM can do that flattening in a way that makes sense for them.

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

2024-08-28 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > (Unassigning myself because I’m not familiar enough w/ the details of > substitution to review this in a meaningful way). No problem :) > That said, I think this is still missing a release note isn’t it? :) Yeah, I realized it the moment after I pushed the last commit, and I

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-28 Thread via cfe-commits
@@ -1957,15 +1945,13 @@ multiclass VCMLA_ROTS { def : SOpInst<"vcmla" # ROT # "_lane", "...qI", "Q" # type, Op<(call "vcmla" # ROT, $p0, $p1, (bitcast $p0, (dup_typed laneqty , (call "vget_lane", (bitcast lanety, $p2), $p3>>; -let isLaneQ = 1 in { -

[clang] [llvm] [AArch64] Initial sched model for Neoverse N3 (PR #106371)

2024-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-aarch64 Author: Franklin (FLZ101) Changes References: * Arm Neoverse N3 Software Optimization Guide * Arm A64 Instruction Set for A-profile architecture --- Patch is 1.64 MiB, truncated to 20.00 KiB below, full versi

[clang] [analyzer] Moving TaintPropagation checker out of alpha (PR #67352)

2024-08-28 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: I have no concerns with moving forward here, my understanding is that the blockers have been resolved. Moreover, we are early in the development cycle for the next release so we still have a lot of time to get more experience with this check once it is move out of alpha. But I

[clang] [llvm] Added instant events and marking defered templated instantiation. (PR #103039)

2024-08-28 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: What is the reason for changing from `llvm::TimeTraceProfilerEntry*` to `std::shared_ptr`? We are also adding significant devirtualization cost with the added different event types. Can we do something like this: ``` enum class TimeTraceEventType { DurationEvent, InstantEvent }; st

[clang] [compiler-rt] [UBSan] Diagnose assumption violation (PR #104741)

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

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

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

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

2024-08-28 Thread via cfe-commits
https://github.com/Sirraide requested changes to this pull request. I’m pretty sure there are some fundamental problems with the current approach wrt how getting source locations for the attribute is being handled. The general approach for the rest of it seems fine from a cursory look, though.

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

2024-08-28 Thread via cfe-commits
@@ -2438,6 +2438,22 @@ bool Type::isIncompleteType(NamedDecl **Def) const { } } +bool Type::isIncompletableIncompleteType() const { + if (!isIncompleteType()) +return false; + + // Forward declarations of structs, classes, enums, and unions could be later + // complet

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

2024-08-28 Thread via cfe-commits
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // Note: This implementation relies on `CountAttributedType` being uniqu

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

2024-08-28 Thread via cfe-commits
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // Note: This implementation relies on `CountAttributedType` being uniqu

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

2024-08-28 Thread via cfe-commits
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { Sirraide wrote: This entire function seems like a very ba

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

2024-08-28 Thread via cfe-commits
@@ -3862,6 +3878,27 @@ CountAttributedType::CountAttributedType( DeclSlot[i] = CoupledDecls[i]; } +StringRef CountAttributedType::GetAttributeName(bool WithMacroPrefix) const { Sirraide wrote: Instead of doing this, it would be better to get a hold of the

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

2024-08-28 Thread via cfe-commits
@@ -8192,6 +8192,14 @@ ExprResult InitializationSequence::Perform(Sema &S, Kind.getRange().getEnd()); } else { CurInit = new (S.Context) ImplicitValueInitExpr(Step->Type); +// Note the return value isn't used to return early +// to pres

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

2024-08-28 Thread via cfe-commits
@@ -2440,6 +2440,26 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { return !isFunctionType(); } + /// \returns True if the type is incomplete and it is also a type that + /// cannot be completed by a later type definition. + /// + /// E.g. For

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

2024-08-28 Thread via cfe-commits
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // Note: This implementation relies on `CountAttributedType` being uniqu

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

2024-08-28 Thread via cfe-commits
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // Note: This implementation relies on `CountAttributedType` being uniqu

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

2024-08-28 Thread via cfe-commits
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // Note: This implementation relies on `CountAttributedType` being uniqu

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

2024-08-28 Thread via cfe-commits
@@ -8192,6 +8192,14 @@ ExprResult InitializationSequence::Perform(Sema &S, Kind.getRange().getEnd()); } else { CurInit = new (S.Context) ImplicitValueInitExpr(Step->Type); +// Note the return value isn't used to return early +// to pres

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

2024-08-28 Thread via cfe-commits
@@ -8238,6 +8246,15 @@ ExprResult InitializationSequence::Perform(Sema &S, } } + // Note the return value isn't used to return early so that additional + // diagnostics can be emitted and to preserve the AST as best as possible + // even though an

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

2024-08-28 Thread via cfe-commits
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // Note: This implementation relies on `CountAttributedType` being uniqu

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

2024-08-28 Thread via cfe-commits
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // Note: This implementation relies on `CountAttributedType` being uniqu

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-28 Thread Krasimir Georgiev via cfe-commits
krasimirgg wrote: It appears that this introduced a regression in code like this: ``` int d = 0; int c(int i) { return i; } void a() { double b = ((double)c(0)) * d / (double)0; } ``` After this patch, the last line gets formatted as: ``` void a() { double b = ((double)c(0))*d / (double)0; } ```

[clang] [llvm] [AArch64] Initial sched model for Neoverse N3 (PR #106371)

2024-08-28 Thread David Green via cfe-commits
@@ -380,6 +380,9 @@ ARM_CPU_NAME("neoverse-n1", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM_CPU_NAME("neoverse-n2", ARMV9A, FK_NEON_FP_ARMV8, false, (ARM::AEK_BF16 | ARM::AEK_DOTPROD | ARM::AEK_FP16FML | ARM::AEK_I8MM | ARM::AEK_RAS | ARM::AEK_SB )

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-28 Thread Pierre Jolivet via cfe-commits
prj- wrote: What's your version? ``` $ clang-format-20 gh.txt void a() { double b = ((double)c(0)) * d / (double)0; } ``` https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-28 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++20 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s + +template class S> +void create_unique() + requires (S{0}, true) {} + +template struct A { + constexpr A(Fn) {}; +}; + +template void create_unique(); +// CHECK: @_

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-28 Thread Krasimir Georgiev via cfe-commits
krasimirgg wrote: Ohh sorry, I had started with a stale clang-format commit. This is a non-issue at HEAD. https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang-tools-extra] [clang-tidy] Extend `bugprone-sizeof-expression` with matching `P +- sizeof(T)` and `P +- N * sizeof(T)` cases, add `cert-arr39-c` alias (PR #106061)

2024-08-28 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/106061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Extend `bugprone-sizeof-expression` with matching `P +- sizeof(T)` and `P +- N * sizeof(T)` cases, add `cert-arr39-c` alias (PR #106061)

2024-08-28 Thread Donát Nagy via cfe-commits
@@ -285,6 +288,50 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder *Finder) { hasRHS(ignoringParenImpCasts(SizeOfExpr.bind("sizeof-ptr-div-expr" .bind("sizeof-in-ptr-arithmetic-div"), this); + + // SEI CERT ARR39-C. Do not add or subt

[clang-tools-extra] [clang-tidy] Extend `bugprone-sizeof-expression` with matching `P +- sizeof(T)` and `P +- N * sizeof(T)` cases, add `cert-arr39-c` alias (PR #106061)

2024-08-28 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM, I didn't spot anything problematic. https://github.com/llvm/llvm-project/pull/106061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang-tools-extra] [clang-tidy] Extend `bugprone-sizeof-expression` with matching `P +- sizeof(T)` and `P +- N * sizeof(T)` cases, add `cert-arr39-c` alias (PR #106061)

2024-08-28 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/106061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-28 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/106036 >From 67e70c3abc2527d2f35abdc10ce2710dd9ebb918 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 26 Aug 2024 07:37:04 +0300 Subject: [PATCH] [Clang] restrict use of attribute names reserved by the C++ st

[clang] [llvm] Added instant events and marking defered templated instantiation. (PR #103039)

2024-08-28 Thread via cfe-commits
https://github.com/ivanaivanovska updated https://github.com/llvm/llvm-project/pull/103039 >From 6d3e4470dfe21f8f3832a2d38b4c4327aa7422a3 Mon Sep 17 00:00:00 2001 From: Ivana Ivanovska Date: Tue, 13 Aug 2024 10:30:34 + Subject: [PATCH 1/2] Added instant events and marking defered templated

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-28 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH 1/2] [Clang] prevent assertion failure when converting vectors

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

2024-08-28 Thread via cfe-commits
@@ -908,9 +936,9 @@ class Analyzer { static bool isSafeBuiltinFunction(const FunctionDecl *FD) { unsigned BuiltinID = FD->getBuiltinID(); switch (BuiltinID) { - case 0: // not builtin + case 0: // Not builtin. return false; - default: //

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

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

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

2024-08-28 Thread via cfe-commits
@@ -210,24 +210,88 @@ void nb18(void (^block)() [[clang::nonblocking]]) [[clang::nonblocking]] } // Builtin functions -void nb18a() [[clang::nonblocking]] { +void nb19() [[clang::nonblocking]] { __builtin_assume(1); void *ptr = __builtin_malloc(1); // expected

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

2024-08-28 Thread via cfe-commits
@@ -1187,13 +1234,261 @@ Analyzer::AnalysisMap::~AnalysisMap() { namespace clang { -void performEffectAnalysis(Sema &S, TranslationUnitDecl *TU) { - if (S.hasUncompilableErrorOccurred() || S.Diags.getIgnoreAllWarnings()) -// exit if having uncompilable errors or ignoring

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

2024-08-28 Thread via cfe-commits
@@ -1,44 +1,67 @@ -//=== EffectAnalysis.cpp - Sema warnings for function effects -===// +//=== SemaFunctionEffects.cpp - Sema handling of function effects -===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See ht

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

2024-08-28 Thread via cfe-commits
@@ -210,24 +210,88 @@ void nb18(void (^block)() [[clang::nonblocking]]) [[clang::nonblocking]] } // Builtin functions -void nb18a() [[clang::nonblocking]] { +void nb19() [[clang::nonblocking]] { __builtin_assume(1); void *ptr = __builtin_malloc(1); // expected

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

2024-08-28 Thread via cfe-commits
https://github.com/Sirraide commented: I think this is in pretty good shape at this point. I’ve pointed out a few more things I noticed just now, but I think at this point I’d like another set of eyes to come and take a look at this in case I missed something. https://github.com/llvm/llvm-proj

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-28 Thread Jonathan Wakely via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx11 -pedantic -std=c++11 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx14 -pedantic -std=c++14 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx17 -pedantic -std=c++17 %s +// RUN: %clang_cc1 -

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-28 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx11 -pedantic -std=c++11 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx14 -pedantic -std=c++14 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx17 -pedantic -std=c++17 %s +// RUN: %clang_cc1 -

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-28 Thread Jonathan Wakely via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx11 -pedantic -std=c++11 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx14 -pedantic -std=c++14 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx17 -pedantic -std=c++17 %s +// RUN: %clang_cc1 -

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-28 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/105996 >From 0e4c511107f76da085a8019cf2eca78c3a5a0754 Mon Sep 17 00:00:00 2001 From: yronglin Date: Mon, 26 Aug 2024 02:09:31 +0800 Subject: [PATCH 1/6] [Clang][Interp] Implement constexpr vector unary operators +, -

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-28 Thread Nikolas Klauser via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { philnik777 wrote: `-nostdlib` doesn't imply that you don't have a standard lib

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-28 Thread Jonathan Wakely via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx11 -pedantic -std=c++11 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx14 -pedantic -std=c++14 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx17 -pedantic -std=c++17 %s +// RUN: %clang_cc1 -

[clang] [clang] Output location info in separate fields for -ftime-trace (PR #106277)

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

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-28 Thread via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++20 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s + +template class S> +void create_unique() + requires (S{0}, true) {} + +template struct A { + constexpr A(Fn) {}; +}; + +template void create_unique(); +// CHECK: @_

[clang] [WIP][clang] Fix std::tm etc. mangling on Solaris (PR #106353)

2024-08-28 Thread via cfe-commits
cor3ntin wrote: > > Can you also add a changelog entry? Thanks! > > I've never seen them used in LLVM. Has that changed recently? Checkout `clang/docs/ReleaseNotes.rst` https://github.com/llvm/llvm-project/pull/106353 ___ cfe-commits mailing list cf

[clang] [clang] Minor updates to C++ DR page design (PR #106360)

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

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-28 Thread Timm Baeder via cfe-commits
@@ -5312,6 +5314,120 @@ bool Compiler::VisitComplexUnaryOperator(const UnaryOperator *E) { return true; } +template +bool Compiler::VisitVectorUnaryOperator(const UnaryOperator *E) { + const Expr *SubExpr = E->getSubExpr(); + assert(SubExpr->getType()->isVectorType()); +

[clang] Adding optin.taint.TaintedDiv checker (PR #106389)

2024-08-28 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 c992690179eb5de6efe47d5c8f3a23f2302723f2 adf8f04eac4ff6e71c985bb991f68c2238a3462f --e

[clang] [Driver] Add -mbranch-protection to ARM and AArch64 multilib flags (PR #106391)

2024-08-28 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 96e1320a9aa8fd010b02fc6751da801c48725a02 b3d7b528a422f7c44b535c480acbd74f03555b4d --e

[clang] [Clang][AST] Add Test Cases for Reference Qualifiers in Opr Overload (PR #102878)

2024-08-28 Thread Muhammad Abdul via cfe-commits
0xzre wrote: > FYI the tests are failing @cor3ntin The solution here #79748 doesn't pass the test too. Kinda expected not to pass the test clang https://github.com/llvm/llvm-project/pull/102878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Driver] Add -mbranch-protection to ARM and AArch64 multilib flags (PR #106391)

2024-08-28 Thread Lucas Duarte Prates via cfe-commits
https://github.com/pratlucas updated https://github.com/llvm/llvm-project/pull/106391 >From b3d7b528a422f7c44b535c480acbd74f03555b4d Mon Sep 17 00:00:00 2001 From: Lucas Prates Date: Wed, 28 Aug 2024 13:58:57 +0100 Subject: [PATCH 1/2] [Driver] Add -mbranch-protection to ARM and AArch64 multil

[clang] [llvm] [AArch64] Implement NEON vamin/vamax intrinsics (PR #99041)

2024-08-28 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/99041 >From 87f1a5aa2215a9fbc1bde7905b2fd5e8d5ff859a Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Mon, 15 Jul 2024 17:50:43 +0100 Subject: [PATCH 1/2] [AArch64] Implement NEON vamin/vamax intrinsics Th

[clang] [Driver] Add -mbranch-protection to ARM and AArch64 multilib flags (PR #106391)

2024-08-28 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/106391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix #55390 here as well (PR #106395)

2024-08-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/106395 Ignore the multiplication overflow but report the 0 denominator. >From 7b1cfea20ae76a7b04ae63bf6d6082488c17b2e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 28 Aug 2024 15:50:10 +020

[clang] [clang][bytecode] Fix #55390 here as well (PR #106395)

2024-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Ignore the multiplication overflow but report the 0 denominator. --- Full diff: https://github.com/llvm/llvm-project/pull/106395.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.h (+9-2)

[clang] Fix clang-format-test.el past 625841c (PR #106398)

2024-08-28 Thread Danial Klimkin via cfe-commits
https://github.com/dklimkin created https://github.com/llvm/llvm-project/pull/106398 None >From edeb17fdfb5ef6ce074fbdeec35d3e28b71592ca Mon Sep 17 00:00:00 2001 From: Danial Klimkin Date: Wed, 28 Aug 2024 15:58:23 +0200 Subject: [PATCH] Fix clang-format-test.el past 625841c --- clang/tools/

[clang] Adding optin.taint.TaintedDiv checker (PR #106389)

2024-08-28 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/106389 >From e979542270b21f4733baf25a7037675af598ca07 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Wed, 28 Aug 2024 15:32:35 +0200 Subject: [PATCH] Adding optin.taint.TaintedDiv checker Tainted division operation

[clang] Fix clang-format-test.el past 625841c (PR #106398)

2024-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Danial Klimkin (dklimkin) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/106398.diff 1 Files Affected: - (modified) clang/tools/clang-format/clang-format-test.el (+5-5) ``diff diff --git a/clang/tool

[clang] Fix clang-format-test.el past 625841c (PR #106398)

2024-08-28 Thread Danial Klimkin via cfe-commits
https://github.com/dklimkin closed https://github.com/llvm/llvm-project/pull/106398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 158ba73 - Fix clang-format-test.el past 625841c (#106398)

2024-08-28 Thread via cfe-commits
Author: Danial Klimkin Date: 2024-08-28T16:00:50+02:00 New Revision: 158ba731c9ecaf39f1790728a589797599c38af8 URL: https://github.com/llvm/llvm-project/commit/158ba731c9ecaf39f1790728a589797599c38af8 DIFF: https://github.com/llvm/llvm-project/commit/158ba731c9ecaf39f1790728a589797599c38af8.diff

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-28 Thread via cfe-commits
https://github.com/kiran-isaac updated https://github.com/llvm/llvm-project/pull/102896 >From eb7551e83618d8452f5dadae1be4aff8f6c9d23c Mon Sep 17 00:00:00 2001 From: Kiran Date: Thu, 8 Aug 2024 13:07:24 +0100 Subject: [PATCH 1/2] [ARM] musttail fixes Backend: - Caller and callee arguments no l

[clang] [clang] Add nuw attribute to GEPs (PR #105496)

2024-08-28 Thread Nikita Popov via cfe-commits
nikic wrote: @mikaelholmen Thanks for the reproducer, this makes the issue clear. BasicAA is incorrectly returning NoAlias for the pointers due to https://github.com/llvm/llvm-project/pull/98608. The issue is that the `add` gets decomposed, but we preserve the nuw flag, effectively making it

[clang] Adding optin.taint.TaintedDiv checker (PR #106389)

2024-08-28 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/106389 >From ccc5da054903568fbd317d5c773251ed84f8f087 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Wed, 28 Aug 2024 15:32:35 +0200 Subject: [PATCH] Adding optin.taint.TaintedDiv checker Tainted division operation

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-28 Thread via cfe-commits
https://github.com/kiran-isaac updated https://github.com/llvm/llvm-project/pull/102896 >From eb7551e83618d8452f5dadae1be4aff8f6c9d23c Mon Sep 17 00:00:00 2001 From: Kiran Date: Thu, 8 Aug 2024 13:07:24 +0100 Subject: [PATCH 1/3] [ARM] musttail fixes Backend: - Caller and callee arguments no l

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-28 Thread via cfe-commits
https://github.com/kiran-isaac updated https://github.com/llvm/llvm-project/pull/102896 >From eb7551e83618d8452f5dadae1be4aff8f6c9d23c Mon Sep 17 00:00:00 2001 From: Kiran Date: Thu, 8 Aug 2024 13:07:24 +0100 Subject: [PATCH 1/3] [ARM] musttail fixes Backend: - Caller and callee arguments no l

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-28 Thread via cfe-commits
@@ -3088,70 +3057,44 @@ bool ARMTargetLowering::IsEligibleForTailCallOptimization( getEffectiveCallingConv(CalleeCC, isVarArg), getEffectiveCallingConv(CallerCC, CallerF.isVarArg()), MF, C, Ins, CCAssignFnForReturn(CalleeCC, isVarArg), -

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-28 Thread via cfe-commits
@@ -67,33 +327,85 @@ declare i32 @e3(ptr nocapture byval(%struct.LargeStruct) align 16 %in) nounwind ; We can't do tail call since address of s is passed to the callee and part of ; s is in caller's local frame. kiran-isaac wrote: I agree, I have removed the c

<    1   2   3   4   5   6   >