[clang-tools-extra] [clangd] Add tweak to inline concept requirements (PR #69693)

2023-10-20 Thread via cfe-commits
@@ -0,0 +1,262 @@ +//===--- InlineConceptRequirement.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] Add tweak to inline concept requirements (PR #69693)

2023-10-20 Thread via cfe-commits
@@ -0,0 +1,262 @@ +//===--- InlineConceptRequirement.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] Add tweak to inline concept requirements (PR #69693)

2023-10-20 Thread via cfe-commits
@@ -0,0 +1,262 @@ +//===--- InlineConceptRequirement.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] Add tweak to inline concept requirements (PR #69693)

2023-10-20 Thread via cfe-commits
https://github.com/5chmidti commented: Please add a note under `Code actions` to the ReleaseNotes (clang-tools-extra/docs/ReleaseNotes.rst) about your change. Looks like a good tweak to have, looking forward to it https://github.com/llvm/llvm-project/pull/69693

[clang] 47747da - [clang] Handle templated operators with reversed arguments (#69595)

2023-10-20 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2023-10-20T14:40:25+02:00 New Revision: 47747da6340b00e301d3656f95ecf9b04a6ec2bb URL: https://github.com/llvm/llvm-project/commit/47747da6340b00e301d3656f95ecf9b04a6ec2bb DIFF: https://github.com/llvm/llvm-project/commit/47747da6340b00e301d3656f95ecf9b04a6ec2bb.diff

[clang] [clang] Handle templated operators with reversed arguments (PR #69595)

2023-10-20 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/69595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement builintin_expect (PR #69713)

2023-10-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69713 >From e369a59fca52901e255baa02458d6e53e5162d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 20 Oct 2023 14:16:22 +0200 Subject: [PATCH] [clang][Interp] Implement builintin_expect ---

[clang] [clang][Interp] Implement builintin_expect (PR #69713)

2023-10-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69713 >From 4d3e51337cb20c597f5cf7f8772d9a4d128eaf65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 20 Oct 2023 14:16:22 +0200 Subject: [PATCH] [clang][Interp] Implement builtin_expect --- c

[clang] [clang][Interp] Implement builtin_expect (PR #69713)

2023-10-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/69713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][InstrProf] Allow absolute path in fun.list of -fprofile-list= (PR #67519)

2023-10-20 Thread Henrik G. Olsson via cfe-commits
@@ -139,9 +139,23 @@ std::optional ProfileList::isFileExcluded(StringRef FileName, CodeGenOptions::ProfileInstrKind Kind) const { StringRef Section = getSectionName(Kind); - // Check for "source:=" + + // Convert the input file path to its canoni

[clang] [clang-scan-deps] [P1689] Keep consistent behavior for make dependencies with clang (PR #69551)

2023-10-20 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Is the issue with MDC's FileDeps that we are calling > `makeAbsoluteAndPreferred` on the paths? Maybe we could instead move that > call into `FullDependencyConsumer`. Or are there other issues? > > The fact we need to add additional `MDC.IsStdModuleP1689Format` checks in >

[clang] [clang][Diagnostics] Provide source range to constexpr function diags (PR #69721)

2023-10-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69721 Before: ```console ./array.cpp:290:16: error: constexpr function never produces a constant expression [-Winvalid-constexpr] 290 | constexpr void neverValid() { |^ ./array.cpp:291:3: note:

[clang] [clang][Diagnostics] Provide source range to constexpr function diags (PR #69721)

2023-10-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Before: ```console ./array.cpp:290:16: error: constexpr function never produces a constant expression [-Winvalid-constexpr] 290 | constexpr void neverValid() { |^ ./array.cpp:291:3: no

[clang-tools-extra] [clangd] Add tweak to inline concept requirements (PR #69693)

2023-10-20 Thread via cfe-commits
https://github.com/Venyla updated https://github.com/llvm/llvm-project/pull/69693 >From e2bb36994e919fd3a6e559d5ad3ba738d00f299f Mon Sep 17 00:00:00 2001 From: Vina Zahnd Date: Fri, 20 Oct 2023 10:01:54 +0200 Subject: [PATCH] [clangd] Add tweak to inline concept requirements Co-authored-by: Je

[clang] [clang] Add information about lld presence in RISCVToolchain. (PR #68904)

2023-10-20 Thread Bushev Dmitry via cfe-commits
dybv-sc wrote: @MaskRay, could you please look into this? https://github.com/llvm/llvm-project/pull/68904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] update list of fast tidy checks (PR #69723)

2023-10-20 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall created https://github.com/llvm/llvm-project/pull/69723 new fast checks: bugprone-compare-pointer-to-member-variable bugprone-empty-catch bugprone-inc-dec-in-conditions bugprone-incorrect-enable-if bugprone-multi-level-implicit-pointer-conversion bugpron

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-20 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > While I think that warning is accurate, I somewhat question the value of > > the 'bool' as working on this type > > I'm not sure what you mean by "working" here, but I'd like to highlight that > we have hundreds of single-bit bit-fields across Clang that would benefit

[clang-tools-extra] [clangd] update list of fast tidy checks (PR #69723)

2023-10-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Sam McCall (sam-mccall) Changes new fast checks: bugprone-compare-pointer-to-member-variable bugprone-empty-catch bugprone-inc-dec-in-conditions bugprone-incorrect-enable-if bugprone-multi-level-implicit-pointer-conversion bugp

[clang] [clang][ASTImporter] Fix import of SubstTemplateTypeParmType in return type of function. (PR #69724)

2023-10-20 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/69724 Import of a function with `auto` return type that is expanded to a `SubstTemplateTypeParmType` could fail if the function itself is the template specialization where the parameter was replaced. From 2bfad6f0fb

[clang] [clang][ASTImporter] Fix import of SubstTemplateTypeParmType in return type of function. (PR #69724)

2023-10-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes Import of a function with `auto` return type that is expanded to a `SubstTemplateTypeParmType` could fail if the function itself is the template specialization where the parameter was replaced. --- Full dif

[clang] [Clang][SME2] Add multi-vector add/sub builtins (PR #69725)

2023-10-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kerry McLaughlin (kmclaughlin-arm) Changes Adds the following SME2 builtins: - sv(add|sub) - sv(add|sub)_za32/za64, - sv(add|sub)_write_za32/za64 Other changes in this patch: - CGBuiltin.cpp: The GetAArch64SMEProcessedOperands

[clang-tools-extra] [clangd] update list of fast tidy checks (PR #69723)

2023-10-20 Thread Sam McCall via cfe-commits
sam-mccall wrote: (this diff isn't great news for the idea of treating new checks as slow by default :-() https://github.com/llvm/llvm-project/pull/69723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [Clang][SME2] Add multi-vector add/sub builtins (PR #69725)

2023-10-20 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 2ec7bba77bf573e2fb134c3f6ed10a8fcdde6fe7 93d7bac47d3a975ca93ded907a5ce5ee53f1a8ff --

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-10-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. LGTM since this is exactly what we do in the downstream. The effects of the change in our workloads is 4% size reduction in a coroutine intensive project. (But it requires the coroutine's final suspend can't except via symetric transfer. I was meant to send a paper to

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-10-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. LGTM since this is exactly what we do in the downstream. The effects of the change in our workloads is 4% size reduction in a coroutine intensive project. (But it requires the coroutine's final suspend can't except via symetric transfer. I was meant to send a paper to

[PATCH] D156565: Diagnose use of VLAs in C++ by default

2023-10-20 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7339c0f782d5: Diagnose use of VLAs in C++ by default (authored by aaron.ballman). Changed prior to commit: https://reviews.llvm.org/D156565?vs=557

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-20 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69431 >From 076f2ea9de7d0f979431363b5426931239c7c494 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 18 Oct 2023 15:58:03 +0800 Subject: [PATCH] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsi

[clang] [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 modules (PR #69431)

2023-10-20 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > I still support disabling delayed template parsing by default in all > > > configurations. Ultimately, this feature is a source of bugs, and we > > > should start the clock on its deprecation and removal. This, of course, > > > involves real work, and I haven't allocate

[clang] Reland "[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes" (PR #69676)

2023-10-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/69676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [PowerPC] Fix use of FPSCR builtins in smmintrin.h (PR #67299)

2023-10-20 Thread Stefan Pintilie via cfe-commits
stefanp-ibm wrote: > I personally prefer this solution. @stefanp-ibm What do you think? > > LGTM I understand your point about forcing users to just use `mffs` when `mffsl` is not available. If that's the case do we also want to change this: ``` #ifdef _ARCH_PWR9 __fpscr_save.__fr = __buil

[clang] [PowerPC] Fix use of FPSCR builtins in smmintrin.h (PR #67299)

2023-10-20 Thread Stefan Pintilie via cfe-commits
stefanp-ibm wrote: > I personally prefer this solution. @stefanp-ibm What do you think? > > LGTM I understand your point about forcing users to just use `mffs` when `mffsl` is not available. If that's the case do we also want to change this: ``` #ifdef _ARCH_PWR9 __fpscr_save.__fr = __buil

[clang-tools-extra] [PowerPC] Fix use of FPSCR builtins in smmintrin.h (PR #67299)

2023-10-20 Thread Stefan Pintilie via cfe-commits
https://github.com/stefanp-ibm edited https://github.com/llvm/llvm-project/pull/67299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [PowerPC] Fix use of FPSCR builtins in smmintrin.h (PR #67299)

2023-10-20 Thread Stefan Pintilie via cfe-commits
@@ -68,10 +68,10 @@ extern __inline __m128d __asm__("mffsce %0" : "=f"(__fpscr_save.__fr)); __enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8; #else -__fpscr_save.__fr = __builtin_mffs(); +__fpscr_save.__fr = __builtin_ppc_mffs(); stefanp-ibm

[clang] [PowerPC] Fix use of FPSCR builtins in smmintrin.h (PR #67299)

2023-10-20 Thread Stefan Pintilie via cfe-commits
https://github.com/stefanp-ibm commented: With respect to the comment from Nemanja I'm okay with this not being 100% the same as GCC. I'm sure we will get questions in the future but really we should discourage the use of `__builtin_mffsl` on pre-Power 9. https://github.com/llvm/llvm-project/

[clang] [PowerPC] Fix use of FPSCR builtins in smmintrin.h (PR #67299)

2023-10-20 Thread Stefan Pintilie via cfe-commits
https://github.com/stefanp-ibm edited https://github.com/llvm/llvm-project/pull/67299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [PowerPC] Fix use of FPSCR builtins in smmintrin.h (PR #67299)

2023-10-20 Thread Stefan Pintilie via cfe-commits
https://github.com/stefanp-ibm commented: With respect to the comment from Nemanja I'm okay with this not being 100% the same as GCC. I'm sure we will get questions in the future but really we should discourage the use of `__builtin_mffsl` on pre-Power 9. https://github.com/llvm/llvm-project/

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-20 Thread Erich Keane via cfe-commits
erichkeane wrote: >As I mentioned in >https://github.com/llvm/llvm-project/pull/69104#discussion_r1365269451, I'm >not putting any restrictions on type parameter of the attribute, which makes >even more sense for more generic preferred_type. >But I'm confused by the fact you are raising this

[clang] [clang] Fix designated initializers inside templates (PR #69712)

2023-10-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/69712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 9a5c6f1 - [clang-tidy]Add new check bugprone-casting-through-void (#69465)

2023-10-20 Thread via cfe-commits
Author: Congcong Cai Date: 2023-10-20T09:29:06-05:00 New Revision: 9a5c6f1760a353fdb4b61ec4ed5b28f4638cc77b URL: https://github.com/llvm/llvm-project/commit/9a5c6f1760a353fdb4b61ec4ed5b28f4638cc77b DIFF: https://github.com/llvm/llvm-project/commit/9a5c6f1760a353fdb4b61ec4ed5b28f4638cc77b.diff

[clang] [clang][Analyzer] Move checker 'alpha.unix.Errno' to 'unix.Errno'. (PR #69469)

2023-10-20 Thread Balázs Kéri via cfe-commits
@@ -934,6 +934,76 @@ Check calls to various UNIX/Posix functions: ``open, pthread_once, calloc, mallo .. literalinclude:: checkers/unix_api_example.c :language: c +.. _unix-Errno: + +unix.Errno (C) +"" + +Check for improper use of ``errno``. +This checker impl

[clang] [analyzer][NFC] Simplifications in ArrayBoundV2 (PR #67572)

2023-10-20 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/DonatNagyE updated https://github.com/llvm/llvm-project/pull/67572 >From 7bd280e2da3f2ee8fe5fd7086a4704331f21b435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?=

[clang] [analyzer][NFC] Simplifications in ArrayBoundV2 (PR #67572)

2023-10-20 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -32,42 +32,72 @@ using namespace taint; namespace { class ArrayBoundCheckerV2 : public Checker { - mutable std::unique_ptr BT; - mutable std::unique_ptr TaintBT; + Bug

[clang-tools-extra] [clangd] update list of fast tidy checks (PR #69723)

2023-10-20 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. > (this diff isn't great news for the idea of treating new checks as slow by > default :-() Well, FWIW, i think that was the trade-off we made. Most of the checks are fast, but when a slow one sneaks in, it's really hard to notice. So by

[clang] [analyzer][NFC] Simplifications in ArrayBoundV2 (PR #67572)

2023-10-20 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -32,42 +32,72 @@ using namespace taint; namespace { class ArrayBoundCheckerV2 : public Checker { - mutable std::unique_ptr BT; - mutable std::unique_ptr TaintBT; + Bug

[clang] [analyzer][NFC] Simplifications in ArrayBoundV2 (PR #67572)

2023-10-20 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/DonatNagyE updated https://github.com/llvm/llvm-project/pull/67572 >From 7bd280e2da3f2ee8fe5fd7086a4704331f21b435 Mon Sep 17 00:00:00 2001 From: =?UTF-

[clang] [analyzer][NFC] Simplifications in ArrayBoundV2 (PR #67572)

2023-10-20 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: DonatNagyE wrote: I'll merge this change soon, when I'll start to work on the followup commit (unless there is additional feedback until then). Thanks for the reviews! h

[clang] [Clang][SME2] Add multi-vector add/sub builtins (PR #69725)

2023-10-20 Thread David Sherwood via cfe-commits
https://github.com/david-arm edited https://github.com/llvm/llvm-project/pull/69725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][SME2] Add multi-vector add/sub builtins (PR #69725)

2023-10-20 Thread David Sherwood via cfe-commits
@@ -9893,24 +9888,37 @@ Value *CodeGenFunction::FormSVEBuiltinResult(Value *Call) { return Call; } -Value *CodeGenFunction::EmitAArch64SVEBuiltinExpr(unsigned BuiltinID, - const CallExpr *E) { +void CodeGenFunction::GetAArch6

[clang] [Clang][SME2] Add multi-vector add/sub builtins (PR #69725)

2023-10-20 Thread David Sherwood via cfe-commits
@@ -1016,29 +1021,24 @@ std::string Intrinsic::mangleName(ClassKind LocalCK) const { getMergeSuffix(); } -void Intrinsic::emitIntrinsic(raw_ostream &OS, SVEEmitter &Emitter) const { +void Intrinsic::emitIntrinsic(raw_ostream &OS, ACLEKind Kind) const { bool IsOver

[clang] [Clang][SME2] Add multi-vector add/sub builtins (PR #69725)

2023-10-20 Thread David Sherwood via cfe-commits
https://github.com/david-arm commented: I've not done an exhaustive review, but thought I'd leave the comments I have so far! https://github.com/llvm/llvm-project/pull/69725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [Clang][SME2] Add multi-vector add/sub builtins (PR #69725)

2023-10-20 Thread David Sherwood via cfe-commits
@@ -10272,29 +10291,13 @@ Value *CodeGenFunction::EmitAArch64SMEBuiltinExpr(unsigned BuiltinID, getContext().GetBuiltinType(BuiltinID, Error, &ICEArguments); david-arm wrote: Do we still need this code given we're now checking the ICE arguments in GetAArch64

[clang] [Clang][SME2] Add multi-vector add/sub builtins (PR #69725)

2023-10-20 Thread David Sherwood via cfe-commits
@@ -9893,24 +9888,37 @@ Value *CodeGenFunction::FormSVEBuiltinResult(Value *Call) { return Call; } -Value *CodeGenFunction::EmitAArch64SVEBuiltinExpr(unsigned BuiltinID, - const CallExpr *E) { +void CodeGenFunction::GetAArch6

[clang] [Clang][SME2] Add multi-vector add/sub builtins (PR #69725)

2023-10-20 Thread David Sherwood via cfe-commits
@@ -9893,24 +9888,37 @@ Value *CodeGenFunction::FormSVEBuiltinResult(Value *Call) { return Call; } -Value *CodeGenFunction::EmitAArch64SVEBuiltinExpr(unsigned BuiltinID, - const CallExpr *E) { +void CodeGenFunction::GetAArch6

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-10-20 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 created https://github.com/llvm/llvm-project/pull/69734 Both active C++ proposals (P1144 and P2786) agree that `is_trivially_relocatable_v` and `is_trivially_relocatable_v` should be false, not true. Only complete object types can be trivially relocatable. Fixes #67

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-10-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amirreza Ashouri (AMP999) Changes Both active C++ proposals (P1144 and P2786) agree that `is_trivially_relocatable_v` and `is_trivially_relocatable_v` should be false, not true. Only complete object types can be trivially re

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-20 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,202 @@ +//===--- APINotesReader.h - API Notes Reader *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-20 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,202 @@ +//===--- APINotesReader.h - API Notes Reader *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [APINotes] Upstream APINotesReader (PR #66769)

2023-10-20 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,2001 @@ +//===--- APINotesReader.cpp - API Notes Reader --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[PATCH] D157252: [clang][ExprConst] Handle 0 type size in builtin_memcpy etc.

2023-10-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Sema/builtin-memcpy.c:4-8 +int b() { + struct { } a[10]; + __builtin_memcpy(&a[2], a, 2); // expected-warning {{buffer has size 0, but size argument is 2}} + return 0; +} The only other test I'd

[clang] Support VFE in thinLTO (PR #69735)

2023-10-20 Thread Manman Ren via cfe-commits
https://github.com/manman-ren created https://github.com/llvm/llvm-project/pull/69735 We add a run of GlobalDCEPass with ImportSummary. When ImportSummary is true, we remove virtual functions in vtables with VCallVisibility not Public. In this run, the regular GlobalDCEPass::AddVirtualFunction

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/69104 >From 976aa5c8f3d936a15e7123069a49d97ad3bf7a05 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 15 Oct 2023 13:14:55 +0300 Subject: [PATCH 1/9] [clang] Add clang::debug_info_type attribute --- clang

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-20 Thread Vlad Serebrennikov via cfe-commits
@@ -5910,6 +5910,51 @@ static void handleBuiltinAliasAttr(Sema &S, Decl *D, D->addAttr(::new (S.Context) BuiltinAliasAttr(S.Context, AL, Ident)); } +static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + if (!AL.hasParsedType()) { +S.Diag(AL.get

[clang] [libclang/python] Add missing concept declaration CursorKind (PR #69125)

2023-10-20 Thread Nick Renieris via cfe-commits
https://github.com/VelocityRa edited https://github.com/llvm/llvm-project/pull/69125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add missing concept declaration CursorKind (PR #69125)

2023-10-20 Thread Nick Renieris via cfe-commits
https://github.com/VelocityRa edited https://github.com/llvm/llvm-project/pull/69125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cb62f67 - Revert "[Intrinsics][ObjC] Mark objc_retain and friends as thisreturn."

2023-10-20 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2023-10-20T09:22:12-07:00 New Revision: cb62f67088aaf79493350547f74870318b71acc5 URL: https://github.com/llvm/llvm-project/commit/cb62f67088aaf79493350547f74870318b71acc5 DIFF: https://github.com/llvm/llvm-project/commit/cb62f67088aaf79493350547f74870318b71acc5.diff L

[clang] 1afb313 - [clang][modules] Use file name as requested (#68957)

2023-10-20 Thread via cfe-commits
Author: Jan Svoboda Date: 2023-10-20T09:23:19-07:00 New Revision: 1afb313b26851bdb050061f6d786c83ec1f569a3 URL: https://github.com/llvm/llvm-project/commit/1afb313b26851bdb050061f6d786c83ec1f569a3 DIFF: https://github.com/llvm/llvm-project/commit/1afb313b26851bdb050061f6d786c83ec1f569a3.diff L

[clang] [clang][modules] Use file name as requested (PR #68957)

2023-10-20 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/68957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Support CSRs in clobbered registers of inline assembly (PR #67646)

2023-10-20 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/67646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Robustify open mp test (PR #69739)

2023-10-20 Thread Nathan Sidwell via cfe-commits
https://github.com/urnathan created https://github.com/llvm/llvm-project/pull/69739 If the source path contains 'alias' this would spuriously fail. Be more specific about not wanting [no]alias annotations. >From bb391aa466577f4187af6b284ee5107090778a03 Mon Sep 17 00:00:00 2001 From: Nathan Si

[clang] [llvm] Use XMACROS for MachO platforms. (PR #69262)

2023-10-20 Thread Juergen Ributzka via cfe-commits
ributzka wrote: Thanks for the reviews. Checks are good now too after rebase. https://github.com/llvm/llvm-project/pull/69262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bde2e69 - [llvm] Use XMACROS for MachO platforms. (#69262)

2023-10-20 Thread via cfe-commits
Author: Juergen Ributzka Date: 2023-10-20T09:37:39-07:00 New Revision: bde2e6981e7848658e91c7282abf387643054b6a URL: https://github.com/llvm/llvm-project/commit/bde2e6981e7848658e91c7282abf387643054b6a DIFF: https://github.com/llvm/llvm-project/commit/bde2e6981e7848658e91c7282abf387643054b6a.di

[clang] [llvm] Use XMACROS for MachO platforms. (PR #69262)

2023-10-20 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka closed https://github.com/llvm/llvm-project/pull/69262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > However, will this actually work in practice in the debugger? If not, perhaps > we should limit to just integer and enumeration types for now, leaving the > extension for the future. I composed an example of that: ```cpp struct A { short a1; short a2; }; struct B { [[cl

[clang] f2801a5 - [Clang][OpenMP] Check if value is contained in array, not if it's contained in the first element (#69462)

2023-10-20 Thread via cfe-commits
Author: Juan Manuel Martinez Caamaño Date: 2023-10-20T18:51:22+02:00 New Revision: f2801a5f5d4d8d6da758a35487ee3ca6a48732c5 URL: https://github.com/llvm/llvm-project/commit/f2801a5f5d4d8d6da758a35487ee3ca6a48732c5 DIFF: https://github.com/llvm/llvm-project/commit/f2801a5f5d4d8d6da758a35487ee3ca

[clang] [Clang][OpenMP] Check if value is contained in array, not if it's contained in the first element (PR #69462)

2023-10-20 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez closed https://github.com/llvm/llvm-project/pull/69462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b081da5 - clang-linker-wrapper/LinkerWrapperOpts.td: "--sysroot" => "--sysroot=" (#65313)

2023-10-20 Thread via cfe-commits
Author: conversy Date: 2023-10-20T22:31:58+05:30 New Revision: b081da5fab053df99e10656cb28bac5520bc0bec URL: https://github.com/llvm/llvm-project/commit/b081da5fab053df99e10656cb28bac5520bc0bec DIFF: https://github.com/llvm/llvm-project/commit/b081da5fab053df99e10656cb28bac5520bc0bec.diff LOG:

[clang] clang-linker-wrapper/LinkerWrapperOpts.td: "--sysroot" => "--sysroot=" (PR #65313)

2023-10-20 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta closed https://github.com/llvm/llvm-project/pull/65313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update stdckdint.h and make it available in pre-C23 modes. (PR #69649)

2023-10-20 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/69649 >From 0c57e45f6ee16e43cc6388b1ca6beb88bbc7b925 Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 19 Oct 2023 22:23:03 + Subject: [PATCH 1/3] Update stdckdint.h and make it available in pre-C23 modes.

[clang-tools-extra] Update stdckdint.h and make it available in pre-C23 modes. (PR #69649)

2023-10-20 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/69649 >From 0c57e45f6ee16e43cc6388b1ca6beb88bbc7b925 Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 19 Oct 2023 22:23:03 + Subject: [PATCH 1/3] Update stdckdint.h and make it available in pre-C23 modes.

[clang] Workaround for MSVC ARM64 build performance regression (PR #65215)

2023-10-20 Thread Shivam Gupta via cfe-commits
xgupta wrote: @tru Is it fine to commit this? https://github.com/llvm/llvm-project/pull/65215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Workaround for MSVC ARM64 build performance regression (PR #65215)

2023-10-20 Thread Tobias Hieta via cfe-commits
tru wrote: Yep. Want me to do it or do you have access now? https://github.com/llvm/llvm-project/pull/65215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Workaround for MSVC ARM64 build performance regression (PR #65215)

2023-10-20 Thread Shivam Gupta via cfe-commits
xgupta wrote: I have the access. https://github.com/llvm/llvm-project/pull/65215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c6f0f88 - Workaround for MSVC ARM64 build performance regression (#65215)

2023-10-20 Thread via cfe-commits
Author: Alexander Smarus Date: 2023-10-20T22:47:12+05:30 New Revision: c6f0f8810db5ce4de4bd326950b644e846a1497e URL: https://github.com/llvm/llvm-project/commit/c6f0f8810db5ce4de4bd326950b644e846a1497e DIFF: https://github.com/llvm/llvm-project/commit/c6f0f8810db5ce4de4bd326950b644e846a1497e.di

[clang] Workaround for MSVC ARM64 build performance regression (PR #65215)

2023-10-20 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta closed https://github.com/llvm/llvm-project/pull/65215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-20 Thread via cfe-commits
https://github.com/EricWF edited https://github.com/llvm/llvm-project/pull/69498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-20 Thread via cfe-commits
@@ -38,39 +44,53 @@ static void* operator_new_impl(std::size_t size) noexcept { _LIBCPP_WEAK void* operator new(std::size_t size) _THROW_BAD_ALLOC { void* p = operator_new_impl(size); -# ifndef _LIBCPP_HAS_NO_EXCEPTIONS if (p == nullptr) -throw std::bad_alloc(); -#

[clang] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-20 Thread via cfe-commits
@@ -38,39 +44,53 @@ static void* operator_new_impl(std::size_t size) noexcept { _LIBCPP_WEAK void* operator new(std::size_t size) _THROW_BAD_ALLOC { void* p = operator_new_impl(size); -# ifndef _LIBCPP_HAS_NO_EXCEPTIONS if (p == nullptr) -throw std::bad_alloc(); -#

[clang] 7aa89ee - Remove accidental merge conflict marker; NFC

2023-10-20 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-10-20T13:28:18-04:00 New Revision: 7aa89ee8be7250d05e4bdc7ea022589cd0f14ecf URL: https://github.com/llvm/llvm-project/commit/7aa89ee8be7250d05e4bdc7ea022589cd0f14ecf DIFF: https://github.com/llvm/llvm-project/commit/7aa89ee8be7250d05e4bdc7ea022589cd0f14ecf.diff

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-20 Thread David Blaikie via cfe-commits
dwblaikie wrote: > ```c++ > struct A { > short a1; > short a2; > }; > > struct B { > [[clang::preferred_type(A)]] unsigned b1 : 32 = 0x000F'000C; > }; > > int main() > { > B b; > return b.b1; > } > ``` An example where the layout doesn't match the normal struct layout might be m

[clang] Support VFE in thinLTO (PR #69735)

2023-10-20 Thread Manman Ren via cfe-commits
https://github.com/manman-ren updated https://github.com/llvm/llvm-project/pull/69735 >From 1adce63e663203f858de86cfa231527ee2284505 Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Thu, 5 Oct 2023 10:56:53 -0700 Subject: [PATCH] Support VFE in thinLTO We add a run of GlobalDCEPass with ImportS

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-10-20 Thread Jerin Philip via cfe-commits
@@ -186,14 +186,14 @@ class AttributeCommonInfo { bool isGNUScope() const; bool isClangScope() const; - bool isCXX11Attribute() const { return SyntaxUsed == AS_CXX11 || IsAlignas; } - + bool isAlignas() const { return IsAlignas; } + bool isCXX11Attribute() const { retur

[clang] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-20 Thread Louis Dionne via cfe-commits
@@ -7,6 +7,8 @@ //===--===// #include <__memory/aligned_alloc.h> +#include <__overridable_function> ldionne wrote: So this file needs to be shared between libc++abi and libc++, unfortunately

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-20 Thread Louis Dionne via cfe-commits
@@ -7,6 +7,8 @@ //===--===// #include <__memory/aligned_alloc.h> +#include <__overridable_function> ldionne wrote: So this file needs to be shared between libc++abi and libc++, unfortunately

[clang] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-20 Thread Louis Dionne via cfe-commits
@@ -38,39 +44,53 @@ static void* operator_new_impl(std::size_t size) noexcept { _LIBCPP_WEAK void* operator new(std::size_t size) _THROW_BAD_ALLOC { void* p = operator_new_impl(size); -# ifndef _LIBCPP_HAS_NO_EXCEPTIONS if (p == nullptr) -throw std::bad_alloc(); -#

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-20 Thread Louis Dionne via cfe-commits
@@ -38,39 +44,53 @@ static void* operator_new_impl(std::size_t size) noexcept { _LIBCPP_WEAK void* operator new(std::size_t size) _THROW_BAD_ALLOC { void* p = operator_new_impl(size); -# ifndef _LIBCPP_HAS_NO_EXCEPTIONS if (p == nullptr) -throw std::bad_alloc(); -#

[clang] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-20 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/69498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-20 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > I wonder if we should treat one-bit bit-fields as if they were bool > > automatically (e.g., create this attribute implicitly in that case). How > > often do we expect to see one-bit bit-fields that are arithmetic? I'm sure > > it happens (to multiply against -1, 0, or

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-10-20 Thread Jerin Philip via cfe-commits
https://github.com/jerinphilip edited https://github.com/llvm/llvm-project/pull/65638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add clang::preferred_type attribute for bitfields (PR #69104)

2023-10-20 Thread Aaron Ballman via cfe-commits
@@ -3153,6 +3153,12 @@ def err_invalid_branch_protection_spec : Error< "invalid or misplaced branch protection specification '%0'">; def warn_unsupported_branch_protection_spec : Warning< "unsupported branch protection specification '%0'">, InGroup; +def warn_attribute_und

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-10-20 Thread Jerin Philip via cfe-commits
@@ -186,14 +186,14 @@ class AttributeCommonInfo { bool isGNUScope() const; bool isClangScope() const; - bool isCXX11Attribute() const { return SyntaxUsed == AS_CXX11 || IsAlignas; } - + bool isAlignas() const { return IsAlignas; } + bool isCXX11Attribute() const { retur

<    1   2   3   4   >