[clang] [llvm] Add support for Arm Cortex A78AE CPU (PR #84485)

2024-03-08 Thread Sjoerd Meijer via cfe-commits
https://github.com/sjoerdmeijer approved this pull request. Thanks for the quick fix. This looks okay to me. But let's see if @DavidSpickett has more comments before merging this. https://github.com/llvm/llvm-project/pull/84485 ___ cfe-commits

[clang] [clang][dataflow] Refactor processing of terminator element (PR #84499)

2024-03-08 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand updated https://github.com/llvm/llvm-project/pull/84499 >From 81945389b60e95019ff916d356127119183e8198 Mon Sep 17 00:00:00 2001 From: Yitzhak Mandelbaum Date: Fri, 8 Mar 2024 15:19:14 + Subject: [PATCH] [clang][dataflow] Refactor processing of terminator element

[clang] [clang][dataflow] Refactor processing of terminator element (PR #84499)

2024-03-08 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 cb6f657a70f7a8d6ecd4fcc2101550a7400f94a7 210a2b83d3647c97ad4fc5eab9e0d9c68a5711a4 --

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread via cfe-commits
@@ -0,0 +1,167 @@ +//===--- MathMissingParenthesesCheck.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:

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread via cfe-commits
@@ -0,0 +1,167 @@ +//===--- MathMissingParenthesesCheck.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:

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread via cfe-commits
@@ -0,0 +1,167 @@ +//===--- MathMissingParenthesesCheck.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:

[clang] [clang][dataflow] Factor out built-in boolean model into an explicit module. (PR #82950)

2024-03-08 Thread Yitzhak Mandelbaum via cfe-commits
ymand wrote: Terminator cleanup split out into https://github.com/llvm/llvm-project/pull/84499 https://github.com/llvm/llvm-project/pull/82950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][dataflow] Refactor processing of terminator element (PR #84499)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Yitzhak Mandelbaum (ymand) Changes This patch vastly simplifies the code handling terminators, without changing any behavior. Additionally, the simplification unblocks our ability to address a (simple) FIXME in the code to invoke

[clang] [clang][dataflow] Refactor processing of terminator element (PR #84499)

2024-03-08 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand created https://github.com/llvm/llvm-project/pull/84499 This patch vastly simplifies the code handling terminators, without changing any behavior. Additionally, the simplification unblocks our ability to address a (simple) FIXME in the code to invoke `transferBranch`,

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-08 Thread David CARLIER via cfe-commits
https://github.com/devnexen updated https://github.com/llvm/llvm-project/pull/83675 >From 1b2fec2c9a41be4ad216d7032189f561eed3f751 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 2 Mar 2024 14:56:15 + Subject: [PATCH 1/3] [clang][StaticAnalyzer] Adding getentropy to

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-08 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > There are many `--no-offload-new-driver` test changes. They can be > pre-committed to make this default flip modify fewer files. Done https://github.com/llvm/llvm-project/pull/84420 ___ cfe-commits mailing list

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/84420 >From 3e2846b721ba17d44a05d7d97b377fa3a43c8cef Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 7 Mar 2024 15:48:00 -0600 Subject: [PATCH] [Offload] Move HIP and CUDA to new driver by default Summary:

[clang] cb6f657 - [CUDA][HIP][NFC] Precommit new driver changes to tests

2024-03-08 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2024-03-08T09:07:00-06:00 New Revision: cb6f657a70f7a8d6ecd4fcc2101550a7400f94a7 URL: https://github.com/llvm/llvm-project/commit/cb6f657a70f7a8d6ecd4fcc2101550a7400f94a7 DIFF: https://github.com/llvm/llvm-project/commit/cb6f657a70f7a8d6ecd4fcc2101550a7400f94a7.diff

[clang] [clang][dataflow] Factor out built-in boolean model into an explicit module. (PR #82950)

2024-03-08 Thread Yitzhak Mandelbaum via cfe-commits
ymand wrote: > > Draft to demo how we can pull out the boolean model. Let's discuss > > specifics of namings, location, etc. > > Not sure -- do you mean let's wordsmith names now, or do you mean we should > discuss naming and location, but that should happen after we've talked about > the

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-08 Thread via cfe-commits
cor3ntin wrote: @andreasfertig Will you need us to merge that for you? https://github.com/llvm/llvm-project/pull/84193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] WIP: Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-03-08 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/84473 >From 870e6a6def8c17859ffbb30906f91912268f872d Mon Sep 17 00:00:00 2001 From: Sirraide Date: Fri, 8 Mar 2024 11:55:42 +0100 Subject: [PATCH 1/5] [Clang] Fix dependence of DREs in lambdas with an explicit

[clang] [Clang] [Sema] WIP: Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-03-08 Thread via cfe-commits
Sirraide wrote: Also, just checked, #84425 apparently was a symptom of this as well, because that one’s also fixed now. https://github.com/llvm/llvm-project/pull/84473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] Add support for Arm Cortex A78AE CPU (PR #84485)

2024-03-08 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray updated https://github.com/llvm/llvm-project/pull/84485 >From 40c20f5b4413bd8aac0249d4d1fc4fb4ce8c6438 Mon Sep 17 00:00:00 2001 From: Jonathan Thackray Date: Fri, 8 Mar 2024 13:39:35 + Subject: [PATCH 1/2] [ARM][AArch64] Add support for Arm Cortex A78AE CPU

[clang] [Clang] [Sema] WIP: Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-03-08 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/84473 >From 870e6a6def8c17859ffbb30906f91912268f872d Mon Sep 17 00:00:00 2001 From: Sirraide Date: Fri, 8 Mar 2024 11:55:42 +0100 Subject: [PATCH 1/4] [Clang] Fix dependence of DREs in lambdas with an explicit

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/84481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] WIP: Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-03-08 Thread via cfe-commits
Sirraide wrote: Ok, looks like `this` is fixed now as well. https://github.com/llvm/llvm-project/pull/84473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] WIP: Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-03-08 Thread via cfe-commits
https://github.com/Sirraide ready_for_review https://github.com/llvm/llvm-project/pull/84473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread Piotr Zegar via cfe-commits
@@ -100,6 +100,12 @@ Improvements to clang-tidy New checks ^^ +- New :doc:`readability-math-missing-parentheses + ` check. + + Checks for mathematical expressions that involve operators + of different priorities. PiotrZSL wrote: `Check for missing

[clang] [Sema] Avoid unnecessary copy on MultiLevelTemplateArgumentList. NFC (PR #84459)

2024-03-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Ah, this used to be a really small class, at one point it was an unsigned plus a handful of array-refs, so it made sense to pass by value. It seems to have grown a decent bit to the point that pass-by-const-ref now makes sense.

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %check_clang_tidy %s readability-math-missing-parentheses %t + +// FIXME: Add something that triggers the check here. +void f(){ +//CHECK-MESSAGES: :[[@LINE+2]]:13: warning: add parantheses to clarify the precedence of operations

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,167 @@ +//===--- MathMissingParenthesesCheck.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:

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,167 @@ +//===--- MathMissingParenthesesCheck.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:

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,167 @@ +//===--- MathMissingParenthesesCheck.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:

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,167 @@ +//===--- MathMissingParenthesesCheck.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:

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,167 @@ +//===--- MathMissingParenthesesCheck.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:

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/84481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. In short, manual code parsing is not allowed, for that e got AST already. Sad thing is that you already wrote all those parsing functions, because this check can be implemented in 60 lines of code.

[clang] [Clang] [Sema] WIP: Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-03-08 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/84473 >From 870e6a6def8c17859ffbb30906f91912268f872d Mon Sep 17 00:00:00 2001 From: Sirraide Date: Fri, 8 Mar 2024 11:55:42 +0100 Subject: [PATCH 1/3] [Clang] Fix dependence of DREs in lambdas with an explicit

[clang-tools-extra] [clang-tidy]avoid bugprone-unused-return-value false positive for assignment operator overloading (PR #84489)

2024-03-08 Thread Oliver Stöneberg via cfe-commits
firewave wrote: Maybe add `+=` to the tests as well? I have also seen it reported with that. https://github.com/llvm/llvm-project/pull/84489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 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?Message-ID: In-Reply-To: steakhal wrote: > This functionality could

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 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?Message-ID: In-Reply-To: @@ -1158,6 +1173,118 @@ void

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-08 Thread Erich Keane via cfe-commits
erichkeane wrote: > The clang-format check fails due to a change in `clang/docs/ReleaseNotes. > rst`, which isn't mine. What's the protocol? Shall I fix the format issue, or > can my change be merged anyway? Nope, don't worry about that one. That bot is being weird, feel free to merge

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 Thread Balázs Kéri via cfe-commits
@@ -1158,6 +1173,118 @@ void StreamChecker::evalUngetc(const FnDescription *Desc, const CallEvent , C.addTransition(StateFailed); } +ProgramStateRef +StreamChecker::ensurePtrNotNull(SVal PtrVal, const Expr *PtrExpr, +CheckerContext ,

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 Thread Balázs Kéri via cfe-commits
@@ -510,6 +517,14 @@ class StreamChecker : public Checkerhttps://github.com/llvm/llvm-project/pull/83027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 Thread Balázs Kéri via cfe-commits
@@ -1158,6 +1173,118 @@ void StreamChecker::evalUngetc(const FnDescription *Desc, const CallEvent , C.addTransition(StateFailed); } +ProgramStateRef +StreamChecker::ensurePtrNotNull(SVal PtrVal, const Expr *PtrExpr, +CheckerContext ,

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 Thread Balázs Kéri via cfe-commits
@@ -1158,6 +1173,118 @@ void StreamChecker::evalUngetc(const FnDescription *Desc, const CallEvent , C.addTransition(StateFailed); } +ProgramStateRef +StreamChecker::ensurePtrNotNull(SVal PtrVal, const Expr *PtrExpr, +CheckerContext ,

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 Thread Balázs Kéri via cfe-commits
@@ -1158,6 +1173,118 @@ void StreamChecker::evalUngetc(const FnDescription *Desc, const CallEvent , C.addTransition(StateFailed); } +ProgramStateRef +StreamChecker::ensurePtrNotNull(SVal PtrVal, const Expr *PtrExpr, +CheckerContext ,

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 Thread Balázs Kéri via cfe-commits
@@ -234,6 +235,9 @@ class StreamChecker : public Checkerhttps://github.com/llvm/llvm-project/pull/83027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 Thread Balázs Kéri via cfe-commits
https://github.com/balazske commented: This functionality could be added to this checker, but to `StdLibraryFunctionsChecker` too, and probably will be added at a time (summary of `getdelim` is not accurate now in that checker). The same bug condition is checked by two different checkers in

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 Thread Balázs Kéri via cfe-commits
https://github.com/balazske edited https://github.com/llvm/llvm-project/pull/83027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Expose CreateExecutor() and ResetExecutor() in extended Interpreter interface (PR #84460)

2024-03-08 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: > Do you mind incorporating this patch so that we avoid churn? Sure. Essentially, this drops lazy creation of the executor and makes it dependent on the frontend action explicitly. Fine for me. We can still expose explicit setup/tear-down.

[clang-tools-extra] [clang-tidy]avoid bugprone-unused-return-value false positive for assignment operator overloading (PR #84489)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes Fixes: #84480 We assuem assignemnt at most of time, operator overloading means the value is assigned to the other variable, then clang-tidy should suppress warning even if this operator overloading

[clang-tools-extra] [clang-tidy]avoid bugprone-unused-return-value false positive for assignment operator overloading (PR #84489)

2024-03-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/84489 >From 265db5ee772772bef4099cc97b69995cfa67b3f2 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 8 Mar 2024 22:15:20 +0800 Subject: [PATCH] [clang-tidy]avoid bugprone-unused-return-value false positive

[clang-tools-extra] [clang-tidy]avoid bugprone-unused-return-value false positive for assignment operator overloading (PR #84489)

2024-03-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/84489 Fixes: #84480 We assuem assignemnt at most of time, operator overloading means the value is assigned to the other variable, then clang-tidy should suppress warning even if this operator overloading match

[clang] [llvm] Add support for Arm Cortex A78AE CPU (PR #84485)

2024-03-08 Thread Jonathan Thackray via cfe-commits
jthackray wrote: > Also does this address the -mcpu=native part of #84450 as well? I've added a host id (0xd42) to llvm/lib/TargetParser/Host.cpp, so I think so (unless there's something else required). https://github.com/llvm/llvm-project/pull/84485

[clang] [llvm] Add support for Arm Cortex A78AE CPU (PR #84485)

2024-03-08 Thread David Spickett via cfe-commits
DavidSpickett wrote: Also does this address the -mcpu=native part of https://github.com/llvm/llvm-project/issues/84450 as well? https://github.com/llvm/llvm-project/pull/84485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] Add support for Arm Cortex A78AE CPU (PR #84485)

2024-03-08 Thread Jonathan Thackray via cfe-commits
jthackray wrote: > Should this be added to the release notes? (so it doesn't get forgotten in a > mad scramble in a few months time) Sure, happy to do that. https://github.com/llvm/llvm-project/pull/84485 ___ cfe-commits mailing list

[clang] [llvm] Add support for Arm Cortex A78AE CPU (PR #84485)

2024-03-08 Thread David Spickett via cfe-commits
DavidSpickett wrote: Should this be added to the release notes? (so it doesn't get forgotten in a mad scramble in a few months time) https://github.com/llvm/llvm-project/pull/84485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][ASTMatcher] Add matchers for isExplicitObjectMemberFunction() (PR #84446)

2024-03-08 Thread Balazs Benics via cfe-commits
steakhal wrote: I had to push a fixup commit, because I forgot about one switch-case. https://github.com/llvm/llvm-project/commit/f07157eb2e8212068cb9469d77f9bc3779ef2ea4 I pushed it already to fix the build bot, but let me know if you disagree with the fix.

[clang] f07157e - Fixup 7457e2c1535acd54 by adding a switch case

2024-03-08 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2024-03-08T14:55:10+01:00 New Revision: f07157eb2e8212068cb9469d77f9bc3779ef2ea4 URL: https://github.com/llvm/llvm-project/commit/f07157eb2e8212068cb9469d77f9bc3779ef2ea4 DIFF: https://github.com/llvm/llvm-project/commit/f07157eb2e8212068cb9469d77f9bc3779ef2ea4.diff

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

2024-03-08 Thread Roberto Bampi via cfe-commits
https://github.com/gigaroby updated https://github.com/llvm/llvm-project/pull/84346 >From 4b0ef9a83db7f8309ea0d8f79fabbfbad50ae6f8 Mon Sep 17 00:00:00 2001 From: Roberto Bampi Date: Thu, 7 Mar 2024 18:10:56 +0100 Subject: [PATCH 1/2] [clang-format] Add --fail-on-incomplete-format. At the

[clang] [llvm] Add support for Arm Cortex A78AE CPU (PR #84485)

2024-03-08 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray edited https://github.com/llvm/llvm-project/pull/84485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add support for Arm Cortex A78AE CPU (PR #84485)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-arm Author: Jonathan Thackray (jthackray) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/84485.diff 13 Files Affected: - (modified) clang/test/Driver/aarch64-mcpu.c (+2) - (modified) clang/test/Driver/arm-cortex-cpus-2.c

[clang] [clang-repl] Expose CreateExecutor() and ResetExecutor() in extended Interpreter interface (PR #84460)

2024-03-08 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: vgvassilev wrote: I was currently touching this area to fix a problem of @jeaye reported on irc. Do you mind incorporating this patch so that we avoid churn? ```diff diff --git a/clang/include/clang/Interpreter/Interpreter.h

[clang] [llvm] Add support for Arm Cortex A78AE CPU (PR #84485)

2024-03-08 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray created https://github.com/llvm/llvm-project/pull/84485 None >From 40c20f5b4413bd8aac0249d4d1fc4fb4ce8c6438 Mon Sep 17 00:00:00 2001 From: Jonathan Thackray Date: Fri, 8 Mar 2024 13:39:35 + Subject: [PATCH] [ARM][AArch64] Add support for Arm Cortex A78AE CPU

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: NagyDonat wrote: I feel that I'm getting bogged down in this area with changes that are more general than what's strictly necessary... I'm not familiar with the unittest framework and if unittests were necessary for

[clang-tools-extra] [run-clang-tidy.py] Add option to ignore source files from compilation database (PR #82416)

2024-03-08 Thread Oliver Stöneberg via cfe-commits
firewave wrote: > Why can't we make "filter" use a full regex that supports negative > expressions instead? How do you do that? I thought `llvm::RegEx` doesn't support negative expressions. https://github.com/llvm/llvm-project/pull/82416 ___

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Bhuminjay Soni (11happy) Changes **Overview:** This pull request fixes #80850 where author suggests adding a readability check to detect missing parentheses around mathematical expressions when operators of different priorities are

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-08 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy created https://github.com/llvm/llvm-project/pull/84481 **Overview:** This pull request fixes #80850 where author suggests adding a readability check to detect missing parentheses around mathematical expressions when operators of different priorities are used.

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

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

[clang] 7415524 - [clang] Implement CTAD for type alias template. (#77890)

2024-03-08 Thread via cfe-commits
Author: Haojian Wu Date: 2024-03-08T14:24:03+01:00 New Revision: 7415524b45392651969374c067041daa82dc89e7 URL: https://github.com/llvm/llvm-project/commit/7415524b45392651969374c067041daa82dc89e7 DIFF: https://github.com/llvm/llvm-project/commit/7415524b45392651969374c067041daa82dc89e7.diff

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 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?Message-ID: In-Reply-To: https://github.com/steakhal edited

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 Thread Balazs Benics via cfe-commits
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?= Message-ID:

[clang] [analyzer] Mention possibility of underflow in array overflow errors (PR #84201)

2024-03-08 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -109,6 +136,33 @@ int *potentialAfterTheEndPtr(int idx) { // [idx]. } +int overflowOrUnderflow(int arg) { + // expected-note@+2 {{Assuming 'arg' is < 0}} + // expected-note@+1 {{Taking false branch}} + if (arg >= 0) +

[clang-tools-extra] [clang-tidy]avoid bugprone-unused-return-value false positive for function with the same prefix as the default argument (PR #84333)

2024-03-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/84333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 912ea6e - [clang-tidy]avoid bugprone-unused-return-value false positive for function with the same prefix as the default argument (#84333)

2024-03-08 Thread via cfe-commits
Author: Congcong Cai Date: 2024-03-08T21:18:58+08:00 New Revision: 912ea6e335ca6174b3433fd960ed8b592794361b URL: https://github.com/llvm/llvm-project/commit/912ea6e335ca6174b3433fd960ed8b592794361b DIFF: https://github.com/llvm/llvm-project/commit/912ea6e335ca6174b3433fd960ed8b592794361b.diff

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal commented: Looks good to me, but I'd be more eased if had seen some unittests for this matter. You could use AST-matchers selecting different FunctionDecls and query them using this

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-08 Thread Balazs Benics via cfe-commits
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext , const CallEvent , C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext , +const CallEvent , CharKind CK) const { +

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-08 Thread Balazs Benics via cfe-commits
@@ -529,3 +529,42 @@ void nocrash_on_locint_offset(void *addr, void* from, struct S s) { size_t iAdd = (size_t) addr; memcpy(((void *) &(s.f)), from, iAdd); } + +#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) +/* present in both glibc 2.25 and musl

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-08 Thread Balazs Benics via cfe-commits
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext , const CallEvent , C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext , +const CallEvent , CharKind CK) const { +

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-08 Thread Balazs Benics via cfe-commits
@@ -219,6 +221,7 @@ class CStringChecker : public Checker< eval::Call, void evalSnprintf(CheckerContext , const CallEvent ) const; void evalSprintfCommon(CheckerContext , const CallEvent , bool IsBounded, bool IsBuiltin) const; + void

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-08 Thread Balazs Benics via cfe-commits
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext , const CallEvent , C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext , +const CallEvent , CharKind CK) const { +

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-08 Thread Balazs Benics via cfe-commits
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext , const CallEvent , C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext , +const CallEvent ) const { + DestinationArgExpr Buffer =

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-08 Thread Balazs Benics via cfe-commits
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext , const CallEvent , C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext , +const CallEvent , CharKind CK) const { +

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-08 Thread Balazs Benics via cfe-commits
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext , const CallEvent , C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext , +const CallEvent , CharKind CK) const {

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-08 Thread Balazs Benics via cfe-commits
@@ -529,3 +529,42 @@ void nocrash_on_locint_offset(void *addr, void* from, struct S s) { size_t iAdd = (size_t) addr; memcpy(((void *) &(s.f)), from, iAdd); } + +#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) +/* present in both glibc 2.25 and musl

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-08 Thread Balazs Benics via cfe-commits
@@ -165,6 +165,8 @@ class CStringChecker : public Checker< eval::Call, {{CDM::CLibrary, {"explicit_bzero"}, 2}, ::evalBzero}, {{CDM::CLibrary, {"sprintf"}, 2}, ::evalSprintf}, {{CDM::CLibrary, {"snprintf"}, 2}, ::evalSnprintf}, + {{CDM::CLibrary,

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-08 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. https://github.com/llvm/llvm-project/pull/83675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

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

[clang] [clang][ASTMatcher] Add matchers for isExplicitObjectMemberFunction() (PR #84446)

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

[clang] 7457e2c - [clang][ASTMatcher] Add matchers for isExplicitObjectMemberFunction() (#84446)

2024-03-08 Thread via cfe-commits
Author: Balazs Benics Date: 2024-03-08T13:57:27+01:00 New Revision: 7457e2c1535acd548d2619dfb34eb93d27d15908 URL: https://github.com/llvm/llvm-project/commit/7457e2c1535acd548d2619dfb34eb93d27d15908 DIFF: https://github.com/llvm/llvm-project/commit/7457e2c1535acd548d2619dfb34eb93d27d15908.diff

[clang] [Clang] [Sema] WIP: Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes This is still WIP, but I figured I’d open a pr anyway to share what I’ve discovered so far. In short, dependence of captures in lambdas with an explicit object parameter is all kinds of broken at the moment.

[clang] [Clang] [Sema] WIP: Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-03-08 Thread via cfe-commits
https://github.com/Sirraide converted_to_draft https://github.com/llvm/llvm-project/pull/84473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] WIP: Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-03-08 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/84473 This is still WIP, but I figured I’d open a pr anyway to share what I’ve discovered so far. In short, dependence of captures in lambdas with an explicit object parameter is all kinds of broken at the moment.

[clang] [HIP] Make the HIP default architecture use the enum value (PR #84400)

2024-03-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/84400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4d1d127 - [HIP] Make the HIP default architecture use the enum value (#84400)

2024-03-08 Thread via cfe-commits
Author: Joseph Huber Date: 2024-03-08T06:54:52-06:00 New Revision: 4d1d1271b8612c72e0020c9d9f42d2ef70f717e7 URL: https://github.com/llvm/llvm-project/commit/4d1d1271b8612c72e0020c9d9f42d2ef70f717e7 DIFF: https://github.com/llvm/llvm-project/commit/4d1d1271b8612c72e0020c9d9f42d2ef70f717e7.diff

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread Aaron Ballman via cfe-commits
@@ -6,7 +6,9 @@ typedef enum EnumA { } EnumA; enum EnumB { - B + B, AaronBallman wrote: It might be good to capture some of what I wrote in the review summary as a comment here so it's clear why this is correct in both C and C++.

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread Aaron Ballman via cfe-commits
@@ -264,11 +264,14 @@ namespace { } QualType Expr::getEnumCoercedType(const ASTContext ) const { - if (isa(this->getType())) -return this->getType(); - else if (const auto *ECD = this->getEnumConstantDecl()) -return Ctx.getTypeDeclType(cast(ECD->getDeclContext()));

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

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

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Hmm, the rules are different between C and C++, but I think we may be okay. In C++: https://eel.is/c++draft/enum#dcl.enum-5.sentence-6 Following the closing brace of an enum-specifier, each enumerator has the type of its enumeration.

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -41,12 +41,8 @@ class CallDescription { /// - We also accept calls where the number of arguments or parameters is ///greater than the specified value. /// For the exact heuristics,

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: NagyDonat wrote: Currently MallocChecker doesn't use this `CDM::CLibrary` mode in the `CallDescription` for `malloc` -- because before this commit it would've been incorrect to use it. I'm planning to ensure that

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus edited https://github.com/llvm/llvm-project/pull/84469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread Kristóf Umann via cfe-commits
@@ -41,12 +41,8 @@ class CallDescription { /// - We also accept calls where the number of arguments or parameters is ///greater than the specified value. /// For the exact heuristics, see CheckerContext::isCLibraryFunction(). -/// Note that functions whose

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread Kristóf Umann via cfe-commits
@@ -87,9 +87,11 @@ bool CheckerContext::isCLibraryFunction(const FunctionDecl *FD, if (!II) return false; - // Look through 'extern "C"' and anything similar invented in the future. - // If this function is not in TU directly, it is not a C library function. - if

<    1   2   3   4   5   >