[clang] [clang] Better bitfield access units (PR #65742)

2024-03-13 Thread John McCall via cfe-commits
@@ -439,82 +444,194 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, Members.push_back(MemberInfo(bitsToCharUnits(StartBitOffset), MemberInfo::Field, nullptr, *Field)); } -return; +return Field;

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-13 Thread John McCall via cfe-commits
@@ -439,82 +444,194 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, Members.push_back(MemberInfo(bitsToCharUnits(StartBitOffset), MemberInfo::Field, nullptr, *Field)); } -return; +return Field;

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-13 Thread Balazs Benics via cfe-commits
steakhal wrote: > Hello @steakhal, I have just looked through the changes again. What is the > advantage of using checkPreCall instead of checkLocation? I would very much > appreciate some background information. Thanks for your help! Oh yes, I should have explained. So, `checkLocation` can be

[clang] [clang][analyzer] Fix crash in loop unrolling (PR #82089)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/82089 >From 2802ef4b9ed88da3cacb16ab7738907ee806 Mon Sep 17 00:00:00 2001 From: huang-me Date: Sat, 17 Feb 2024 10:43:48 +0800 Subject: [PATCH 1/9] Fix crash on StaticAnalyzer loop unrolling --- clang/lib/Static

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/85032 Draft for CI. Addresses https://github.com/llvm/llvm-project/issues/82628 >From 6469dca42dae503bf08a65e55d60ccf48e012f25 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 13 Mar 2024 13:47:33 +0800 Subject:

[clang] [llvm] [Clang][BPF] Allow sign/zero extension for call parameters with int/uint types (PR #84874)

2024-03-13 Thread Pu Lehui via cfe-commits
pulehui wrote: > > A kernel function will expect the uint to be sign-extended, not > > zero-extended. > > I suspect riscv bpf jit will do sign-extension. @pulehui can confirm. This > may be true for 32-bit subregisters, but I am not sure whether this is true > for full register or not. Sorry

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 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 fd3eaf76ba3392a4406247d996e757ef49f7a8b2 6469dca42dae503bf08a65e55d60ccf48e012f25 --

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/85032 >From 6469dca42dae503bf08a65e55d60ccf48e012f25 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 13 Mar 2024 13:47:33 +0800 Subject: [PATCH 1/2] [concepts] Preserve the FoundDecl of ConceptReference properl

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/84972 >From 9860dad609c8a27dfaa178af5b72285e3ad050fd Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 12 Mar 2024 19:55:29 +0100 Subject: [PATCH 1/2] [analyzer] Support C++23 static operator calls Made by foll

[clang] [llvm] [PowerPC] Add restriction for rldimi builtin (PR #85040)

2024-03-13 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises created https://github.com/llvm/llvm-project/pull/85040 rldimi is 64-bit instruction, so the corresponding builtin should not be available in 32-bit mode. Also, clang should check if shift amount and mask are consistent. >From d5aa72a2d0ed083919b37cc1faacad1f3addc

[clang] Fix missing include past a38b7a432d3cbb093af9310eba5b4982dc0a0243 (PR #85041)

2024-03-13 Thread Danial Klimkin via cfe-commits
https://github.com/dklimkin created https://github.com/llvm/llvm-project/pull/85041 None >From aba8a875a3dcebb1300974297ab1276c6f657a93 Mon Sep 17 00:00:00 2001 From: Danial Klimkin Date: Wed, 13 Mar 2024 08:54:15 +0100 Subject: [PATCH] Fix missing include past a38b7a432d3cbb093af9310eba5b498

[clang] [llvm] [PowerPC] Add restriction for rldimi builtin (PR #85040)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-powerpc Author: Qiu Chaofan (ecnelises) Changes rldimi is 64-bit instruction, so the corresponding builtin should not be available in 32-bit mode. Also, clang should check if shift amount and mask are consistent. --- Full diff: https://github.

[clang] Fix missing include past a38b7a432d3cbb093af9310eba5b4982dc0a0243 (PR #85041)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Danial Klimkin (dklimkin) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/85041.diff 1 Files Affected: - (modified) clang/include/clang/InstallAPI/FrontendRecords.h (+1) ``diff diff --git a/clang/include/cla

[clang] Fix missing include past a38b7a432d3cbb093af9310eba5b4982dc0a0243 (PR #85041)

2024-03-13 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-em

[clang] 46682f4 - Fix missing include past a38b7a432d3cbb093af9310eba5b4982dc0a0243 (#85041)

2024-03-13 Thread via cfe-commits
Author: Danial Klimkin Date: 2024-03-13T09:00:09+01:00 New Revision: 46682f445adfa06cb74239b17b588e36fcd4fdaa URL: https://github.com/llvm/llvm-project/commit/46682f445adfa06cb74239b17b588e36fcd4fdaa DIFF: https://github.com/llvm/llvm-project/commit/46682f445adfa06cb74239b17b588e36fcd4fdaa.diff

[clang] Fix missing include past a38b7a432d3cbb093af9310eba5b4982dc0a0243 (PR #85041)

2024-03-13 Thread Danial Klimkin via cfe-commits
https://github.com/dklimkin closed https://github.com/llvm/llvm-project/pull/85041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-13 Thread via cfe-commits
@@ -709,6 +710,77 @@ class CXXInstanceCall : public AnyFunctionCall { } }; +/// Represents a static C++ operator call. +/// +/// "A" in this example. +/// However, "B" and "C" are represented by SimpleFunctionCall. +/// \code +/// struct S { +/// int pad; +/// stat

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-13 Thread via cfe-commits
https://github.com/tomasz-kaminski-sonarsource approved this pull request. Only small change. https://github.com/llvm/llvm-project/pull/84972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang] CTAD: Respect requires-clause of the original function template (PR #84913)

2024-03-13 Thread Haojian Wu via cfe-commits
hokein wrote: Thanks for the review. https://github.com/llvm/llvm-project/pull/84913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0be9592 - [clang] CTAD: Respect requires-clause of the original function template for the synthesized deduction guide (#84913)

2024-03-13 Thread via cfe-commits
Author: Haojian Wu Date: 2024-03-13T09:02:05+01:00 New Revision: 0be9592b0077dc63596ce46379cf7b3bd4a405c8 URL: https://github.com/llvm/llvm-project/commit/0be9592b0077dc63596ce46379cf7b3bd4a405c8 DIFF: https://github.com/llvm/llvm-project/commit/0be9592b0077dc63596ce46379cf7b3bd4a405c8.diff LO

[clang] [clang] CTAD: Respect requires-clause of the original function template (PR #84913)

2024-03-13 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/84913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/84972 >From 9860dad609c8a27dfaa178af5b72285e3ad050fd Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 12 Mar 2024 19:55:29 +0100 Subject: [PATCH 1/3] [analyzer] Support C++23 static operator calls Made by foll

[clang] [llvm] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-13 Thread Takuto Ikuta via cfe-commits
@@ -102,23 +104,24 @@ struct llvm::TimeTraceProfiler { llvm::get_thread_name(ThreadName); } - void begin(std::string Name, llvm::function_ref Detail) { -Stack.emplace_back(ClockType::now(), TimePointType(), std::move(Name), - Detail()); + Time

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/84972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-13 Thread Takuto Ikuta via cfe-commits
atetubou wrote: > > > IIUC, the approach you choose here is to let `SemaPPCallbacks` control > > > the "entered file stack" and allow it to remove element (which is file) > > > from middle of the internal stack in `TimeTraceProfiler`, but this > > > creates async event which is not designed fo

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-13 Thread via cfe-commits
@@ -0,0 +1,36 @@ +// RUN: %clang_analyze_cc1 -std=c++2b -verify %s \ +// RUN: -analyzer-checker=core,debug.ExprInspection + +template void clang_analyzer_dump(T); + +struct Adder { + int data; + static int operator()(int x, int y) { +clang_analyzer_dump(x); // expected-wa

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-13 Thread via cfe-commits
https://github.com/tomasz-kaminski-sonarsource edited https://github.com/llvm/llvm-project/pull/84972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/85032 >From 6469dca42dae503bf08a65e55d60ccf48e012f25 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 13 Mar 2024 13:47:33 +0800 Subject: [PATCH 1/4] [concepts] Preserve the FoundDecl of ConceptReference properl

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread YAMAMOTO Takashi via cfe-commits
https://github.com/yamt updated https://github.com/llvm/llvm-project/pull/84137 >From 6c1bfa0aa292d81102a9aeb86ca4264516beb634 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 9 Feb 2024 15:49:55 +0900 Subject: [PATCH 01/20] [WebAssembly] Implement an alternative translation for -wasm

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread YAMAMOTO Takashi via cfe-commits
https://github.com/yamt edited https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread YAMAMOTO Takashi via cfe-commits
https://github.com/yamt ready_for_review https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread YAMAMOTO Takashi via cfe-commits
yamt wrote: @aheejin @sbc100 i think i resolved most of your feedback in this PR and the emscripten PR. i tried to run the relevant emscripten tests. but i have not succeeded yet even w/o these changes. (i'm an emscripten newbie.) https://github.com/llvm/llvm-project/pull/84137 __

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/85032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/85032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clangd Author: Younan Zhang (zyn0217) Changes The `ConceptReference`'s `FoundDecl` claims it "can differ from `NamedConcept` when, for example, the concept was found through a `UsingShadowDecl`", but such the cont

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/85050 This is the driver part of https://github.com/llvm/llvm-project/pull/75894. This patch introduces '-fgen-reduced-bmi' to enable generating the reduced BMI. This patch did: - When `-fgen-reduced-bmi` is specif

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang-driver Author: Chuanqi Xu (ChuanqiXu9) Changes This is the driver part of https://github.com/llvm/llvm-project/pull/75894. This patch introduces '-fgen-reduced-bmi' to enable generating the reduced BMI. This pat

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 converted_to_draft https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Concepts] Add Decls from the outer scope of the current lambda for conversion function constraints (PR #83420)

2024-03-13 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/83420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Concepts] Add Decls from the outer scope of the current lambda for conversion function constraints (PR #83420)

2024-03-13 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM modulo nitpicks https://github.com/llvm/llvm-project/pull/83420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Concepts] Add Decls from the outer scope of the current lambda for conversion function constraints (PR #83420)

2024-03-13 Thread via cfe-commits
@@ -275,6 +275,9 @@ Bug Fixes to C++ Support (`#82258 `_) - Correctly immediate-escalate lambda conversion functions. (`#82258 `_) +- Fixed a crash while checking constrain

[clang] [Concepts] Add Decls from the outer scope of the current lambda for conversion function constraints (PR #83420)

2024-03-13 Thread via cfe-commits
@@ -691,11 +691,15 @@ bool Sema::CheckFunctionConstraints(const FunctionDecl *FD, // A lambda conversion operator has the same constraints as the call operator // and constraints checking relies on whether we are in a lambda call operator // (and may refer to its parame

[clang] [Concepts] Add Decls from the outer scope of the current lambda for conversion function constraints (PR #83420)

2024-03-13 Thread via cfe-commits
@@ -275,6 +275,9 @@ Bug Fixes to C++ Support (`#82258 `_) - Correctly immediate-escalate lambda conversion functions. (`#82258 `_) +- Fixed a crash while checking constrain

[clang] AArch64: add __builtin_arm_trap (PR #85054)

2024-03-13 Thread Tim Northover via cfe-commits
https://github.com/TNorthover created https://github.com/llvm/llvm-project/pull/85054 It's useful to provide an indicator code with the trap, which the generic __builtin_trap can't do. asm("brk #N") is an option, but following that with a __builtin_unreachable() leads to two traps when the com

[clang] AArch64: add __builtin_arm_trap (PR #85054)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Tim Northover (TNorthover) Changes It's useful to provide an indicator code with the trap, which the generic __builtin_trap can't do. asm("brk #N") is an option, but following that with a __builtin_unrea

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1, cflush.d.l1, and cease instructions. (PR #83896)

2024-03-13 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: I believe the patch is ready to be merged now, but since I am not the reviewer here, someone else must approve it as well. Thanks again for the patch! https://github.com/llvm/llvm-project/pull/83896 ___ cfe-commits mailing list c

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-03-13 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/81869 >From 72bbd9d38cb6e292d92391fcf04154cfbc336192 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Thu, 15 Feb 2024 09:52:22 + Subject: [PATCH 01/12] [flang][clang] Add Visibility specific help text for

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-03-13 Thread David Spickett via cfe-commits
DavidSpickett wrote: I've also tested this with increased array sizes. You can check the .inc files to see that they are intialised properly, `/lib/ToolDrivers/llvm-lib/Options.inc` is one. https://github.com/llvm/llvm-project/pull/81869 ___ cfe-commi

[clang] [llvm] [clang][HLSL][SPRI-V] Add convergence intrinsics (PR #80680)

2024-03-13 Thread Nathan Gauër via cfe-commits
@@ -1130,8 +1130,96 @@ struct BitTest { static BitTest decodeBitTestBuiltin(unsigned BuiltinID); }; + +// Returns the first convergence entry/loop/anchor instruction found in |BB|. +// std::nullopt otherwise. +std::optional getConvergenceToken(llvm::BasicBlock *BB) { + for

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. Very nice, thanks! https://github.com/llvm/llvm-project/pull/85032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] Diagnose misuse of the cleanup attribute (PR #80040)

2024-03-13 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy updated https://github.com/llvm/llvm-project/pull/80040 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread via cfe-commits
https://github.com/ealcdan created https://github.com/llvm/llvm-project/pull/85060 Some options take the maximum unsigned integer value as default, but they are being dumped to a string as integers. This makes -dump-config write invalid '-1' values for these options. This change fixes this iss

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" (#84926) (PR #84963)

2024-03-13 Thread via cfe-commits
https://github.com/NagyDonat commented: Thanks for finding the root cause and fixing the commit! The change LGTM, but I don't think that it is fair to give a formal approval on what's essentially my own commit. https://github.com/llvm/llvm-project/pull/84963 ___

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread via cfe-commits
ealcdan wrote: This PR attempts to fix #60217 https://github.com/llvm/llvm-project/pull/85060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (ealcdan) Changes Some options take the maximum unsigned integer value as default, but they are being dumped to a string as integers. This makes -dump-config write invalid '-1' values for these options. This change fixes

[clang-tools-extra] [clang-tidy] Avoid overflow when dumping unsigned integer values (PR #85060)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (ealcdan) Changes Some options take the maximum unsigned integer value as default, but they are being dumped to a string as integers. This makes -dump-config write invalid '-1' values for these options. This change fixes this is

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" (#84926) (PR #84963)

2024-03-13 Thread via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/84963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-03-13 Thread Bhuminjay Soni via cfe-commits
11happy wrote: > It looks like it passed on your last commit but you have a conflict now which > you need to resolve. > > Can you merge or do you need help with that? I tried to resolve the merge conflict but the resolve editor is just stuck on loading on Vs Code may be as it have 2 conflicts

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good to me. https://github.com/llvm/llvm-project/pull/85032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" (#84926) (PR #84963)

2024-03-13 Thread Balazs Benics via cfe-commits
steakhal wrote: You gave approval for the fix for the buggy tests I suggested. I think there is nothing wrong with this. Thanks for having a look at my fix. Ill recommit this as you authored, and I coauthored. https://github.com/llvm/llvm-project/pull/84963 _

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From e5114cdc6a77711dda6a13cbee9cd5cc42be48c6 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH] [C++20] [Modules] Introduce -fgen-reduced-bmi --- clang/include

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 ready_for_review https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. Thanks for the investigation and fix! https://github.com/llvm/llvm-project/pull/85032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-03-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good to me. https://github.com/llvm/llvm-project/pull/80040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][HLSL][SPRI-V] Add convergence intrinsics (PR #80680)

2024-03-13 Thread Matt Arsenault via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -4554,6 +4554,13 @@ def HLSLWaveActiveCountBits : LangBuiltin<"HLSL_LANG"> { let Prototype = "unsigned int(bool)"; } +// HLSL +def HLSLWav

[clang] [RISCV] Emit arch string macro to facilitate ASM programming (PR #85063)

2024-03-13 Thread Nemanja Ivanovic via cfe-commits
https://github.com/nemanjai created https://github.com/llvm/llvm-project/pull/85063 In order to make assembly programming more convenient, emit macro __riscv_cmdline_arch_string that will be defined to the arch string based on the command line arguments. This string may differ from the actual

[clang] [RISCV] Emit arch string macro to facilitate ASM programming (PR #85063)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-risc-v Author: Nemanja Ivanovic (nemanjai) Changes In order to make assembly programming more convenient, emit macro __riscv_cmdline_arch_string that will be defined to the arch string based on the command line argume

[clang] [DRAFT][RISCV] Emit arch string macro to facilitate ASM programming (PR #85063)

2024-03-13 Thread Nemanja Ivanovic via cfe-commits
https://github.com/nemanjai edited https://github.com/llvm/llvm-project/pull/85063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DRAFT][RISCV] Emit arch string macro to facilitate ASM programming (PR #85063)

2024-03-13 Thread Nemanja Ivanovic via cfe-commits
nemanjai wrote: This is a suggestion born out of a request from a user to have a way to emit the ISA attributes into objects produced from pre-processed asm files. Perhaps there is already a method to do this that I'm not aware of, but if not, I think this is a convenient and lightweight way t

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-13 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/85064 This is a relatively rare case, but - It's still nice to get this right, - We can remove the special case for this in `VisitCXXOperatorCallExpr()` (that simply bails out), and - With this in place, I can a

[clang] [clang][dataflow] Model assignment to derived class from base. (PR #85064)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes This is a relatively rare case, but - It's still nice to get this right, - We can remove the special case for this in `VisitCXXOperatorCallExpr()` (that simply bails out), and - With this in place, I can avoid

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/84981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for the fix! This is looking pretty good to me. https://github.com/llvm/llvm-project/pull/84981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-13 Thread Aaron Ballman via cfe-commits
@@ -216,3 +216,6 @@ int PR4517_x2 = PR4517_arrc[PR4517_idx]; // CHECK: @PR4517_x = global i32 42, align 4 // CHECK: @PR4517_idx = constant i32 1, align 4 // CHECK: @PR4517_x2 = global i32 42, align 4 + +// CHECK: @GH84784_inf = constant i8 1 +_Bool const GH84784_inf = (1.0/0.0)

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
zyn0217 wrote: (Waiting for the CI before landing it. As usual, thank you all for the review!) https://github.com/llvm/llvm-project/pull/85032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [clang][AArch64] Enable fp128 for aarch64 linux target (PR #85070)

2024-03-13 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau created https://github.com/llvm/llvm-project/pull/85070 None >From 51bd7b1ff944032e9aba5da1fd1a61bec0dafddd Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Wed, 13 Mar 2024 12:15:33 + Subject: [PATCH] [clang][AArch64] Enable fp128 for aarch64 linux target -

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" (#84926) (PR #84963)

2024-03-13 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/84963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread Doug Wyatt via cfe-commits
@@ -395,6 +395,33 @@ bool Sema::checkStringLiteralArgumentAttr(const ParsedAttr &AL, unsigned ArgNum, return checkStringLiteralArgumentAttr(AL, ArgExpr, Str, ArgLocation); } +/// Check if the argument \p ArgNum of \p Attr is a compile-time constant +/// integer (boolean) ex

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/84671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add a test for result object location on `CXXDefaultArgExpr`. (PR #85072)

2024-03-13 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/85072 I'm working on an upcoming change that will improve the semantics of `Environment::GetResultObjectLocation()` (see the FIXME in the method comment), and this patch improves the test coverage for this change.

[clang] [clang][dataflow] Add a test for result object location on `CXXDefaultArgExpr`. (PR #85072)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes I'm working on an upcoming change that will improve the semantics of `Environment::GetResultObjectLocation()` (see the FIXME in the method comment), and this patch improves the test coverage for this change. --

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos deleted https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-13 Thread via cfe-commits
@@ -216,3 +216,6 @@ int PR4517_x2 = PR4517_arrc[PR4517_idx]; // CHECK: @PR4517_x = global i32 42, align 4 // CHECK: @PR4517_idx = constant i32 1, align 4 // CHECK: @PR4517_x2 = global i32 42, align 4 + +// CHECK: @GH84784_inf = constant i8 1 +_Bool const GH84784_inf = (1.0/0.0)

[clang] [llvm] [IR] Change representation of getelementptr inrange (PR #84341)

2024-03-13 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/84341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-13 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/84981 >From b60ff0c29f367306beb5ea0965dfaf5b7f361654 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Tue, 12 Mar 2024 13:53:34 +0100 Subject: [PATCH 1/5] [Clang] [CodeGen] Fix codegen bug in constant initialisation in

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-13 Thread via cfe-commits
Sirraide wrote: I’ve added the test. The CI failure is the same thing from a few days ago I think; must be because I created this branch before updating the main branch. https://github.com/llvm/llvm-project/pull/84981 ___ cfe-commits mailing list cfe-

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" (#84926) (PR #84963)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/84963 >From bca501228e3a146d3ca6c05b7de15fd914fb16b9 Mon Sep 17 00:00:00 2001 From: NagyDonat Date: Tue, 12 Mar 2024 18:24:26 +0100 Subject: [PATCH] Reapply "[analyzer] Accept C library functions from the `std` names

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" (#84926) (PR #84963)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/84963 >From e48d5a838f69e0a8e0ae95a8aed1a8809f45465a Mon Sep 17 00:00:00 2001 From: NagyDonat Date: Tue, 12 Mar 2024 18:24:26 +0100 Subject: [PATCH] Reapply "[analyzer] Accept C library functions from the `std` names

[clang] e48d5a8 - Reapply "[analyzer] Accept C library functions from the `std` namespace"

2024-03-13 Thread Balazs Benics via cfe-commits
Author: NagyDonat Date: 2024-03-13T14:48:42+01:00 New Revision: e48d5a838f69e0a8e0ae95a8aed1a8809f45465a URL: https://github.com/llvm/llvm-project/commit/e48d5a838f69e0a8e0ae95a8aed1a8809f45465a DIFF: https://github.com/llvm/llvm-project/commit/e48d5a838f69e0a8e0ae95a8aed1a8809f45465a.diff LOG

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" (#84926) (PR #84963)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/84963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" (#84926) (PR #84963)

2024-03-13 Thread Balazs Benics via cfe-commits
steakhal wrote: Merged to main as e48d5a838f69e0a8e0ae95a8aed1a8809f45465a https://github.com/llvm/llvm-project/pull/84963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/84981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/84981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-13 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c23 %s + +// Division by 0 here is an error iff the variable is 'constexpr'. +const _Bool inf1 = (1.0/0.0 == __builtin_inf()); +constexpr _Bool inf2 = (1.0/0.0 == __builtin_inf()); // expected-error {{must be initial

[clang] 960b4aa - [AIX][ClangRepl] Disable new test on AIX

2024-03-13 Thread via cfe-commits
Author: Jake Egan Date: 2024-03-13T09:54:35-04:00 New Revision: 960b4aa6dab69125778f230c4c94f2d19c96cc87 URL: https://github.com/llvm/llvm-project/commit/960b4aa6dab69125778f230c4c94f2d19c96cc87 DIFF: https://github.com/llvm/llvm-project/commit/960b4aa6dab69125778f230c4c94f2d19c96cc87.diff LOG

[clang] nolock/noalloc attributes (PR #84983)

2024-03-13 Thread via cfe-commits
@@ -4912,3 +4922,279 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context) { Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(), getTypeConstraintConcept(), getTypeConstraintArguments()); } + +FunctionEffect::~Function

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-13 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/84981 >From b60ff0c29f367306beb5ea0965dfaf5b7f361654 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Tue, 12 Mar 2024 13:53:34 +0100 Subject: [PATCH 1/6] [Clang] [CodeGen] Fix codegen bug in constant initialisation in

[clang] [Clang] [CodeGen] Fix codegen bug in constant initialisation in C23 mode (PR #84981)

2024-03-13 Thread via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c23 %s + +// Division by 0 here is an error iff the variable is 'constexpr'. +const _Bool inf1 = (1.0/0.0 == __builtin_inf()); +constexpr _Bool inf2 = (1.0/0.0 == __builtin_inf()); // expected-error {{must be initial

[clang] 424e0a8 - [ClangRepl] Add missing hashtag

2024-03-13 Thread via cfe-commits
Author: Jake Egan Date: 2024-03-13T09:57:31-04:00 New Revision: 424e0a825fe4d9e3bf98b63ef86edbc4fa5e3799 URL: https://github.com/llvm/llvm-project/commit/424e0a825fe4d9e3bf98b63ef86edbc4fa5e3799 DIFF: https://github.com/llvm/llvm-project/commit/424e0a825fe4d9e3bf98b63ef86edbc4fa5e3799.diff LOG

<    1   2   3   4   5   >