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

2024-08-21 Thread Aaron Ballman via cfe-commits
@@ -335,7 +335,7 @@ def note_constexpr_new_non_replaceable : Note< def note_constexpr_new_placement : Note< "this placement new expression is not yet supported in constant expressions">; def note_constexpr_placement_new_wrong_type : Note< - "placement new would change type

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

2024-08-21 Thread Aaron Ballman via cfe-commits
@@ -10003,23 +10003,14 @@ bool PointerExprEvaluator::VisitCXXNewExpr(const CXXNewExpr *E) { return false; FunctionDecl *OperatorNew = E->getOperatorNew(); + QualType AllocType = E->getAllocatedType(); + QualType TargetType = AllocType; bool IsNothrow = false;

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

2024-08-21 Thread Aaron Ballman via cfe-commits
@@ -994,7 +994,7 @@ namespace placement_new_delete { constexpr bool bad(int which) { switch (which) { case 0: - delete new (placement_new_arg{}) int; // expected-note {{call to placement 'operator new'}} + delete new (placement_new_arg{}) int; // expected-n

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

2024-08-21 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,78 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + + +namespace std { + using size_t = decltype(sizeof(0)); +} + +void *operator new(std::size_t, void *p) { return p; } +void* operator new[] (std::size_t, void* p) {return p;} + + +consteval int ok() { +int i; +n

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

2024-08-21 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,78 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + + +namespace std { + using size_t = decltype(sizeof(0)); +} + +void *operator new(std::size_t, void *p) { return p; } +void* operator new[] (std::size_t, void* p) {return p;} + + +consteval int ok() { +int i; +n

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

2024-08-21 Thread Aaron Ballman via cfe-commits
@@ -309,7 +309,7 @@ namespace placement_new_delete { constexpr bool bad(int which) { switch (which) { case 0: - delete new (placement_new_arg{}) int; // ref-note {{call to placement 'operator new'}} \ + delete new (placement_new_arg{}) int; // ref-note {{th

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

2024-08-21 Thread via cfe-commits
https://github.com/cor3ntin 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-21 Thread via cfe-commits
cor3ntin wrote: > Thank you for working on this! Given that it's an extension in C++20 mode, > we're missing diagnostics and test coverage for issuing extension/precompat > diagnostics. No longer an extension after our last chat - i just forgot to update the description https://github.com/ll

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

2024-08-21 Thread via cfe-commits
@@ -6691,7 +6691,7 @@ static bool HandleDestructionImpl(EvalInfo &Info, SourceRange CallRange, if (Size && Size > Value.getArrayInitializedElts()) expandArray(Value, Value.getArraySize() - 1); -for (; Size != 0; --Size) { +for (Size = Value.getArraySize(); S

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

2024-08-21 Thread via cfe-commits
@@ -245,7 +245,7 @@ namespace std { namespace PlacementNew { constexpr int foo() { // both-error {{never produces a constant expression}} char c[sizeof(int)]; -new (c) int{12}; // ref-note {{call to placement 'operator new'}} \ +new (c) int{12}; // ref-note {{this

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

2024-08-21 Thread via cfe-commits
@@ -309,7 +309,7 @@ namespace placement_new_delete { constexpr bool bad(int which) { switch (which) { case 0: - delete new (placement_new_arg{}) int; // ref-note {{call to placement 'operator new'}} \ + delete new (placement_new_arg{}) int; // ref-note {{th

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

2024-08-21 Thread via cfe-commits
@@ -0,0 +1,78 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + + +namespace std { + using size_t = decltype(sizeof(0)); +} + +void *operator new(std::size_t, void *p) { return p; } +void* operator new[] (std::size_t, void* p) {return p;} + + +consteval int ok() { +int i; +n

[clang] [Clang] [NFC] Introduce `DynamicRecursiveASTVisitor` (PR #105195)

2024-08-21 Thread via cfe-commits
@@ -0,0 +1,252 @@ +#ifndef LLVM_CLANG_AST_DYNAMIC_RECURSIVE_AST_VISITOR_H +#define LLVM_CLANG_AST_DYNAMIC_RECURSIVE_AST_VISITOR_H + +#include "clang/AST/Attr.h" +#include "clang/AST/ExprConcepts.h" +#include "clang/AST/TypeLoc.h" + +namespace clang { +class ASTContext; + +/// Recu

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

2024-08-21 Thread Aaron Ballman via cfe-commits
@@ -245,7 +245,7 @@ namespace std { namespace PlacementNew { constexpr int foo() { // both-error {{never produces a constant expression}} char c[sizeof(int)]; -new (c) int{12}; // ref-note {{call to placement 'operator new'}} \ +new (c) int{12}; // ref-note {{this

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

2024-08-21 Thread Sam Elliott via cfe-commits
lenary wrote: This is also a limitation if you use `@` as a prefix as suggested in the discourse thread - GCC's `-print-multi-lib` prints out flags with the first `-` replaced with an `@`, which iirc some build systems also parse (i recall crosstool-ng, but maybe it's newlib within a crosstoo

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

2024-08-21 Thread Aaron Ballman via cfe-commits
@@ -6691,7 +6691,7 @@ static bool HandleDestructionImpl(EvalInfo &Info, SourceRange CallRange, if (Size && Size > Value.getArrayInitializedElts()) expandArray(Value, Value.getArraySize() - 1); -for (; Size != 0; --Size) { +for (Size = Value.getArraySize(); S

[clang] [Clang] [NFC] Introduce `DynamicRecursiveASTVisitor` (PR #105195)

2024-08-21 Thread via cfe-commits
Sirraide wrote: > I wonder if we can reduce binary size by simply marking RAV as > `visibility("hidden")` Hmm, I haven’t thought about that, but I’m not convinced it would help: the main issue w/ the RAV is that to traverse *every possible AST* that you might end up handing it, you need an in

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

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

[clang] [llvm] [Coverage][MC/DC] Show uncoverable and unreachable conditions (PR #94137)

2024-08-21 Thread Alan Phipps via cfe-commits
@@ -1128,15 +1132,22 @@ struct CounterCoverageMappingBuilder BranchParams = mcdc::BranchParameters{ID, Conds}; // If a condition can fold to true or false, the corresponding branch - // will be removed. Create a region with both counters hard-coded to -

[clang] [llvm] [Coverage][MC/DC] Show uncoverable and unreachable conditions (PR #94137)

2024-08-21 Thread Alan Phipps via cfe-commits
@@ -47,7 +47,7 @@ // CHECK: Branch (103:9): [True: 9, False: 1] // CHECK: switches() -// CHECK: Branch (113:3): [True: 1, False: 0] +// CHECK: Branch (113:3): [Folded - Ignored] evodius96 wrote: I'm not sure I see why the evaluation of this case (and line 60)

[clang] [llvm] [Coverage][MC/DC] Show uncoverable and unreachable conditions (PR #94137)

2024-08-21 Thread Alan Phipps via cfe-commits
evodius96 wrote: > I have no authority to request reviewers or commit this patch. So let's @ > someone, @chapuni @ornata @hanickadot I had some comments in the pending state that I just now noticed :( sorry about that. https://github.com/llvm/llvm-project/pull/94137 __

[clang] [llvm] [OpenMP] Diagnostic check for imperfect loop collapse (PR #96087)

2024-08-21 Thread Michael Kruse via cfe-commits
Meinersbur wrote: I agree with @kparzysz that the examples you are using are generally unsafe. E.g. with ```c #pragma omp parallel for collapse(2) for (int i = 0; i < N; i++) { arr[i][i] = ...; for (int j = 0; j < N; j++) { arr[i][j] = ...; } } ``` there shoul

[clang] [clang] Diagnose functions with too many parameters (PR #104833)

2024-08-21 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot2` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/2982 Here is the relevant piece of the bu

[clang] [llvm] [RISC-V] Make EmitRISCVCpuSupports accept multiple features (PR #104917)

2024-08-21 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `bolt-x86_64-ubuntu-nfc` running on `bolt-worker` while building `clang,llvm` at step 9 "test-build-bolt-check-large-bolt". Full details are available at: https://lab.llvm.org/buildbot/#/builders/92/builds/4968 Here is the re

[clang] Fix bug with -ffp-contract=fast-honor-pragmas (PR #104857)

2024-08-21 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/104857 >From 59ac754b9a88037e2348f16e5dc7efbd437d65cb Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Mon, 19 Aug 2024 13:41:40 -0700 Subject: [PATCH 1/3] Fix bug with -ffp-contract=fast-honor-pragmas This fixes a

[clang] Fix bug with -ffp-contract=fast-honor-pragmas (PR #104857)

2024-08-21 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/104857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c0d2222 - Fix bug with -ffp-contract=fast-honor-pragmas (#104857)

2024-08-21 Thread via cfe-commits
Author: Andy Kaylor Date: 2024-08-21T08:10:26-07:00 New Revision: c0d19a8d01d3945100114256d26cfe833a1c URL: https://github.com/llvm/llvm-project/commit/c0d19a8d01d3945100114256d26cfe833a1c DIFF: https://github.com/llvm/llvm-project/commit/c0d19a8d01d3945100114256d26cfe833a1c.diff L

[clang] [flang] [lldb] [llvm] [mlir] [APInt] Assert correct values in APInt constructor (PR #80309)

2024-08-21 Thread Nikita Popov via cfe-commits
nikic wrote: Okay, looks like I tracked down all the assertion failures in tests. My plan would now be to land this in three phases, first to add the new assertions and implicitTrunc parameter, but with implicitTrunc=true by default. Then to land fixes (possibly split up further), and finally

[clang] Fix codegen for transparent_union function params (PR #104816)

2024-08-21 Thread Lei Huang via cfe-commits
lei137 wrote: > I think the issue could be handled a different (more generic) way, by pulling > `useFirstFieldIfTransparentUnion` to the caller and taking transparent unions > into account when emitting LLVM IR for the formal / actual parameters > somewhere in `CGCall.cpp`, so that ABIInfo imp

[clang] [Sparc] Add flags to enable errata workaround pass for GR712RC and UT700 (PR #104742)

2024-08-21 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/104742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix codegen for transparent_union function params (PR #104816)

2024-08-21 Thread Sergei Barannikov via cfe-commits
s-barannikov wrote: > However I feel like it is out of scope for what I am trying to do right now. > Would this be better as a separate PR to change how this is handled? Sure https://github.com/llvm/llvm-project/pull/104816 ___ cfe-commits mailing l

[clang] [NFC] Replace bool <= bool comparison (PR #102948)

2024-08-21 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok edited https://github.com/llvm/llvm-project/pull/102948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Make MMIWP not have ownership over MMI + Remove Move Constructor of MMI + Make MMI Only Use and Externally-Created MCContext (PR #105541)

2024-08-21 Thread Matin Raayai via cfe-commits
https://github.com/matinraayai created https://github.com/llvm/llvm-project/pull/105541 This PR makes the following changes, addressing issues raised in #104834 and #98770: 1. MMIWP behaves like the new PM's analysis Pass; It only takes a reference to an externally created MMI. 2. Removed the

[clang] [llvm] Make MMIWP not have ownership over MMI + Remove Move Constructor of MMI + Make MMI Only Use and Externally-Created MCContext (PR #105541)

2024-08-21 Thread Matin Raayai via cfe-commits
https://github.com/matinraayai converted_to_draft 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] Make MMIWP not have ownership over MMI + Remove Move Constructor of MMI + Make MMI Only Use and Externally-Created MCContext (PR #105541)

2024-08-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lto @llvm/pr-subscribers-tools-llvm-exegesis Author: Matin Raayai (matinraayai) Changes This PR makes the following changes, addressing issues raised in #104834 and #98770: 1. MMIWP behaves like the new PM's analysis Pass; It only takes a reference to a

[clang] [llvm] Make MMIWP not have ownership over MMI + Remove Move Constructor of MMI + Make MMI Only Use and Externally-Created MCContext (PR #105541)

2024-08-21 Thread Matin Raayai via cfe-commits
https://github.com/matinraayai edited 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] Make MMIWP not have ownership over MMI + Remove Move Constructor of MMI + Make MMI Only Use and Externally-Created MCContext (PR #105541)

2024-08-21 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang] [llvm] Make MMIWP not have ownership over MMI + Remove Move Constructor of MMI + Make MMI Only Use and Externally-Created MCContext (PR #105541)

2024-08-21 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 93eda08babe95188ee41400035abaade79cda7d1 923978640a76a33d77ab2c794953479efa86b73c --e

[clang] [llvm] [NFC][SetTheory] Refactor to use const pointers and range loops (PR #105544)

2024-08-21 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/105544 - Refactor SetTheory code to use const pointers when possible. - Use auto for variables initialized using dyn_cast<>. - Use range based for loops and early continue. >From b9b2cea49dab03ad2f01b70ffa784be8a5e23b6

[clang] [clang][ASTImporter] New fix for default template parameter values. (PR #101836)

2024-08-21 Thread Balázs Kéri via cfe-commits
@@ -5968,11 +5962,21 @@ ASTNodeImporter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { } if (D->hasDefaultArgument()) { +// Default argument can be "inherited" when it has a reference to the +// previous declaration (of the default argument) which is stored

[clang] [llvm] [NFC][SetTheory] Refactor to use const pointers and range loops (PR #105544)

2024-08-21 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 6816a137985bfa38cda20b9cd4e23c361c3bd0de b9b2cea49dab03ad2f01b70ffa784be8a5e23b6d --e

[clang] [llvm] [NFC][SetTheory] Refactor to use const pointers and range loops (PR #105544)

2024-08-21 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/105544 >From 6ead1e81f891a826b55aa74ef13b132eb854bb47 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 21 Aug 2024 05:59:33 -0700 Subject: [PATCH] [NFC][SetTheory] Refactor to use const pointers and range loops

[clang] [clang][ASTImporter] New fix for default template parameter values. (PR #101836)

2024-08-21 Thread Balázs Kéri via cfe-commits
@@ -5968,11 +5962,21 @@ ASTNodeImporter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { } if (D->hasDefaultArgument()) { +// Default argument can be "inherited" when it has a reference to the +// previous declaration (of the default argument) which is stored

[clang] [clang][ASTImporter] New fix for default template parameter values. (PR #101836)

2024-08-21 Thread Balázs Kéri via cfe-commits
@@ -5968,11 +5962,21 @@ ASTNodeImporter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { } if (D->hasDefaultArgument()) { +// Default argument can be "inherited" when it has a reference to the +// previous declaration (of the default argument) which is stored

[clang] 625841c - [clang-format] Use double hyphen for multiple-letter flags (#100978)

2024-08-21 Thread via cfe-commits
Author: magic-akari Date: 2024-08-21T18:22:21+02:00 New Revision: 625841c3be4dbaab089c01217726a2906f3a8103 URL: https://github.com/llvm/llvm-project/commit/625841c3be4dbaab089c01217726a2906f3a8103 DIFF: https://github.com/llvm/llvm-project/commit/625841c3be4dbaab089c01217726a2906f3a8103.diff L

[clang] [clang-format] Use double hyphen for multiple-letter flags (PR #100978)

2024-08-21 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks closed https://github.com/llvm/llvm-project/pull/100978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Use double hyphen for multiple-letter flags (PR #100978)

2024-08-21 Thread via cfe-commits
github-actions[bot] wrote: @magic-akari Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a bu

[clang] [clang-format] Treat new expressions as simple functions (PR #105168)

2024-08-21 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: How does it look like without the new? https://github.com/llvm/llvm-project/pull/105168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Make MMIWP not have ownership over MMI + Remove Move Constructor of MMI + Make MMI Only Use and Externally-Created MCContext (PR #105541)

2024-08-21 Thread Matin Raayai via cfe-commits
https://github.com/matinraayai updated https://github.com/llvm/llvm-project/pull/105541 >From 4030c78148a2cb9b584038bd2ce522906b710f7e Mon Sep 17 00:00:00 2001 From: matinraayai <30674652+matinraa...@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:22:11 -0400 Subject: [PATCH 1/3] Made MMI on

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

2024-08-21 Thread Joseph Huber via cfe-commits
jhuber6 wrote: ```llvm/llvm-project/build/lib/clang/20/include/avx10_2convertintrin.h:29:19: error: use of undeclared identifier '__builtin_ia32_vcvt2ps2phx128_mask' 29 | return (__m128h)__builtin_ia32_vcvt2ps2phx128_mask( | ^ ``` I'm getting a lot of errors like thi

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

2024-08-21 Thread Joseph Huber via cfe-commits
jhuber6 wrote: My guess is that you added these as a target dependent builtin, but made the headers always reference them. https://github.com/llvm/llvm-project/pull/101600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

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

2024-08-21 Thread Joseph Huber via cfe-commits
jhuber6 wrote: This is all it takes to reproduce this on my machine so I'm going to revert. x64 Linux, CPU is `znver3`. ```console echo "#include " | ./bin/clang++ -x c++ - ``` https://github.com/llvm/llvm-project/pull/101600 ___ cfe-commits mailing l

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

2024-08-21 Thread Aaron Ballman via cfe-commits
@@ -245,7 +245,7 @@ namespace std { namespace PlacementNew { constexpr int foo() { // both-error {{never produces a constant expression}} char c[sizeof(int)]; -new (c) int{12}; // ref-note {{call to placement 'operator new'}} \ +new (c) int{12}; // ref-note {{this

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

2024-08-21 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + + +namespace std { + using size_t = decltype(sizeof(0)); +} + +void *operator new(std::size_t, void *p) { return p; } +void* operator new[] (std::size_t, void* p) {return p;} + + +consteval int ok() { +int i; +

[clang] [Clang] Overflow Pattern Exclusions (PR #100272)

2024-08-21 Thread Justin Stitt via cfe-commits
JustinStitt wrote: @nico > The test added here was tweaked a bit and then deleted in > [07a8cba](https://github.com/llvm/llvm-project/commit/07a8cbaf8dc16bebf6e875173d20299d9cc47cc5) > > What gives? > > Instead of deleting tests, we should revert the PR that adds them and then > reland the P

[clang] [llvm] [Offload] Provide a kernel library useable by the offload runtime (PR #104168)

2024-08-21 Thread Johannes Doerfert via cfe-commits
@@ -393,22 +393,17 @@ struct CUDADeviceTy : public GenericDeviceTy { return Plugin::success(); } - virtual Error callGlobalConstructors(GenericPluginTy &Plugin, - DeviceImageTy &Image) override { -// Check for the presense of gl

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

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

[clang] [llvm] Make MMIWP not have ownership over MMI + Remove Move Constructor of MMI + Make MMI Only Use and Externally-Created MCContext (PR #105541)

2024-08-21 Thread Matin Raayai via cfe-commits
https://github.com/matinraayai updated https://github.com/llvm/llvm-project/pull/105541 >From 4030c78148a2cb9b584038bd2ce522906b710f7e Mon Sep 17 00:00:00 2001 From: matinraayai <30674652+matinraa...@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:22:11 -0400 Subject: [PATCH 1/3] Made MMI on

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -438,6 +438,36 @@ Moved checkers Sanitizers -- +- Added the ``-fsanitize-undefined-ignore-overflow-pattern`` flag which can be + used to disable specific overflow-dependent code patterns. The supported + patterns are: ``add-overflow-test``, ``negated-unsigned-cons

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Fix null pointer dereference in enum debug info generation (PR #105556)

2024-08-21 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/105556 None >From 3ea17898c7281195fc3def45485cc3528c743ded Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Wed, 21 Aug 2024 10:26:42 -0700 Subject: [PATCH] [Clang] Fix null pointer dereference in enum debug info

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Fix null pointer dereference in enum debug info generation (PR #105556)

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

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/104889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Justin Stitt via cfe-commits
@@ -438,6 +438,36 @@ Moved checkers Sanitizers -- +- Added the ``-fsanitize-undefined-ignore-overflow-pattern`` flag which can be + used to disable specific overflow-dependent code patterns. The supported + patterns are: ``add-overflow-test``, ``negated-unsigned-cons

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -367,6 +367,21 @@ class LangOptionsBase { PerThread, }; + /// Exclude certain code patterns from being instrumented by arithmetic + /// overflow sanitizers + enum OverflowPatternExclusionKind { +/// Don't exclude any overflow patterns from sanitizers +None

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Justin Stitt via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/104889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Justin Stitt via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

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

2024-08-21 Thread via cfe-commits
eddyz87 wrote: @yonghong-song , @AaronBallman , @nikic , thank you for the review! https://github.com/llvm/llvm-project/pull/105417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Justin Stitt via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -0,0 +1,63 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsanitize=signed-integer-overflow,unsigned-integer-overflow -fsanitize-undefined-ignore-overflow-pattern=all %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsanitize

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -438,6 +438,36 @@ Moved checkers Sanitizers -- +- Added the ``-fsanitize-undefined-ignore-overflow-pattern`` flag which can be + used to disable specific overflow-dependent code patterns. The supported + patterns are: ``add-overflow-test``, ``negated-unsigned-cons

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka deleted https://github.com/llvm/llvm-project/pull/104889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Compiler-rt] [TEST] Use lit Syntax for Environment Variables in Clang subproject (PR #102647)

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

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] [Test] Use lit Syntax for Environment Variables in Clang subproject (PR #102647)

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

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] c975dc1 - [clang] [test] Use lit Syntax for Environment Variables in Clang subproject (#102647)

2024-08-21 Thread via cfe-commits
Author: Harini0924 Date: 2024-08-21T10:48:32-07:00 New Revision: c975dc1da03d684604ddf787b07b63fb8e903648 URL: https://github.com/llvm/llvm-project/commit/c975dc1da03d684604ddf787b07b63fb8e903648 DIFF: https://github.com/llvm/llvm-project/commit/c975dc1da03d684604ddf787b07b63fb8e903648.diff LO

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/104889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Test] Use lit Syntax for Environment Variables in Clang subproject (PR #102647)

2024-08-21 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/102647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -367,6 +367,21 @@ class LangOptionsBase { PerThread, }; + /// Exclude certain code patterns from being instrumented by arithmetic + /// overflow sanitizers + enum OverflowPatternExclusionKind { +/// Don't exclude any overflow patterns from sanitizers +None

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/104889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/104889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/104889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/104889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/104889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Treat new expressions as simple functions (PR #105168)

2024-08-21 Thread kadir çetinkaya via cfe-commits
kadircet wrote: ``` $ cat a.cc fooo(BAR( XXXZ())); ``` ``` $ clang-format a.cc fooo(BAR( XXXZ())); ``` https://github.com/llvm/llvm-project/pul

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Justin Stitt via cfe-commits
@@ -438,6 +438,36 @@ Moved checkers Sanitizers -- +- Added the ``-fsanitize-undefined-ignore-overflow-pattern`` flag which can be + used to disable specific overflow-dependent code patterns. The supported + patterns are: ``add-overflow-test``, ``negated-unsigned-cons

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Justin Stitt via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Justin Stitt via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Justin Stitt via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Justin Stitt via cfe-commits
@@ -0,0 +1,63 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsanitize=signed-integer-overflow,unsigned-integer-overflow -fsanitize-undefined-ignore-overflow-pattern=all %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsanitize

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt edited https://github.com/llvm/llvm-project/pull/104889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-08-21 Thread Henrik G. Olsson via cfe-commits
hnrklssn wrote: Regarding there not being a `no-wraps` attribute. What happens with code like this? Is the attribute lost or casted away during the addition? ``` wrapping_int a = INT_MAX; a = (int) a + 1; ``` Does it affect converting a number too large to fit in the target type? ``` wrapping_i

[clang] [llvm] [WebAssembly] Change half-precision feature name to fp16. (PR #105434)

2024-08-21 Thread Heejin Ahn via cfe-commits
aheejin wrote: > I know it is a little pedantic, but I recently sorted the features > alphabetically (#90777)... Can you move the new `fp16` entries so that the > lists are alphabetically sorted in the files? Sorry nevermind, even if we want to sort it its place is the same... 😅 https://githu

<    1   2   3   4   >