[clang] [clang][bytecode] Handle __builtin_memcmp (PR #119544)

2024-12-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/119544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Migrate away from PointerUnion::{is, get} (NFC) (PR #119673)

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

[clang] [AST] Migrate away from PointerUnion::{is, get} (NFC) (PR #119673)

2024-12-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::{is,get} have been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast I'm n

[clang] [AST] Migrate away from PointerUnion::{is, get} (NFC) (PR #119673)

2024-12-12 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/119673 Note that PointerUnion::{is,get} have been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast I'm not touching

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-12 Thread Kito Cheng via cfe-commits
kito-cheng wrote: I would suggest to break this PR into several small pieces, the clang/test folder should not having too much change during the merging, especially I feel not conformable changing the non-RISC-V file within this PR, I expect those change should happened in a separated patch.

[clang] [clang-tools-extra] FunctionDecl::getFunctionTypeLoc: ignore function type attributes (PR #118420)

2024-12-12 Thread Robert Dazi via cfe-commits
v01dXYZ wrote: I've got to squash and reword the commits. Also, I'll add a line to the release stating now FunctionDecl getFunctionTypeLoc/getReturrnLoc now supports AnnotatedTypes. https://github.com/llvm/llvm-project/pull/118420 ___ cfe-commits mai

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-12 Thread A. Jiang via cfe-commits
@@ -540,6 +540,14 @@ namespace PR10504 { void f(A *x) { delete x; } // expected-warning {{delete called on 'PR10504::A' that is abstract but has non-virtual destructor}} } +#if __cplusplus >= 201103L +enum GH99278_1 { // expected-note {{definition of 'GH99278_1' is not comp

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-12 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/118455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-12 Thread Petr Hosek via cfe-commits
petrhosek wrote: > > I think this change could be made a lot smaller by doing a clean up first, > > bringing the BareMetal driver closer to other drivers, before attempting to > > merge the RISCVToolChain driver into it. > > Could you describe in a bit more detail which bits you think need to

[clang] [AST] Migrate away from PointerUnion::{is, get} (NFC) (PR #119673)

2024-12-12 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/119673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2a825cd - [AST] Migrate away from PointerUnion::{is,get} (NFC) (#119673)

2024-12-12 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-12-12T01:15:39-08:00 New Revision: 2a825cd2f93b5f83029c36d6c8229f65b6ef2ec7 URL: https://github.com/llvm/llvm-project/commit/2a825cd2f93b5f83029c36d6c8229f65b6ef2ec7 DIFF: https://github.com/llvm/llvm-project/commit/2a825cd2f93b5f83029c36d6c8229f65b6ef2ec7.diff L

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

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

[clang] cfad8f1 - [clang][bytecode] Fix a build failure on aarch64

2024-12-12 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-12-12T09:08:30+01:00 New Revision: cfad8f14f846860b5c2e413c41c9b2b5642e URL: https://github.com/llvm/llvm-project/commit/cfad8f14f846860b5c2e413c41c9b2b5642e DIFF: https://github.com/llvm/llvm-project/commit/cfad8f14f846860b5c2e413c41c9b2b5642e.diff LO

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-12 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak closed https://github.com/llvm/llvm-project/pull/118249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-12 Thread Carlo Cabrera via cfe-commits
carlocab wrote: Tested locally; seems to be working as intended. https://github.com/llvm/llvm-project/pull/115993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-12 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab closed https://github.com/llvm/llvm-project/pull/115993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 737d78a - [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (#115993)

2024-12-12 Thread via cfe-commits
Author: Carlo Cabrera Date: 2024-12-12T16:15:20+08:00 New Revision: 737d78a9785ea3e928de2b36a4e3e7decd8c9491 URL: https://github.com/llvm/llvm-project/commit/737d78a9785ea3e928de2b36a4e3e7decd8c9491 DIFF: https://github.com/llvm/llvm-project/commit/737d78a9785ea3e928de2b36a4e3e7decd8c9491.diff

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab created https://github.com/llvm/llvm-project/pull/119670 This is a scaled down version of https://reviews.llvm.org/D136315. The intent is largely the same as before[^1], but I've scaled down the scope to try to avoid the issues that the previous patch caused: - the

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Carlo Cabrera (carlocab) Changes This is a scaled down version of https://reviews.llvm.org/D136315. The intent is largely the same as before[^1], but I've scaled down the scope to try to avoid the issues that the previous patch cau

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > We also introduce an environment variable `CLANG_NO_XCSELECT` that disables > this behaviour if Clang is configured with `CLANG_USE_XCSELECT=ON`. This is > needed to avoid breaking tests. It might also be nicer to set this only for the tests that break instead of globally.

[clang] [WebKit checkers] Recognize ensureFoo functions (PR #119681)

2024-12-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes In WebKit, we often write Foo::ensureBar function which lazily initializes m_bar and returns a raw pointer or a raw reference to m_bar. Such a return value is safe to use for the duration of

[clang] [WebKit checkers] Recognize ensureFoo functions (PR #119681)

2024-12-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/119681 In WebKit, we often write Foo::ensureBar function which lazily initializes m_bar and returns a raw pointer or a raw reference to m_bar. Such a return value is safe to use for the duration of a member function cal

[clang] 98470c0 - [clang][bytecode] Handle __builtin_bcmp (#119678)

2024-12-12 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-12T10:57:39+01:00 New Revision: 98470c0b2e0eef52e6900bf2d524a390edac9d58 URL: https://github.com/llvm/llvm-project/commit/98470c0b2e0eef52e6900bf2d524a390edac9d58 DIFF: https://github.com/llvm/llvm-project/commit/98470c0b2e0eef52e6900bf2d524a390edac9d58.diff L

[clang] [clang][bytecode] Handle __builtin_bcmp (PR #119678)

2024-12-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/119678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable the -Wdangling-capture diagnostic by default. (PR #119685)

2024-12-12 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/119685 We have tested this diagnostics internally, and we don't find see any issues. >From be7678e1798ad61af05ac3f83d7149125be9ed7a Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 12 Dec 2024 10:57:06 +0100 Subjec

[clang] [clang][bytecode] Handle __builtin_bcmp (PR #119678)

2024-12-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/119678 ... the same as `__builtin_memcmp`. Also fix a bug we still had when we couldn't find a difference in the two inputs after `Size` bytes. >From 3a480676781925badff8b88c3833f083fdc3dcbd Mon Sep 17 00:00:00 2001

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

2024-12-12 Thread Florian Mayer via cfe-commits
@@ -808,6 +808,10 @@ void Verifier::visitGlobalValue(const GlobalValue &GV) { "visibility must be dso_local!", &GV); + if (GV.isTagged()) { fmayer wrote: The codegen has "is section == precisely honor alignment" ``` Align DataLayout::get

[clang] [WebKit checkers] Recognize ensureFoo functions (PR #119681)

2024-12-12 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 dd8d85dba6e8f74a55fb5053107797e21894a0c6 0982f5ca3f9d1ea713b1e34b6e6b9d08ff65e6f1 --e

[clang] [clang] Enable the -Wdangling-capture diagnostic by default. (PR #119685)

2024-12-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes We have tested this diagnostics internally, and we don't find see any issues. --- Full diff: https://github.com/llvm/llvm-project/pull/119685.diff 2 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+

[clang] [C++20][Modules] Load function body from the module that gives canonical decl (PR #111992)

2024-12-12 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: We'll try the latest version and report back. https://github.com/llvm/llvm-project/pull/111992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable the -Wdangling-capture diagnostic by default. (PR #119685)

2024-12-12 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/119685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Xtensa] Add Xtensa target. (PR #118008)

2024-12-12 Thread Alexey Gerenkov via cfe-commits
https://github.com/gerekon updated https://github.com/llvm/llvm-project/pull/118008 >From bf0488585f41d3342c5c6d289d4621e3f50195cc Mon Sep 17 00:00:00 2001 From: Andrei Safronov Date: Thu, 1 Jun 2023 00:42:37 +0300 Subject: [PATCH 1/2] [Clang][Xtensa] Add Xtensa target. --- clang/include/clan

[clang] [Clang][Xtensa] Add Xtensa target. (PR #118008)

2024-12-12 Thread Alexey Gerenkov via cfe-commits
@@ -358,7 +358,10 @@ class TargetInfo : public TransferrableTargetInfo, //void *__saved_reg_area_end_pointer; //void *__overflow_area_pointer; //} va_list; -HexagonBuiltinVaList +HexagonBuiltinVaList, + +// Tensilica Xtensa +XtensaABIBuiltinV

[clang] [Clang][Xtensa] Add Xtensa target. (PR #118008)

2024-12-12 Thread Alexey Gerenkov via cfe-commits
@@ -9727,6 +9727,51 @@ static TypedefDecl *CreateHexagonBuiltinVaListDecl(const ASTContext *Context) { return Context->buildImplicitTypedef(VaListTagArrayType, "__builtin_va_list"); } +static TypedefDecl * +CreateXtensaABIBuiltinVaListDecl(const ASTContext *Context) { + /

[clang] [Clang][Xtensa] Add Xtensa target. (PR #118008)

2024-12-12 Thread Alexey Gerenkov via cfe-commits
@@ -9727,6 +9727,51 @@ static TypedefDecl *CreateHexagonBuiltinVaListDecl(const ASTContext *Context) { return Context->buildImplicitTypedef(VaListTagArrayType, "__builtin_va_list"); } +static TypedefDecl * +CreateXtensaABIBuiltinVaListDecl(const ASTContext *Context) { + /

[clang] [Clang][Xtensa] Add Xtensa target. (PR #118008)

2024-12-12 Thread Alexey Gerenkov via cfe-commits
@@ -0,0 +1,62 @@ +//===--- Xtensa.cpp - Implement Xtensa target feature support -===// +// +// The LLVM Compiler Infrastructure +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.

[clang] [Clang][Xtensa] Add Xtensa target. (PR #118008)

2024-12-12 Thread Alexey Gerenkov via cfe-commits
@@ -9727,6 +9727,51 @@ static TypedefDecl *CreateHexagonBuiltinVaListDecl(const ASTContext *Context) { return Context->buildImplicitTypedef(VaListTagArrayType, "__builtin_va_list"); } +static TypedefDecl * +CreateXtensaABIBuiltinVaListDecl(const ASTContext *Context) { + /

[clang] [Clang][Xtensa] Add Xtensa target. (PR #118008)

2024-12-12 Thread Alexey Gerenkov via cfe-commits
@@ -0,0 +1,141 @@ +//===--- Xtensa.h - Declare Xtensa target feature support ---*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE

[libclc] [libclc] Optimize ceil/fabs/floor/rint/trunc (PR #119596)

2024-12-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. LGTM. I'm not sure how this all ends up expanding, I was expecting to see the elementwise builtins used. It would be great if we had update_cc_test_checks style testing for the resulting implementation https://github.com/llvm/llvm-project

[clang] [clang] Fix sub-integer __builtin_elementwise_(add|sub)_sat (PR #119423)

2024-12-12 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > Even with this fix, the behavior with mixed types still seems really > confusing, especially if you mix signed/unsigned inputs. Can we address that > somehow? I totally agree. The (elementwise) builtins won't let you mix `ext_vector_type`s of different signs or element s

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-12-12 Thread Stephen Tozer via cfe-commits
@@ -1664,6 +1710,17 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) { emission.getOriginalAllocatedAddress(), emission.getSizeForLifetimeMarkers()); + // Analogous to lifetime markers,

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/117858 >From f388f19e26bdd7e45e874e4574e7d9196c2eaf0b Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 25 Nov 2024 15:52:18 + Subject: [PATCH 1/3] [clang][ASTVisitor] Visit `HoldingVar` from `Binding

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-12-12 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer edited https://github.com/llvm/llvm-project/pull/110102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-12 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,11 @@ +// REQUIRES: asserts + +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-cpu x86-64 -disable-llvm-passes -fopenmp-targets=amdgcn-amd-amdhsa -x c++ -emit-llvm-bc %s -o %t-x86-host.bc +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-un

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-12-12 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer edited https://github.com/llvm/llvm-project/pull/110102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Don't add implicit NoBuiltinAttr to deleted or defaulted functions (#116256) (PR #119719)

2024-12-12 Thread via cfe-commits
cor3ntin wrote: Can you edit the description to explain the reason for that change? Thanks https://github.com/llvm/llvm-project/pull/119719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] 6edd867 - [SystemZ][z/OS] Replace assert with updated return statement to check if a file size will grow due to conversion

2024-12-12 Thread Abhina Sreeskantharajan via cfe-commits
Author: Abhina Sreeskantharajan Date: 2024-12-12T11:56:08-05:00 New Revision: 6edd867e43cb5eb3bb84561c0490e5ebb9d06d90 URL: https://github.com/llvm/llvm-project/commit/6edd867e43cb5eb3bb84561c0490e5ebb9d06d90 DIFF: https://github.com/llvm/llvm-project/commit/6edd867e43cb5eb3bb84561c0490e5ebb9d0

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #117904)

2024-12-12 Thread via cfe-commits
SunilKuravinakop wrote: I ran `./install/bin/clang-tidy -p=build clang/lib/Sema/SemaOpenMP.cpp -checks=llvm-*` and did not find any changes being suggested for the code changes which I have done. Is there any other tool other than clang-tidy which I can run before uploading? I have been using

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

2024-12-12 Thread via cfe-commits
@@ -15629,6 +15629,34 @@ ExprResult SemaOpenMP::VerifyPositiveIntegerConstantInClause( return ICE; } +void SemaOpenMP::ActOnOpenMPDeviceNum(Expr *DeviceNumExpr) { + llvm::APSInt Result; + Expr::EvalResult EvalResult; + // Strip implicit casts from the expression + Devic

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

2024-12-12 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,11 @@ +// REQUIRES: asserts arsenm wrote: This does not require asserts https://github.com/llvm/llvm-project/pull/119246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

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

2024-12-12 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,11 @@ +// REQUIRES: asserts + +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-cpu x86-64 -disable-llvm-passes -fopenmp-targets=amdgcn-amd-amdhsa -x c++ -emit-llvm-bc %s -o %t-x86-host.bc +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-un

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

2024-12-12 Thread Matt Arsenault via cfe-commits
@@ -3302,6 +3302,9 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs( CharUnits Align = CGM.getContext().getDeclAlign(VD); Val = Builder.CreateAlignedLoad(Var->getValueType(), Val, Align); } +if (Val->getType() != Wrapper->getReturnType()) { + Val = Build

[clang] [lldb] [Serialization] Support loading template specializations lazily (PR #119333)

2024-12-12 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: @ChuanqiXu9 the added test fails under ASAN that reports memory leaks: ``` $ cmake -G Ninja -DLLVM_USE_SANITIZER=Address -DCMAKE_CXX_COMPILER=clang -DCMAKE_C_COMPILER=clang ../ $ ninja SerializationTests $ ./tools/clang/unittests/Serialization/SerializationTests ``` produc

[clang] [clang][bytecode] Handle __builtin_bcmp (PR #119678)

2024-12-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes ... the same as `__builtin_memcmp`. Also fix a bug we still had when we couldn't find a difference in the two inputs after `Size` bytes. --- Full diff: https://github.com/llvm/llvm-project/pull/119678.diff

[clang] [clang][LoongArch] Add FreeBSD targets (PR #119191)

2024-12-12 Thread WÁNG Xuěruì via cfe-commits
xen0n wrote: > > Also a `[Clang]` tag could be prepended to the PR title to make it clearer > > what part gets changed. > > Not only clang, all of FreeBSD on LoongArch It's not about *what can get built after the change*, but *what part of LLVM project this change applies to*, which is Clang.

[clang] [lldb] [Serialization] Support loading template specializations lazily (PR #119333)

2024-12-12 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: Ah, it's `DisableFree` again. I'll send a fix. https://github.com/llvm/llvm-project/pull/119333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [Serialization] Support loading template specializations lazily (PR #119333)

2024-12-12 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: Fixed by 7f4312015291a32d811a0f37e24b4d9736c524f7. https://github.com/llvm/llvm-project/pull/119333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7f43120 - [Serialization] Free memory in LoadSpecLazilyTest

2024-12-12 Thread Ilya Biryukov via cfe-commits
Author: Ilya Biryukov Date: 2024-12-12T11:19:11+01:00 New Revision: 7f4312015291a32d811a0f37e24b4d9736c524f7 URL: https://github.com/llvm/llvm-project/commit/7f4312015291a32d811a0f37e24b4d9736c524f7 DIFF: https://github.com/llvm/llvm-project/commit/7f4312015291a32d811a0f37e24b4d9736c524f7.diff

[clang] [clang] Enable the -Wdangling-capture diagnostic by default. (PR #119685)

2024-12-12 Thread via cfe-commits
cor3ntin wrote: Did you benchmark the impact on compile times? https://github.com/llvm/llvm-project/pull/119685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Don't require -fno-integrated-as when using -save-temps (PR #119624)

2024-12-12 Thread Sergio Afonso via cfe-commits
https://github.com/skatrak approved this pull request. Thank you, I think this is a good first step. Eventually, I think we'll still have to introduce proper support for `-fc1as`, because `-fno-integrated-as` (this patch making it the default for Flang) results in target offload programs faili

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-12-12 Thread Guy Blank via cfe-commits
@@ -0,0 +1,371 @@ +//===- RISCVLoadStoreOptimizer.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][Driver] Fix triple config loading for clang-cl (PR #111397)

2024-12-12 Thread via cfe-commits
https://github.com/zmodem commented: I didn't even realize people are using config files with clang-cl (since IIRC it doesn't support the config file command-line options). https://github.com/llvm/llvm-project/pull/111397 ___ cfe-commits mailing list

[clang] [clang][Driver] Fix triple config loading for clang-cl (PR #111397)

2024-12-12 Thread via cfe-commits
@@ -1336,17 +1359,7 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { // FIXME: TargetTriple is used by the target-prefixed calls to as/ld // and getToolChain is const. - if (IsCLMode()) { -// clang-cl targets MSVC-style Win32. -llvm::Triple T(TargetTri

[clang] [clang][Driver] Fix triple config loading for clang-cl (PR #111397)

2024-12-12 Thread via cfe-commits
@@ -1286,6 +1299,16 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { appendOneArg(Args, Opt, nullptr); } } + +// The config file may have changed the architecture so apply it. +if (HasConfigFile && Args.hasArg(options::OPT__SLASH_arm64E

[clang] [clang][Driver] Fix triple config loading for clang-cl (PR #111397)

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

[libclc] [libclc] Optimize ceil/fabs/floor/rint/trunc (PR #119596)

2024-12-12 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/119596 >From 68df2622a3ca1b98a0cbf1fc9e6200e12fecbb2e Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Wed, 11 Dec 2024 17:28:38 + Subject: [PATCH 1/2] [libclc] Optimize ceil/fabs/floor/rint/trunc These fun

[clang-tools-extra] [clang-tidy][NFC][doc] clean out-dated clang-static-analyzer checks (PR #119580)

2024-12-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/119580 >From df8b95c76ef3b5be61b5cea6476eba80bcd16792 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 12 Dec 2024 00:20:01 +0800 Subject: [PATCH 1/3] [clang-tidy][NFC][doc] clean out-dated clang-static-anal

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2024-12-12 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/11 >From 6a873f5c487a936344f6cd226b7d525b406f34b2 Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Wed, 25 Sep 2024 15:08:39 +0100 Subject: [PATCH 1/6] [Clang] Add "extend lifetime" flags and release note Follow

[clang] [clang][Driver] Support simplified triple versions for config files (PR #111387)

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

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2024-12-12 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/118026 >From efd7f58e421b0afdc886688128f72170e0c4a970 Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Wed, 25 Sep 2024 15:08:39 +0100 Subject: [PATCH 1/2] [Clang] Add "extend lifetime" flags and release note Follow

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

2024-12-12 Thread Sergei Barannikov via cfe-commits
s-barannikov wrote: > Updating the wrapper function's return type as below also fixes the error: I mean, why do we have to watch for type mismatches and fix them instead of creating the correct type in the first place? There is `getPointerType(RetQT)` just above, shouldn't it be something like

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2024-12-12 Thread Stephen Tozer via cfe-commits
@@ -1834,6 +1834,14 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, Opts.setInlining(CodeGenOptions::NormalInlining); } + // If we have specified -Og and have not explicitly set -fno-extend-lifetimes, + // then default to -fextend-li

[clang] f229ea2 - [clang] Enable the -Wdangling-capture diagnostic by default. (#119685)

2024-12-12 Thread via cfe-commits
Author: Haojian Wu Date: 2024-12-12T16:38:17+01:00 New Revision: f229ea2ffe9bb8380a4285bd379736aaadaf55ac URL: https://github.com/llvm/llvm-project/commit/f229ea2ffe9bb8380a4285bd379736aaadaf55ac DIFF: https://github.com/llvm/llvm-project/commit/f229ea2ffe9bb8380a4285bd379736aaadaf55ac.diff LO

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

2024-12-12 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj updated https://github.com/llvm/llvm-project/pull/118471 >From cb3bfb497c6f65bc185dc4fe7b8d9c5dbd92c4f0 Mon Sep 17 00:00:00 2001 From: Ritanya B Bharadwaj Date: Tue, 3 Dec 2024 03:58:40 -0600 Subject: [PATCH] Initial parsing/sema support for target_device

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

2024-12-12 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/119246 >From 9dbcf65775a979553bee2c95b16e3e2328e957a1 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Mon, 9 Dec 2024 10:33:18 -0600 Subject: [PATCH 1/2] [clang] Recover necessary AddrSpaceCast A necessary AddrSpace

[clang] 4aacafd - [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (#117858)

2024-12-12 Thread via cfe-commits
Author: Clement Courbet Date: 2024-12-12T17:01:59+01:00 New Revision: 4aacafd49b74dc168e0d99018b4c8289ce9c923e URL: https://github.com/llvm/llvm-project/commit/4aacafd49b74dc168e0d99018b4c8289ce9c923e DIFF: https://github.com/llvm/llvm-project/commit/4aacafd49b74dc168e0d99018b4c8289ce9c923e.dif

[clang] [clang][ASTVisitor] Visit `HoldingVar` from `BindingDecl`. (PR #117858)

2024-12-12 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle closed https://github.com/llvm/llvm-project/pull/117858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Infer nuw for gep inbounds from base of object (PR #119225)

2024-12-12 Thread Nikita Popov via cfe-commits
nikic wrote: I think https://github.com/llvm/llvm-test-suite/pull/190 should fix this issue, but haven't tested on an affected arch. I'm a bit worried that we don't have a sanitizer to catch this issue (the negative left shift issue is an unrelated one). https://github.com/llvm/llvm-project/p

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

2024-12-12 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: > I mean, why do we have to watch for type mismatches and fix them instead of > creating the correct type in the first place? There is getPointerType(RetQT) just above, shouldn't it be something like getPointerType(RetQT, )? Or RetQT should have had the correct address space, but

[clang] [llvm] [InstCombine] Infer nuw for gep inbounds from base of object (PR #119225)

2024-12-12 Thread Lu Weining via cfe-commits
SixWeining wrote: Seems that this change causes Segment Fault on multiple targets including aarch64, loongarch64 and riscv64. This is detected by a LoongArch [buildbot](https://lab.llvm.org/staging/#/builders/20/builds/6282) and manually checked on aarch64 and riscv64 QEMUs. I wonder why aar

[clang] [llvm] [InstCombine] Infer nuw for gep inbounds from base of object (PR #119225)

2024-12-12 Thread Nikita Popov via cfe-commits
nikic wrote: >From a quick look, it's probably due to UB on this line: >https://github.com/llvm/llvm-test-suite/blob/4f14adb8a2f2c5fa02c6b3643d45e74adfcb31f9/SingleSource/Benchmarks/CoyoteBench/huffbench.c#L114 > It indexes below the start of an object. https://github.com/llvm/llvm-project/pull

[clang] [clang] Enable the -Wdangling-capture diagnostic by default. (PR #119685)

2024-12-12 Thread Haojian Wu via cfe-commits
hokein wrote: > Did you benchmark the impact on compile times? I don't have concrete numbers, this warning works similarly to other -Wdangling warnings, performing only a lightweight, single-statement analysis on the annotated parameter, I believe the cost on compile times is negligible. htt

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

2024-12-12 Thread via cfe-commits
@@ -664,11 +664,22 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, SmallerValueMentioned |= OutSize < InSize; } +// If the input is an integer register while the output is floating point, +// there is no way they can work together.

[clang] [clang] Generate appropriate assume in presence of libc's memcpy (PR #119704)

2024-12-12 Thread via cfe-commits
https://github.com/serge-sans-paille created https://github.com/llvm/llvm-project/pull/119704 It is an undefined behavior to pass null arguments as memcpy source or destination parameter, so generate the appropriate llvm.assume call to communicate this to the backend. Don't do it for builtin

[clang] [clang] Generate appropriate assume in presence of libc's memcpy (PR #119704)

2024-12-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: None (serge-sans-paille) Changes It is an undefined behavior to pass null arguments as memcpy source or destination parameter, so generate the appropriate llvm.assume call to communicate this to the back

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

2024-12-12 Thread Sergei Barannikov via cfe-commits
s-barannikov wrote: > I'm unfamiliar with Clang Qualtypes I see. Well, neither am I :) I brought this up in case someone else could suggest the preferred way to fix the issue. I don't have objections against the current approach, but I'm not qualified to review it either. https://github.com/

[clang] [Clang][Parser] Add a warning to ambiguous uses of T...[N] types (PR #116332)

2024-12-12 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM. I'll be amazed if this warning ever get seen in the wild though https://github.com/llvm/llvm-project/pull/116332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] 8eec301 - [OpenACC] Implement 'device_type' for 'data' construct

2024-12-12 Thread via cfe-commits
Author: erichkeane Date: 2024-12-12T08:37:20-08:00 New Revision: 8eec301fe3ac5fdcb4de4757806661b99c9e6580 URL: https://github.com/llvm/llvm-project/commit/8eec301fe3ac5fdcb4de4757806661b99c9e6580 DIFF: https://github.com/llvm/llvm-project/commit/8eec301fe3ac5fdcb4de4757806661b99c9e6580.diff LO

[clang] [flang] [flang] Add -f[no-]vectorize flags (PR #119718)

2024-12-12 Thread David Truby via cfe-commits
https://github.com/DavidTruby created https://github.com/llvm/llvm-project/pull/119718 This patch adds the -fvectorize and -fno-vectorize flags to flang. Note that this also changes the behaviour of `flang -fc1` to match that of `clang -cc1`, which is that vectorization is only enabled in the

[clang] [flang] [flang] Add -f[no-]vectorize flags (PR #119718)

2024-12-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver @llvm/pr-subscribers-clang Author: David Truby (DavidTruby) Changes This patch adds the -fvectorize and -fno-vectorize flags to flang. Note that this also changes the behaviour of `flang -fc1` to match that of `clang -cc1`, which is that

[clang] [flang] [flang] Add -f[no-]vectorize flags (PR #119718)

2024-12-12 Thread David Truby via cfe-commits
https://github.com/DavidTruby converted_to_draft https://github.com/llvm/llvm-project/pull/119718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2024-12-12 Thread Sean Perry via cfe-commits
https://github.com/perry-ca updated https://github.com/llvm/llvm-project/pull/111035 >From e8d355c9cd165e0a255bbbfb5b0126cf7b1461a6 Mon Sep 17 00:00:00 2001 From: Sean Perry Date: Wed, 2 Oct 2024 12:56:43 -0500 Subject: [PATCH 1/9] initial work for pragma export & _Export keyword --- clang/in

[clang] [clang-cl] Don't add implicit NoBuiltinAttr to deleted or defaulted functions (#116256) (PR #119719)

2024-12-12 Thread via cfe-commits
https://github.com/VScigolevs created https://github.com/llvm/llvm-project/pull/119719 None >From 7babf835ecaf3081473b42ee48f522ff3bfb39ee Mon Sep 17 00:00:00 2001 From: Vladimirs Scigolevs Date: Fri, 22 Nov 2024 11:26:37 +0200 Subject: [PATCH] [clang-cl] Don't add implicit NoBuiltinAttr to de

[clang] [clang-cl] Don't add implicit NoBuiltinAttr to deleted or defaulted functions (#116256) (PR #119719)

2024-12-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (VScigolevs) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/119719.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaAttr.cpp (+2) - (added) clang/test/SemaCXX/msvc-pragma-function-no-builtin-attr.cpp (+32)

[clang] [clang-cl] Don't add implicit NoBuiltinAttr to deleted or defaulted functions (#116256) (PR #119719)

2024-12-12 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] [clang] Fix a use-after-free in expression evaluation (PR #118480)

2024-12-12 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: Here's a small reprocase (thanks for cvise for getting it): ```cpp // Run under ASAN: clang -fsyntax-only template constexpr _InputIterator find_if(_InputIterator __first, _Predicate __pred) { if (__pred(*__first)) ; } template struct basic_string_view { char __d

[clang] [llvm] [InstCombine] Infer nuw for gep inbounds from base of object (PR #119225)

2024-12-12 Thread via cfe-commits
serge-sans-paille wrote: Hey @nikic, I've bisected the failures from this buildbot: https://lab.llvm.org/buildbot/#/builders/199/builds/57 down to this commit. The reproducer is unfortunately not pleasant: get a stage-2 build of clang then run the llvm-test suite. This reproducibility choke

[clang] [Clang][Parser] Add a warning to ambiguous uses of T...[N] types (PR #116332)

2024-12-12 Thread Younan Zhang via cfe-commits
@@ -253,6 +254,19 @@ bool Parser::ParseOptionalCXXScopeSpecifier( if (Type.isNull()) return false; +// C++ [cpp23.dcl.dcl-2]: +// Previously, T...[n] would declare a pack of function parameters. +// T...[n] is now a pack-index-specifier. [...] Valid C

[clang] [llvm] [InstCombine] Infer nuw for gep inbounds from base of object (PR #119225)

2024-12-12 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > Seems that this change causes Segment Fault on multiple targets including > aarch64, loongarch64 and riscv64. > > This is detected by a LoongArch > [buildbot](https://lab.llvm.org/staging/#/builders/20/builds/6282) and > manually checked on aarch64 and riscv64 QEMUs. > > I w

[clang] Fix a bug that CXXConstructExpr wasn't recognized by tryToFindPtrOrigin (PR #119336)

2024-12-12 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. Thanks for fixing the tests, LGTM! https://github.com/llvm/llvm-project/pull/119336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

  1   2   3   4   >