[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-06-11 Thread Zahira Ammarguellat via cfe-commits
@@ -14674,6 +14676,31 @@ static bool TryEvaluateBuiltinNaN(const ASTContext &Context, return true; } +// Checks that the value x is in the range (-1;-0.5], [0.5; 1) +static bool isInFrexpResultRange(const llvm::APFloat &x) { + llvm::APFloat minusOne(x.getSemantics(), "-1.

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

2024-06-11 Thread Haojian Wu via cfe-commits
@@ -10918,22 +10944,24 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (!(RD->getDefinition() && RD->isAggregate())) return; QualType Ty = Context.getRecordType(RD); - SmallVector ElementTypes; - - InitListChecker CheckInitList(*

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

2024-06-11 Thread Haojian Wu via cfe-commits
@@ -305,14 +305,32 @@ namespace { /// structured list even in 'verify only' mode, so that we can track which /// elements need 'empty' initializtion. class InitListChecker { +public: + struct CandidateParamTypesForAggregateDeduction { hokein wrote: nit: inste

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

2024-06-11 Thread Haojian Wu via cfe-commits
@@ -10918,22 +10944,24 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (!(RD->getDefinition() && RD->isAggregate())) return; QualType Ty = Context.getRecordType(RD); - SmallVector ElementTypes; - - InitListChecker CheckInitList(*

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

2024-06-11 Thread Haojian Wu via cfe-commits
@@ -335,3 +335,73 @@ namespace TTP { // CHECK-NEXT: `-TemplateArgument type 'T':'type-parameter-0-0'{{$}} // CHECK-NEXT:`-TemplateTypeParmType {{.+}} 'T' dependent depth 0 index 0{{$}} // CHECK-NEXT: `-TemplateTypeParm {{.+}} 'T'{{$}} + +namespace GH64625

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

2024-06-11 Thread Haojian Wu via cfe-commits
@@ -335,3 +335,73 @@ namespace TTP { // CHECK-NEXT: `-TemplateArgument type 'T':'type-parameter-0-0'{{$}} // CHECK-NEXT:`-TemplateTypeParmType {{.+}} 'T' dependent depth 0 index 0{{$}} // CHECK-NEXT: `-TemplateTypeParm {{.+}} 'T'{{$}} + +namespace GH64625

[clang] [clang] Implement -Wmissing-include-dirs (PR #94827)

2024-06-11 Thread via cfe-commits
@@ -809,4 +809,7 @@ def warn_android_unversioned_fallback : Warning< def err_drv_triple_version_invalid : Error< "version '%0' in target triple '%1' is invalid">; + +def warn_missing_include_dirs : Warning< + "the included directory %0 is missing">, InGroup, DefaultIgnore;

[clang] [clang] Implement -Wmissing-include-dirs (PR #94827)

2024-06-11 Thread via cfe-commits
https://github.com/zmodem edited https://github.com/llvm/llvm-project/pull/94827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement -Wmissing-include-dirs (PR #94827)

2024-06-11 Thread via cfe-commits
https://github.com/zmodem commented: This basically looks good to me. Just a few nits. https://github.com/llvm/llvm-project/pull/94827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement -Wmissing-include-dirs (PR #94827)

2024-06-11 Thread via cfe-commits
@@ -6,3 +6,7 @@ // Check that -isysroot warns on nonexistent paths. // RUN: %clang -### -c -target i386-apple-darwin10 -isysroot %t/warning-options %s 2>&1 | FileCheck --check-prefix=CHECK-ISYSROOT %s // CHECK-ISYSROOT: warning: no such sysroot directory: '{{.*}}/warning-optio

[clang] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-11 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/95112 [CWG2813](https://cplusplus.github.io/CWG/issues/2813.html) `prvalue.member_fn(expression-list)` now will not materialize a temporary for `prvalue` if `member_fn` is an explicit object member function, and `p

[clang] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes [CWG2813](https://cplusplus.github.io/CWG/issues/2813.html) `prvalue.member_fn(expression-list)` now will not materialize a temporary for `prvalue` if `member_fn` is an explicit object member function, and

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-11 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu commented: Is there a way to test that the attribute is lowered to FIR and perhaps also on to LLVM? `flang/test/Lower/` has some tests which check for the presence of certain constructs in the LLVM IR. Could something be written similar to those? https://github.c

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-11 Thread Tarun Prabhu via cfe-commits
@@ -371,7 +371,7 @@ static mlir::LogicalResult convertFortranSourceToMLIR( ctx, semanticsContext, defKinds, semanticsContext.intrinsics(), semanticsContext.targetCharacteristics(), parsing.allCooked(), targetTriple, kindMap, loweringOptions, envDefaults, -

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-11 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/95043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [include-cleaner] Pass WorkingDir to suggestPathToFileForDiagnostics (PR #95114)

2024-06-11 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/95114 Addresses https://github.com/llvm/llvm-project/issues/81215. From b15c33b685f80dfe7b0f4865a574276bf1c15b40 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 11 Jun 2024 15:36:15 +0200 Subject: [PATCH]

[clang] [clang-tools-extra] [include-cleaner] Pass WorkingDir to suggestPathToFileForDiagnostics (PR #95114)

2024-06-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: kadir çetinkaya (kadircet) Changes Addresses https://github.com/llvm/llvm-project/issues/81215. --- Full diff: https://github.com/llvm/llvm-project/pull/95114.diff 4 Files Affected: - (modified) clang-tools-extra/include-cleaner/lib/In

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-11 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/94549 >From 36618e65d94ffa3e83464b7d19ff6cd7d5855abf Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Wed, 5 Jun 2024 16:51:51 -0700 Subject: [PATCH 1/3] [Offload][NFCI] Initialize the KernelArgsTy to default

[clang] [clang] Implement -Wmissing-include-dirs (PR #94827)

2024-06-11 Thread Braden Helmer via cfe-commits
https://github.com/bradenhelmer updated https://github.com/llvm/llvm-project/pull/94827 >From 317e4c2fe7fb0ee76f7917b64ee447ba3ed838bc Mon Sep 17 00:00:00 2001 From: Braden Helmer Date: Fri, 7 Jun 2024 21:38:04 -0400 Subject: [PATCH 1/3] Implement -Wmissing-include-dirs --- clang/include/clan

[clang] [clang] Implement -Wmissing-include-dirs (PR #94827)

2024-06-11 Thread Braden Helmer via cfe-commits
https://github.com/bradenhelmer updated https://github.com/llvm/llvm-project/pull/94827 >From 317e4c2fe7fb0ee76f7917b64ee447ba3ed838bc Mon Sep 17 00:00:00 2001 From: Braden Helmer Date: Fri, 7 Jun 2024 21:38:04 -0400 Subject: [PATCH 1/4] Implement -Wmissing-include-dirs --- clang/include/clan

[clang] [analyzer] Finish moving alpha.core.SizeofPtr to clang-tidy (PR #95118)

2024-06-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/95118 The checker `alpha.core.SizeofPtr` was a very simple checker that did not rely on path sensitive analysis and was very similar to the (more complex and refined) clang-tidy check `bugprone-sizeof-expression`.

[clang] [analyzer] Finish moving alpha.core.SizeofPtr to clang-tidy (PR #95118)

2024-06-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Donát Nagy (NagyDonat) Changes The checker `alpha.core.SizeofPtr` was a very simple checker that did not rely on path sensitive analysis and was very similar to the (more complex and refined) clang-tidy check `bugprone-sizeof-expression`.

[clang] [analyzer] Finish moving alpha.core.SizeofPtr to clang-tidy (PR #95118)

2024-06-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Donát Nagy (NagyDonat) Changes The checker `alpha.core.SizeofPtr` was a very simple checker that did not rely on path sensitive analysis and was very similar to the (more complex and refined) clang-tidy check `bugprone-s

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

2024-06-11 Thread Younan Zhang via cfe-commits
@@ -10918,22 +10944,24 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (!(RD->getDefinition() && RD->isAggregate())) return; QualType Ty = Context.getRecordType(RD); - SmallVector ElementTypes; - - InitListChecker CheckInitList(*

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balázs Kéri via cfe-commits
@@ -0,0 +1,179 @@ +// RUN: %clang_analyze_cc1 -verify %s -analyzer-output=text \ +// RUN: -analyzer-checker=core \ +// RUN: -analyzer-checker=unix.Stream balazske wrote: This file can have a better name (like "stream-notes-missing-close.cpp"). https://github

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balázs Kéri via cfe-commits
https://github.com/balazske edited https://github.com/llvm/llvm-project/pull/94957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balázs Kéri via cfe-commits
https://github.com/balazske commented: I did not find big issues. But a description could be added to the `NoOwnershipChangeVisitor` to explain what it does, and to `StreamChecker` for what is it used. I did not find a similar test for `MallocChecker` but there could be one with similar test f

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balázs Kéri via cfe-commits
@@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===// +// Definition of NoStreamStateChangeVisitor. +//===--

[clang] [clang][HeaderSearch] Fix handling of relative file-paths in suggestPathToFileForDiagnostics (PR #95121)

2024-06-11 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/95121 Normalize header-to-be-spelled using WorkingDir, similar to search paths themselves. Addresses https://github.com/llvm/llvm-project/issues/81215. From 22422586ef650bf98f83d5f58a47e59be29d02b8 Mon Sep 17 00:00:

[clang] [clang][HeaderSearch] Fix handling of relative file-paths in suggestPathToFileForDiagnostics (PR #95121)

2024-06-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: kadir çetinkaya (kadircet) Changes Normalize header-to-be-spelled using WorkingDir, similar to search paths themselves. Addresses https://github.com/llvm/llvm-project/issues/81215. --- Full diff: https://github.com/llvm/llvm-project/pull

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balázs Kéri via cfe-commits
@@ -696,6 +732,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===// +// Definition of NoStreamStateChangeVisitor. +//===--

[clang] [clang] Implement -Wmissing-include-dirs (PR #94827)

2024-06-11 Thread via cfe-commits
https://github.com/zmodem approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/94827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve sizeof(pointer) handling in bugprone-sizeof-expression (PR #94356)

2024-06-11 Thread Donát Nagy via cfe-commits
NagyDonat wrote: Minor correction: in the commit message I accidentally wrote `alpha.core.SizeofPointer` instead of `alpha.core.SizeofPtr`. (Fortunately this difference is mostly academical, because my followup commit will remove that checker.) https://github.com/llvm/llvm-project/pull/94356

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-06-11 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/91990 >From 5dc9193af0d98335a87e93ad70d945dbc0ffce79 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 13 May 2024 16:59:06 +0100 Subject: [PATCH 1/2] [Clang] Fix Microsoft ABI inheritance model when member poi

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

2024-06-11 Thread Younan Zhang via cfe-commits
@@ -335,3 +335,73 @@ namespace TTP { // CHECK-NEXT: `-TemplateArgument type 'T':'type-parameter-0-0'{{$}} // CHECK-NEXT:`-TemplateTypeParmType {{.+}} 'T' dependent depth 0 index 0{{$}} // CHECK-NEXT: `-TemplateTypeParm {{.+}} 'T'{{$}} + +namespace GH64625

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-11 Thread Jan Leyonberg via cfe-commits
https://github.com/jsjodin updated https://github.com/llvm/llvm-project/pull/94763 >From adfeb69ba312e971cb4eae71f185f38b1cac9b8f Mon Sep 17 00:00:00 2001 From: Jan Leyonberg Date: Wed, 5 Jun 2024 10:56:41 -0400 Subject: [PATCH 1/2] [flang] Add -mlink-builtin-bitcode option to fc1 This patch e

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-11 Thread Jan Leyonberg via cfe-commits
@@ -0,0 +1,18 @@ + +!-- +! RUN lines +!-- +! Embed something that can be easily checked +! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o - -mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s + +! CHECK: define internal void @libfun_ +

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-11 Thread Jan Leyonberg via cfe-commits
@@ -0,0 +1,18 @@ + +!-- +! RUN lines +!-- +! Embed something that can be easily checked +! RUN: %flang_fc1 -emit-llvm -triple x86_64-unknown-linux-gnu -o - -mlink-builtin-bitcode %S/Inputs/bclib.bc %s 2>&1 | FileCheck %s + +! CHECK: define internal void @libfun_ +

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-06-11 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786 >From 48eea6eda33c4e73316fe938a15d8e361039072e Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Wed, 5 Jun 2024 01:17:03 -0700 Subject: [PATCH 1/2] [RISCV] Add groupid/bitmask for RISC-V extension Base on https://git

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-06-11 Thread Piyou Chen via cfe-commits
BeMg wrote: Stack on https://github.com/llvm/llvm-project/pull/94440 https://github.com/llvm/llvm-project/pull/85786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-11 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/94549 >From 36618e65d94ffa3e83464b7d19ff6cd7d5855abf Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Wed, 5 Jun 2024 16:51:51 -0700 Subject: [PATCH 1/3] [Offload][NFCI] Initialize the KernelArgsTy to default

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-11 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: > Should the NFCI changes (like initializing struct fields) be put into a > separate PR? Done. https://github.com/llvm/llvm-project/pull/95116 https://github.com/llvm/llvm-project/pull/95117 > Will kernels in TUs compiled with -foffload-via-llvm be interoperable with > code

[clang] [libclang/python] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-06-11 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Thanks a lot for your feedback! Yup I get that the PR is pretty big and might still need significant changes. > 1. I have maintainability concerns about `ClangLib` protocol [...] I completely agree that this is ugly, but I didn't find a better solution that would enable

[clang] [llvm] [ConstantFold] Drop gep of gep fold entirely (PR #95126)

2024-06-11 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/95126 This is a followup to https://github.com/llvm/llvm-project/pull/93823 and drops the DataLayout-unaware GEP of GEP fold entirely. All cases are now left to the DataLayout-aware constant folder, which will fold every

[clang] [llvm] [ConstantFold] Drop gep of gep fold entirely (PR #95126)

2024-06-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikita Popov (nikic) Changes This is a followup to https://github.com/llvm/llvm-project/pull/93823 and drops the DataLayout-unaware GEP of GEP fold entirely. All cases are now left to the DataLayout-aware constant folder, which will fold

[clang] [llvm] [ConstantFold] Drop gep of gep fold entirely (PR #95126)

2024-06-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Nikita Popov (nikic) Changes This is a followup to https://github.com/llvm/llvm-project/pull/93823 and drops the DataLayout-unaware GEP of GEP fold entirely. All cases are now left to the DataLayout-aware constant folder, which will fol

[clang] [llvm] [ConstantFold] Drop gep of gep fold entirely (PR #95126)

2024-06-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-analysis Author: Nikita Popov (nikic) Changes This is a followup to https://github.com/llvm/llvm-project/pull/93823 and drops the DataLayout-unaware GEP of GEP fold entirely. All cases are now left to the DataLayout-aware constant folder, which wi

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-11 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/94549 >From 36618e65d94ffa3e83464b7d19ff6cd7d5855abf Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Wed, 5 Jun 2024 16:51:51 -0700 Subject: [PATCH 1/3] [Offload][NFCI] Initialize the KernelArgsTy to default

[clang] [llvm] Add SonarCloud (PR #94745)

2024-06-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/94745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/95128 This change keeps existing behavior, namely that if we hit a Z3 timeout we will accept the report as "satisfiable". This prepares for the commit "Harden safeguards for Z3 query times". https://discourse.llvm.org

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Balazs Benics (steakhal) Changes This change keeps existing behavior, namely that if we hit a Z3 timeout we will accept the report as "satisfiable". This prepares for the commit "Harden safeguar

[clang] [Driver] Add winsysroot alias to the GNU driver (PR #94731)

2024-06-11 Thread via cfe-commits
https://github.com/Andarwinux updated https://github.com/llvm/llvm-project/pull/94731 >From 9078da10c4204ebddb011dc2c616e4bccedbdd03 Mon Sep 17 00:00:00 2001 From: Andarwinux <144242044+andarwi...@users.noreply.github.com> Date: Fri, 7 Jun 2024 07:07:40 + Subject: [PATCH] [Driver] Add winsys

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-11 Thread via cfe-commits
joanahalili wrote: just a heads up: we are seeing a number targets failing due to an compilation timeout caused by this commit. https://github.com/llvm/llvm-project/pull/92083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [clang] Skip auto-init on scalar vars that have a non-constant Init and no self-ref (PR #94642)

2024-06-11 Thread Jan Voung via cfe-commits
jvoung wrote: +cc @dwblaikie @aeubanks https://github.com/llvm/llvm-project/pull/94642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ConstantFold] Drop gep of gep fold entirely (PR #95126)

2024-06-11 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: See https://github.com/llvm/llvm-project/commit/51e459a561519c8d51e2b4cadddc0d1f99c8b7ef: > This causes some non-trivial text size increases in unoptimized builds for > Bullet. Revert while I investigate. Can you double check this? https://github.com/llvm/llvm-project/pull/95

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-11 Thread via cfe-commits
asmok-g wrote: > just a heads up: we are seeing a number targets failing due to a compilation > timeout caused by this commit. More precisely, the timeouts are happening only on arm CPUs. https://github.com/llvm/llvm-project/pull/92083 ___ cfe-commit

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-11 Thread Alexis Perry-Holby via cfe-commits
@@ -58,6 +58,15 @@ def FramePointerKindAttr : LLVM_Attr<"FramePointerKind", "framePointerKind"> { let assemblyFormat = "`<` $framePointerKind `>`"; } +//===--===// +// TuneCPUAttr +//===

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-11 Thread Alexis Perry-Holby via cfe-commits
@@ -371,7 +371,7 @@ static mlir::LogicalResult convertFortranSourceToMLIR( ctx, semanticsContext, defKinds, semanticsContext.intrinsics(), semanticsContext.targetCharacteristics(), parsing.allCooked(), targetTriple, kindMap, loweringOptions, envDefaults, -

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-11 Thread Alexis Perry-Holby via cfe-commits
@@ -411,6 +412,13 @@ void Flang::addTargetOptions(const ArgList &Args, } // TODO: Add target specific flags, ABI, mtune option etc. + if (const Arg *A = Args.getLastArg(options::OPT_mtune_EQ)) { +CmdArgs.push_back("-tune-cpu"); +if (strcmp(A->getValue(), "native")

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-11 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/95043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-11 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space commented: Thanks for working on this @AlexisPerry ! Could you add some tests? https://github.com/llvm/llvm-project/pull/95043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-11 Thread Andrzej Warzyński via cfe-commits
@@ -32,6 +32,9 @@ class TargetOptions { /// If given, the name of the target CPU to generate code for. std::string cpu; + /// If given, the name of the target CPU to tune code for. + std::string tuneCPU; banach-space wrote: I'm fine with longer self-doc

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-11 Thread Alexis Perry-Holby via cfe-commits
https://github.com/AlexisPerry updated https://github.com/llvm/llvm-project/pull/95043 >From 2312d31b14aecc6eeea2e81d221ee004e5de3efc Mon Sep 17 00:00:00 2001 From: Alexis Perry-Holby Date: Thu, 6 Jun 2024 14:02:52 -0600 Subject: [PATCH 1/3] [flang] Add basic -mtune support --- clang/include/

[clang] [analyzer] Finish moving alpha.core.SizeofPtr to clang-tidy (PR #95118)

2024-06-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. We should remember to mention this transfer explicitly in the release notes one day. But given that we don't really maintain/sync the release notes that's for another day, closer to the release branchoff. https://github.com/llvm/llvm-proj

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

2024-06-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/94889 >From 217c00f47aaa65b113d1c1cfd93a9c4e1d235c1a Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 9 Jun 2024 11:49:18 +0800 Subject: [PATCH 1/4] [Clang] Fix two issues of CTAD for aggregates --- clang/lib/S

[clang] [Driver] Add winsysroot alias to the GNU driver (PR #94731)

2024-06-11 Thread via cfe-commits
https://github.com/Andarwinux updated https://github.com/llvm/llvm-project/pull/94731 >From 7ccd1cab0d47e21cc07583e2c8ee8dbf24ecf7df Mon Sep 17 00:00:00 2001 From: Andarwinux <144242044+andarwi...@users.noreply.github.com> Date: Fri, 7 Jun 2024 07:07:40 + Subject: [PATCH] [Driver] Add winsys

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-11 Thread Shilei Tian via cfe-commits
shiltian wrote: any comment/concern? https://github.com/llvm/llvm-project/pull/94830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Merge duplicate extension information. (PR #92319)

2024-06-11 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/92319 >From 5e4b981996ece8da962848fe141fed2f9dd46f66 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 14 May 2024 17:46:00 +0100 Subject: [PATCH] [AArch64] Merge duplicate extension information. When w

[clang] [llvm] [AArch64] Merge duplicate extension information. (PR #92319)

2024-06-11 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/92319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ConstantFold] Drop gep of gep fold entirely (PR #95126)

2024-06-11 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. https://github.com/llvm/llvm-project/pull/95126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

2024-06-11 Thread Younan Zhang via cfe-commits
@@ -335,3 +335,73 @@ namespace TTP { // CHECK-NEXT: `-TemplateArgument type 'T':'type-parameter-0-0'{{$}} // CHECK-NEXT:`-TemplateTypeParmType {{.+}} 'T' dependent depth 0 index 0{{$}} // CHECK-NEXT: `-TemplateTypeParm {{.+}} 'T'{{$}} + +namespace GH64625

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

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

[clang] [libclang/python] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-06-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Conceptually, `ClangLib` works for strict type checking, because implementations are opaque, so the checker has to simply believe the annotations. What I want is to push this opaqueness boundary closer to the user-facing API, and get rid of the large body of code that is here ju

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/94957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Krist=C3=B3f?= Umann , =?utf-8?q?Krist=C3=B3f?= Umann , =?utf-8?q?Krist=C3=B3f?= Umann Message-ID: In-Reply-To: https://github.com/steakhal commented: LGTM. I only had some nits and some terminology flexing. https://github.com/llvm/llvm-project/pull/94957 ___

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===//

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===//

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -300,6 +333,8 @@ class StreamChecker : public Checkerhttps://github.com/llvm/llvm-project/pull/94957 ___ cfe-commits mailing

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===//

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===//

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===//

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===//

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -98,6 +107,19 @@ struct StreamState { OpenFailed /// The last open operation has failed. } State; + StringRef getKindStr() const { +switch (State) { +

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-11 Thread Balazs Benics via cfe-commits
=?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann , =?utf-8?q?Kristóf?= Umann Message-ID: In-Reply-To: @@ -696,6 +730,69 @@ struct StreamOperationEvaluator { } // end anonymous namespace +//===--===//

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-11 Thread Tarun Prabhu via cfe-commits
@@ -411,6 +412,13 @@ void Flang::addTargetOptions(const ArgList &Args, } // TODO: Add target specific flags, ABI, mtune option etc. + if (const Arg *A = Args.getLastArg(options::OPT_mtune_EQ)) { +CmdArgs.push_back("-tune-cpu"); +if (strcmp(A->getValue(), "native")

[clang] [llvm] [ConstantFold] Drop gep of gep fold entirely (PR #95126)

2024-06-11 Thread Nikita Popov via cfe-commits
nikic wrote: > See > [51e459a](https://github.com/llvm/llvm-project/commit/51e459a561519c8d51e2b4cadddc0d1f99c8b7ef): > > > This causes some non-trivial text size increases in unoptimized builds for > > Bullet. Revert while I investigate. > > Can you double check this? This was mitigated by

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-11 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/95112 >From e53dfbc9b2c6b7f30c1378731d7de284fa99d568 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 11 Jun 2024 14:26:38 +0100 Subject: [PATCH 1/2] [Clang] Implement CWG2813 --- clang/docs/ReleaseNotes.rst

[clang] [clang-format] Add BinPackBinaryOperations configuration (PR #95013)

2024-06-11 Thread Ameer J via cfe-commits
@@ -27492,6 +27492,86 @@ TEST_F(FormatTest, SpaceBetweenKeywordAndLiteral) { verifyFormat("return sizeof \"5\";"); } +TEST_F(FormatTest, BinPackBinaryOperations) { + auto Style = getLLVMStyle(); + Style.BinPackBinaryOperations = false; + + // Logical operations + verifyF

[clang] [clang] [test] Skip a test that sets PATH= on Windows (PR #95096)

2024-06-11 Thread Fangrui Song via cfe-commits
@@ -77,13 +77,3 @@ // XTOR: {{llvm-spirv.*"}} // BACKEND-NOT: {{llvm-spirv.*"}} - -//- -// Check llvm-spirv- is used if it is found in PATH. -// RUN: mkdir -p %t/versioned -// RUN: touch %t/versioned/l

[clang] [clang] [test] Skip a test that sets PATH= on Windows (PR #95096)

2024-06-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/95096 ___ 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 lambda l_square (PR #95084)

2024-06-11 Thread Emilia Kond via cfe-commits
@@ -1591,6 +1591,12 @@ TEST_F(TokenAnnotatorTest, UnderstandsLambdas) { EXPECT_TOKEN(Tokens[15], tok::arrow, TT_TrailingReturnArrow); EXPECT_TOKEN(Tokens[17], tok::l_brace, TT_LambdaLBrace); + Tokens = annotate("auto l = [] -> struct S { return {}; };");

[clang] 4cf607f - [clang][Interp] Fix visiting non-FieldDecl MemberExprs

2024-06-11 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-11T18:13:28+02:00 New Revision: 4cf607fa15fd9ccd79115095a1eb02e0cd83e1a9 URL: https://github.com/llvm/llvm-project/commit/4cf607fa15fd9ccd79115095a1eb02e0cd83e1a9 DIFF: https://github.com/llvm/llvm-project/commit/4cf607fa15fd9ccd79115095a1eb02e0cd83e1a9.diff LO

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-11 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: how does a user initialize/populate this type of objects? by calling a builtin function? need a SemaCUDA test to make sure it is defined with %clang_cc1 -triple x86_64-unknown-gnu-linux -aux-triple amdgcn-amd-amdhsa , like https://github.com/llvm/llvm-project/blob/main/clang/

[clang] [llvm] Reapply "[llvm][IR] Extend BranchWeightMetadata to track provenance of weights" (PR #95136)

2024-06-11 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/95136 Reverts llvm/llvm-project#95060, and relands #86609, with the unintended code generation changes addressed. This patch implements the changes to LLVM IR discussed in https://discourse.llvm.org/t/rfc-update-branc

[clang] [llvm] Reapply "[llvm][IR] Extend BranchWeightMetadata to track provenance of weights" (PR #95136)

2024-06-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paul Kirth (ilovepi) Changes Reverts llvm/llvm-project#95060, and relands #86609, with the unintended code generation changes addressed. This patch implements the changes to LLVM IR discussed in https://discourse.llvm.org/t/rfc-update-bra

[clang] [llvm] Reapply "[llvm][IR] Extend BranchWeightMetadata to track provenance of weights" (PR #95136)

2024-06-11 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi converted_to_draft https://github.com/llvm/llvm-project/pull/95136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Strict Availability Diagnostics (PR #93860)

2024-06-11 Thread Justin Bogner via cfe-commits
@@ -834,34 +841,41 @@ void DiagnoseUnguardedAvailability::DiagnoseDeclAvailability( OffendingDecl)) return; -// We would like to emit the diagnostic even if -Wunguarded-availability is -// not specified for deployment

[clang] [llvm] Reapply "[llvm][IR] Extend BranchWeightMetadata to track provenance of weights" (PR #95136)

2024-06-11 Thread Paul Kirth via cfe-commits
ilovepi wrote: Still looking into the codegen issue, but I'd expect there's probably just 1-2 cases where I failed to update a pass to use APIs from ProfDataUtils. https://github.com/llvm/llvm-project/pull/95136 ___ cfe-commits mailing list cfe-commit

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-11 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria updated https://github.com/llvm/llvm-project/pull/94544 From ed167da84dd9ad59a5b2c61bd237d041efa9d4fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Amatria=20Barral?= Date: Thu, 6 Jun 2024 00:52:30 +0200 Subject: [PATCH 1/2] [llvm][Support] Stop using PW

[clang] [llvm] Reapply "[llvm][IR] Extend BranchWeightMetadata to track provenance of weights" (PR #95136)

2024-06-11 Thread David Li via cfe-commits
david-xl wrote: What is the summary of the new changes that address the compile time issue? https://github.com/llvm/llvm-project/pull/95136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

<    1   2   3   4   5   >