[clang] [C++20] [Modules] Fix the duplicated static initializer problem (PR #114193)

2024-10-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/114193 Reproducer: ``` //--- a.cppm export module a; int func(); static int a = func(); //--- a.cpp import a; ``` The `func()` should only execute once. However, before this patch we will somehow import `static i

[clang] [clang][analyzer] Model more wide-character versions of string functions (PR #113908)

2024-10-30 Thread Balazs Benics via cfe-commits
@@ -2524,8 +2625,33 @@ void CStringChecker::evalStdCopyCommon(CheckerContext &C, C.addTransition(State); } -void CStringChecker::evalMemset(CheckerContext &C, -const CallEvent &Call) const { +namespace { +CharUnits getSizeOfUnit(CharKind CK, C

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585, #111173)" (PR #111852)

2024-10-30 Thread via cfe-commits
asmok-g wrote: Any updates on this ? This is blocking us in google. When do we expect the fix to be submitted ? https://github.com/llvm/llvm-project/pull/111852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang] Update the lifetimebound example with up-to-date expected warning and change the sample code to be a fully working example (PR #113437)

2024-10-30 Thread Boaz Brickner via cfe-commits
@@ -3702,20 +3702,32 @@ user-declared functions. For example: .. code-block:: c++ +#include +#include + +using namespace std::literals; + // Returns m[key] if key is present, or default_value if not. template const U &get_or_default(const std::map

[clang] [C++20] [Modules] Fix the duplicated static initializer problem (PR #114193)

2024-10-30 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Given the problem is very serious and the solution is pretty simple, I'd like to backport this to 19.x. https://github.com/llvm/llvm-project/pull/114193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-30 Thread via cfe-commits
@@ -0,0 +1,165 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [C++20] [Modules] Fix the duplicated static initializer problem (PR #114193)

2024-10-30 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#114197 https://github.com/llvm/llvm-project/pull/114193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Initialize DeclaratorDecl.ExtInfo.TInfo to null (PR #114198)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Boaz Brickner (bricknerb) Changes I believe this has no effect current behavior but would make code safer in case we forget to initialize this. --- Full diff: https://github.com/llvm/llvm-project/pull/114198.diff 1 Files Affected: - (m

[clang] [Clang] Correctly initialize placeholder fields from their initializers (PR #114196)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes We made the incorrect assumption that names of fields are unique when creating their default initializers. We fix that by keeping track of the instantiaation pattern for field decls that are placeholder vars,

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-30 Thread via cfe-commits
@@ -0,0 +1,165 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [MS] Add /Zc:tlsGuards option to control tls guard emission (PR #113830)

2024-10-30 Thread Maurice Heumann via cfe-commits
momo5502 wrote: seems like nobody can review this. maybe you, @efriedma-quic, have time 😊 https://github.com/llvm/llvm-project/pull/113830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [C++20] [Modules] Fix the duplicated static initializer problem (PR #114193)

2024-10-30 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: /cherry-pick 259eaa6878ead1e2e7ef572a874dc3d885c1899b https://github.com/llvm/llvm-project/pull/114193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 259eaa6 - [C++20] [Modules] Fix the duplicated static initializer problem (#114193)

2024-10-30 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-10-30T17:27:04+08:00 New Revision: 259eaa6878ead1e2e7ef572a874dc3d885c1899b URL: https://github.com/llvm/llvm-project/commit/259eaa6878ead1e2e7ef572a874dc3d885c1899b DIFF: https://github.com/llvm/llvm-project/commit/259eaa6878ead1e2e7ef572a874dc3d885c1899b.diff LO

[clang] [C++20] [Modules] Fix the duplicated static initializer problem (PR #114193)

2024-10-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/114193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-30 Thread via cfe-commits
qt-tatiana wrote: Do you mean more templates and macros? There already were: // The code that triggers the check #define MAX_MACRO(a, b) (a < b) ? b : a template void TemplateFuncParameter(T val) { unsigned long uL = 0; if (val >= uL) return;

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-30 Thread via cfe-commits
https://github.com/qt-tatiana updated https://github.com/llvm/llvm-project/pull/113144 >From 34ee6f5836efe3acddbdd1c9810af358b8c4f981 Mon Sep 17 00:00:00 2001 From: Tatiana Borisova Date: Thu, 17 Oct 2024 18:00:08 +0200 Subject: [PATCH 1/5] [clang-tidy] Create a check for signed and unsigned i

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-30 Thread via cfe-commits
@@ -0,0 +1,165 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] Fix KCFI types for generated functions with integer normalization (PR #104826)

2024-10-30 Thread Alice Ryhl via cfe-commits
Darksonn wrote: This [has landed in 19.1.3](https://discourse.llvm.org/t/llvm-19-1-3-relased/82829). Thanks! https://github.com/llvm/llvm-project/pull/104826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang] Output an error when [[lifetimebound]] attribute is applied on a function implicit object parameter while the function returns void (PR #114203)

2024-10-30 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb created https://github.com/llvm/llvm-project/pull/114203 Fixes: https://github.com/llvm/llvm-project/issues/107556 >From 82d89b8b5d1e5faebefed57f3289eb43ad9f8d65 Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Wed, 30 Oct 2024 11:24:07 +0100 Subject: [PATCH 1/2]

[clang] [clang] Output an error when [[lifetimebound]] attribute is applied on a function implicit object parameter while the function returns void (PR #114203)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Boaz Brickner (bricknerb) Changes Fixes: https://github.com/llvm/llvm-project/issues/107556 --- Full diff: https://github.com/llvm/llvm-project/pull/114203.diff 4 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+2-2) - (modif

[clang] [Clang] Add __ugly__ spelling for the msvc attribute scope (PR #113765)

2024-10-30 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > The MSVC FE team hasn't expressed enthusiasm for adding ugly spellings. If > > I learn more I'll relay that info. > > Thank you for checking! Unfortunately, I think that's a reason for Clang to > not support it for the `msvc` vendor prefix either. What is the alternative

[clang] [Clang] Start moving X86Builtins.def to X86Builtins.td (PR #106005)

2024-10-30 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @AaronBallman @RKSimon does this look good to you? https://github.com/llvm/llvm-project/pull/106005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LoongArch] Support amcas[_db].{b/h/w/d} instructions. (PR #114189)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: None (tangaac) Changes Two options for clang: -mlamcas & -mno-lamcas. Enable or disable amcas[_db].{b/h} instructions. The default is -mno-lamcas. Only works on LoongArch64. --- Patch is 218.99 KiB, truncated to 20.00 KiB below, fu

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

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

[clang] [clang-format] Fix path expansion inside git-clang-format.bat (PR #114078)

2024-10-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-hwasan` running on `sanitizer-buildbot11` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/3186 Here is the rel

[clang] [Clang] Correctly initialize placeholder fields from their initializers (PR #114196)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: cor3ntin (cor3ntin) Changes We made the incorrect assumption that names of fields are unique when creating their default initializers. We fix that by keeping track of the instantiaation pattern for field decls that are placeholde

[clang] [Driver] Remove ignored Flag form of -fauto-profile/-fprofile-sample-use (PR #113528)

2024-10-30 Thread Mikołaj Piróg via cfe-commits
mikolaj-pirog wrote: > > Regarding the default filename extension, it doesn't have to be `.profdata` > > for `fprofile-sample-use`, it can be the `.afdo`, or any other extension > > deemed proper. `fprofile-sample-use` and `fprofile-use` would behave > > similarly then: they would look for a `

[clang] [Clang] Provide default value for -fprofile-sample-use, -fprofile-auto (PR #112750)

2024-10-30 Thread Mikołaj Piróg via cfe-commits
https://github.com/mikolaj-pirog updated https://github.com/llvm/llvm-project/pull/112750 From 06472c56a4a916dc2fd7b29a0c137597bbda0504 Mon Sep 17 00:00:00 2001 From: "Pirog, Mikolaj Maciej" Date: Thu, 17 Oct 2024 10:17:09 -0700 Subject: [PATCH 1/2] Provide default value for -fprofile-sample-us

[clang] [clang] Initialize DeclaratorDecl.ExtInfo.TInfo to null (PR #114198)

2024-10-30 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb created https://github.com/llvm/llvm-project/pull/114198 I believe this has no effect current behavior but would make code safer in case we forget to initialize this. >From 647406c00b1b60b23c3fd4314a1e5b4baeb9e574 Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date:

[clang] [clang-format] convert path to Windows path if user is using a MSYS2 shell (PR #111526)

2024-10-30 Thread Gary Wang via cfe-commits
BLumia wrote: > > Isn't this a Python/MSYS2 bug? > > I'm not sure if it should be considered as a MSYS2 bug. I also created a discussion thread, see: https://github.com/msys2/MSYS2-packages/discussions/4982 https://github.com/llvm/llvm-project/pull/111526

[clang] [C++20] [Modules] Fix the duplicated static initializer problem (PR #114193)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes Reproducer: ``` //--- a.cppm export module a; int func(); static int a = func(); //--- a.cpp import a; ``` The `func()` should only execute once. However, before this patch we will somehow import

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-30 Thread Oleksandr T. via cfe-commits
@@ -39,7 +39,8 @@ bool Sema::SetMemberAccessSpecifier(NamedDecl *MemberDecl, AccessSpecifier LexicalAS) { if (!PrevMemberDecl) { // Use the lexical access specifier. -MemberDecl->setAccess(LexicalAS); a-tarasyuk wro

[clang] [Driver] Remove ignored Flag form of -fauto-profile/-fprofile-sample-use (PR #113528)

2024-10-30 Thread Haohai Wen via cfe-commits
@@ -1729,8 +1729,6 @@ defm gnu_inline_asm : BoolFOption<"gnu-inline-asm", "Disable GNU style inline asm">, PosFlag>; -def fprofile_sample_use : Flag<["-"], "fprofile-sample-use">, Group, -Visibility<[ClangOption, CLOption]>; def fno_profile_sample_use : Flag<[

[clang] [clang-format] Fix path expansion inside git-clang-format.bat (PR #114078)

2024-10-30 Thread via cfe-commits
github-actions[bot] wrote: @MathiasMagnus 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

[clang] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-30 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks a lot, lgtm! LMK if i should commit this for you https://github.com/llvm/llvm-project/pull/113612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (PR #113796)

2024-10-30 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/113796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-30 Thread kadir çetinkaya via cfe-commits
@@ -115,15 +115,17 @@ static int initialize(Lang Language) { NSLen = 0; } -if (SymIndex >= 0 && -Mapping->SymbolNames[SymIndex].qualifiedName() == QName) { - // Not a new symbol, use the same index. +if (SymIndex > 0) { assert(llvm::none_o

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585, #111173)" (PR #111852)

2024-10-30 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @adam-smnk Should have the fix merged today https://github.com/llvm/llvm-project/pull/111852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-10-30 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm created https://github.com/llvm/llvm-project/pull/114209 Similar to arm_sve_vector_bits, the mangling of function types is implemented as a pseudo template if there are any SME attributes present, i.e. `__SME_ATTRS` For example, the following function:

[clang] [Clang] Fix crash with implicit int-to-pointer conversion (PR #114218)

2024-10-30 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard created https://github.com/llvm/llvm-project/pull/114218 If an integer is passed to the pointer argument of the __atomic_test_and_set or __atomic_clear builtins with the int-conversion error disabled or downgraded, we crashed in codegen due to assuming that the typ

[clang] [Clang] Fix crash in __builtin_assume_aligned (PR #114217)

2024-10-30 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard created https://github.com/llvm/llvm-project/pull/114217 The CodeGen for __builtin_assume_aligned assumes that the first argument is a pointer, so crashes if the int-conversion error is downgraded or disabled. Emit a non-downgradable error if the argument is not a

[clang] [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (PR #113796)

2024-10-30 Thread kadir çetinkaya via cfe-commits
@@ -411,6 +411,11 @@ SYMBOL(_27, std::placeholders::, ) SYMBOL(_28, std::placeholders::, ) SYMBOL(_29, std::placeholders::, ) +SYMBOL(binary_search, std::ranges::, ) kadircet wrote: can you move this next to https://github.com/llvm/llvm-project/blob/2de1fc82

[clang] [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (PR #113796)

2024-10-30 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, lgtm! let me know if i should land this for you https://github.com/llvm/llvm-project/pull/113796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [Clang] Fix crash with implicit int-to-pointer conversion (PR #114218)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Stannard (ostannard) Changes If an integer is passed to the pointer argument of the __atomic_test_and_set or __atomic_clear builtins with the int-conversion error disabled or downgraded, we crashed in codegen due to assuming that t

[clang] [llvm] [AArch64] Add soft-float ABI (PR #84146)

2024-10-30 Thread Oliver Stannard via cfe-commits
ostannard wrote: Those two regressions turned out to be an existing bug, which previously only triggered with `-Wno-int-conversion`. They should be fixed by #114217 and #114218. https://github.com/llvm/llvm-project/pull/84146 ___ cfe-commits mailing

[clang] [Clang] Fix crash in __builtin_assume_aligned (PR #114217)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Stannard (ostannard) Changes The CodeGen for __builtin_assume_aligned assumes that the first argument is a pointer, so crashes if the int-conversion error is downgraded or disabled. Emit a non-downgradable error if the argument is

[clang] [NFC] Delete unused clang-formatted-file.txt/ClangFormattedStatus.rst files (PR #109220)

2024-10-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you for the cleanup! https://github.com/llvm/llvm-project/pull/109220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang][Index][USR][NFC] Allow customizing langopts for USR generation (PR #109574)

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

[clang] Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (PR #114221)

2024-10-30 Thread via cfe-commits
https://github.com/chandraghale edited https://github.com/llvm/llvm-project/pull/114221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in fma function. (PR #113020)

2024-10-30 Thread via cfe-commits
@@ -549,6 +562,22 @@ static bool interp__builtin_fpclassify(InterpState &S, CodePtr OpPC, return true; } +static bool interp__builtin_fma(InterpState &S, CodePtr OpPC, +const InterpFrame *Frame, const Function *Func, +

[clang] [analyzer] EvalBinOpLL should return Unknown less often (PR #114222)

2024-10-30 Thread GĂĄbor HorvĂĄth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/114222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __ugly__ spelling for the msvc attribute scope (PR #113765)

2024-10-30 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > I'm personally sympathetic, and would be ok with something that we know MSVC > won't step on (`__clang_msvc__` would be fine to me). As far as the > `no_unique_address`, I THINK we already get the double-underscore spelling of > that, don't we? I don't think we exclude the

[clang] [clang] constexpr built-in fma function. (PR #113020)

2024-10-30 Thread via cfe-commits
@@ -549,6 +562,22 @@ static bool interp__builtin_fpclassify(InterpState &S, CodePtr OpPC, return true; } +static bool interp__builtin_fma(InterpState &S, CodePtr OpPC, +const InterpFrame *Frame, const Function *Func, +

[clang] [analyzer] EvalBinOpLL should return Unknown less often (PR #114222)

2024-10-30 Thread GĂĄbor HorvĂĄth via cfe-commits
https://github.com/Xazax-hun commented: Makes sense for me. It would be nice if we had a minimal reproducer for a regression test instead of maintaining a large-ish test. https://github.com/llvm/llvm-project/pull/114222 ___ cfe-commits mailing list cf

[clang] [Clang] Add __ugly__ spelling for the msvc attribute scope (PR #113765)

2024-10-30 Thread Erich Keane via cfe-commits
erichkeane wrote: > > > > > The MSVC FE team hasn't expressed enthusiasm for adding ugly > > > > > spellings. If I learn more I'll relay that info. > > > > > > > > > > > > Thank you for checking! Unfortunately, I think that's a reason for > > > > Clang to not support it for the `msvc` vendor

[clang] [analyzer] EvalBinOpLL should return Unknown less often (PR #114222)

2024-10-30 Thread GĂĄbor HorvĂĄth via cfe-commits
Xazax-hun wrote: > To me, simplifying a SymbolRef should never result in Unknown or Undef, > unless it was Unknown or Undef initially or, during simplification we > realized that it's a division by zero once we did the constant folding, etc. I understand that we might not be ready for this, bu

[clang] [AST] Bump Type::NumOfBuiltinTypeBits. NFCI. (PR #113559)

2024-10-30 Thread Jay Foad via cfe-commits
jayfoad wrote: > The community doesn't add new builtin types particularly often, so having > four leftover bits isn't actually that close to the limit for us. I guess "close" is subjective. > Is there a problem with keeping this change downstream until we get to the > limit in community? No,

[clang] [AST] Bump Type::NumOfBuiltinTypeBits. NFCI. (PR #113559)

2024-10-30 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/113559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __ugly__ spelling for the msvc attribute scope (PR #113765)

2024-10-30 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > > > The MSVC FE team hasn't expressed enthusiasm for adding ugly spellings. > > > > If I learn more I'll relay that info. > > > > > > > > > Thank you for checking! Unfortunately, I think that's a reason for Clang > > > to not support it for the `msvc` vendor prefix eithe

[clang] [AST] Bump Type::NumOfBuiltinTypeBits. NFCI. (PR #113559)

2024-10-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The community doesn't add new builtin types particularly often, so having four leftover bits isn't actually that close to the limit for us. Is there a problem with keeping this change downstream until we get to the limit in community? https://github.c

[clang] [compiler-rt] [llvm] Reland "[FMV] Remove useless features according the latest ACLE spec." (PR #89232)

2024-10-30 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/89232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Fix the duplicated static initializer problem (PR #114193)

2024-10-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 milestoned https://github.com/llvm/llvm-project/pull/114193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] EvalBinOpLL should return Unknown less often (PR #114222)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes SValBuilder::getKnownValue, getMinValue, getMaxValue use SValBuilder::simplifySVal. simplifySVal does repeated simplification until a fixed-point is reached. A single step is done by Sim

[clang] [analyzer] EvalBinOpLL should return Unknown less often (PR #114222)

2024-10-30 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/114222 SValBuilder::getKnownValue, getMinValue, getMaxValue use SValBuilder::simplifySVal. simplifySVal does repeated simplification until a fixed-point is reached. A single step is done by SimpleSValBuilder::simpli

[clang] [analyzer] EvalBinOpLL should return Unknown less often (PR #114222)

2024-10-30 Thread Balazs Benics via cfe-commits
steakhal wrote: @necto https://github.com/llvm/llvm-project/pull/114222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Index][USR][NFC] Allow customizing langopts for USR generation (PR #109574)

2024-10-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll Could you please help me reaching out to the right set of reviewers? Aaron noticed it faster 😄 https://github.com/llvm/llvm-project/pull/109574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [clang] constexpr built-in fma function. (PR #113020)

2024-10-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I suspect fma is not one of the functions we want to try to share, at least > not short-term. It's one of the core IEEE operations, LLVM has > APFloat::fusedMultiplyAdd since forever, and there's probably some weirdness > with dependencies if we try to share it because ot

[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-30 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: AaronBallman wrote: There's a valid precommit CI failure: ``` TEST 'Clang :: AST/ByteCode/builtin-bit-cast.cpp' FAILED Exit Code: 1 Command Output (stdout): -- # RUN: at line 1 c:\ws\src\build\bin\clang.

[clang] [Clang] Start moving X86Builtins.def to X86Builtins.td (PR #106005)

2024-10-30 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. https://github.com/llvm/llvm-project/pull/106005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __ugly__ spelling for the msvc attribute scope (PR #113765)

2024-10-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > > > The MSVC FE team hasn't expressed enthusiasm for adding ugly > > > > > spellings. If I learn more I'll relay that info. > > > > > > > > > > > > Thank you for checking! Unfortunately, I think that's a reason for > > > > Clang to not support it for the `msvc` vendo

[clang] 5082638 - [Clang] Start moving X86Builtins.def to X86Builtins.td (#106005)

2024-10-30 Thread via cfe-commits
Author: Nikolas Klauser Date: 2024-10-30T14:23:35+01:00 New Revision: 508263824f4ef0c70f37523810e5f7d56bcfa653 URL: https://github.com/llvm/llvm-project/commit/508263824f4ef0c70f37523810e5f7d56bcfa653 DIFF: https://github.com/llvm/llvm-project/commit/508263824f4ef0c70f37523810e5f7d56bcfa653.dif

[clang] [Clang] Start moving X86Builtins.def to X86Builtins.td (PR #106005)

2024-10-30 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/106005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-30 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/AaronBallman commented: This generally LGTM, but I'd like to see some tests for slightly more complicated situations, such as derived classes, classes with reference members, bitcasting a class with a

[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-30 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,399 @@ +// RUN: %clang_cc1 -verify=ref,both -std=c++2a -fsyntax-only %s +// RUN: %clang_cc1 -verify=ref,both -std=c++2a -fsyntax-only -triple aarch64_be-linux-gnu %s +// RUN: %clang_cc1 -verify

[clang] [analyzer] EvalBinOpLL should return Unknown less often (PR #114222)

2024-10-30 Thread Balazs Benics via cfe-commits
steakhal wrote: > Makes sense for me. It would be nice if we had a minimal reproducer for a > regression test instead of maintaining a large-ish test. I wish I could add a LIT test instead. Out of the get min/max val, or getKnownValue APIs, only the latter is used slightly more broadly, where

[clang] [clang][Index][USR][NFC] Allow customizing langopts for USR generation (PR #109574)

2024-10-30 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/109574 >From 643ad2cd6e788b6e62f22c980ed06abd192ded55 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sun, 22 Sep 2024 12:04:33 +0200 Subject: [PATCH] [clang][Index][USR][NFC] Allow customizing langopts for USR ge

[clang] [NFC] Delete unused clang-formatted-file.txt/ClangFormattedStatus.rst files (PR #109220)

2024-10-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/109220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Ignore previous partial specializations of member class templates explicitly specialized for a implicitly instantiated class template specialization (PR #113464)

2024-10-30 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/113464 >From 7542bda555601ed537dd9bacde65537021cf402d Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 23 Oct 2024 10:28:23 -0400 Subject: [PATCH 1/5] [Clang][Sema] Ignore previous partial specializatio

[clang] [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (PR #113796)

2024-10-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/9362 Here is the relevant piece of the build log

[clang] [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (PR #113796)

2024-10-30 Thread via cfe-commits
https://github.com/c8ef closed https://github.com/llvm/llvm-project/pull/113796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 68daf7d - [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (#113796)

2024-10-30 Thread via cfe-commits
Author: c8ef Date: 2024-10-30T22:04:14+08:00 New Revision: 68daf7d27ecc085fe7347552736197db6453f71c URL: https://github.com/llvm/llvm-project/commit/68daf7d27ecc085fe7347552736197db6453f71c DIFF: https://github.com/llvm/llvm-project/commit/68daf7d27ecc085fe7347552736197db6453f71c.diff LOG: [To

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-30 Thread via cfe-commits
@@ -0,0 +1,68 @@ +.. title:: clang-tidy - qt-integer-sign-comparison + +qt-integer-sign-comparison += + +The qt-integer-sign-comparison check is an alias, please see +:doc:`modernize-use-integer-sign-comparison <../modernize/use-integer-sign-comparison

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-30 Thread via cfe-commits
@@ -0,0 +1,68 @@ +.. title:: clang-tidy - qt-integer-sign-comparison + +qt-integer-sign-comparison += + +The qt-integer-sign-comparison check is an alias, please see +:doc:`modernize-use-integer-sign-comparison <../modernize/use-integer-sign-comparison

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb edited https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb edited https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb edited https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb edited https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { bricknerb wrote: Yes, I think the current state is pretty b

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-30 Thread Tom Honermann via cfe-commits
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute facilitates the generation of a

[clang] [NFC} Call base class method in DarwinAArch64TargetInfo::getOSDefines (PR #114241)

2024-10-30 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/114241 >From 98fe1611486549221a1475188d6d19a2d2cc9d12 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Wed, 30 Oct 2024 07:36:31 -0700 Subject: [PATCH] [NFC] Call base class method in DarwinAArch64TargetInfo::getO

[clang] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-30 Thread Vadim D. via cfe-commits
vvd170501 wrote: > thanks a lot, lgtm! > > LMK if i should commit this for you Yes, commit it please, I don't have the permissions. https://github.com/llvm/llvm-project/pull/113612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

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

2024-10-30 Thread Matt Arsenault via cfe-commits
@@ -722,6 +722,38 @@ static Value *emitFrexpBuiltin(CodeGenFunction &CGF, const CallExpr *E, return CGF.Builder.CreateExtractValue(Call, 0); } +static void emitSincosBuiltin(CodeGenFunction &CGF, const CallExpr *E, + llvm::Intrinsic::ID Intrinsi

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

2024-10-30 Thread Matt Arsenault via cfe-commits
@@ -722,6 +722,36 @@ static Value *emitFrexpBuiltin(CodeGenFunction &CGF, const CallExpr *E, return CGF.Builder.CreateExtractValue(Call, 0); } +static void emitSincosBuiltin(CodeGenFunction &CGF, const CallExpr *E, + llvm::Intrinsic::ID Intrinsi

[clang] Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (PR #114221)

2024-10-30 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-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
@@ -477,6 +486,109 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { +public: + static std::unique_ptr + create(const llvm::MemoryBuffer &MB, st

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-30 Thread via cfe-commits
https://github.com/qt-tatiana updated https://github.com/llvm/llvm-project/pull/113144 >From 34ee6f5836efe3acddbdd1c9810af358b8c4f981 Mon Sep 17 00:00:00 2001 From: Tatiana Borisova Date: Thu, 17 Oct 2024 18:00:08 +0200 Subject: [PATCH 1/6] [clang-tidy] Create a check for signed and unsigned i

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
@@ -477,6 +486,109 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { +public: + static std::unique_ptr + create(const llvm::MemoryBuffer &MB, st

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
@@ -477,6 +486,109 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { +public: + static std::unique_ptr + create(const llvm::MemoryBuffer &MB, st

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

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

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-30 Thread Erich Keane via cfe-commits
@@ -14296,6 +14296,31 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, + CanQualType KernelNameType, +

  1   2   3   4   5   6   >