[clang-tools-extra] [clangd] Augment code completion results with documentation from the index. (PR #120099)

2024-12-17 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 02328e0465c256293950542f1a85eb55bcbc9d45 ace8121506029e9016df9ec3bffa9d465334e97d --e

[clang-tools-extra] [clang-tidy] Add readability-string-view-substr check (PR #120055)

2024-12-17 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka ready_for_review https://github.com/llvm/llvm-project/pull/120055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add readability-string-view-substr check (PR #120055)

2024-12-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Helmut Januschka (hjanuschka) Changes Add a new check that suggests using `string_view::remove_prefix()` and `remove_suffix()` instead of `substr()` when the intent is to remove characters from either end of a string_view. e

[clang-tools-extra] [clang-tidy] Add readability-string-view-substr check (PR #120055)

2024-12-17 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka edited https://github.com/llvm/llvm-project/pull/120055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add readability-string-view-substr check (PR #120055)

2024-12-17 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/120055 >From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Mon, 16 Dec 2024 08:24:14 +0100 Subject: [PATCH 1/5] [clang-tidy] Add readability-string-view-substr check

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-12-17 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh edited https://github.com/llvm/llvm-project/pull/116462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add readability-string-view-substr check (PR #120055)

2024-12-17 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka edited https://github.com/llvm/llvm-project/pull/120055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [Libunwind] Try to fix msan failures (PR #120013)

2024-12-17 Thread Dmitry Chestnykh via cfe-commits
chestnykh wrote: I've debugged msan errors. On CI there were stack overflows caused by 'wrong' msan reports and circular calls libunwind -> libmsan -> libunwind. For example: ``` #4234 0x55587eb2 in __msan_warning_with_origin_noreturn () at /home/dima/work/llvm-project/compiler-rt/lib/

[clang] 514580b - [MTE] Apply alignment / size in AsmPrinter rather than IR (#111918)

2024-12-17 Thread via cfe-commits
Author: Florian Mayer Date: 2024-12-17T00:47:02-08:00 New Revision: 514580b43898921cc95659de47b383bd2c9b4b12 URL: https://github.com/llvm/llvm-project/commit/514580b43898921cc95659de47b383bd2c9b4b12 DIFF: https://github.com/llvm/llvm-project/commit/514580b43898921cc95659de47b383bd2c9b4b12.diff

[clang] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-17 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/111918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-12-17 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/115487 >From 5e24d212f797b5fa1b6da1526c807046373d3c21 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 8 Nov 2024 16:13:17 +0200 Subject: [PATCH 1/6] [Clang] skip default argument instantiation for non-definin

[clang] [Static analysis] Encodes a filename before inserting it into a URL. (PR #120123)

2024-12-17 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/2949 Here is the releva

[clang] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `cross-project-tests-sie-ubuntu` running on `doug-worker-1a` while building `clang,llvm` at step 2 "checkout". Full details are available at: https://lab.llvm.org/buildbot/#/builders/181/builds/10481 Here is the relevant pie

[libunwind] [Libunwind] Try to fix msan failures (PR #120013)

2024-12-17 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/120013 >From 9422b097ff80f5501dcf4fa3d41176b9439ab3f6 Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Sun, 15 Dec 2024 21:18:23 +0300 Subject: [PATCH 1/4] [Libunwind] Don't XFAIL tests with msan --- libunwind

[libunwind] [Libunwind] Try to fix msan failures (PR #120013)

2024-12-17 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh ready_for_review https://github.com/llvm/llvm-project/pull/120013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [Libunwind] Try to fix msan failures (PR #120013)

2024-12-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/120013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [Libunwind] Try to fix msan failures (PR #120013)

2024-12-17 Thread Alexander Richardson via cfe-commits
@@ -133,6 +133,10 @@ _LIBUNWIND_EXPORT _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) { unw_cursor_t cursor; unw_context_t uc; +#if __has_feature(memory_sanitizer) + __builtin_memset(&cursor, 0, sizeof(cursor)); arichardson wro

[libunwind] [Libunwind] Try to fix msan failures (PR #120013)

2024-12-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson requested changes to this pull request. We shouldn't need to initialize these structures to silence sanitizer errors. I had a draft pr last year to fix this properly but forgot about it since other things came up: https://github.com/llvm/llvm-project/pull/67860 I

[libunwind] [Libunwind] Try to fix msan failures (PR #120013)

2024-12-17 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh deleted https://github.com/llvm/llvm-project/pull/120013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [Libunwind] Try to fix msan failures (PR #120013)

2024-12-17 Thread Dmitry Chestnykh via cfe-commits
@@ -133,6 +133,10 @@ _LIBUNWIND_EXPORT _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) { unw_cursor_t cursor; unw_context_t uc; +#if __has_feature(memory_sanitizer) + __builtin_memset(&cursor, 0, sizeof(cursor)); chestnykh wrote

[clang] [clang-format] extend clang-format directive with options to prevent formatting for one line (PR #118566)

2024-12-17 Thread Paul Hoad via cfe-commits
phoad107185 wrote: > > I struggle with changes that encourage people to not be fully > > clang-formatted, I would prefer to ask why we need this feature, can we > > have some examples of where this would be used? > > This makes it so only one line isn't formatted instead of the current > solu

[clang] [compiler-rt] [flang] [libc] [llvm] [polly] [cmake] Drop `AddFileDependencies` and `CMakeParseArguments` (PR #120002)

2024-12-17 Thread via cfe-commits
https://github.com/paperchalice closed https://github.com/llvm/llvm-project/pull/120002 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add readability-string-view-substr check (PR #120055)

2024-12-17 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka edited https://github.com/llvm/llvm-project/pull/120055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 449af81 - [Clang] Fix crash for incompatible types in inline assembly (#119098)

2024-12-17 Thread via cfe-commits
Author: AdUhTkJm Date: 2024-12-17T18:44:25+07:00 New Revision: 449af81f922cdb7a1f24b4c1e989f30848e1d762 URL: https://github.com/llvm/llvm-project/commit/449af81f922cdb7a1f24b4c1e989f30848e1d762 DIFF: https://github.com/llvm/llvm-project/commit/449af81f922cdb7a1f24b4c1e989f30848e1d762.diff LOG:

[clang] [Clang] Fix crash for incompatible types in inline assembly (PR #119098)

2024-12-17 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/119098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-12-17 Thread Vinay Deshmukh via cfe-commits
vinay-deshmukh wrote: > I was thinking about the case, and I think it's okay to have state-splits in > the subexpressions coming from an assume expression - given that the assume > expression has no side effects. This way we should have 2 paths after the > assume expression (but still before t

[clang] [Clang] Fix crash for incompatible types in inline assembly (PR #119098)

2024-12-17 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/119098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash for incompatible types in inline assembly (PR #119098)

2024-12-17 Thread via cfe-commits
github-actions[bot] wrote: @AdUhTkJm Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build

[clang] [flang] [flang] Support -f[no-]realloc-lhs. (PR #120165)

2024-12-17 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. Thanks. Just a comment, no action required. I see some hits for realloc-lhs in the gfortran testsuite. Will some of these tests start behaving differently? ``` CMakeLists.txt: -fno-realloc-lhs CMakeLists.txt: -Wrealloc-lhs

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-12-17 Thread Matt Arsenault via cfe-commits
@@ -3232,6 +3264,22 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, return RValue::get(emitUnaryMaybeConstrainedFPBuiltin( *this, E, Intrinsic::sinh, Intrinsic::experimental_constrained_sinh)); +case Builtin::BIsincos:

[clang] [llvm] [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (PR #120145)

2024-12-17 Thread Nick Sarnie via cfe-commits
@@ -0,0 +1,38 @@ +//==- SPIRVOpenMP.cpp - SPIR-V OpenMP Tool Implementations *- C++ -*==// +// +// 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: Apa

[clang] [llvm] [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (PR #120145)

2024-12-17 Thread Nick Sarnie via cfe-commits
@@ -735,11 +736,15 @@ wrapDeviceImages(ArrayRef> Buffers, } Expected>> -bundleOpenMP(ArrayRef Images) { +bundleOpenMP(SmallVectorImpl &Images) { sarnex wrote: It's mutable because we modify it inside `bundleOpenMP` if the vendor is `Intel`, where we call `c

[clang] [compiler-rt] [libcxx] [libcxxabi] [llvm] [libc++] Replace LIBCXX_ENABLE_STATIC_ABI_LIBRARY & friends by a new LIBCXX_CXX_ABI choice (PR #112978)

2024-12-17 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/112978 >From 7b8f1538b452d6c16874d0f076baa2d54abb66b0 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Fri, 13 May 2022 09:26:01 -0400 Subject: [PATCH 1/3] [libc++] Replace LIBCXX_ENABLE_STATIC_ABI_LIBRARY & friends

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-12-17 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/114086 >From 5e6e49cf8bceed6d137ea67abe81a8a425d5aed8 Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Mon, 9 Sep 2024 10:15:20 + Subject: [PATCH 1/5] [clang] Add sincos builtin using `llvm.sincos` intrinsic T

[clang] [llvm] [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (PR #120145)

2024-12-17 Thread Joseph Huber via cfe-commits
@@ -735,11 +736,15 @@ wrapDeviceImages(ArrayRef> Buffers, } Expected>> -bundleOpenMP(ArrayRef Images) { +bundleOpenMP(SmallVectorImpl &Images) { jhuber6 wrote: But this function's job is to return a new list of binary files after serializing the input, can'

[clang] [llvm] [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (PR #120145)

2024-12-17 Thread Nick Sarnie via cfe-commits
@@ -2829,10 +2829,13 @@ void tools::addOpenMPDeviceRTL(const Driver &D, LibraryPaths.emplace_back(LibPath); OptSpecifier LibomptargetBCPathOpt = - Triple.isAMDGCN() ? options::OPT_libomptarget_amdgpu_bc_path_EQ -: options::OPT_libomptarget_nv

[clang] [llvm] [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (PR #120145)

2024-12-17 Thread Nick Sarnie via cfe-commits
@@ -4256,6 +4256,7 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, if (TT.getArch() == llvm::Triple::UnknownArch || !(TT.getArch() == llvm::Triple::aarch64 || TT.isPPC() || +TT.getArch() == llvm::Triple::spirv64 || -

[clang] c135f6f - [TySan] Add initial Type Sanitizer support to Clang) (#76260)

2024-12-17 Thread via cfe-commits
Author: Florian Hahn Date: 2024-12-17T15:13:42Z New Revision: c135f6ffe2542bdde5a2a3e1d6515a6fc7031967 URL: https://github.com/llvm/llvm-project/commit/c135f6ffe2542bdde5a2a3e1d6515a6fc7031967 DIFF: https://github.com/llvm/llvm-project/commit/c135f6ffe2542bdde5a2a3e1d6515a6fc7031967.diff LOG:

[clang] [compiler-rt] [llvm] [TySan] A Type Sanitizer (Runtime Library) (PR #76261)

2024-12-17 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/76261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [TySan] A Type Sanitizer (Clang) (PR #76260)

2024-12-17 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/76260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (PR #120145)

2024-12-17 Thread Nick Sarnie via cfe-commits
@@ -28,8 +28,11 @@ void SPIRV::constructTranslateCommand(Compilation &C, const Tool &T, if (Input.getType() == types::TY_PP_Asm) CmdArgs.push_back("-to-binary"); + + // The text output from spirv-dis is not in the format expected + // by llvm-spirv, so use the text ou

[clang] [llvm] [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (PR #120145)

2024-12-17 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/120145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (PR #120145)

2024-12-17 Thread Joseph Huber via cfe-commits
@@ -2829,10 +2829,13 @@ void tools::addOpenMPDeviceRTL(const Driver &D, LibraryPaths.emplace_back(LibPath); OptSpecifier LibomptargetBCPathOpt = - Triple.isAMDGCN() ? options::OPT_libomptarget_amdgpu_bc_path_EQ -: options::OPT_libomptarget_nv

[clang] [Clang][AMDGPU] Stop defaulting to `one-as` for all atomic scopes (PR #120095)

2024-12-17 Thread via cfe-commits
b-sumner wrote: @JonChesterfield I think I agree with you. And OpenCL source should not be calling builtins to begin with since they're not officially part of the OpenCL language. https://github.com/llvm/llvm-project/pull/120095 ___ cfe-commits mail

[clang] [Clang][AMDGPU] Stop defaulting to `one-as` for all atomic scopes (PR #120095)

2024-12-17 Thread via cfe-commits
@@ -537,7 +537,11 @@ AMDGPUTargetCodeGenInfo::getLLVMSyncScopeID(const LangOptions &LangOpts, break; } - if (Ordering != llvm::AtomicOrdering::SequentiallyConsistent) { + // OpenCL assumes by default that atomic scopes are per-address space for + // non-sequentially

[clang] [Clang][AMDGPU] Stop defaulting to `one-as` for all atomic scopes (PR #120095)

2024-12-17 Thread via cfe-commits
https://github.com/b-sumner edited https://github.com/llvm/llvm-project/pull/120095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix dangling false positives for conditional operators. (PR #120233)

2024-12-17 Thread Haojian Wu via cfe-commits
@@ -582,6 +582,15 @@ static void visitFunctionCallArguments(IndirectLocalPath &Path, Expr *Call, // Temp().ptr; // Here ptr might not dangle. if (isa(Arg->IgnoreImpCasts())) return; +// Avoid false positives when the object is constructed from a conditional

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-12-17 Thread Benjamin Maxwell via cfe-commits
@@ -3232,6 +3264,22 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, return RValue::get(emitUnaryMaybeConstrainedFPBuiltin( *this, E, Intrinsic::sinh, Intrinsic::experimental_constrained_sinh)); +case Builtin::BIsincos:

[clang] [clang][dataflow] Add matchers for smart pointer accessors to be cached (PR #120102)

2024-12-17 Thread Jan Voung via cfe-commits
https://github.com/jvoung updated https://github.com/llvm/llvm-project/pull/120102 >From f9b8cbaed4c01c2051cdcde105d6a9bca1684388 Mon Sep 17 00:00:00 2001 From: Jan Voung Date: Mon, 16 Dec 2024 16:06:43 + Subject: [PATCH 1/2] [clang][dataflow] Add matchers for smart pointer accessors to be

[clang] [llvm] [TySan] A Type Sanitizer (Clang) (PR #76260)

2024-12-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/12442 Here is the releva

[clang] [llvm] [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (PR #120145)

2024-12-17 Thread Nick Sarnie via cfe-commits
@@ -2829,10 +2829,13 @@ void tools::addOpenMPDeviceRTL(const Driver &D, LibraryPaths.emplace_back(LibPath); OptSpecifier LibomptargetBCPathOpt = - Triple.isAMDGCN() ? options::OPT_libomptarget_amdgpu_bc_path_EQ -: options::OPT_libomptarget_nv

[clang] [Clang][AMDGPU] Stop defaulting to `one-as` for all atomic scopes (PR #120095)

2024-12-17 Thread via cfe-commits
https://github.com/b-sumner edited https://github.com/llvm/llvm-project/pull/120095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (PR #120145)

2024-12-17 Thread Nick Sarnie via cfe-commits
@@ -735,11 +736,15 @@ wrapDeviceImages(ArrayRef> Buffers, } Expected>> -bundleOpenMP(ArrayRef Images) { +bundleOpenMP(SmallVectorImpl &Images) { sarnex wrote: Somehow I convinced myself it might be more performant to do it this way, but I'm not so sure that

[clang] [llvm] [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (PR #120145)

2024-12-17 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/120145 ___ 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] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)

2024-12-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/120245 According to #116591. > Coding guidelines should "cherry-pick" (and posddsibly configure/harden/make > more strict) base checks. We should move narrowing conversion to bugprone and keep alias in cppcoreguid

[clang-tools-extra] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)

2024-12-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes According to #116591. > Coding guidelines should "cherry-pick" (and posddsibly configure/harden/make more strict) base checks. We should move narrowing conversion to bugprone and keep alias in cppco

[clang] [clang][dataflow] Add matchers for smart pointer accessors to be cached (PR #120102)

2024-12-17 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 3c3094b60d3587b1db8ef35b3bf54e73ac5894d9 4b21305cbe0da07faa57f05856edd9369d4f4ed5 --e

[clang] [llvm] [NFC][AMDGPU] Pre-commit clang and llvm tests for dynamic allocas (PR #120063)

2024-12-17 Thread via cfe-commits
@@ -0,0 +1,532 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -x hip -emit-llvm -fcuda-is-device -o - %s | FileCheck %s easyonaadit wrote: I will follow up on

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

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

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

2024-12-17 Thread via cfe-commits
@@ -1162,6 +1195,9 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, valueKind = VK_PRValue; type = Context.BoundMemberTy; cor3ntin wrote: Good catch. This fixed the weird changes to the for loop materializations tests https

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

2024-12-17 Thread via cfe-commits
@@ -1162,6 +1195,9 @@ Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType, valueKind = VK_PRValue; type = Context.BoundMemberTy; Sirraide wrote: That makes sense; I was wondering what was going on w/ those. https://github.com/llvm

[clang] [Sema] Diagnose tautological bounds checks (PR #120222)

2024-12-17 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/120222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Stop defaulting to `one-as` for all atomic scopes (PR #120095)

2024-12-17 Thread Matt Arsenault via cfe-commits
@@ -537,7 +537,11 @@ AMDGPUTargetCodeGenInfo::getLLVMSyncScopeID(const LangOptions &LangOpts, break; } - if (Ordering != llvm::AtomicOrdering::SequentiallyConsistent) { + // OpenCL assumes by default that atomic scopes are per-address space for + // non-sequentially

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2024-12-17 Thread via cfe-commits
https://github.com/sivan-shani edited https://github.com/llvm/llvm-project/pull/118771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Stop defaulting to `one-as` for all atomic scopes (PR #120095)

2024-12-17 Thread Joseph Huber via cfe-commits
@@ -537,7 +537,11 @@ AMDGPUTargetCodeGenInfo::getLLVMSyncScopeID(const LangOptions &LangOpts, break; } - if (Ordering != llvm::AtomicOrdering::SequentiallyConsistent) { + // OpenCL assumes by default that atomic scopes are per-address space for + // non-sequentially

[clang-tools-extra] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)

2024-12-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/120245 >From 9e47698969dc59df1abaa8abd243b97e8fa038c3 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 17 Dec 2024 23:31:52 +0800 Subject: [PATCH] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conversio

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-12-17 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/114086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (PR #120145)

2024-12-17 Thread Nick Sarnie via cfe-commits
@@ -133,6 +133,11 @@ Error getAMDGPUMetaDataFromImage(MemoryBufferRef MemBuffer, StringMap &KernelInfoMap, uint16_t &ELFABIVersion); } // namespace amdgpu +namespace intel { +/// Containerizes an offloading imag

[clang-tools-extra] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)

2024-12-17 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 8b02d809d284c8e10b38087431def52c86e3e9e6 c32e19f4f5dc15cf272acc54d7c574bd685a4870 --e

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-12-17 Thread Matt Arsenault via cfe-commits
@@ -3232,6 +3264,22 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, return RValue::get(emitUnaryMaybeConstrainedFPBuiltin( *this, E, Intrinsic::sinh, Intrinsic::experimental_constrained_sinh)); +case Builtin::BIsincos:

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2024-12-17 Thread via cfe-commits
https://github.com/sivan-shani edited https://github.com/llvm/llvm-project/pull/118771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Use smart pointer caching in unchecked optional accessor (PR #120249)

2024-12-17 Thread Jan Voung via cfe-commits
https://github.com/jvoung created https://github.com/llvm/llvm-project/pull/120249 Part 2 (and final part) following https://github.com/llvm/llvm-project/pull/120102 Allows users to do things like: ``` if (o->x.has_value()) { ((*o).x).value(); } ``` where the `->` and `*` are operator overlo

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-17 Thread Cyndy Ishida via cfe-commits
@@ -0,0 +1,26 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Add default directories before running clang to check default +// search paths. +// RUN: rm -rf %t && mkdir -p %t +// RUN: cp -R %S/Inputs/M

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/120149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-17 Thread Cyndy Ishida via cfe-commits
@@ -2539,6 +2550,18 @@ void DarwinClang::AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs llvm::sys::path::append(P, "usr", "include"); addExternCSystemInclude(DriverArgs, CC1Args, P.str()); } + + // Add default framework search paths + auto addFramew

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida commented: Thank you for cleaning this up!! https://github.com/llvm/llvm-project/pull/120149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash for incompatible types in inline assembly (PR #119098)

2024-12-17 Thread via cfe-commits
https://github.com/AdUhTkJm updated https://github.com/llvm/llvm-project/pull/119098 >From 56670608becf2032867405778fa7b2b1a36fb3cf Mon Sep 17 00:00:00 2001 From: AdUhTkJm <2292398...@qq.com> Date: Sun, 8 Dec 2024 08:07:59 +0800 Subject: [PATCH] [Clang] Fix crash for incompatible types in inline

[clang] [llvm] [NFC][AMDGPU] Pre-commit clang and llvm tests for dynamic allocas (PR #120063)

2024-12-17 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,532 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -x hip -emit-llvm -fcuda-is-device -o - %s | FileCheck %s arsenm wrote: I guess 51a014cb2d9c6f83

[clang-tools-extra] [clang-tidy] Add readability-string-view-substr check (PR #120055)

2024-12-17 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/120055 >From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Mon, 16 Dec 2024 08:24:14 +0100 Subject: [PATCH 1/5] [clang-tidy] Add readability-string-view-substr check

[clang] [HLSL][NFC] Fix static analyzer concerns (PR #120090)

2024-12-17 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM modulo nit https://github.com/llvm/llvm-project/pull/120090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add matchers for smart pointer accessors to be cached (PR #120102)

2024-12-17 Thread Florian Mayer via cfe-commits
@@ -0,0 +1,194 @@ +//===- unittests/Analysis/FlowSensitive/SmartPointerAccessorCachingTest.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: Ap

[clang] [clang][dataflow] Add matchers for smart pointer accessors to be cached (PR #120102)

2024-12-17 Thread Florian Mayer via cfe-commits
@@ -0,0 +1,134 @@ +#include "clang/Analysis/FlowSensitive/SmartPointerAccessorCaching.h" + +#include "clang/AST/CanonicalType.h" +#include "clang/AST/DeclCXX.h" +#include "clang/ASTMatchers/ASTMatchers.h" +#include "clang/Basic/OperatorKinds.h" + +namespace clang::dataflow { + +na

[clang] [llvm] [Offload] Add support for loongarch64 to host plugin (PR #120173)

2024-12-17 Thread via cfe-commits
https://github.com/wangleiat closed https://github.com/llvm/llvm-project/pull/120173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Feature]: support for the BC library file into the compile dependencies (PR #119513)

2024-12-17 Thread via cfe-commits
zhouronghua wrote: ping https://github.com/llvm/llvm-project/pull/119513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2024-12-17 Thread Matt Arsenault via cfe-commits
@@ -3232,6 +3264,22 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, return RValue::get(emitUnaryMaybeConstrainedFPBuiltin( *this, E, Intrinsic::sinh, Intrinsic::experimental_constrained_sinh)); +case Builtin::BIsincos:

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-17 Thread Youngsuk Kim via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-linux-gnu -target-cpu gfx906 -fopenmp -nogpulib -fopenmp-is-target-device -emit-llvm %s -o - | FileCheck %s + +// Don't crash with assertions build. + +// CHECK: @MyGlobVar = external

[clang] [llvm] [OpenMP]Initial parsing/sema support for target_device selector set (PR #118471)

2024-12-17 Thread via cfe-commits
@@ -2903,7 +2903,10 @@ TargetOMPContext::TargetOMPContext( const FunctionDecl *CurrentFunctionDecl, ArrayRef ConstructTraits) : OMPContext(ASTCtx.getLangOpts().OpenMPIsTargetDevice, - ASTCtx.getTargetInfo().getTriple()), + ASTCtx.getT

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

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

[clang] [HLSL][NFC] Fix static analyzer concerns (PR #120090)

2024-12-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/120090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-17 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 1/4] Upda

[clang] b4c1ded - [clang] Recover necessary AddrSpaceCast (#119246)

2024-12-17 Thread via cfe-commits
Author: Youngsuk Kim Date: 2024-12-17T08:38:31-05:00 New Revision: b4c1ded7d54858972c27250f4b6b882e74da1444 URL: https://github.com/llvm/llvm-project/commit/b4c1ded7d54858972c27250f4b6b882e74da1444 DIFF: https://github.com/llvm/llvm-project/commit/b4c1ded7d54858972c27250f4b6b882e74da1444.diff

[clang] fbbf1be - [HLSL][NFC] Fix static analyzer concerns (#120090)

2024-12-17 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2024-12-17T14:37:48+01:00 New Revision: fbbf1bed746c335b970aee7bd135676e534ffa05 URL: https://github.com/llvm/llvm-project/commit/fbbf1bed746c335b970aee7bd135676e534ffa05 DIFF: https://github.com/llvm/llvm-project/commit/fbbf1bed746c335b970aee7bd135676e534ffa

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-17 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/119246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP]Initial parsing/sema support for target_device selector set (PR #118471)

2024-12-17 Thread Shilei Tian via cfe-commits
@@ -2903,7 +2903,10 @@ TargetOMPContext::TargetOMPContext( const FunctionDecl *CurrentFunctionDecl, ArrayRef ConstructTraits) : OMPContext(ASTCtx.getLangOpts().OpenMPIsTargetDevice, - ASTCtx.getTargetInfo().getTriple()), + ASTCtx.getT

[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

2024-12-17 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/119246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix dangling false positives for conditional operators. (PR #120233)

2024-12-17 Thread Haojian Wu via cfe-commits
@@ -582,6 +582,15 @@ static void visitFunctionCallArguments(IndirectLocalPath &Path, Expr *Call, // Temp().ptr; // Here ptr might not dangle. if (isa(Arg->IgnoreImpCasts())) return; +// Avoid false positives when the object is constructed from a conditional

[clang] [llvm] [NFC][AMDGPU] Pre-commit clang and llvm tests for dynamic allocas (PR #120063)

2024-12-17 Thread via cfe-commits
https://github.com/easyonaadit edited https://github.com/llvm/llvm-project/pull/120063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][AMDGPU] Pre-commit clang and llvm tests for dynamic allocas (PR #120063)

2024-12-17 Thread via cfe-commits
https://github.com/easyonaadit edited https://github.com/llvm/llvm-project/pull/120063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][AMDGPU] Pre-commit clang and llvm tests for dynamic allocas (PR #120063)

2024-12-17 Thread via cfe-commits
@@ -5,8 +5,46 @@ target datalayout = "A5" ; CHECK: in function test_dynamic_stackalloc{{.*}}: unsupported dynamic alloca -define amdgpu_kernel void @test_dynamic_stackalloc(ptr addrspace(1) %out, i32 %n) { +define amdgpu_kernel void @test_dynamic_stackalloc(i32 %n) { %all

[clang] [llvm] [OpenMP]Initial parsing/sema support for target_device selector set (PR #118471)

2024-12-17 Thread via cfe-commits
@@ -2903,7 +2903,10 @@ TargetOMPContext::TargetOMPContext( const FunctionDecl *CurrentFunctionDecl, ArrayRef ConstructTraits) : OMPContext(ASTCtx.getLangOpts().OpenMPIsTargetDevice, - ASTCtx.getTargetInfo().getTriple()), + ASTCtx.getT

  1   2   3   4   5   >