[clang] [clang-format] Make some binary operations imply requires clause (PR #110942)

2024-10-02 Thread Owen Pan via cfe-commits
@@ -3528,6 +3528,17 @@ bool UnwrappedLineParser::parseRequires() { return false; } break; +case tok::equalequal: +case tok::greaterequal: +case tok::lessequal: +case tok::r_paren: +case tok::pipepipe: + if (OpenAngles == 0) { +

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-10-02 Thread via cfe-commits
@@ -522,6 +526,28 @@ let Predicates = [BPFNoALU32] in { } def STD : STOREi64; +class relaxed_store + : PatFrag<(ops node:$val, node:$ptr), (base node:$val, node:$ptr)> { + let IsAtomic = 1; + let IsAtomicOrderingReleaseOrStronger = 0; +} + +class releasing_store + : PatFra

[clang] [clang] Handle template argument conversions for non-pack param to pack argument (PR #110963)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This fixes a regression introduced in #96023, reported in https://github.com/llvm/llvm-project/issues/110231#issuecomment-2389131854 --- Full diff: https://github.com/llvm/llvm-project/pull/110963.diff

[clang] [clang] Handle template argument conversions for non-pack param to pack argument (PR #110963)

2024-10-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/110963 This fixes a regression introduced in #96023, reported in https://github.com/llvm/llvm-project/issues/110231#issuecomment-2389131854 >From b37fd6faea430d77ff97568259a3792a3534b481 Mon Sep 17 00:00:00 2001 From

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Carlo Cabrera (carlocab) Changes Shipping a system configuration file for Clang is useful, but it limits the relocatability of the toolchain because it bakes in a reference to an absolute path on the file system. Let's fix that by a

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-02 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] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-02 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab created https://github.com/llvm/llvm-project/pull/110962 Shipping a system configuration file for Clang is useful, but it limits the relocatability of the toolchain because it bakes in a reference to an absolute path on the file system. Let's fix that by allowing for

[clang] [RISCV] Implement Clang Builtins for XCVmac Extension in CV32E40P (PR #110623)

2024-10-02 Thread Craig Topper via cfe-commits
@@ -0,0 +1,111 @@ +/*=== riscv_corev_mac.h - CORE-V multiply accumulate intrinsics === + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apac

[clang] [RISCV] Implement Clang Builtins for XCVmac Extension in CV32E40P (PR #110623)

2024-10-02 Thread via cfe-commits
https://github.com/realqhc updated https://github.com/llvm/llvm-project/pull/110623 >From da8b2fc0b5815f5870efe650ba5d585ec14e1a08 Mon Sep 17 00:00:00 2001 From: Qihan Cai Date: Tue, 1 Oct 2024 12:14:15 +1000 Subject: [PATCH 1/3] [RISCV] Implement Clang Builtins for XCVmac Extension in CV32E40

[clang] [Clang][CodeGen] Emit load of GEP after EmitMemberExpr (PR #110487)

2024-10-02 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/110487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread via cfe-commits
github-actions[bot] wrote: @Cydox 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 build, y

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/110497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 882457a - [Clang] Fix 'counted_by' for nested struct pointers (#110497)

2024-10-02 Thread via cfe-commits
Author: Jan Hendrik Farr Date: 2024-10-03T05:16:21Z New Revision: 882457a2eedbe6d53161b2f78fcf769fc9a93e8a URL: https://github.com/llvm/llvm-project/commit/882457a2eedbe6d53161b2f78fcf769fc9a93e8a DIFF: https://github.com/llvm/llvm-project/commit/882457a2eedbe6d53161b2f78fcf769fc9a93e8a.diff L

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Bill Wendling via cfe-commits
https://github.com/bwendling approved this pull request. Thanks for the patch! https://github.com/llvm/llvm-project/pull/110497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CGData][ThinLTO][NFC] Prep for two-codegen rounds (PR #90934)

2024-10-02 Thread Teresa Johnson via cfe-commits
https://github.com/teresajohnson approved this pull request. https://github.com/llvm/llvm-project/pull/90934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CGData][ThinLTO][NFC] Prep for two-codegen rounds (PR #90934)

2024-10-02 Thread Teresa Johnson via cfe-commits
@@ -586,7 +586,9 @@ Error lto::thinBackend(const Config &Conf, unsigned Task, AddStreamFn AddStream, Mod.setPartialSampleProfileRatio(CombinedIndex); LLVM_DEBUG(dbgs() << "Running ThinLTO\n"); - if (Conf.CodeGenOnly) { + if (CodeGenOnly) { teresajohnson

[clang] [libcxx] [clang] remove extra space in warn_atomic_op_oversized (NFC) (PR #110955)

2024-10-02 Thread via cfe-commits
https://github.com/Enna1 created https://github.com/llvm/llvm-project/pull/110955 None >From 68a4cacb9a90904eb780f295955695443f0895cc Mon Sep 17 00:00:00 2001 From: Enna1 Date: Thu, 3 Oct 2024 13:04:28 +0800 Subject: [PATCH] [clang] remove extra space in warn_atomic_op_oversized (NFC) --- ..

[clang] [flang] [flang][Driver] Add support for -f[no-]wrapv and -f[no]-strict-overflow in the frontend (PR #110061)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Yusuke MINATO (yus3710-fj) Changes This patch introduces the options for integer overflow flags into Flang. The behavior is similar to that of Clang. --- Full diff: https://github.com/llvm/llvm-project/pull/110061.diff 8 Files Aff

[clang] [flang] [flang][Driver] Add support for -f[no-]wrapv and -f[no]-strict-overflow in the frontend (PR #110061)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-fir-hlfir Author: Yusuke MINATO (yus3710-fj) Changes This patch introduces the options for integer overflow flags into Flang. The behavior is similar to that of Clang. --- Full diff: https://github.com/llvm/llvm-project/pull/110061.diff 8 Files

[clang] [flang] [flang][Driver] Add support for -f[no-]wrapv and -f[no]-strict-overflow in the frontend (PR #110061)

2024-10-02 Thread Yusuke MINATO via cfe-commits
https://github.com/yus3710-fj ready_for_review https://github.com/llvm/llvm-project/pull/110061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Add support for -f[no-]wrapv and -f[no]-strict-overflow in the frontend (PR #110061)

2024-10-02 Thread Yusuke MINATO via cfe-commits
https://github.com/yus3710-fj updated https://github.com/llvm/llvm-project/pull/110061 >From aea2cfa4b1d812dc84cb1609f93cc2ec2bcd33b4 Mon Sep 17 00:00:00 2001 From: Yusuke MINATO Date: Wed, 18 Sep 2024 21:12:43 +0900 Subject: [PATCH] [flang][Driver] Add support for -f[no-]wrapv and -f[no]-stri

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #110951)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/110951.diff 1 Files Affected: - (modified) clang/lib/Sema/JumpDiagnostics.cpp (+1-2) ``diff diff --git a/clang/lib/Sema/JumpDiagno

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #110951)

2024-10-02 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/110951 None >From 6e37d7fac860490dd491afff51b6ec26c45b4594 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 2 Oct 2024 07:01:33 -0700 Subject: [PATCH] [Sema] Avoid repeated hash lookups (NFC) --- clang/l

[clang] [Serialization] Avoid repeated hash lookups (NFC) (PR #110950)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/110950.diff 1 Files Affected: - (modified) clang/lib/Serialization/GlobalModuleIndex.cpp (+7-8) ``diff diff --git a/clang/

[clang] [Serialization] Avoid repeated hash lookups (NFC) (PR #110950)

2024-10-02 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/110950 None >From 9be1bde51a7b095b285bdfb81123749b6364d524 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 2 Oct 2024 07:02:53 -0700 Subject: [PATCH] [Serialization] Avoid repeated hash lookups (NFC) ---

[clang] [Analysis] Avoid repeated hash lookups (NFC) (PR #110949)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/110949.diff 1 Files Affected: - (modified) clang/lib/Analysis/ExprMutationAnalyzer.cpp (+2-3) ``diff diff --git a/clang/lib/Analys

[clang] [Analysis] Avoid repeated hash lookups (NFC) (PR #110949)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/110949.diff 1 Files Affected: - (modified) clang/lib/Analysis/ExprMutationAnalyzer.cpp (+2-3) ``diff diff --git a/clang/l

[clang] [Analysis] Avoid repeated hash lookups (NFC) (PR #110949)

2024-10-02 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/110949 None >From 0e4235061e3f668c0d1b86cc993eada3ca7efac7 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 2 Oct 2024 07:00:45 -0700 Subject: [PATCH] [Analysis] Avoid repeated hash lookups (NFC) --- cla

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #110947)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/110947.diff 1 Files Affected: - (modified) clang/lib/AST/ASTContext.cpp (-2) ``diff diff --git a/clang/lib/AST/ASTContext.cpp b/cl

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #110947)

2024-10-02 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/110947 None >From 75622baf2f2bb12c46ca501f1f9b26afa0503e6b Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 2 Oct 2024 06:59:47 -0700 Subject: [PATCH] [AST] Avoid repeated hash lookups (NFC) --- clang/li

[clang] [clang-format] Fix a bug that misannotates binary operators */&/&& (PR #110945)

2024-10-02 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/110945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating PointerOrReference (PR #110945)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #110879. --- Full diff: https://github.com/llvm/llvm-project/pull/110945.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+1-1) - (modified) clang/unittests/Format/TokenAnn

[clang] [clang-format] Fix a bug in annotating PointerOrReference (PR #110945)

2024-10-02 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/110945 Fixes #110879. >From ab6f3f4950a5ca1e1297437940730b43746c7f6a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 2 Oct 2024 19:30:30 -0700 Subject: [PATCH] [clang-format] Fix a bug in annotating PointerOrReferen

[clang] [clang] [Driver] Ensure we error on lto with link.exe and target `*-windows-msvc` on non cl driver modes (PR #109607)

2024-10-02 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/109607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c1343a2 - [clang] [Driver] Ensure we error on lto with link.exe and target `*-windows-msvc` on non cl driver modes (#109607)

2024-10-02 Thread via cfe-commits
Author: Max Winkler Date: 2024-10-02T19:16:45-07:00 New Revision: c1343a29216f08ec762b3e58572e5c3e41f6f285 URL: https://github.com/llvm/llvm-project/commit/c1343a29216f08ec762b3e58572e5c3e41f6f285 DIFF: https://github.com/llvm/llvm-project/commit/c1343a29216f08ec762b3e58572e5c3e41f6f285.diff L

[clang] [clang-format] Handle template closer followed by empty paretheses (PR #110408)

2024-10-02 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/110408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 14e1fef - [clang-format] Handle template closer followed by empty paretheses (#110408)

2024-10-02 Thread via cfe-commits
Author: Owen Pan Date: 2024-10-02T19:06:56-07:00 New Revision: 14e1fef73625daf9fad1a2c51b16f67b3152a675 URL: https://github.com/llvm/llvm-project/commit/14e1fef73625daf9fad1a2c51b16f67b3152a675 DIFF: https://github.com/llvm/llvm-project/commit/14e1fef73625daf9fad1a2c51b16f67b3152a675.diff LOG:

[clang] [clang-tools-extra] [RecursiveASTVisitor] Skip implicit instantiations. (PR #110899)

2024-10-02 Thread via cfe-commits
@@ -2069,22 +2069,24 @@ bool RecursiveASTVisitor::TraverseTemplateArgumentLocsHelper( #define DEF_TRAVERSE_TMPL_SPEC_DECL(TMPLDECLKIND, DECLKIND) \ DEF_TRAVERSE_DECL(TMPLDECLKIND##TemplateSpecializationDecl, { \ +auto TSK = D->getTemp

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
@@ -1164,15 +1163,15 @@ llvm::Value *CodeGenFunction::EmitLoadOfCountedByField( return nullptr; llvm::Value *Res = nullptr; - if (StructBase->isLValue()) { -LValue LV = EmitLValue(StructBase); -Address Addr = LV.getAddress(); -Res = Addr.emitRawPointer(*this

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
https://github.com/Cydox updated https://github.com/llvm/llvm-project/pull/110497 >From 15b69329a97706ada7d5e8cbeb76508aa55b418f Mon Sep 17 00:00:00 2001 From: Jan Hendrik Farr Date: Sun, 29 Sep 2024 21:38:13 +0200 Subject: [PATCH 1/5] [Clang] Fix 'counted_by' for nested struct pointers Fixes

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

2024-10-02 Thread via cfe-commits
Sirraide wrote: > LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` Looks like the failure is somewhere in an LLDB test, so I think we can ignore this because that’s completely unrelated. https://github.com/llvm/llvm-project/pull/99656 ___

[clang] [Clang] [Sema] Don't crash on unexpanded pack in invalid block literal (PR #110762)

2024-10-02 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/110762 >From a471d32c94bfcbd10291053bb6ce0541ea2e626c Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 2 Oct 2024 00:59:37 +0200 Subject: [PATCH 1/4] [Clang] [Sema] Don't crash on unexpanded pack in invalid block l

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-10-02 Thread Peilin Ye via cfe-commits
@@ -522,6 +526,28 @@ let Predicates = [BPFNoALU32] in { } def STD : STOREi64; +class relaxed_store + : PatFrag<(ops node:$val, node:$ptr), (base node:$val, node:$ptr)> { + let IsAtomic = 1; + let IsAtomicOrderingReleaseOrStronger = 0; +} + +class releasing_store + : PatFra

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: Now this passes all tests again, also compiles the kernel without issue. https://github.com/llvm/llvm-project/pull/110497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle template closer followed by empty paretheses (PR #110408)

2024-10-02 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/110408 >From 27135c008868cc4f17b7ca5ff9c2af9c2fc02135 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 28 Sep 2024 22:42:56 -0700 Subject: [PATCH 1/2] [clang-format] Handle template closer followed by empty parethese

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
@@ -1164,15 +1163,15 @@ llvm::Value *CodeGenFunction::EmitLoadOfCountedByField( return nullptr; llvm::Value *Res = nullptr; - if (StructBase->isLValue()) { -LValue LV = EmitLValue(StructBase); -Address Addr = LV.getAddress(); -Res = Addr.emitRawPointer(*this

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
https://github.com/Cydox updated https://github.com/llvm/llvm-project/pull/110497 >From 15b69329a97706ada7d5e8cbeb76508aa55b418f Mon Sep 17 00:00:00 2001 From: Jan Hendrik Farr Date: Sun, 29 Sep 2024 21:38:13 +0200 Subject: [PATCH 1/4] [Clang] Fix 'counted_by' for nested struct pointers Fixes

[clang] 688bc95 - [clang-format] Add TemplateNames option to help parse C++ angles (#109916)

2024-10-02 Thread via cfe-commits
Author: Owen Pan Date: 2024-10-02T18:10:56-07:00 New Revision: 688bc958bd4167512f0d45e1fd008c9551de1c75 URL: https://github.com/llvm/llvm-project/commit/688bc958bd4167512f0d45e1fd008c9551de1c75 DIFF: https://github.com/llvm/llvm-project/commit/688bc958bd4167512f0d45e1fd008c9551de1c75.diff LOG:

[clang] [clang-format] Add TemplateNames option to help parse C++ angles (PR #109916)

2024-10-02 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/109916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate */& in if condition with braced init (PR #109505)

2024-10-02 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/109505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 98281da - [clang-format] Correctly annotate */& in if condition with braced init (#109505)

2024-10-02 Thread via cfe-commits
Author: Owen Pan Date: 2024-10-02T18:07:57-07:00 New Revision: 98281da29f7e36e22ff1e20b9cfefda8c31dbe56 URL: https://github.com/llvm/llvm-project/commit/98281da29f7e36e22ff1e20b9cfefda8c31dbe56 DIFF: https://github.com/llvm/llvm-project/commit/98281da29f7e36e22ff1e20b9cfefda8c31dbe56.diff LOG:

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: Yeah so the problem is if you do `__builtin_dynamic_object_size(v, 0)` In that case it's a `DeclRefExpr`, a pointer, and an `LValue`. Easy fix is to check if `StructBase` is a pointer instead of checking for LValue, but then I don't really see the point of this change vs my origin

[clang] [clang-format] Annotate the l_paren of function pointer types (PR #109229)

2024-10-02 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/109229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6ae14c0 - [clang-format] Annotate the l_paren of function pointer types (#109229)

2024-10-02 Thread via cfe-commits
Author: Owen Pan Date: 2024-10-02T18:01:25-07:00 New Revision: 6ae14c0505e92cceefc1757467e4a2eb797429e6 URL: https://github.com/llvm/llvm-project/commit/6ae14c0505e92cceefc1757467e4a2eb797429e6 DIFF: https://github.com/llvm/llvm-project/commit/6ae14c0505e92cceefc1757467e4a2eb797429e6.diff LOG:

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

2024-10-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/4846 Here is the relevant piece of the build log

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: So, this doesn't fully work yet. When compiling the kernel it seems like there are cases were `StructBase` is now both an LValue and a pointer. Still investigating. https://github.com/llvm/llvm-project/pull/110497 ___ cfe-commits mailing

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-02 Thread Ellis Hoag via cfe-commits
@@ -1119,6 +1125,18 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, // removed. MPM.addPass( PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */)); + +if (InstrumentSampleColdFuncPath.getNumOccurrences() && +

[clang] [Clang][Sema] Bump the instantiated index when skipping past non-init-captures (PR #110887)

2024-10-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/110887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5064c4c - [Clang][Sema] Bump the instantiated index when skipping past non-init-captures (#110887)

2024-10-02 Thread via cfe-commits
Author: Younan Zhang Date: 2024-10-03T08:24:20+08:00 New Revision: 5064c4c4f8f5b09c51bab9b18f62a5c3012989c0 URL: https://github.com/llvm/llvm-project/commit/5064c4c4f8f5b09c51bab9b18f62a5c3012989c0 DIFF: https://github.com/llvm/llvm-project/commit/5064c4c4f8f5b09c51bab9b18f62a5c3012989c0.diff

[clang] [clang][HLSL] Add radians intrinsic (PR #110802)

2024-10-02 Thread Adam Yang via cfe-commits
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/110802 >From 08f0b8a10f3e5292fe2f91946392141c9239ec2c Mon Sep 17 00:00:00 2001 From: Adam Yang Date: Wed, 2 Oct 2024 01:21:19 -0700 Subject: [PATCH 1/4] Added radians to clang --- clang/include/clang/Basic/Builtins

[clang] [clang-format] Make some binary operations imply requires clause (PR #110942)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Emilia Kond (rymiel) Changes This patch adjusts the requires clause/expression lookahead heuristic to assume that some binary operation mean that the requires keyword refers to a clause. This partially reverts the removed case clau

[clang] [clang-format] Make some binary operations imply requires clause (PR #110942)

2024-10-02 Thread Emilia Kond via cfe-commits
https://github.com/rymiel created https://github.com/llvm/llvm-project/pull/110942 This patch adjusts the requires clause/expression lookahead heuristic to assume that some binary operation mean that the requires keyword refers to a clause. This partially reverts the removed case clauses from

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/109180 ___ 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-10-02 Thread via cfe-commits
https://github.com/Sirraide closed 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] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
@@ -10,6 +10,7 @@ // //===--===// +#include Cydox wrote: Yeah, this is just a quick commit to show you where my mind is going right now. Won't be in any final commit https://github.com/ll

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Bill Wendling via cfe-commits
@@ -10,6 +10,7 @@ // //===--===// +#include bwendling wrote: Please don't include this (I know it's left from debugging). If you want to debug things, you can use: ```c++ llvm::errs() <<

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: @efriedma-quic do you mean somthing along those lines? https://github.com/llvm/llvm-project/pull/110497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
https://github.com/Cydox updated https://github.com/llvm/llvm-project/pull/110497 >From 15b69329a97706ada7d5e8cbeb76508aa55b418f Mon Sep 17 00:00:00 2001 From: Jan Hendrik Farr Date: Sun, 29 Sep 2024 21:38:13 +0200 Subject: [PATCH 1/3] [Clang] Fix 'counted_by' for nested struct pointers Fixes

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #110188)

2024-10-02 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Just under "clang" is fine. https://github.com/llvm/llvm-project/pull/110188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: I'm gonna push something real quick to see if I understand were you want us to go. Didn't check if this breaks any tests yet. https://github.com/llvm/llvm-project/pull/110497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > I'm not sure what you mean by "or it finds a pointer that's the base". The > MemberExpr the visitor returns doesn't have to be a pointer---e.g. > ptr->a.b.c.d returning ptr->a.b, where b isn't a pointer---or do you mean > something else? In an expression which does not

[clang] [Clang] [Sema] Don't crash on unexpanded pack in invalid block literal (PR #110762)

2024-10-02 Thread via cfe-commits
Sirraide wrote: > I don't think there's a deep reason blocks and lambdas don't use quite the > same scope mechanics in the compiler, so if you wanted to pursue that, it > seems reasonable. But this approach also seems viable. Yeah, there is a comment about parameter packs in block arguments be

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-10-02 Thread via cfe-commits
github-actions[bot] wrote: @keith-packard 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

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-10-02 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/108942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ca57e8f - [RISCV] Support -mstack-protector-guard=tls (#108942)

2024-10-02 Thread via cfe-commits
Author: Keith Packard Date: 2024-10-02T16:33:31-07:00 New Revision: ca57e8f23ff042c0ae996b040f364ced433b7507 URL: https://github.com/llvm/llvm-project/commit/ca57e8f23ff042c0ae996b040f364ced433b7507 DIFF: https://github.com/llvm/llvm-project/commit/ca57e8f23ff042c0ae996b040f364ced433b7507.diff

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #101863 --- Full diff: https://github.com/llvm/llvm-project/pull/110761.diff 4 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+2) - (modified) clang/lib/Sema/TreeTransform.h (+8-1) -

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-02 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk ready_for_review https://github.com/llvm/llvm-project/pull/110761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-02 Thread Oleksandr T. via cfe-commits
@@ -15598,6 +15598,9 @@ TreeTransform::TransformCXXFoldExpr(CXXFoldExpr *E) { return getDerived().RebuildEmptyCXXFoldExpr(E->getEllipsisLoc(), E->getOperator()); + if (*NumExpansions == 1) a-tarasyuk wrote:

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-02 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/110761 >From 9c69d6584d6b71554aec55f0de52abb4baa9435f Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 2 Oct 2024 02:13:51 +0300 Subject: [PATCH 1/3] [Clang] omit parentheses in fold expressions with a single

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Bill Wendling via cfe-commits
bwendling wrote: The problem we're faced with here is that the `Base` pointer could point to anywhere within the structure. We already jump through several hoops to get the flexible array member's `Decl` and the counter's `Decl`. So because `Base` could be a pointer to anywhere in the struct,

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-02 Thread Lei Wang via cfe-commits
@@ -1119,6 +1125,18 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, // removed. MPM.addPass( PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */)); + +if (InstrumentSampleColdFuncPath.getNumOccurrences() && +

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-02 Thread Snehasish Kumar via cfe-commits
@@ -1784,6 +1784,12 @@ defm debug_info_for_profiling : BoolFOption<"debug-info-for-profiling", PosFlag, NegFlag>; +def fprofile_generate_cold_function_coverage : Flag<["-"], "fprofile-generate-cold-function-coverage">, snehasish wrote: > Is it that the b

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: Alright I think I'm getting what you mean with skipping over the LValueToRValue cast. I'll try to put a better fix together... https://github.com/llvm/llvm-project/pull/110497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

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

2024-10-02 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -2263,6 +2265,28 @@ static bool neverReturns(const CFGBlock *B) { return false; } +void ThreadSafetyAnalyzer::checkMismat

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

2024-10-02 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -2263,6 +2265,28 @@ static bool neverReturns(const CFGBlock *B) { return false; } +void ThreadSafetyAnalyzer::checkMismat

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

2024-10-02 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -26,6 +26,7 @@ namespace clang { class AnalysisDeclContext; class FunctionDecl; class NamedDecl; +class Attr; --

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

2024-10-02 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -2282,6 +2306,9 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) { const NamedDecl *D = walker.getDecl();

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-02 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 8e0434d7571e693a794d82911557c021c1906fa2 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH 01/13] Codegen builtin --- clang/include/clang/Basic/Builtin

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #110188)

2024-10-02 Thread Augusto Noronha via cfe-commits
augusto2112 wrote: And would that be an RFC under "clang"? Or is there a different section on Discourse for feature proposals? https://github.com/llvm/llvm-project/pull/110188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-02 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: > StructAccessBase has two possible results: it finds an lvalue that's the > base, which can't be peeled apart any further, or it finds a pointer that's > the base. It shouldn't be possible to confuse a pointer with a MemberExpr: a > MemberExpr is an lvalue, and a pointer is, in t

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-02 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From ef969c536d700a8585f0892952fae49cdd9c42d1 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH 01/13] Codegen builtin --- clang/include/clang/Basic/Builtin

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code without relying on target-dependent overload resolution (PR #109663)

2024-10-02 Thread Artem Belevich via cfe-commits
Artem-B wrote: Unless HIP explicitly defines wavefront size property for the host (I do not think so), it would appear that it's a property of a GPU, and as such should not be treated as a constant on the host, because the host needs to deal with multiple GPU variants, with different idea of t

[clang] [llvm] UEFI backend for x86_64 (PR #109320)

2024-10-02 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/109320 >From 6fc7aceab6bc193616fe78e21b796efb4dbffb58 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Tue, 3 Sep 2024 21:02:15 -0700 Subject: [PATCH 1/2] UEFI backend for x86_64 --- clang/lib/Basic/Targets/OSTargets.h

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #110188)

2024-10-02 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: For a new feature with no existing implementation/language specification, I want to see community input from people who want to use it, and understand the potential impact on other projects (in this context, debuggers). There isn't any formal requirement that happens on D

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-02 Thread Ellis Hoag via cfe-commits
@@ -1119,6 +1125,18 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, // removed. MPM.addPass( PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */)); + +if (InstrumentSampleColdFuncPath.getNumOccurrences() && +

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

2024-10-02 Thread Duncan P . N . Exon Smith via cfe-commits
dexonsmith wrote: I remember discovering that there are effectively two kinds of DISubprogram already... one for declarations (which usually get uniqued/deduped) and another for definitions (which I believe never do... IIRC they are always "distinct"). I imagine it would be possible/good to se

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-10-02 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/109180 >From 3c58861f3e8c2f1333d0b36c6f5b7ba7f3d9e187 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 18 Sep 2024 12:20:19 -0700 Subject: [PATCH 1/9] add cross hlsl function --- clang/include/clang/Basic/Bu

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-02 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From ef969c536d700a8585f0892952fae49cdd9c42d1 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH 01/12] Codegen builtin --- clang/include/clang/Basic/Builtin

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-10-02 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag updated https://github.com/llvm/llvm-project/pull/102602 >From 7b4f999b39f4308cab253204e6be41ea7a70f695 Mon Sep 17 00:00:00 2001 From: Pavel Skripkin Date: Fri, 9 Aug 2024 14:37:47 +0300 Subject: [PATCH 01/12] clang/csa: add initial support for builtin overflow ---

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-10-02 Thread Pavel Skripkin via cfe-commits
pskrgag wrote: Ah, this dangling reference to rvalue... I do remember why I bind `get{Min, Max}Value` to locals -- `ConcreteInt` takes a reference to `APSInt`, so it's not possible to pass result of these calls directly to constructor. https://github.com/llvm/llvm-project/pull/102602 _

  1   2   3   4   5   >