[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vinayak Dev via cfe-commits
@@ -16538,6 +16538,27 @@ void Sema::DiagnoseAlwaysNonNullPointer(Expr *E, } } + // Complain if we are converting a lambda expression to a boolean value + if (auto *MCallExpr = dyn_cast(E)) { +if (MCallExpr->getObjectType()->isRecordType()) { + if (auto *MRecor

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-02-28 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Friendly ping. I'm looking for your feedback before fixing other similar bugs, e.g. #82104. https://github.com/llvm/llvm-project/pull/82310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [llvm] [RISCV] Remove experimental from Zacas. (PR #83195)

2024-02-28 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/83195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

2024-02-28 Thread via cfe-commits
https://github.com/AMS21 updated https://github.com/llvm/llvm-project/pull/82689 >From ffde0d326b7ab2c451c9070a894d6c487fe90682 Mon Sep 17 00:00:00 2001 From: AMS21 Date: Thu, 22 Feb 2024 22:10:09 +0100 Subject: [PATCH] [clang-tidy] Improve `google-explicit-constructor` checks handling of `expl

[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

2024-02-28 Thread via cfe-commits
@@ -79,8 +79,10 @@ static bool isStdInitializerList(QualType Type) { } void ExplicitConstructorCheck::check(const MatchFinder::MatchResult &Result) { - constexpr char WarningMessage[] = + constexpr char NoExpressionWarningMessage[] = "%0 must be marked explicit to avo

[clang] 49c399c - [clang][Interp] Toplevel destructors may fail

2024-02-28 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-28T09:48:27+01:00 New Revision: 49c399c2d113df1654b09c9b5afa38924829a8fe URL: https://github.com/llvm/llvm-project/commit/49c399c2d113df1654b09c9b5afa38924829a8fe DIFF: https://github.com/llvm/llvm-project/commit/49c399c2d113df1654b09c9b5afa38924829a8fe.diff LO

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vinayak Dev via cfe-commits
vinayakdsci wrote: > There are some related test failures caught by precommit CI that need to be > addressed. > > The issue in dr18xx.cpp looks to be a case where we should replace `bool b = > ` with `auto b = ` (it doesn't change the testing for what's discussed in > http://wg21.link/cwg1837

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vinayak Dev via cfe-commits
@@ -16538,6 +16538,27 @@ void Sema::DiagnoseAlwaysNonNullPointer(Expr *E, } } + // Complain if we are converting a lambda expression to a boolean value + if (auto *MCallExpr = dyn_cast(E)) { +if (MCallExpr->getObjectType()->isRecordType()) { + if (auto *MRecor

[clang] 9f99eda - [clang][Interp][NFC] Convert test to verify=expected,both style

2024-02-28 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-28T09:53:44+01:00 New Revision: 9f99eda1208787364b1a381b2d4e146fc4868cd5 URL: https://github.com/llvm/llvm-project/commit/9f99eda1208787364b1a381b2d4e146fc4868cd5 DIFF: https://github.com/llvm/llvm-project/commit/9f99eda1208787364b1a381b2d4e146fc4868cd5.diff LO

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

2024-02-28 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 8cfb71613c452dd45a84a74affe8464bfd33de02 b4cb8945224633fef27b69f0eed34f505032f76e --

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

2024-02-28 Thread Nathan Sidwell via cfe-commits
urnathan wrote: > > > > Thinking further, several (AArch64, ARM & Loongson) targets have a > 'HasUnaligned' bool in their TargetInfo objects. Perhaps the way forwards is > to promote that to the base TargetInfo and just use that, rather than the > bitfield-specific field I added (which just

[clang] [OpenCL] Fix BIenqueue_kernel fallthrough (PR #83238)

2024-02-28 Thread Sven van Haastregt via cfe-commits
https://github.com/svenvh created https://github.com/llvm/llvm-project/pull/83238 Handling of the `BIenqueue_kernel` builtin must not fallthrough to the `BIget_kernel_work_group_size` builtin, as these builtins have no common functionality. >From a7375b651a2ec392e0edf4cbe3658981f56ea67a Mon S

[clang] [OpenCL] Fix BIenqueue_kernel fallthrough (PR #83238)

2024-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Sven van Haastregt (svenvh) Changes Handling of the `BIenqueue_kernel` builtin must not fallthrough to the `BIget_kernel_work_group_size` builtin, as these builtins have no common functionality. --- Full diff: https://github.com/

[clang] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object references within trivial statements (PR #82229)

2024-02-28 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229 >From 099640652b62c52160b12542a16eb66da90cfc93 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 19 Feb 2024 01:07:13 -0800 Subject: [PATCH 1/2] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object

[clang] [Driver] Unify InstalledDir and Dir (PR #80527)

2024-02-28 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo approved this pull request. If nobody else wants to chime in here, I guess I'll go ahead and approve it. LGTM! https://github.com/llvm/llvm-project/pull/80527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [-Wunsafe-buffer-usage][NFC] clang-format UnsafeBufferUsage.cpp (PR #82027)

2024-02-28 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/82027 >From 2a068ce8dd6c54814a45151759e34f8e56181649 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Fri, 16 Feb 2024 10:51:00 -0800 Subject: [PATCH 1/2] [-Wunsafe-buffer-usage][NFC] clang-format UnsafeBufferUsa

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-28 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/82476 From a886005893585ce060415619e1fa6164ba4e1729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Tue, 14 Nov 2023 09:28:45 +0100 Subject: [PATCH 01/11]

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-28 Thread Alejandro Álvarez Ayllón via cfe-commits
alejandro-alvarez-sonarsource wrote: Rebased on top of main to solve a conflict. https://github.com/llvm/llvm-project/pull/82476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3fa9102 - [-Wunsafe-buffer-usage][NFC] clang-format UnsafeBufferUsage.cpp (#82027)

2024-02-28 Thread via cfe-commits
Author: jkorous-apple Date: 2024-02-28T02:05:20-08:00 New Revision: 3fa91021257ec89ccbfa8aae80312700c2de9d11 URL: https://github.com/llvm/llvm-project/commit/3fa91021257ec89ccbfa8aae80312700c2de9d11 DIFF: https://github.com/llvm/llvm-project/commit/3fa91021257ec89ccbfa8aae80312700c2de9d11.diff

[clang] [-Wunsafe-buffer-usage][NFC] clang-format UnsafeBufferUsage.cpp (PR #82027)

2024-02-28 Thread via cfe-commits
https://github.com/jkorous-apple closed https://github.com/llvm/llvm-project/pull/82027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-02-28 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/83126 From 3a6fdd006f00b0530e7fe6ead1fcd2765c1bfe07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Mon, 26 Feb 2024 19:12:41 +0100 Subject: [PATCH 1/4] [clang-repl] Split out TypeVisitor

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-02-28 Thread via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: 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: ``ba

[clang] [llvm] [LLVM][TypeSize] Remove default constructor. (PR #82810)

2024-02-28 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. https://github.com/llvm/llvm-project/pull/82810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Clang Codegen Interop : Accept multiple init (PR #82604)

2024-02-28 Thread via cfe-commits
SunilKuravinakop wrote: Alexey, Can you please review my changes? https://github.com/llvm/llvm-project/pull/82604 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-02-28 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Alright. The above change makes it as cheap as it gets with an abstraction: virtual function calls only on init and one function pointer call for each processed statement. > I was wondering if we can extend that functionality via a callback mechanism How would that look

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-02-28 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/83126 From 3a6fdd006f00b0530e7fe6ead1fcd2765c1bfe07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Mon, 26 Feb 2024 19:12:41 +0100 Subject: [PATCH 1/5] [clang-repl] Split out TypeVisitor

[clang] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object references within trivial statements (PR #82229)

2024-02-28 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229 >From 099640652b62c52160b12542a16eb66da90cfc93 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 19 Feb 2024 01:07:13 -0800 Subject: [PATCH 1/2] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object

[clang-tools-extra] [NFC][clang] add a clang tool for mlir refactor (PR #75279)

2024-02-28 Thread via cfe-commits
https://github.com/lipracer updated https://github.com/llvm/llvm-project/pull/75279 >From 71ae35b1538201790e5fc7a25d1d7aba7df7913d Mon Sep 17 00:00:00 2001 From: lipracer Date: Wed, 13 Dec 2023 11:37:12 +0800 Subject: [PATCH] [NFC][clang] add a clang tool for mlir refactor --- clang-tools-ext

[clang-tools-extra] [NFC][clang] add a clang tool for mlir refactor (PR #75279)

2024-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: long.chen (lipracer) Changes I am unable to modify the title; however, the detailed description is [here](https://discourse.llvm.org/t/rfc-add-a-mlir-refactor-tool-to-clang-tools-extra/75451). This is an NFC (No Functional Cha

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-28 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Aylló

[clang] ffe7049 - [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (#82476)

2024-02-28 Thread via cfe-commits
Author: Alejandro Álvarez Ayllón Date: 2024-02-28T12:22:57+01:00 New Revision: ffe7049b543adb9739261d28a60d4a47a00aa2e0 URL: https://github.com/llvm/llvm-project/commit/ffe7049b543adb9739261d28a60d4a47a00aa2e0 DIFF: https://github.com/llvm/llvm-project/commit/ffe7049b543adb9739261d28a60d4a47a00

[clang] [clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (PR #82476)

2024-02-28 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Aylló

[clang] fe97a59 - [clang] remove (clang::)ast_matchers:: namespace from AST matcher args for docs (#81437)

2024-02-28 Thread via cfe-commits
Author: Julian Schmidt Date: 2024-02-28T12:43:43+01:00 New Revision: fe97a59a7be51dfc7e92619536963051604d155a URL: https://github.com/llvm/llvm-project/commit/fe97a59a7be51dfc7e92619536963051604d155a DIFF: https://github.com/llvm/llvm-project/commit/fe97a59a7be51dfc7e92619536963051604d155a.diff

[clang] [clang] remove (clang::)ast_matchers:: namespace from AST matcher args for docs (PR #81437)

2024-02-28 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti closed https://github.com/llvm/llvm-project/pull/81437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3d454d2 - [LLVM][TypeSize] Remove default constructor. (#82810)

2024-02-28 Thread via cfe-commits
Author: Paul Walker Date: 2024-02-28T11:48:53Z New Revision: 3d454d2895820cd1e6caa92f1e82ba468b5b5f09 URL: https://github.com/llvm/llvm-project/commit/3d454d2895820cd1e6caa92f1e82ba468b5b5f09 DIFF: https://github.com/llvm/llvm-project/commit/3d454d2895820cd1e6caa92f1e82ba468b5b5f09.diff LOG: [

[clang] [llvm] [LLVM][TypeSize] Remove default constructor. (PR #82810)

2024-02-28 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm closed https://github.com/llvm/llvm-project/pull/82810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Refactor target attribute mangling. (PR #81893)

2024-02-28 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/81893 >From 4bff4f1378140b084256cf1647d26466e95d6ef7 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 15 Feb 2024 15:53:51 + Subject: [PATCH] [clang] Refactor target attribute mangling. Before this

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-02-28 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/83124 >From 7de2ca730de7a51f4bb3c6178914bf57a7efb321 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Tue, 27 Feb 2024 03:13:51 -0800 Subject: [PATCH] [Clang][Sema] placement new initializes typedef array with corre

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Aaron Ballman via cfe-commits
@@ -16538,6 +16538,27 @@ void Sema::DiagnoseAlwaysNonNullPointer(Expr *E, } } + // Complain if we are converting a lambda expression to a boolean value + if (auto *MCallExpr = dyn_cast(E)) { +if (MCallExpr->getObjectType()->isRecordType()) { + if (auto *MRecor

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > There are some related test failures caught by precommit CI that need to be > > addressed. > > The issue in dr18xx.cpp looks to be a case where we should replace `bool b > > = ` with `auto b = ` (it doesn't change the testing for what's discussed in > > http://wg21.link

[clang] [cfi][CodeGen] Call SetLLVMFunctionAttributes{, ForDefinition} on __cf… (PR #78253)

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

[clang] [cfi][CodeGen] Call SetLLVMFunctionAttributes{, ForDefinition} on __cf… (PR #78253)

2024-02-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I think the code looks pretty reasonable, but I've added codegen code owners for final sign-off. Should we add a release note to `clang/docs/ReleaseNotes.rst` so users know about the changes? https://github.com/llvm/llvm-project/pull/78253 ___

[clang] [cfi][CodeGen] Call SetLLVMFunctionAttributes{, ForDefinition} on __cf… (PR #78253)

2024-02-28 Thread Aaron Ballman via cfe-commits
@@ -3443,11 +3443,28 @@ void CodeGenFunction::EmitCfiSlowPathCheck( void CodeGenFunction::EmitCfiCheckStub() { llvm::Module *M = &CGM.getModule(); auto &Ctx = M->getContext(); + auto &C = getContext(); AaronBallman wrote: Please spell out the types here i

[clang] 27b297b - [clang] Fix -Wunused-variable in CGCall.cpp (NFC)

2024-02-28 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2024-02-28T20:58:20+08:00 New Revision: 27b297bf21b6637047c1ac403f983351b9a3fc64 URL: https://github.com/llvm/llvm-project/commit/27b297bf21b6637047c1ac403f983351b9a3fc64 DIFF: https://github.com/llvm/llvm-project/commit/27b297bf21b6637047c1ac403f983351b9a3fc64.diff LOG: [

[clang] 570bc5d - Revert "[clang][analyzer] StreamChecker: Model getc, vfscanf, putc, vfprintf (#82476)"

2024-02-28 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2024-02-28T14:10:22+01:00 New Revision: 570bc5d291f92e19f6264262b02ddff1a2f2e09b URL: https://github.com/llvm/llvm-project/commit/570bc5d291f92e19f6264262b02ddff1a2f2e09b DIFF: https://github.com/llvm/llvm-project/commit/570bc5d291f92e19f6264262b02ddff1a2f2e09b.diff

[clang] [Clang] [Sema] Handle `this` in `__restrict`-qualified member functions properly (PR #83187)

2024-02-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Thank you for the fix! This seems to fix quite a few issues because it also addresses: https://github.com/llvm/llvm-project/issues/42411 https://github.com/llvm/llvm-project/issues/18121 https://github.com/llvm/llvm-project/issues/1103

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-02-28 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/83136 >From cdc9ee6c322af0ceed162f3f714bcd0a22e020c3 Mon Sep 17 00:00:00 2001 From: Phoebe Wang Date: Tue, 27 Feb 2024 22:16:38 +0800 Subject: [PATCH 1/2] [X86] Add Support for X86 TLSDESC Relocations --- clang/li

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-02-28 Thread Phoebe Wang via cfe-commits
@@ -18515,17 +18515,17 @@ X86TargetLowering::LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const { return LowerGlobalOrExternal(Op, DAG, /*ForCall=*/false); } -static SDValue -GetTLSADDR(SelectionDAG &DAG, SDValue Chain, GlobalAddressSDNode *GA, - SDValue *InG

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-02-28 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,165 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc < %s -mtriple=i686-unknown-unknown --relocation-model=pic -enable-tlsdesc | FileCheck %s --check-prefix=X86 phoebewang wrote: Done

[clang] a2efb68 - [clang][Interp] Remove now faulty assertion

2024-02-28 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-28T14:27:25+01:00 New Revision: a2efb68906ec2bf7b55b464060c3713e395e68e5 URL: https://github.com/llvm/llvm-project/commit/a2efb68906ec2bf7b55b464060c3713e395e68e5 DIFF: https://github.com/llvm/llvm-project/commit/a2efb68906ec2bf7b55b464060c3713e395e68e5.diff LO

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-28 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Hm actually reopening, the metadata isn't emitted if the defnition isn't > available [e.g. for `extern int X;` when given an annotation That seems like a bug (so long as the declaration is actually emitted to LLVM IR at all). > @AaronBallman @erichkeane, do you have any

[clang] [llvm] [AArch64] [SVE] Created intrinsics for DUPQ instr. (PR #83260)

2024-02-28 Thread via cfe-commits
https://github.com/Lukacma created https://github.com/llvm/llvm-project/pull/83260 This patch adds clang and llvm support for following intrinsic and maps it to DUPQ instruction: ``` // Variants are also available for: // _s8, _u16, _s16, _u32, _s32, _u64, _s64 // _bf16, _f16, _f32, _f

[clang] [llvm] [AArch64] [SVE] Created intrinsics for DUPQ instr. (PR #83260)

2024-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Lukacma) Changes This patch adds clang and llvm support for following intrinsic and maps it to DUPQ instruction: ``` // Variants are also available for: // _s8, _u16, _s16, _u32, _s32, _u64, _s64 // _bf16, _f16, _f32, _f64

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-02-28 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/83124 >From 991ca334f7efb4a7fc1e184ab6b4603db681b863 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Tue, 27 Feb 2024 03:13:51 -0800 Subject: [PATCH] [Clang][Sema] placement new initializes typedef array with corre

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-02-28 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,165 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc < %s -mtriple=i686-unknown-unknown --relocation-model=pic -enable-tlsdesc | FileCheck %s --check-prefix=X86 +; RUN: llc < %s -mtriple=x86_64-pc-linu

[clang] [OpenMP] Clang Codegen Interop : Accept multiple init (PR #82604)

2024-02-28 Thread Alexey Bataev via cfe-commits
@@ -7023,19 +7023,25 @@ void CodeGenFunction::EmitOMPInteropDirective(const OMPInteropDirective &S) { S.getSingleClause())) && "OMPNowaitClause clause is used separately in OMPInteropDirective."); - if (const auto *C = S.getSingl

[clang] [Clang][Sema] Fix missing warning when comparing mismatched enums in … (PR #81418)

2024-02-28 Thread Erich Keane via cfe-commits
erichkeane wrote: > For what it's worth, this change adds several instances of > `-Wenum-enum-conversion` for the Linux kernel: > [ClangBuiltLinux/linux#2002](https://github.com/ClangBuiltLinux/linux/issues/2002). > I assume this is intentional given the nature of the change as a whole but >

[clang] [OpenMP] Parse and Sema support for declare target in local scope (PR #83223)

2024-02-28 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev commented: One big question - why do we need it in function scope for clang? https://github.com/llvm/llvm-project/pull/83223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [OpenMP] Parse and Sema support for declare target in local scope (PR #83223)

2024-02-28 Thread Alexey Bataev via cfe-commits
@@ -23352,6 +23352,15 @@ void Sema::ActOnOpenMPDeclareTargetName(NamedDecl *ND, SourceLocation Loc, isa(ND)) && "Expected variable, function or function template."); + if (auto *VD = dyn_cast(ND)) { alexey-bataev wrote: checkDeclIsAllowed

[clang] [OpenMP] Parse and Sema support for declare target in local scope (PR #83223)

2024-02-28 Thread Alexey Bataev via cfe-commits
@@ -11326,6 +11326,9 @@ def err_omp_device_type_mismatch : Error< def err_omp_wrong_device_function_call : Error< "function with 'device_type(%0)' is not available on %select{device|host}1">; def note_omp_marked_device_type_here : Note<"marked as 'device_type(%0)' here">; +d

[clang] [OpenMP] Parse and Sema support for declare target in local scope (PR #83223)

2024-02-28 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/83223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-02-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I don't have any concerns, but want @cor3ntin to take a look. He's under the weather at the moment, so he might be a few days. https://github.com/llvm/llvm-project/pull/82310 ___ cfe-commits mailing list cfe-c

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vinayak Dev via cfe-commits
https://github.com/vinayakdsci updated https://github.com/llvm/llvm-project/pull/83152 >From 0e9d7e7ed96feb8c32be33ca9b1262bba32ab8b4 Mon Sep 17 00:00:00 2001 From: Vinayak Dev Date: Tue, 27 Feb 2024 18:05:29 +0530 Subject: [PATCH] [Clang][Sema]: Diagnose lambda to bool implicit casts --- cla

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vinayak Dev via cfe-commits
https://github.com/vinayakdsci updated https://github.com/llvm/llvm-project/pull/83152 >From c65c6a379db75eb4bf38578106ba2aa4e894e3d8 Mon Sep 17 00:00:00 2001 From: Vinayak Dev Date: Tue, 27 Feb 2024 18:05:29 +0530 Subject: [PATCH] [Clang][Sema]: Diagnose lambda to bool implicit casts --- cla

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-28 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Hm actually reopening, the metadata isn't emitted if the defnition isn't > > available [e.g. for `extern int X;` when given an annotation > > That seems like a bug (so long as the declaration is actually emitted to LLVM > IR at all). > > > @AaronBallman @erichkeane, do y

[clang] [analyzer] Removing untrusted buffer size taint warning (PR #68607)

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

[clang] [analyzer] Removing untrusted buffer size taint warning (PR #68607)

2024-02-28 Thread via cfe-commits
https://github.com/NagyDonat commented: I think this old commit could be merged after some very minor clarifications. In addition to the changes marked in inline comments, you could also add some TODO comments in MallocChecker and CStringChecker to mark the places where we want to add the code

[clang] [analyzer] Removing untrusted buffer size taint warning (PR #68607)

2024-02-28 Thread via cfe-commits
@@ -95,22 +94,23 @@ void testReadStdIn(){ } void multipleTaintSources(void) { - int x,y,z; - scanf("%d", &x); // expected-note {{Taint originated here}} + char cmd[2048],file[1024]; NagyDonat wrote: Bikeshedding: please add a space after the comma (here an

[clang] [analyzer] Removing untrusted buffer size taint warning (PR #68607)

2024-02-28 Thread via cfe-commits
@@ -305,15 +305,19 @@ void testGets_s(void) { void testTaintedBufferSize(void) { size_t ts; + // malloc, calloc, bcopy, memcpy functions are removed as unconditional sinks + // from the GenericTaintChecker's default configuration, + // because it generated too many false

[clang] [clang] Refactor target attribute mangling. (PR #81893)

2024-02-28 Thread Erich Keane via cfe-commits
@@ -857,6 +864,36 @@ void AArch64TargetCodeGenInfo::checkFunctionCallABI( << Callee->getDeclName(); } +void AArch64ABIInfo::appendAttributeMangling(TargetClonesAttr *Attr, + unsigned Index, +

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/83152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vlad Serebrennikov via cfe-commits
@@ -287,6 +287,11 @@ namespace dr1837 { // dr1837: 3.3 }; }; }; + /* since-cxx11-warning@-6{{address of function '[] { Endilll wrote: Can you convert this to use a marker? We don't want readers to count relative offsets. In other words, it should

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. https://github.com/llvm/llvm-project/pull/83152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Aaron Ballman via cfe-commits
@@ -16538,6 +16538,24 @@ void Sema::DiagnoseAlwaysNonNullPointer(Expr *E, } } + // Complain if we are converting a lambda expression to a boolean value + if (const auto *MCallExpr = dyn_cast(E)) { +if (MCallExpr->getObjectType()->isRecordType()) { + if (const

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Aaron Ballman via cfe-commits
@@ -16538,6 +16538,24 @@ void Sema::DiagnoseAlwaysNonNullPointer(Expr *E, } } + // Complain if we are converting a lambda expression to a boolean value + if (const auto *MCallExpr = dyn_cast(E)) { +if (MCallExpr->getObjectType()->isRecordType()) { + if (const

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vinayak Dev via cfe-commits
@@ -16538,6 +16538,24 @@ void Sema::DiagnoseAlwaysNonNullPointer(Expr *E, } } + // Complain if we are converting a lambda expression to a boolean value + if (const auto *MCallExpr = dyn_cast(E)) { +if (MCallExpr->getObjectType()->isRecordType()) { + if (const

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-28 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/6] Implement a subset of builtin_cpu_supports() features --- clang

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Aaron Ballman via cfe-commits
@@ -16538,6 +16538,24 @@ void Sema::DiagnoseAlwaysNonNullPointer(Expr *E, } } + // Complain if we are converting a lambda expression to a boolean value + if (const auto *MCallExpr = dyn_cast(E)) { +if (MCallExpr->getObjectType()->isRecordType()) { + if (const

[clang] cb6c0f1 - [clang][Interp] Ignore ArrayDecay ops for null pointers

2024-02-28 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-28T16:16:03+01:00 New Revision: cb6c0f1d28c0d1915d1ca9a198254e3828af2384 URL: https://github.com/llvm/llvm-project/commit/cb6c0f1d28c0d1915d1ca9a198254e3828af2384 DIFF: https://github.com/llvm/llvm-project/commit/cb6c0f1d28c0d1915d1ca9a198254e3828af2384.diff LO

[clang] [clang] Refactor target attribute mangling. (PR #81893)

2024-02-28 Thread Alexandros Lamprineas via cfe-commits
@@ -857,6 +864,36 @@ void AArch64TargetCodeGenInfo::checkFunctionCallABI( << Callee->getDeclName(); } +void AArch64ABIInfo::appendAttributeMangling(TargetClonesAttr *Attr, + unsigned Index, +

[clang] [Clang][ARM][AArch64] Add branch protection attributes to the defaults. (PR #83277)

2024-02-28 Thread via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/83277 These attributes are no longer inherited from the module flags, therefore need to be added for synthetic functions. >From 46f0334eb5c5edd15b657429f39f588cc7726072 Mon Sep 17 00:00:00 2001 From: Daniel

[clang] [clang] Refactor target attribute mangling. (PR #81893)

2024-02-28 Thread Erich Keane via cfe-commits
@@ -857,6 +864,36 @@ void AArch64TargetCodeGenInfo::checkFunctionCallABI( << Callee->getDeclName(); } +void AArch64ABIInfo::appendAttributeMangling(TargetClonesAttr *Attr, + unsigned Index, +

[clang] [Clang][ARM][AArch64] Add branch protection attributes to the defaults. (PR #83277)

2024-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Dani (DanielKristofKiss) Changes These attributes are no longer inherited from the module flags, therefore need to be added for synthetic functions. --- Full diff: https://github.com/llvm/llvm-project/pu

[clang] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-02-28 Thread via cfe-commits
DanielKristofKiss wrote: This handles the synthetic function in clang: #83277 https://github.com/llvm/llvm-project/pull/82819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ARM][AArch64] Add branch protection attributes to the defaults. (PR #83277)

2024-02-28 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/83277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-28 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs created https://github.com/llvm/llvm-project/pull/83279 There was a bug in clang where it couldn't choose which overload candidate is more specialized if it was comparing a member-function to a non-member function. Previously, this was detected as an ambigouity, now c

[clang] [NFC][ARM][AArch64] Deduplicated code. (PR #82785)

2024-02-28 Thread Tomas Matheson via cfe-commits
@@ -1369,13 +1369,20 @@ class TargetInfo : public TransferrableTargetInfo, } struct BranchProtectionInfo { -LangOptions::SignReturnAddressScopeKind SignReturnAddr = -LangOptions::SignReturnAddressScopeKind::None; -LangOptions::SignReturnAddressKeyKind SignK

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-28 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs edited https://github.com/llvm/llvm-project/pull/83279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Botond István Horváth (HoBoIs) Changes There was a bug in clang where it couldn't choose which overload candidate is more specialized if it was comparing a member-function to a non-member function. Previously, this was detected as an ambi

[clang] [clang][fat-lto-objects] Make module flags match non-FatLTO pipelines (PR #83159)

2024-02-28 Thread Teresa Johnson via cfe-commits
https://github.com/teresajohnson edited https://github.com/llvm/llvm-project/pull/83159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][fat-lto-objects] Make module flags match non-FatLTO pipelines (PR #83159)

2024-02-28 Thread Teresa Johnson via cfe-commits
https://github.com/teresajohnson approved this pull request. https://github.com/llvm/llvm-project/pull/83159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][fat-lto-objects] Make module flags match non-FatLTO pipelines (PR #83159)

2024-02-28 Thread Teresa Johnson via cfe-commits
@@ -1036,7 +1041,8 @@ void EmitAssemblyHelper::RunOptimizationPipeline( if (!actionRequiresCodeGen(Action) && CodeGenOpts.VerifyModule) MPM.addPass(VerifierPass()); - if (Action == Backend_EmitBC || Action == Backend_EmitLL) { + if (Action == Backend_EmitBC || Action =

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-28 Thread Botond István Horváth via cfe-commits
HoBoIs wrote: @zygoloid @erichkeane Could you take a look? https://github.com/llvm/llvm-project/pull/83279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

2024-02-28 Thread Vinayak Dev via cfe-commits
https://github.com/vinayakdsci updated https://github.com/llvm/llvm-project/pull/83152 >From 613e7c0698f16292bb408be832c7ab3647f17195 Mon Sep 17 00:00:00 2001 From: Vinayak Dev Date: Tue, 27 Feb 2024 18:05:29 +0530 Subject: [PATCH] [Clang][Sema]: Diagnose lambda to bool implicit casts --- cla

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-02-28 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 8e51b22ce21b01ae0be8267c5da3703ffd3b2c5b 68200ecf3267d1b3940fa73c25c50ee706932a98 --

[clang] Reapply "[clang][analyzer] StreamChecker: Model getc, vfscanf, putc, … (PR #83281)

2024-02-28 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource created https://github.com/llvm/llvm-project/pull/83281 …vfprintf (#82476)" `va_list` is a platform-specific type. On some, it is a struct instead of a pointer to a struct, so `lookupFn` was ignoring calls to `vfprintf` and `vfscanf`. `stream.

[clang] Reapply "[clang][analyzer] StreamChecker: Model getc, vfscanf, putc, … (PR #83281)

2024-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Alejandro Álvarez Ayllón (alejandro-alvarez-sonarsource) Changes …vfprintf (#82476)" `va_list` is a platform-specific type. On some, it is a struct instead of a pointer to a struct, so `lookupFn` was ignoring calls to `v

[clang] Reapply "[clang][analyzer] StreamChecker: Model getc, vfscanf, putc, … (PR #83281)

2024-02-28 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 680c780a367bfe1c0cdf786250fd7f565ef6d23d ddbe895e3d2893060ac54bc6c984eea22e09b460 --

[clang] [clang] Refactor target attribute mangling. (PR #81893)

2024-02-28 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/81893 >From ed8c2af0e301885101097c23cc96c872e8650529 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 15 Feb 2024 15:53:51 + Subject: [PATCH] [clang] Refactor target attribute mangling. Before this

[clang] [clang] Refactor target attribute mangling. (PR #81893)

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

  1   2   3   4   >