[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. [[tem

[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][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] [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][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
@@ -165,6 +165,8 @@ class CStringChecker : public Checker< eval::Call, {{CDM::CLibrary, {"explicit_bzero"}, 2}, &CStringChecker::evalBzero}, {{CDM::CLibrary, {"sprintf"}, 2}, &CStringChecker::evalSprintf}, {{CDM::CLibrary, {"snprintf"}, 2}, &CStringChecker::ev

[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 &C, const CallEvent &Call, C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext &C, +const CallEvent &Call, 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 &C, const CallEvent &Call, C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext &C, +const CallEvent &Call, CharKind CK) const { + Dest

[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 &C, const CallEvent &Call, C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext &C, +const CallEvent &Call) const { + DestinationArgExp

[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 &C, const CallEvent &Call, C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext &C, +const CallEvent &Call, CharKind CK) const { + Dest

[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 &C, const CallEvent &Call) const; void evalSprintfCommon(CheckerContext &C, const CallEvent &Call, 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 &C, const CallEvent &Call, C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext &C, +const CallEvent &Call, CharKind CK) const { + Dest

[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 &C, const CallEvent &Call, C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext &C, +const CallEvent &Call, CharKind CK) const { + Dest

[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 free-func

[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-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] [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) { // &TenElements[idx]. } +int overflowOrUnderflow(int arg) { + // expected-note@+2 {{Assuming 'arg' is < 0}} + // expected-note@+1 {{Taking false branch}} + if (

[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] [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 https://gi

[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 LO

[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-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. **T

[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] [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 ___ cfe-com

[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 th

[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 A

[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 b/clang/includ

[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] [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] [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 momen

[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][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. https://github.com/llvm/llvm-projec

[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 https://lists.

[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 cfe-commits@list

[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 https://lists.llvm.

[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-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 the

[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 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] [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. https://github.com/llvm/llvm-pr

[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][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 th

[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
@@ -1158,6 +1173,118 @@ void StreamChecker::evalUngetc(const FnDescription *Desc, const CallEvent &Call, C.addTransition(StateFailed); } +ProgramStateRef +StreamChecker::ensurePtrNotNull(SVal PtrVal, const Expr *PtrExpr, +CheckerContext &C, P

[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 &Call, C.addTransition(StateFailed); } +ProgramStateRef +StreamChecker::ensurePtrNotNull(SVal PtrVal, const Expr *PtrExpr, +CheckerContext &C, P

[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 &Call, C.addTransition(StateFailed); } +ProgramStateRef +StreamChecker::ensurePtrNotNull(SVal PtrVal, const Expr *PtrExpr, +CheckerContext &C, P

[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 &Call, C.addTransition(StateFailed); } +ProgramStateRef +StreamChecker::ensurePtrNotNull(SVal PtrVal, const Expr *PtrExpr, +CheckerContext &C, P

[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 withou

[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] [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 be

[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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[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 object

[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. https://github.com/llvm/llvm-

[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
@@ -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: Ap

[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: Ap

[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: Ap

[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: Ap

[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: Ap

[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 [readability-math-mi

[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. https://github.com/llvm/

[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] [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] [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-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
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 object

[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 Add

[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 https://lists.llvm.org/cgi-

[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 object

[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][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 gen

[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] [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: This

[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 cfe-commits@lists.llvm

[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 CStringChecker.

[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`, eve

[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] 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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[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: Ap

[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: Ap

[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: Ap

[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] [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 Thi

[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 maili

[clang] [clang][Interp] Implement __builtin_popcountg (PR #84500)

2024-03-08 Thread via cfe-commits
https://github.com/overmighty created https://github.com/llvm/llvm-project/pull/84500 None >From 8850f6e317e440babaa95830123eae2b7bf46db6 Mon Sep 17 00:00:00 2001 From: OverMighty Date: Fri, 8 Mar 2024 15:23:25 + Subject: [PATCH] [clang][Interp] Implement __builtin_popcountg --- clang/li

[clang] [clang][Interp] Implement __builtin_popcountg (PR #84500)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: OverMighty (overmighty) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/84500.diff 2 Files Affected: - (modified) clang/lib/AST/Interp/InterpBuiltin.cpp (+2-5) - (modified) clang/test/AST/Interp/builtin-functions.cpp

[clang] [clang][Interp] Implement __builtin_popcountg (PR #84500)

2024-03-08 Thread via cfe-commits
overmighty wrote: cc @tbaederr https://github.com/llvm/llvm-project/pull/84500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement __builtin_popcountg (PR #84500)

2024-03-08 Thread via cfe-commits
@@ -53,11 +53,7 @@ static APSInt peekToAPSInt(InterpStack &Stk, PrimType T, size_t Offset = 0) { Offset = align(primSize(T)); APSInt R; - INT_TYPE_SWITCH(T, { -T Val = Stk.peek(Offset); -R = APSInt(APInt(Val.bitWidth(), static_cast(Val), T::isSigned()), --

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

2024-03-08 Thread Balázs Kéri via cfe-commits
balazske wrote: I want to avoid that some functions have null pointer checks in `StreamChecker`, some not. If this change is merged then it would be good to add null pointer checks to other functions like `fread` and `fwrite`. (Until now only the NULL stream pointer was checked.) https://gith

[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 b7887543320f8727545a7ce8e6d9e02b77604472 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 Thi

[clang] [llvm] [Clang][LLVM][SVE2.1] Created intrinsics for DUPQ instr. (PR #83260)

2024-03-08 Thread via cfe-commits
https://github.com/CarolineConcatto approved this pull request. https://github.com/llvm/llvm-project/pull/83260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/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 d1bedf3a9b1d0d4c2fbfc10509797b39eef3d592 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 Thi

[clang] 2b4d818 - [Clang][LLVM][SVE2.1] Created intrinsics for DUPQ instr. (#83260)

2024-03-08 Thread via cfe-commits
Author: Lukacma Date: 2024-03-08T15:35:48Z New Revision: 2b4d8188b263019477fa996b74b3da8a87a0e04b URL: https://github.com/llvm/llvm-project/commit/2b4d8188b263019477fa996b74b3da8a87a0e04b DIFF: https://github.com/llvm/llvm-project/commit/2b4d8188b263019477fa996b74b3da8a87a0e04b.diff LOG: [Clan

[clang] [llvm] [Clang][LLVM][SVE2.1] Created intrinsics for DUPQ instr. (PR #83260)

2024-03-08 Thread via cfe-commits
https://github.com/Lukacma closed https://github.com/llvm/llvm-project/pull/83260 ___ 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 David Spickett via cfe-commits
DavidSpickett wrote: > I've added a host id (0xd42) to llvm/lib/TargetParser/Host.cpp, so I think so > (unless there's something else required). Right, of course, somehow I skipped right over that. 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
https://github.com/DavidSpickett approved this pull request. Looks good to me. 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] [X86] Finally handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

2024-03-08 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >