[clang] [clang-tools-extra] [clang][Sema] Respect const-qualification of methods in heuristic results (PR #123551)

2025-01-20 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/123551 >From cd87f05f19f245e24f5c29b97af0b69266608d7a Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 20 Jan 2025 01:52:24 -0500 Subject: [PATCH 1/2] Upgrade HeuristicResolver to use QualType rather than

[clang] [flang] Reland "[Flang][Driver] Add a flag to control zero initialization" (PR #123606)

2025-01-20 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan closed https://github.com/llvm/llvm-project/pull/123606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ce32625 - Reland "[Flang][Driver] Add a flag to control zero initialization" (#123606)

2025-01-20 Thread via cfe-commits
Author: Kiran Chandramohan Date: 2025-01-21T07:57:44Z New Revision: ce32625966a922fe96aababe0ed975ada004901f URL: https://github.com/llvm/llvm-project/commit/ce32625966a922fe96aababe0ed975ada004901f DIFF: https://github.com/llvm/llvm-project/commit/ce32625966a922fe96aababe0ed975ada004901f.diff

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang] [Rewrite] Avoid repeated hash lookups (NFC) (PR #123696)

2025-01-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/123696.diff 1 Files Affected: - (modified) clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp (+2-2) ``diff diff --git a/clang/lib/F

[clang] [Rewrite] Avoid repeated hash lookups (NFC) (PR #123696)

2025-01-20 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/123696 None >From 18c544645309d614fb288869ddc26ad7fe86a514 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 20 Jan 2025 10:33:13 -0800 Subject: [PATCH] [Rewrite] Avoid repeated hash lookups (NFC) --- cla

[clang] [clang-format] Handle leading C++11 attribute in QualifierAlignment (PR #123690)

2025-01-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #123573. --- Full diff: https://github.com/llvm/llvm-project/pull/123690.diff 2 Files Affected: - (modified) clang/lib/Format/QualifierAlignmentFixer.cpp (+2-1) - (modified) clang/unittests/Format

[clang] [Clang] Delegate part of SetupConstraintScope's job to LambdaScopeForCallOperatorInstantiationRAII (PR #123687)

2025-01-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/123687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f07e516 - [Clang] Delegate part of SetupConstraintScope's job to LambdaScopeForCallOperatorInstantiationRAII (#123687)

2025-01-20 Thread via cfe-commits
Author: Younan Zhang Date: 2025-01-21T14:16:17+08:00 New Revision: f07e5162d0e67ec980e0ea282cf294f377407b10 URL: https://github.com/llvm/llvm-project/commit/f07e5162d0e67ec980e0ea282cf294f377407b10 DIFF: https://github.com/llvm/llvm-project/commit/f07e5162d0e67ec980e0ea282cf294f377407b10.diff

[clang] [clang-format] Handle leading C++11 attribute in QualifierAlignment (PR #123690)

2025-01-20 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/123690 Fixes #123573. >From 966ff2aea1eb0c137bdde04076c59de756204bc2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 20 Jan 2025 22:02:04 -0800 Subject: [PATCH] [clang-format] Handle leading C++11 attribute in Qual

[clang] [Clang] Delegate part of SetupConstraintScope's job to LambdaScopeForCallOperatorInstantiationRAII (PR #123687)

2025-01-20 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/123687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-20 Thread via cfe-commits
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, return New; } +// CheckBindingsCount +// - Checks the arity of the structured bindings +// - Creates the resolved pack expr if there is +//one +static bool CheckBindingsCount(Sema &S, D

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

2025-01-20 Thread via cfe-commits
https://github.com/cor3ntin commented: Can you add a changelog entry? https://github.com/llvm/llvm-project/pull/123678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Unwind through loongarch64/Linux sigreturn frame (PR #123682)

2025-01-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: None (Ami-zhang) Changes Similar to D90898 (Linux AArch64), D124765 (SystemZ), and D148499 (RISCV). In this commit, I enabled two test cases, while zhuqizheng supported with the source code development. Co-Authored-By: zhuqizheng

[clang] [Clang] Delegate part of SetupConstraintScope's job to LambdaScopeForCallOperatorInstantiationRAII (PR #123687)

2025-01-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes Now that the RAII object has a dedicate logic for handling nested lambdas, where the inner lambda could reference any captures/variables/parameters from the outer lambda, we can shift the responsibility for

[clang] [Clang] Delegate part of SetupConstraintScope's job to LambdaScopeForCallOperatorInstantiationRAII (PR #123687)

2025-01-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/123687 Now that the RAII object has a dedicate logic for handling nested lambdas, where the inner lambda could reference any captures/variables/parameters from the outer lambda, we can shift the responsibility for man

[clang] [llvm] Generate `DW_AT_RUST_short_backtrace` attributes for `DISubprogram` nodes (PR #123683)

2025-01-20 Thread via cfe-commits
@@ -125,6 +125,13 @@ class DITypeRefArray { iterator end() const { return N ? iterator(N->op_end()) : iterator(); } }; +/// DWARF-like extension attribute for setting short backtrace debuginfo. +enum class ShortBacktraceAttr { + SkipFrame = 0, + StartShortBacktrace = 1, +

[clang] [llvm] Generate `DW_AT_RUST_short_backtrace` attributes for `DISubprogram` nodes (PR #123683)

2025-01-20 Thread via cfe-commits
@@ -0,0 +1,36 @@ +;; This test checks whether DWARF tag DW_AT_RUST_short_backtrace is accepted and processed. +; REQUIRES: object-emission +; RUN: %llc_dwarf %s -filetype=obj -o - | llvm-dwarfdump --verbose - | FileCheck %s +; CHECK: DW_AT_RUST_short_backtrace [DW_FORM_data1] +

[clang] [llvm] Generate `DW_AT_RUST_short_backtrace` attributes for `DISubprogram` nodes (PR #123683)

2025-01-20 Thread via cfe-commits
@@ -5658,10 +5658,27 @@ bool LLParser::parseDISubprogram(MDNode *&Result, bool IsDistinct) { OPTIONAL(retainedNodes, MDField, ); \ OPTIONAL(thrownTypes, MDField, ); \ OPTIONAL(annotatio

[clang] [llvm] Generate `DW_AT_RUST_short_backtrace` attributes for `DISubprogram` nodes (PR #123683)

2025-01-20 Thread via cfe-commits
@@ -605,6 +605,10 @@ HANDLE_DW_AT(0x3b28, BORLAND_Delphi_ABI, 0, BORLAND) HANDLE_DW_AT(0x3b29, BORLAND_Delphi_return, 0, BORLAND) HANDLE_DW_AT(0x3b30, BORLAND_Delphi_frameptr, 0, BORLAND) HANDLE_DW_AT(0x3b31, BORLAND_closure, 0, BORLAND) + +// Rust extensions. +HANDLE_DW_AT(0x3

[clang] [llvm] Generate `DW_AT_RUST_short_backtrace` attributes for `DISubprogram` nodes (PR #123683)

2025-01-20 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] [llvm] Generate `DW_AT_RUST_short_backtrace` attributes for `DISubprogram` nodes (PR #123683)

2025-01-20 Thread via cfe-commits
https://github.com/jyn514 created https://github.com/llvm/llvm-project/pull/123683 The Rust standard library has two [styles](https://doc.rust-lang.org/stable/std/panic/enum.BacktraceStyle.html) for printing backtraces at runtime: 1. Full backtraces. These work in the obvious way. 2. Short bac

[libunwind] [libunwind] Unwind through loongarch64/Linux sigreturn frame (PR #123682)

2025-01-20 Thread via cfe-commits
https://github.com/Ami-zhang created https://github.com/llvm/llvm-project/pull/123682 Similar to D90898 (Linux AArch64), D124765 (SystemZ), and D148499 (RISCV). In this commit, I enabled two test cases, while zhuqizheng supported with the source code development. Co-Authored-By: zhuqizheng

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

2025-01-20 Thread A. Jiang via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -std=c++26 -verify %s frederick-vs-ja wrote: I think it would be better to verify that this is OK since C++20. https://github.com/llvm/llvm-project/pull/123667 ___ cfe-commits maili

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-01-20 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: In general, personally I quite like the idea of removing decls from the scope. Though I think when I've tried to do so [in a different context], there were some problems. I'll try to find what I was doing and why it wasn't working. It's not a blocker for your change but it can b

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-01-20 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: That crash looks pretty annoying, thanks for looking into this issue and debugging it. Can you trigger the crash without `-ast-dump-all`? If there is a way to detect a faulty behaviour without verifying the internal compiler state, it is more reliable and less fragile to do it

[clang] [clang] Lower non-builtin sincos[f|l] calls to llvm.sincos.* when -fno-math-errno is set (PR #121763)

2025-01-20 Thread Craig Topper via cfe-commits
topperc wrote: > > @RKSimon do you know if there is a reason CodeGen AA is not enabled for x86? > > I'd otherwise be happy to approve this patch, lowering to the intrinsic > > seems like the right thing to do. > > I don't remember any reason for alias analysis to not be enabled on x86 - > @pho

[libclc] [libclc] Route int bitselect through CLC; add half (PR #123653)

2025-01-20 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/123653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/123648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OffloadBundler] Compress bundles over 4GB (PR #122307)

2025-01-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-global-isel` running on `linaro-clang-aarch64-global-isel` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/125/builds/5078 Here is the

[clang] [OffloadBundler] Compress bundles over 4GB (PR #122307)

2025-01-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve2-vla-2stage` running on `linaro-g4-01` while building `clang` at step 12 "ninja check 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/199/builds/1090 Here is the relevant piece

[libclc] [libclc] Route select through __clc_select (PR #123647)

2025-01-20 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/123647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OffloadBundler] Compress bundles over 4GB (PR #122307)

2025-01-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-win-x-aarch64` running on `as-builder-2` while building `clang` at step 10 "test-check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/193/builds/5054 Here is the relevant piece of

[clang] e87b843 - Reland [OffloadBundler] Compress bundles over 4GB (#122307)

2025-01-20 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-01-20T21:17:21-05:00 New Revision: e87b843811e147db8d1edd7fe2dd52bb90be6ebc URL: https://github.com/llvm/llvm-project/commit/e87b843811e147db8d1edd7fe2dd52bb90be6ebc DIFF: https://github.com/llvm/llvm-project/commit/e87b843811e147db8d1edd7fe2dd52bb90be6ebc.dif

[clang] [OffloadBundler] Compress bundles over 4GB (PR #122307)

2025-01-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu` running on `sie-linux-worker3` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/11719 Her

[clang] 72c560d - Revert "[OffloadBundler] Compress bundles over 4GB (#122307)"

2025-01-20 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-01-20T20:58:05-05:00 New Revision: 72c560da4b923b42114490093794e585144879f4 URL: https://github.com/llvm/llvm-project/commit/72c560da4b923b42114490093794e585144879f4 DIFF: https://github.com/llvm/llvm-project/commit/72c560da4b923b42114490093794e585144879f4.dif

[clang] [OffloadBundler] Compress bundles over 4GB (PR #122307)

2025-01-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/20312 Here is

[clang] [OffloadBundler] Compress bundles over 4GB (PR #122307)

2025-01-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-debian-cpp20` running on `clang-debian-cpp20` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/108/builds/8358 Here is the r

[clang] [OffloadBundler] Compress bundles over 4GB (PR #122307)

2025-01-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-armv8-quick` running on `linaro-clang-armv8-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/10570 Here is the relevant piece o

[clang] [OffloadBundler] Compress bundles over 4GB (PR #122307)

2025-01-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/10933 Here is the relevant pie

[clang] [OffloadBundler] Compress bundles over 4GB (PR #122307)

2025-01-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `arc-builder` running on `arc-worker` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/10570 Here is the relevant piece of

[clang] clang/limits.h: Avoid including limits.h twice (PR #120526)

2025-01-20 Thread YunQiang Su via cfe-commits
wzssyqa wrote: > > Yes and no. It's due to the redefinitions, for sure. But that diagnostic is > suppressed in system headers: https://godbolt.org/z/Mb7Kh975f, so I think we > need to understand why there's a `limits.h` being included as though it were > not a system header, because that's a

[clang] 4e2efc3 - [OffloadBundler] Compress bundles over 4GB (#122307)

2025-01-20 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-01-20T20:17:30-05:00 New Revision: 4e2efc3bd500836d0fa977d6e257ffee2c92e178 URL: https://github.com/llvm/llvm-project/commit/4e2efc3bd500836d0fa977d6e257ffee2c92e178 DIFF: https://github.com/llvm/llvm-project/commit/4e2efc3bd500836d0fa977d6e257ffee2c92e178.dif

[clang] [llvm] [X86][AVX10.2-MINMAX][NFC] Remove NE[P] from intrinsic and instruction (PR #123272)

2025-01-20 Thread Evgenii Kudriashov via cfe-commits
https://github.com/e-kud approved this pull request. LGTM. Couldn't grep something `minmax`-like that hasn't been covered. https://github.com/llvm/llvm-project/pull/123272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

2025-01-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikolas Klauser (philnik777) Changes This aligns the builtins with how implementations work which don't use the buitins. --- Full diff: https://github.com/llvm/llvm-project/pull/123678.diff 2 Files Affected: - (modified) clang/lib/Sem

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

2025-01-20 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/123678 This aligns the builtins with how implementations work which don't use the buitins. >From 233d8d797a7a915d4100d7ca4259bb28611c7d90 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 21 Jan 2025 02:1

[clang] [OffloadBundler] Compress bundles over 4GB (PR #122307)

2025-01-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/16114

[clang] [OffloadBundler] Compress bundles over 4GB (PR #122307)

2025-01-20 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/122307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Shafik Yaghmour via cfe-commits
@@ -48,24 +48,49 @@ namespace std __attribute__((__visibility__("default"))) { isnan(double __x); bool isnan(long double __x); -bool + bool isfinite(float __x); bool isfinite(double __x); bool isfinte(long double __x); - bool + bool isunordered(float _

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: quick questions https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Shafik Yaghmour via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

2025-01-20 Thread Marco Elver via cfe-commits
melver wrote: > We had a discussion on https://reviews.llvm.org/D52395 that might be relevant > here. To quote @delesley: > > > When you pass an object to a function, either by pointer or by reference, > > no actual load from memory has yet occurred. Thus, there is a real risk of > > false po

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/122754 >From b6c576fb90362640b2fd4e41bd7f13dfee95d04d Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 13 Jan 2025 11:53:39 -0500 Subject: [PATCH 01/13] initial template arg fix push --- .../clang/Basic/Diagnost

[clang] [HLSL] Fix global resource initialization (PR #123394)

2025-01-20 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/123394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-20 Thread Jason Rice via cfe-commits
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, return New; } +// CheckBindingsCount +// - Checks the arity of the structured bindings +// - Creates the resolved pack expr if there is +//one +static bool CheckBindingsCount(Sema &S, D

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/122754 >From b6c576fb90362640b2fd4e41bd7f13dfee95d04d Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 13 Jan 2025 11:53:39 -0500 Subject: [PATCH 01/12] initial template arg fix push --- .../clang/Basic/Diagnost

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/122754 >From b6c576fb90362640b2fd4e41bd7f13dfee95d04d Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 13 Jan 2025 11:53:39 -0500 Subject: [PATCH 01/11] initial template arg fix push --- .../clang/Basic/Diagnost

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/122754 >From b6c576fb90362640b2fd4e41bd7f13dfee95d04d Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 13 Jan 2025 11:53:39 -0500 Subject: [PATCH 01/10] initial template arg fix push --- .../clang/Basic/Diagnost

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/122754 >From b6c576fb90362640b2fd4e41bd7f13dfee95d04d Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 13 Jan 2025 11:53:39 -0500 Subject: [PATCH 1/9] initial template arg fix push --- .../clang/Basic/Diagnostic

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/122754 >From b6c576fb90362640b2fd4e41bd7f13dfee95d04d Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 13 Jan 2025 11:53:39 -0500 Subject: [PATCH 1/8] initial template arg fix push --- .../clang/Basic/Diagnostic

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/122754 >From b6c576fb90362640b2fd4e41bd7f13dfee95d04d Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 13 Jan 2025 11:53:39 -0500 Subject: [PATCH 1/7] initial template arg fix push --- .../clang/Basic/Diagnostic

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -4870,9 +4870,25 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">; +

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -883,13 +896,11 @@ TemplateParameter DeductionFailureInfo::getTemplateParameter() { case TemplateDeductionResult::NonDependentConversionFailure: case TemplateDeductionResult::ConstraintsNotSatisfied: return TemplateParameter(); - justinfargnoli wrot

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -749,10 +753,9 @@ clang::MakeDeductionFailureInfo(ASTContext &Context, break; case TemplateDeductionResult::Incomplete: - case TemplateDeductionResult::InvalidExplicitArguments: +// case TemplateDeductionResult::InvalidExplicitArguments: justinfa

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -883,13 +896,11 @@ TemplateParameter DeductionFailureInfo::getTemplateParameter() { case TemplateDeductionResult::NonDependentConversionFailure: case TemplateDeductionResult::ConstraintsNotSatisfied: return TemplateParameter(); - case TemplateDeductionResult::Inc

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -736,8 +738,10 @@ clang::MakeDeductionFailureInfo(ASTContext &Context, TemplateDeductionResult TDK, TemplateDeductionInfo &Info) { DeductionFailureInfo Result; + justinfargnoli wrote: ```sugg

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -11714,13 +11724,53 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } - case TemplateDeductionResult::InvalidExplicitArguments: + case TemplateDeductionResult::InvalidExplicitArguments: { assert(ParamD && "no parameter f

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -946,15 +956,14 @@ const TemplateArgument *DeductionFailureInfo::getFirstArg() { case TemplateDeductionResult::Incomplete: case TemplateDeductionResult::TooManyArguments: case TemplateDeductionResult::TooFewArguments: - case TemplateDeductionResult::InvalidExplicitAr

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -3575,7 +3575,15 @@ TemplateDeductionResult Sema::SubstituteExplicitTemplateArguments( unsigned Index = SugaredBuilder.size(); if (Index >= TemplateParams->size()) return TemplateDeductionResult::SubstitutionFailure; + justinfargnoli wrote: `

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -715,12 +715,14 @@ namespace { struct DFIParamWithArguments : DFIArguments { TemplateParameter Param; }; + justinfargnoli wrote: ```suggestion ``` https://github.com/llvm/llvm-project/pull/122754 ___ cfe-

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -163,4 +163,4 @@ namespace PR15673 { CONCEPT_REQUIRES_(some_passing_trait::value && some_trait::value)> void rangesv3(); // expected-note{{candidate template ignored: requirement 'some_trait::value' was not satisfied [with T = int, x = 42]}} void test_ranges

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -11610,9 +11618,11 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, bool TakingCandidateAddress) { TemplateParameter Param = DeductionFailure.getTemplateParameter(); NamedDecl *ParamD; - (ParamD = Param.dy

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -822,13 +834,14 @@ void DeductionFailureInfo::Destroy() { case TemplateDeductionResult::Incomplete: case TemplateDeductionResult::TooManyArguments: case TemplateDeductionResult::TooFewArguments: - case TemplateDeductionResult::InvalidExplicitArguments: + // case Temp

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -918,7 +929,6 @@ TemplateArgumentList *DeductionFailureInfo::getTemplateArgumentList() { case TemplateDeductionResult::CUDATargetMismatch: case TemplateDeductionResult::NonDependentConversionFailure: return nullptr; - justinfargnoli wrote: Add newl

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -979,14 +988,13 @@ const TemplateArgument *DeductionFailureInfo::getSecondArg() { case TemplateDeductionResult::IncompletePack: case TemplateDeductionResult::TooManyArguments: case TemplateDeductionResult::TooFewArguments: - case TemplateDeductionResult::InvalidExpli

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -777,6 +780,7 @@ clang::MakeDeductionFailureInfo(ASTContext &Context, case TemplateDeductionResult::IncompletePack: // FIXME: It's slightly wasteful to allocate two TemplateArguments for this. case TemplateDeductionResult::Inconsistent: + justinfarg

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -1,4 +1,4 @@ // RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify %s // expected-no-diagnostics void f(void *); -void g() { f(__nullptr); } +void g() { f(__nullptr); } justinfargnoli wrote: ```suggestion void g() { f(__nullptr); } ``` https://github.com/ll

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/122754 >From b6c576fb90362640b2fd4e41bd7f13dfee95d04d Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 13 Jan 2025 11:53:39 -0500 Subject: [PATCH 1/6] initial template arg fix push --- .../clang/Basic/Diagnostic

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Justin Fargnoli via cfe-commits
@@ -4870,9 +4870,25 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">; +

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-20 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/122754 >From b6c576fb90362640b2fd4e41bd7f13dfee95d04d Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 13 Jan 2025 11:53:39 -0500 Subject: [PATCH 1/5] initial template arg fix push --- .../clang/Basic/Diagnostic

[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

2025-01-20 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: We had a discussion on https://reviews.llvm.org/D52395 that might be relevant here. To quote @delesley: > When you pass an object to a function, either by pointer or by reference, no > actual load from memory has yet occurred. Thus, there is a real risk of false > positiv

[clang] [libcxx] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualified base classes (PR #121419)

2025-01-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/121419 >From 3f6b1d68978857035a972f49b1cfd9d9d0151be9 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 1 Jan 2025 01:47:17 +0200 Subject: [PATCH 1/6] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualifi

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-01-20 Thread via cfe-commits
@@ -2509,6 +2509,20 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, DC = DC->getLookupParent(); } + // Check whether a similar function-like macro exists and suggest it Sirraide wrote: Hmm, that sounds weird because I do

[clang] Clang-Refactor (PR #94855)

2025-01-20 Thread Roscoe A. Bartlett via cfe-commits
=?utf-8?b?0JjQs9C90LDRgiDQodC10YDQsw=?=, =?utf-8?b?0JjQs9C90LDRgiDQodC10YDQsw=?Message-ID: In-Reply-To: bartlettroscoe wrote: @IgnatSergeev, no-one ever commented on this PR? We are interested in potentially extending this `clang-refactor` tool. Any suggestions or advance on doing so? (You

[clang] [libcxx] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualified base classes (PR #121419)

2025-01-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/121419 >From 3f6b1d68978857035a972f49b1cfd9d9d0151be9 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 1 Jan 2025 01:47:17 +0200 Subject: [PATCH 1/6] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualifi

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

2025-01-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/106036 >From ef0f3551dbb3ce61c57a5ad044d86b504c7742e0 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Tue, 10 Sep 2024 02:35:43 +0300 Subject: [PATCH 1/7] [Clang] restrict use of attribute names reserved by the C+

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e5992b6 - [Clang] Fix warning for non std functions with name `infinity` (#123417)

2025-01-20 Thread via cfe-commits
Author: Amr Hesham Date: 2025-01-20T22:21:48+01:00 New Revision: e5992b686bb06dd53a4ff1e9586fa350d3ff43b5 URL: https://github.com/llvm/llvm-project/commit/e5992b686bb06dd53a4ff1e9586fa350d3ff43b5 DIFF: https://github.com/llvm/llvm-project/commit/e5992b686bb06dd53a4ff1e9586fa350d3ff43b5.diff LO

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
@@ -8454,26 +8454,43 @@ static bool IsInfOrNanFunction(StringRef calleeName, MathCheck Check) { llvm_unreachable("unknown MathCheck"); } +static bool IsInfinityFunction(const FunctionDecl *FDecl) { + if (FDecl->getName() != "infinity") +return false; + + if (const CXX

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Zahira Ammarguellat via cfe-commits
@@ -8454,26 +8454,43 @@ static bool IsInfOrNanFunction(StringRef calleeName, MathCheck Check) { llvm_unreachable("unknown MathCheck"); } +static bool IsInfinityFunction(const FunctionDecl *FDecl) { + if (FDecl->getName() != "infinity") +return false; + + if (const CXX

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/123417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

2025-01-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #123524 --- Full diff: https://github.com/llvm/llvm-project/pull/123667.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1-1) - (modified) clang/lib/Parse/ParseExprCXX.cpp (+6)

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

2025-01-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/123667 Fixes #123524 >From 00b8b64879ad3ae35a0a671da563ac876ffaf228 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 20 Jan 2025 22:51:00 +0200 Subject: [PATCH] [Clang] use constant evaluation context for cons

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-20 Thread Amr Hesham via cfe-commits
@@ -8454,26 +8454,43 @@ static bool IsInfOrNanFunction(StringRef calleeName, MathCheck Check) { llvm_unreachable("unknown MathCheck"); } +static bool IsInfinityFunction(const FunctionDecl *FDecl) { + if (FDecl->getName() != "infinity") +return false; + + if (const CXX

  1   2   3   4   >