[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-10 Thread YunQiang Su via cfe-commits
wzssyqa wrote: @aeubanks The problem is that in your configure, the libclang_rt is please in `/lib/clang/19/lib/linux/libclang_rt.builtins-arm-android.a`, instead of `/lib/clang/19/lib/arm-unknown-linux-android/libclang_rt.builtins.a`. https://github.com/llvm/llvm-project/pull/87866

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

2024-04-10 Thread Owen Pan via cfe-commits
owenca wrote: @HighCommander4 Thanks! https://github.com/llvm/llvm-project/pull/88352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

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

[clang-tools-extra] 5964c94 - [clangd] Fix test case due to clang-format bug fix (#88352)

2024-04-10 Thread via cfe-commits
Author: Owen Pan Date: 2024-04-10T22:25:37-07:00 New Revision: 5964c944bfe74cee2872cddb66eff22866cdb6ee URL: https://github.com/llvm/llvm-project/commit/5964c944bfe74cee2872cddb66eff22866cdb6ee DIFF: https://github.com/llvm/llvm-project/commit/5964c944bfe74cee2872cddb66eff22866cdb6ee.diff

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

2024-04-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. https://github.com/llvm/llvm-project/pull/88352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

2024-04-10 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/88352 >From a070f07c16ddacc1aaf7591a1f7c129bf6abc90a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 10 Apr 2024 21:22:05 -0700 Subject: [PATCH] [clangd] Fix test case due to clang-format bug fix See commit

[clang] [llvm] [InstCombine] Infer nsw/nuw for trunc (PR #87910)

2024-04-10 Thread Yingwei Zheng via cfe-commits
@@ -897,7 +897,20 @@ Instruction *InstCombinerImpl::visitTrunc(TruncInst ) { } } - return nullptr; + bool Changed = false; + if (!Trunc.hasNoSignedWrap() && + ComputeMaxSignificantBits(Src, /*Depth=*/0, ) <= DestWidth) { +Trunc.setHasNoSignedWrap(true); +

[clang] Add txtpb to the list of supported TextProto extensions (PR #88355)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Jing Wang (jingw) Changes According to https://protobuf.dev/reference/protobuf/textformat-spec/#text-format-files, txtpb is the canonical extension --- Full diff: https://github.com/llvm/llvm-project/pull/88355.diff 4 Files

[clang] Add txtpb to the list of supported TextProto extensions (PR #88355)

2024-04-10 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,

[clang] Add txtpb to the list of supported TextProto extensions (PR #88355)

2024-04-10 Thread Jing Wang via cfe-commits
https://github.com/jingw created https://github.com/llvm/llvm-project/pull/88355 According to https://protobuf.dev/reference/protobuf/textformat-spec/#text-format-files, txtpb is the canonical extension >From b8463dbc5ffa3a401bc9470a3c86e8c72964a0f6 Mon Sep 17 00:00:00 2001 From: Jing Wang

[clang] [clang][NFC] Move more functions to `SemaHLSL` (PR #88354)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Vlad Serebrennikov (Endilll) Changes A follow-up to #87912. I'm moving more HLSL-related functions from `Sema` to `SemaHLSL`. I'm also dropping `HLSL` from their names in the process. --- Patch is 24.36 KiB, truncated to 20.00 KiB below,

[clang] [clang][NFC] Move more functions to `SemaHLSL` (PR #88354)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes A follow-up to #87912. I'm moving more HLSL-related functions from `Sema` to `SemaHLSL`. I'm also dropping `HLSL` from their names in the process. --- Patch is 24.36 KiB, truncated to 20.00 KiB

[clang] [clang][NFC] Move more functions to `SemaHLSL` (PR #88354)

2024-04-10 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/88354 A follow-up to #87912. I'm moving more HLSL-related functions from `Sema` to `SemaHLSL`. I'm also dropping `HLSL` from their names in the process. >From ecff8db824552872ba055fdc0bca42b1a0386c39 Mon Sep 17

[clang] [llvm] [InstCombine] Add canonicalization of `sitofp` -> `uitofp nneg` (PR #88299)

2024-04-10 Thread via cfe-commits
goldsteinn wrote: > Can the implementation of foldFBinOpOfIntCastsFromSign be simplified to use > nneg instead of KnownBits after this change? yeah we could. Should I do a survey of existing folds first to ensure we don't incorrectly keep flags (like with `trunc nuw/nsw`) before integrating

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Owen Pan (owenca) Changes See commit 51f1681424f1. --- Full diff: https://github.com/llvm/llvm-project/pull/88352.diff 1 Files Affected: - (modified) clang-tools-extra/clangd/unittests/HoverTests.cpp (+3-1) ``diff diff

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Owen Pan (owenca) Changes See commit 51f1681424f1. --- Full diff: https://github.com/llvm/llvm-project/pull/88352.diff 1 Files Affected: - (modified) clang-tools-extra/clangd/unittests/HoverTests.cpp (+3-1)

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

2024-04-10 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/88352 See commit 51f1681424f1. >From 3ecf27d15646345f43703f5a361bd9766307ebf4 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 10 Apr 2024 21:22:05 -0700 Subject: [PATCH] [clangd] Fix test case due to clang-format

[clang] XFAIL clang/Driver/test/compress.c on AIX (PR #87269)

2024-04-10 Thread Fangrui Song via cfe-commits
MaskRay wrote: Can you edit the description to state which command fails on AIX? These tests all contain `-###` to stop after clangDriver completes. And `clang --target=powerpc-ibm-aix -fintegrated-as -Wa,-compress-debug-sections -c a.c '-###'` seems to work for me.

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
@@ -270,6 +270,12 @@ DependencyScanningWorkerFilesystem::status(const Twine ) { return Result->getStatus(); } +bool +DependencyScanningWorkerFilesystem::exists(const Twine ) { + llvm::ErrorOr Status = status(Path); jansvoboda11 wrote: Would be good to

[clang] 75edf0c - [NFC] [Serialization] Avoid accessing PendingBodies as much as possible

2024-04-10 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-11T11:08:58+08:00 New Revision: 75edf0c18c777d69df7cfc6462e5233649bd47d4 URL: https://github.com/llvm/llvm-project/commit/75edf0c18c777d69df7cfc6462e5233649bd47d4 DIFF: https://github.com/llvm/llvm-project/commit/75edf0c18c777d69df7cfc6462e5233649bd47d4.diff

[clang] [lld] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 closed https://github.com/llvm/llvm-project/pull/87597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Look for compiler-rt from subdir given by --target (PR #88334)

2024-04-10 Thread Fangrui Song via cfe-commits
MaskRay wrote: Can you provide CMake configure command and the compiler-rt file paths? I am not sure we need more changes to clangDriver. https://github.com/llvm/llvm-project/pull/88334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [X86] Define __APX_F__ when APX is enabled. (PR #88343)

2024-04-10 Thread Freddy Ye via cfe-commits
@@ -954,6 +954,8 @@ void X86TargetInfo::getTargetDefines(const LangOptions , Builder.defineMacro("__CCMP__"); if (HasCF) Builder.defineMacro("__CF__"); + if (HasEGPR && HasPush2Pop2 && HasPPX && HasNDD) FreddyLeaf wrote: 4929d88

[clang] [X86] Define __APX_F__ when APX is enabled. (PR #88343)

2024-04-10 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/88343 >From 88e99b1f3f99140e13f7acb8e7e10162dc1694a0 Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Wed, 10 Apr 2024 16:49:05 +0800 Subject: [PATCH 1/2] [X86] Define __APX_F__ when APX is enabled. Relate gcc

[clang-tools-extra] [clang-tidy] Simplify RenamerClangTidyCheck API (PR #88268)

2024-04-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Look for compiler-rt from subdir given by --target (PR #88334)

2024-04-10 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa converted_to_draft https://github.com/llvm/llvm-project/pull/88334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Define __APX_F__ when APX is enabled. (PR #88343)

2024-04-10 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert approved this pull request. LGTM with a suggestion https://github.com/llvm/llvm-project/pull/88343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Define __APX_F__ when APX is enabled. (PR #88343)

2024-04-10 Thread Shengchen Kan via cfe-commits
@@ -954,6 +954,8 @@ void X86TargetInfo::getTargetDefines(const LangOptions , Builder.defineMacro("__CCMP__"); if (HasCF) Builder.defineMacro("__CF__"); + if (HasEGPR && HasPush2Pop2 && HasPPX && HasNDD) KanRobert wrote: Add comment `Condition here

[clang] [X86] Define __APX_F__ when APX is enabled. (PR #88343)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Freddy Ye (FreddyLeaf) Changes Relate gcc patch: https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648789.html --- Full diff: https://github.com/llvm/llvm-project/pull/88343.diff 2 Files Affected: - (modified)

[clang] [X86] Define __APX_F__ when APX is enabled. (PR #88343)

2024-04-10 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf created https://github.com/llvm/llvm-project/pull/88343 Relate gcc patch: https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648789.html >From 88e99b1f3f99140e13f7acb8e7e10162dc1694a0 Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Wed, 10 Apr 2024 16:49:05

[clang] [clang-format] Don't merge a short block for SBS_Never (PR #88238)

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

[clang] 51f1681 - [clang-format] Don't merge a short block for SBS_Never (#88238)

2024-04-10 Thread via cfe-commits
Author: Owen Pan Date: 2024-04-10T19:06:29-07:00 New Revision: 51f1681424f1a8ccf1e3432d71c341e799597171 URL: https://github.com/llvm/llvm-project/commit/51f1681424f1a8ccf1e3432d71c341e799597171 DIFF: https://github.com/llvm/llvm-project/commit/51f1681424f1a8ccf1e3432d71c341e799597171.diff

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-10 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Could you share the rest of the "no transitive change" patches, or at least > their outline? I'm curious what else goes into making that work. Oh, I haven't started them. The patch in my mind includes two at least: (1) Add a new block recording the semantical hash value of

[clang] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-10 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/87578 >From 3960050439964fe3c0536696490b284a6c470cd1 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 3 Apr 2024 13:15:59 -0700 Subject: [PATCH 1/4] implement binding type error for t/cbuffers and rwbuffers

[clang] [llvm] [InstCombine] Add canonicalization of `sitofp` -> `uitofp nneg` (PR #88299)

2024-04-10 Thread Nikita Popov via cfe-commits
nikic wrote: Can the implementation of foldFBinOpOfIntCastsFromSign be simplified to use nneg instead of KnownBits after this change? https://github.com/llvm/llvm-project/pull/88299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [InstCombine] Add canonicalization of `sitofp` -> `uitofp nneg` (PR #88299)

2024-04-10 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-10 Thread Joshua Batista via cfe-commits
@@ -119,8 +119,10 @@ struct BuiltinTypeDeclBuilder { ResourceKind RK, bool IsROV) { if (Record->isCompleteDefinition()) return *this; -Record->addAttr(HLSLResourceAttr::CreateImplicit(Record->getASTContext(), -

[clang] [llvm] Look for compiler-rt from subdir given by --target (PR #88334)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: YunQiang Su (wzssyqa) Changes Currently, clang looks for compiler-rt only from the normalized triple subdir. While if we are configured with a non-normalized triple with -DLLVM_DEFAULT_TARGET_TRIPLE, such as triples without vendor

[clang] [llvm] Look for compiler-rt from subdir given by --target (PR #88334)

2024-04-10 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa created https://github.com/llvm/llvm-project/pull/88334 Currently, clang looks for compiler-rt only from the normalized triple subdir. While if we are configured with a non-normalized triple with -DLLVM_DEFAULT_TARGET_TRIPLE, such as triples without vendor section,

[clang] [lldb] [NFC][Clang] Improve const correctness for IdentifierInfo (PR #79365)

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

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-04-10 Thread Brandt Bucher via cfe-commits
brandtbucher wrote: Draft PR at https://github.com/llvm/llvm-project/pull/88333. https://github.com/llvm/llvm-project/pull/76868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-10 Thread Dan Liew via cfe-commits
@@ -1599,6 +1599,13 @@ defm double_square_bracket_attributes : BoolFOption<"double-square-bracket-attri LangOpts<"DoubleSquareBracketAttributes">, DefaultTrue, PosFlag, NegFlag>; +defm experimental_late_parse_attributes : BoolFOption<"experimental-late-parse-attributes",

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-10 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/87596 >From af735f3216dd5db9dcaf164892f3f573731701ec Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Wed, 3 Apr 2024 20:58:46 -0700 Subject: [PATCH 1/2] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields;

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-10 Thread via cfe-commits
@@ -4429,6 +4433,218 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +// TODO: Should FunctionEffect be located elsewhere, where Decl is not +//

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,51 @@ +//===- DependencyScanningFilesystemTest.cpp ---===// +// +// 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:

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] be10070 - Revert "[Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin"

2024-04-10 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2024-04-10T23:41:51Z New Revision: be10070f91b86a6f126d2451852242bfcb2cd366 URL: https://github.com/llvm/llvm-project/commit/be10070f91b86a6f126d2451852242bfcb2cd366 DIFF: https://github.com/llvm/llvm-project/commit/be10070f91b86a6f126d2451852242bfcb2cd366.diff

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-10 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: it seems that the test depends on if certain android runtime libraries are present or not in the resource dir (without per-target runtime directory since that's still an issue on Android). perhaps the tests need `-resource-dir` to make them more hermetic? anyway, will revert,

[clang] 6ef4450 - [clang] Fix -Wunused-function in CGStmtOpenMP.cpp (NFC)

2024-04-10 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2024-04-11T07:37:12+08:00 New Revision: 6ef4450705473e5cccb025219e8980999f456b71 URL: https://github.com/llvm/llvm-project/commit/6ef4450705473e5cccb025219e8980999f456b71 DIFF: https://github.com/llvm/llvm-project/commit/6ef4450705473e5cccb025219e8980999f456b71.diff LOG:

[clang] [llvm] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)

2024-04-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/68645 >From fce5325720bcc945baed5923e00d09d84daf58e6 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Mon, 9 Oct 2023 10:14:17 -0700 Subject: [PATCH 1/8] [clang] Move lookup filename into function ---

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Thanks, this seems good! https://github.com/llvm/llvm-project/pull/88317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Seems like some tests failed on Linux. https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM. Would be nice to land Ben's change separately. https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [llvm][clang] Trace VFS calls (PR #88326)

2024-04-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff e72c949c15208ba3dd53a9cebfee02734965a678 540321e84dbd3c5687cfcc60e9deec79d790896e --

[clang] [llvm] [llvm][clang] Trace VFS calls (PR #88326)

2024-04-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/88326 None >From 540321e84dbd3c5687cfcc60e9deec79d790896e Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 10 Apr 2024 16:03:19 -0700 Subject: [PATCH] [llvm][clang] Trace VFS calls ---

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

2024-04-10 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/86618 >From 10ee32826fc2acb6bd993c88bdb7142360b6f263 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH 1/9] implement wraps attribute Signed-off-by: Justin Stitt

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

2024-04-10 Thread Justin Stitt via cfe-commits
JustinStitt wrote: The most recent commits have massively simplified checking for the wrapping attributes. FWIW, the tests I am running are: βœ… `$ llvm-lit clang/test/CodeGen/integer-overflow.c -v` βœ… `$ llvm-lit clang/test/CodeGen/unsigned-overflow.c -v` βœ… `$ llvm-lit

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-10 Thread Doug Wyatt via cfe-commits
@@ -4429,6 +4433,218 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +// TODO: Should FunctionEffect be located elsewhere, where Decl is not +//

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

2024-04-10 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/86618 >From 10ee32826fc2acb6bd993c88bdb7142360b6f263 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH 1/8] implement wraps attribute Signed-off-by: Justin Stitt

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

2024-04-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff eec41d2f8d81b546d7b97648cca6b2d656104bd3 a2f63982920f22d795c4971800bcc5cb55356570 --

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

2024-04-10 Thread Justin Stitt via cfe-commits
@@ -6954,6 +6954,23 @@ static void HandleBTFTypeTagAttribute(QualType , const ParsedAttr , ::new (Ctx) BTFTypeTagAttr(Ctx, Attr, BTFTypeTag), Type); } +static void handleWrapsAttr(QualType , const ParsedAttr , +TypeProcessingState ) { +

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

2024-04-10 Thread Justin Stitt via cfe-commits
@@ -147,6 +147,15 @@ struct BinOpInfo { return UnOp->getSubExpr()->getType()->isFixedPointType(); return false; } + + /// Does the BinaryOperator have the wraps attribute? + /// If so, we can ellide overflow sanitizer checks. + bool oneOfWraps() const { +

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

2024-04-10 Thread Justin Stitt via cfe-commits
@@ -2237,6 +2237,21 @@ bool BinaryOperator::isNullPointerArithmeticExtension(ASTContext , return true; } +bool BinaryOperator::oneOfWraps(const ASTContext ) const { + llvm::SmallVector Both = {getLHS(), getRHS()}; JustinStitt wrote: I had trouble with

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

2024-04-10 Thread Justin Stitt via cfe-commits
@@ -4506,3 +4506,9 @@ def CodeAlign: StmtAttr { static constexpr int MaximumAlignment = 4096; }]; } + +def Wraps : DeclOrTypeAttr { + let Spellings = [GNU<"wraps">]; + let Subjects = SubjectList<[Var, TypedefName, Field]>; + let Documentation = [WrapsDocs]; +}

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

2024-04-10 Thread Justin Stitt via cfe-commits
@@ -4506,3 +4506,9 @@ def CodeAlign: StmtAttr { static constexpr int MaximumAlignment = 4096; }]; } + +def Wraps : DeclOrTypeAttr { + let Spellings = [GNU<"wraps">]; JustinStitt wrote: Right, I had that originally. I shouldn't have changed it :)

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

2024-04-10 Thread Justin Stitt via cfe-commits
@@ -4077,6 +4077,9 @@ class BinaryOperator : public Expr { static unsigned sizeOfTrailingObjects(bool HasFPFeatures) { return HasFPFeatures * sizeof(FPOptionsOverride); } + + /// Do one of the subexpressions have the wraps attribute? + bool oneOfWraps(const

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

2024-04-10 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/86618 >From 10ee32826fc2acb6bd993c88bdb7142360b6f263 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH 1/7] implement wraps attribute Signed-off-by: Justin Stitt

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Artem Chikin via cfe-commits
artemcm wrote: > I'd like to see a unit test specific to `DependencyScanningFilesystem`, > similar to what I have here: #68645. Done! Added one in `DependencyScanningFilesystemTest.cpp`. Thank you. https://github.com/llvm/llvm-project/pull/88152 ___

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Artem Chikin via cfe-commits
https://github.com/artemcm updated https://github.com/llvm/llvm-project/pull/88152 >From c2b2cd03e1d8f92b1df814e6312158b8820b790d Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Tue, 9 Apr 2024 11:22:44 -0700 Subject: [PATCH 1/2] [llvm][vfs] Make vfs::FileSystem::exists() virtual NFC Allow

[clang] [llvm] [HLSL][SPIRV] Add any intrinsic lowering (PR #88325)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Farzon Lotfi (farzonl) Changes - `CGBuiltin.cpp` - Switch to using `CGM.getHLSLRuntime().get##NAME##Intrinsic()` - `CGHLSLRuntime.h` - Add any to backend intrinsic abstraction - `IntrinsicsSPIRV.td` - Add any intrinsic to SPIR-V. -

[clang] [llvm] [HLSL][SPIRV] Add any intrinsic lowering (PR #88325)

2024-04-10 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/88325 - `CGBuiltin.cpp` - Switch to using `CGM.getHLSLRuntime().get##NAME##Intrinsic()` - `CGHLSLRuntime.h` - Add any to backend intrinsic abstraction - `IntrinsicsSPIRV.td` - Add any intrinsic to SPIR-V. -

[clang] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
@@ -564,6 +581,12 @@ class GlobalValueSummary { bool canAutoHide() const { return Flags.CanAutoHide; } + bool shouldImportAsDec() const { minglotus-6 wrote: this makes sense, done. https://github.com/llvm/llvm-project/pull/87597

[clang] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
@@ -16,13 +16,13 @@ ^3 = gv: (guid: 2, summaries: (function: (module: ^1, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 10, calls: ((callee: ^15, relbf: 256, tail: 1) ; Summaries with different linkage types. -^4 =

[clang] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
@@ -2072,6 +2072,23 @@ void LLParser::parseOptionalVisibility(unsigned ) { Lex.Lex(); } +static GlobalValueSummary::ImportKind +parseOptionalImportType(lltok::Kind Kind) { + GlobalValueSummary::ImportKind Res; + switch (Kind) { + default: +Res =

[clang] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
@@ -432,6 +432,18 @@ class GlobalValueSummary { /// Sububclass discriminator (for dyn_cast<> et al.) enum SummaryKind : unsigned { AliasKind, FunctionKind, GlobalVarKind }; + enum ImportKind : unsigned { +// The global value definition corresponding to the summary

[clang] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
@@ -635,7 +635,8 @@ static void computeFunctionSummary( HasIndirBranchToBlockAddress || HasIFuncCall; GlobalValueSummary::GVFlags Flags( F.getLinkage(), F.getVisibility(), NotEligibleForImport, - /* Live = */ false, F.isDSOLocal(),

[clang] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-10 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: Resolve review feedback, and 'backfilled' three affected tests in `clang/test/CodeGen`. Now `ninja check-llvm check-clang check-compiler-rt` passed locally. https://github.com/llvm/llvm-project/pull/87597 ___ cfe-commits mailing

[clang] [HLSL] Remove an unnecessary .ll file in clang/test/SemaHLSL/. (PR #87346)

2024-04-10 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/87346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Evan Wilde via cfe-commits
https://github.com/etcwilde updated https://github.com/llvm/llvm-project/pull/88317 >From 753df93a4fc054328c0b7caacc1064c283ced8ec Mon Sep 17 00:00:00 2001 From: Evan Wilde Date: Thu, 14 Mar 2024 18:11:24 -0700 Subject: [PATCH] Make clang resource headers an interface library Making the clang

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I'd like to see a unit test specific to `DependencyScanningFilesystem`, similar to what I have here: https://github.com/llvm/llvm-project/pull/68645. https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > Not sure @jansvoboda11 perhaps if we want to cherry pick > [b768a8c](https://github.com/llvm/llvm-project/commit/b768a8c1db85b9e84fd8b356570a3a8fbe37acf6) > on `release/18.x`? Or should we land just a simple PR with just the function > change above? I can try pulling

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Evan Wilde via cfe-commits
@@ -501,6 +501,10 @@ add_header_target("windows-resource-headers" ${windows_only_files}) add_header_target("utility-resource-headers" ${utility_files}) get_clang_resource_dir(header_install_dir SUBDIR include) +target_include_directories(clang-resource-headers INTERFACE + $

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

2024-04-10 Thread Eli Friedman via cfe-commits
@@ -1230,11 +1230,26 @@ CodeGenFunction::EmitCXXForRangeStmt(const CXXForRangeStmt , JumpDest LoopExit = getJumpDestInCurrentScope("for.end"); LexicalScope ForScope(*this, S.getSourceRange()); + const DeclStmt *RangeDS = cast(S.getRangeStmt()); + const VarDecl

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Alexandre Ganea via cfe-commits
@@ -201,6 +201,21 @@ class ErrorDummyFileSystem : public DummyFileSystem { } }; +/// A version of \c DummyFileSystem that aborts on \c status() to test that +/// \c exists() is being used. +class NoStatusDummyFileSystem : public DummyFileSystem { +public: + ErrorOr

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea approved this pull request. Otherwise this PR LGTM. https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea edited https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-10 Thread Alexandre Ganea via cfe-commits
aganea wrote: > This patch doesn`t improve my usage, it seems I'm hitting a different > codepath than you do. I'll investigate. Ah I see, the commit https://github.com/llvm/llvm-project/commit/b768a8c1db85b9e84fd8b356570a3a8fbe37acf6 didn't make it in time for the 18.x branch. The issue I'm

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Saleem Abdulrasool via cfe-commits
@@ -501,6 +501,10 @@ add_header_target("windows-resource-headers" ${windows_only_files}) add_header_target("utility-resource-headers" ${utility_files}) get_clang_resource_dir(header_install_dir SUBDIR include) +target_include_directories(clang-resource-headers INTERFACE + $

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. This seems like a step in the right direction - avoiding custom targets is generally better. https://github.com/llvm/llvm-project/pull/88317 ___ cfe-commits mailing list

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/88317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Evan Wilde (etcwilde) Changes Making the clang resource headers into an interface library instead of a custom target means that we can attach the header search paths to the library. Targets that "link" against this library will

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Evan Wilde via cfe-commits
https://github.com/etcwilde created https://github.com/llvm/llvm-project/pull/88317 Making the clang resource headers into an interface library instead of a custom target means that we can attach the header search paths to the library. Targets that "link" against this library will

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-10 Thread via cfe-commits
Sirraide wrote: > Yeah, when things settle down from this latest round of feedback, I'll back > out as much as possible for "phase two". In case that helps, imo it’s mainly the stuff in `AnalysisBasedWarnings.cpp` that is kind of separate from everything else; everything else can probably

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-10 Thread Doug Wyatt via cfe-commits
dougsonos wrote: > One thing I noticed you bring up on Discourse and which I agree is probably > for the better: this pr can just be about introducing an effect system; > actually using it can be deferred to a follow-up pr. This pr is already big > enough if you consider just those changes,

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-04-10 Thread via cfe-commits
@@ -0,0 +1,50 @@ +//===--- ExceptionRethrowCheck.cpp - clang-tidy ---===// +// +// 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:

[clang] [Flang] responds to Clang Tidy feedback (PR #87847)

2024-04-10 Thread Christopher Di Bella via cfe-commits
https://github.com/cjdb closed https://github.com/llvm/llvm-project/pull/87847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d347235 - [Flang] responds to Clang Tidy feedback (#87847)

2024-04-10 Thread via cfe-commits
Author: Christopher Di Bella Date: 2024-04-10T13:15:22-07:00 New Revision: d347235bddbeba2a72d94ebe9d8f98dc675c3776 URL: https://github.com/llvm/llvm-project/commit/d347235bddbeba2a72d94ebe9d8f98dc675c3776 DIFF:

[clang] [Flang] responds to Clang Tidy feedback (PR #87847)

2024-04-10 Thread Jordan Rupprecht via cfe-commits
https://github.com/rupprecht approved this pull request. https://github.com/llvm/llvm-project/pull/87847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Flang] responds to Clang Tidy feedback (PR #87847)

2024-04-10 Thread Jordan Rupprecht via cfe-commits
https://github.com/rupprecht edited https://github.com/llvm/llvm-project/pull/87847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >