[clang] [HLSL][Driver] Use temporary files correctly (PR #130436)

2025-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes This updates the DXV and Metal Converter actions to properly use temporary files created by the driver. I've abstracted away a check to determine if an action is the last in the sequence because we may have be

[clang] [Clang] Fix typo 'dereferencable' to 'dereferenceable' (PR #116761)

2025-03-08 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue approved this pull request. https://github.com/llvm/llvm-project/pull/116761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-08 Thread Oliver Hunt via cfe-commits
ojhunt wrote: I'm planning on removing the docs, but I've left them in for now just so that reviewers can read them if they want context to understand the PR. @cor3ntin @AaronBallman @erichkeane I'm ok removing the flag, I'll look into how to diagnose the "you're using an extension/future lang

[clang] [HLSL] add extra scalar vector overloads for clamp (PR #129939)

2025-03-08 Thread Sarah Spall via cfe-commits
https://github.com/spall converted_to_draft https://github.com/llvm/llvm-project/pull/129939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Instantiate destructors for initialized members (PR #128866)

2025-03-08 Thread Maurice Heumann via cfe-commits
https://github.com/momo5502 updated https://github.com/llvm/llvm-project/pull/128866 >From bb4091d2f9b7062aa83e5bee2ba525478a7dbd0a Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Wed, 26 Feb 2025 14:31:47 +0100 Subject: [PATCH 1/7] Instantiate destructors from initialized anonymous union

[clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-08 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: > But at this time point, there are no other sub project use it, which means it > is not a common part. Using this logic we would almost never move anything to reusable libraries. In LLVM, we tend to introduce reusable componantes/functionality a lot. As far as I remember, wh

[clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-08 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: Also, I already know about downstream users who are also interested in using this option in their tools. https://github.com/llvm/llvm-project/pull/128150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang] Add builtins for `add` with `nuw` and/or `nsw` (PR #130354)

2025-03-08 Thread Nikolas Klauser via cfe-commits
@@ -5037,6 +5037,66 @@ def ArithmeticFence : LangBuiltin<"ALL_LANGUAGES"> { let Prototype = "void(...)"; } +class SNUWTemplate : + Template<["int", "long int", "long long int"], + ["_nuw", "l_nuw", "ll_nuw"]>; philnik777 wrote: I'm

[clang] [NFC][analyzer] OOB test consolidation IV: rename files (PR #129697)

2025-03-08 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/129697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Allow non-local/non-variable declarations in for loop (PR #129737)

2025-03-08 Thread Shafik Yaghmour via cfe-commits
@@ -2269,10 +2269,11 @@ StmtResult Sema::ActOnForStmt(SourceLocation ForLoc, SourceLocation LParenLoc, for (auto *DI : DS->decls()) { if (VarDecl *VD = dyn_cast(DI)) { VarDeclSeen = true; - if (VD->isLocalVarDecl() && !VD->hasLocalStorage()) {

[clang] [clang][bytecode] Loosen assertion This() for array elements (PR #130399)

2025-03-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-msan` running on `sanitizer-buildbot9` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/94/builds/5061 Here is the releva

[clang-tools-extra] [clang-tidy][NFC]refactor matcher for bugprone-optional-value-conversion (PR #130415)

2025-03-08 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: * **#130417** https://app.graphite.dev/github/pr/llvm/llvm-project/130417?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> * **#130416** https://app.graphite.dev/github/pr/llvm/l

[clang-tools-extra] [clang-tidy][NFC]refactor matcher for bugprone-optional-value-conversion (PR #130415)

2025-03-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 ready_for_review https://github.com/llvm/llvm-project/pull/130415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC]refactor matcher for bugprone-optional-value-conversion (PR #130415)

2025-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes The old `constructFrom` has hidden requirement which TypeMatcher must be used before ArgumentMatcher because there are bind inside. Inlining this function to make it more intuitive. --- Full diff: h

[clang] disable unary, vector mask (PR #130400)

2025-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Leslie (wsehjk) Changes This pr is to fix #92342. --- Full diff: https://github.com/llvm/llvm-project/pull/130400.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaChecking.cpp (+6-18) - (modified) clang/test/Sema/constant_builti

[clang-tools-extra] [clang-tidy] Add ClangQueryChecks config option (PR #123734)

2025-03-08 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: Hello @DeNiCoN, Are you still working on this patch? If not, I hope I can take over this patch to finally finish it. https://github.com/llvm/llvm-project/pull/123734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang-tools-extra] [clang-tidy][NFC]refactor matcher for bugprone-optional-value-conversion (PR #130415)

2025-03-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/130415 The old `constructFrom` has hidden requirement which TypeMatcher must be used before ArgumentMatcher because there are bind inside. Inlining this function to make it more intuitive. >From ca39210f6a28569116

[clang] CodeGen: support static linking for libclosure (PR #125384)

2025-03-08 Thread Balazs Benics via cfe-commits
steakhal wrote: Hi, I'm not sure where to move your addition in the ReleaseNotes, but I'm pretty sure it shouldn't be in the Static Analyzer section. https://github.com/llvm/llvm-project/pull/125384 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang-tools-extra] [clang-tidy] `modernize-use-trailing-return-type`: add an option to apply to `void`-returning functions as well (PR #129406)

2025-03-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/129406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-08 Thread Ulrich Weigand via cfe-commits
uweigand wrote: > * However, if I removed the check for COMPILER_RT_HAS_FLOAT16 in the source > files, it builds. Not sure why/if that is needed there (there is no check for > it in e.g. extendhfdf2.c), or how it could be set. This is set if the host compiler used to build compiler-rt supports

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-08 Thread Ulrich Weigand via cfe-commits
uweigand wrote: > For the missing libfunctions, I see these files in compiler-rt/lib/builtins: > > ``` > compiler-rt/lib/builtins/extendhfsf2.c > compiler-rt/lib/builtins/extendhftf2.c > compiler-rt/lib/builtins/extendhfxf2.c > ``` > > For double, I get undefined reference to `__extendhfdf2' fr

[clang] [analyzer] Model [[assume]] attributes without side-ffects (PR #130418)

2025-03-08 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/130418 This PR splits the existing modeling of builtin assume from the BuiltinFunctionChecker. We just sink the execution path if we are about to leave the assume expression with a false assumption. Assumptions with

[clang] [analyzer] Model [[assume]] attributes without side-ffects (PR #130418)

2025-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes This PR splits the existing modeling of builtin assume from the BuiltinFunctionChecker. We just sink the execution path if we are about to leave the assume expression with a false assump

[clang] [analyzer] Model [[assume]] attributes without side-ffects (PR #130418)

2025-03-08 Thread Balazs Benics via cfe-commits
steakhal wrote: This patch should conclude the assume attribute modeling. After this, we would have some basic support for them. https://github.com/llvm/llvm-project/pull/130418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [clang][bytecode] Loosen assertion This() for array elements (PR #130399)

2025-03-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-bootstrap-asan` running on `sanitizer-buildbot1` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/52/builds/6640 Here is the relevan

[clang] [clang] Add builtins for `add` with `nuw` and/or `nsw` (PR #130354)

2025-03-08 Thread Nikolas Klauser via cfe-commits
@@ -5037,6 +5037,66 @@ def ArithmeticFence : LangBuiltin<"ALL_LANGUAGES"> { let Prototype = "void(...)"; } +class SNUWTemplate : + Template<["int", "long int", "long long int"], + ["_nuw", "l_nuw", "ll_nuw"]>; + +class SNSWTemplate : + Template<["in

[clang] [clang] Add builtins for `add` with `nuw` and/or `nsw` (PR #130354)

2025-03-08 Thread Nikolas Klauser via cfe-commits
@@ -5037,6 +5037,66 @@ def ArithmeticFence : LangBuiltin<"ALL_LANGUAGES"> { let Prototype = "void(...)"; } +class SNUWTemplate : philnik777 wrote: Can we just make these builtins generic instead? There are like a dozen builtin families that first only got

[clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-08 Thread Congcong Cai via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: HerrCai0907 wrote: > > The current patch is still unstable in my opinion. > > If that is the case that is an even stronger argument to not land it but let > it cook a bit more. > I hope it can be land and then m

[clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-08 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: My proposal for this change is in `MatchASTConsumer` behind an off by default option and make clang tidy turn this on by default. Open a ticket about not considering the indirect field declarations top level. Properly update the documentation and the changelog. I think this ap

[clang] [CIR] Upstream emitAndUpdateRetAlloca (PR #129933)

2025-03-08 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > I have mixed feelings about this change. It mostly overlaps with what I am > working on, which is class `LexicalScope`, which has a bunch of the code for > handling the return value. I think I would prefer that this PR be dropped, as > the changes will be part of the PR I

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-08 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I think the failure in question is ``` == FAIL: test_file_eq (tests.cindex.test_file.TestFile.test_file_eq) -- Traceback (most recent call last):

[clang] [clang][bytecode] Implement __builtin_{memchr,strchr,char_memchr} (PR #130420)

2025-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes llvm has recently started to use `__builitn_memchr` at compile time, so implement this. Still needs some work but the basics are done. --- Full diff: https://github.com/llvm/llvm-project/pull/130420.diff 2

[clang-tools-extra] [clangd] Add `BuiltinHeaders` flag to Config file (PR #129459)

2025-03-08 Thread Khalil Estell via cfe-commits
https://github.com/kammce updated https://github.com/llvm/llvm-project/pull/129459 >From 103a6843690182640d661e71517faf693c9e1c7d Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Sat, 1 Mar 2025 14:29:42 -0800 Subject: [PATCH 1/3] [clangd] Add `BuiltinHeaders` flag to Config file Usage: ```

[clang-tools-extra] added Conflicting Global Accesses checker (PR #130421)

2025-03-08 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

<    1   2