[clang] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Jay Foad via cfe-commits
https://github.com/jayfoad updated https://github.com/llvm/llvm-project/pull/65729 >From 66129acffd34a4b0f2c8a956d88212ed2ee30946 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 8 Sep 2023 10:09:21 +0100 Subject: [PATCH] Clean up strange uses of getAnalysisIfAvailable After a pass calls add

[clang] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Jay Foad (jayfoad) Changes After a pass calls addRequired() it is strange to call getAnalysisIfAvailable() because analysis X should always be available. Use getAnalysis() instead. --- Full diff: https://github.com/llvm

[clang] [clang][C2x] Remove confusing diagnostic auto storage class specifier (PR #68710)

2023-10-11 Thread via cfe-commits
cor3ntin wrote: You should just be able to click "squash and merge", no? https://github.com/llvm/llvm-project/pull/68710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][C2x] Remove confusing diagnostic auto storage class specifier (PR #68710)

2023-10-11 Thread Guillot Tony via cfe-commits
to268 wrote: Nope, I can't > This branch has no conflicts with the base branch Only those with [write access](https://docs.github.com/articles/what-are-the-different-access-permissions) to this repository can merge pull requests. https://github.com/llvm/llvm-project/pull/68710

[clang] c3f67b3 - [clang][Interp] Limit MaxBitInt to 128 bits

2023-10-11 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-10-11T09:48:28+02:00 New Revision: c3f67b3ba9c8cf1677c7ee2a42a6ebd35fdcc763 URL: https://github.com/llvm/llvm-project/commit/c3f67b3ba9c8cf1677c7ee2a42a6ebd35fdcc763 DIFF: https://github.com/llvm/llvm-project/commit/c3f67b3ba9c8cf1677c7ee2a42a6ebd35fdcc763.diff LO

[clang] [clang][ASTImporter] Fix crash when template class static member impo… (PR #68774)

2023-10-11 Thread via cfe-commits
https://github.com/mzyKi created https://github.com/llvm/llvm-project/pull/68774 …rted to other translation unit. Fixes: #68769 https://github.com/llvm/llvm-project/issues/68769 >From 1c3b9f6696842230b49962531c065956a1b3ab8c Mon Sep 17 00:00:00 2001 From: miaozhiyuan Date: Wed, 11 Oct 2023 15:

[clang] [clang][ASTImporter] Fix crash when template class static member impo… (PR #68774)

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

[clang] [clang][ASTImporter] Fix crash when template class static member impo… (PR #68774)

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

[clang] [clang][ASTImporter] Fix crash when template class static member imported to other translation unit. (PR #68774)

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

[clang] [clang][Interp] IntegralAP zero-init (PR #68081)

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

[clang] [clang][Interp] Only emit function_param_value_unknown in C++11 (PR #67990)

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

[PATCH] D93829: [clangd] Support outgoing calls in call hierarchy

2023-10-11 Thread Nathan Ridge via Phabricator via cfe-commits
nridge commandeered this revision. nridge added a reviewer: qchateau. nridge added a comment. In D93829#4422090 , @qchateau wrote: > So if anyone wants to take it from there, feel free to reuse my commits (or > not). I'm going to pick up this work and tr

[clang] [clang][ASTImporter] Fix crash when template class static member imported to other translation unit. (PR #68774)

2023-10-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Exile (mzyKi) Changes Fixes: #68769 --- Full diff: https://github.com/llvm/llvm-project/pull/68774.diff 6 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+4) - (modified) clang/lib/AST/ASTImporter.cpp (+2-1) - (added) clang

[clang] [clang][C2x] Remove confusing diagnostic auto storage class specifier (PR #68710)

2023-10-11 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/68710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d5444ab - [clang][C2x] Remove confusing diagnostic auto storage class specifier (#68710)

2023-10-11 Thread via cfe-commits
Author: Guillot Tony Date: 2023-10-11T09:51:46+02:00 New Revision: d5444ab26743115e42e4abb3782bbefb0e8912d0 URL: https://github.com/llvm/llvm-project/commit/d5444ab26743115e42e4abb3782bbefb0e8912d0 DIFF: https://github.com/llvm/llvm-project/commit/d5444ab26743115e42e4abb3782bbefb0e8912d0.diff

[PATCH] D93829: [clangd] Support outgoing calls in call hierarchy

2023-10-11 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. To be able to reason about the impact of various memory usage optimizations, I took some baseline measurements. I used a workload consisting of the LLVM codebase, with the compile_commands.json entries filtered to those containing `clang/lib` or `clang-tools-extra/clang

[clang-tools-extra] [RISCV] Eliminate dead li after emitting VSETVLIs (PR #65934)

2023-10-11 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Gentle ping. https://github.com/llvm/llvm-project/pull/65934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Eliminate dead li after emitting VSETVLIs (PR #65934)

2023-10-11 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Gentle ping. https://github.com/llvm/llvm-project/pull/65934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

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

[clang-tools-extra] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

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

[clang] 4803ba9 - [clang][Interp] Remove expected-no-directives lines

2023-10-11 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-10-11T10:54:04+02:00 New Revision: 4803ba9ecbfcc9cd4be4d2ff4736ca510bd2ebd1 URL: https://github.com/llvm/llvm-project/commit/4803ba9ecbfcc9cd4be4d2ff4736ca510bd2ebd1 DIFF: https://github.com/llvm/llvm-project/commit/4803ba9ecbfcc9cd4be4d2ff4736ca510bd2ebd1.diff LO

[clang-tools-extra] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Björn Pettersson via cfe-commits
https://github.com/bjope edited https://github.com/llvm/llvm-project/pull/65729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Björn Pettersson via cfe-commits
@@ -3280,7 +3280,7 @@ class llvm::gvn::GVNLegacyPass : public FunctionPass { if (skipFunction(F)) return false; -auto *LIWP = getAnalysisIfAvailable(); +auto &LIWP = getAnalysis(); bjope wrote: IIUC GVN doesn't depend on LoopInfo itself. It

[clang-tools-extra] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Björn Pettersson via cfe-commits
https://github.com/bjope commented: I guess I don't know how pull requests and reviewing works in github. I actually added 3 comments on this patch a several days (or weeks) ago. But turns out that they were "pending" because I had only "started review" and not found the place to "submit revie

[clang] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Björn Pettersson via cfe-commits
@@ -261,7 +261,7 @@ bool VirtRegRewriter::runOnMachineFunction(MachineFunction &fn) { Indexes = &getAnalysis(); LIS = &getAnalysis(); VRM = &getAnalysis(); - DebugVars = getAnalysisIfAvailable(); + DebugVars = &getAnalysis(); bjope wrote: Not sure how

[clang] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Björn Pettersson via cfe-commits
https://github.com/bjope edited https://github.com/llvm/llvm-project/pull/65729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Björn Pettersson via cfe-commits
@@ -935,7 +935,7 @@ bool AArch64ConditionalCompares::runOnMachineFunction(MachineFunction &MF) { SchedModel = MF.getSubtarget().getSchedModel(); MRI = &MF.getRegInfo(); DomTree = &getAnalysis(); - Loops = getAnalysisIfAvailable(); + Loops = &getAnalysis();

[clang-tools-extra] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Björn Pettersson via cfe-commits
@@ -3280,7 +3280,7 @@ class llvm::gvn::GVNLegacyPass : public FunctionPass { if (skipFunction(F)) return false; -auto *LIWP = getAnalysisIfAvailable(); +auto &LIWP = getAnalysis(); bjope wrote: IIUC GVN doesn't depend on LoopInfo itself. It

[clang] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Jay Foad via cfe-commits
jayfoad wrote: > I guess I don't know how pull requests and reviewing works in github. I > actually added 3 comments on this patch a several days (or weeks) ago. But > turns out that they were "pending" because I had only "started review" and > not found the place to "submit review". For that

[clang] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Nikita Popov via cfe-commits
nikic wrote: > GVN seems to have different behavior regarding LoopInfo in the LegacyPM and > NewPM, but that's an orthogonal issue. I'll check whether always requiring > LoopInfo in GVN has any compile-time impact, as I don't think this is > supposed to be an optional analysis there (otherwise

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-11 Thread Dinar Temirbulatov via cfe-commits
@@ -292,7 +310,7 @@ define void @ldr_with_off_16mulvl(ptr %ptr) { %vscale = call i64 @llvm.vscale.i64() %mulvl = mul i64 %vscale, 256 %base = getelementptr i8, ptr %ptr, i64 %mulvl - call void @llvm.aarch64.sme.ldr(i32 16, ptr %base) + call void @llvm.aarch64.sme.ldr(i3

[PATCH] D159351: [Sema] Change order of displayed overloads in diagnostics

2023-10-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D159351#4653687 , @shafik wrote: > You say "attempts to be a strict weak order" does that mean there are still > cases which will cause an assert or are we not sure? No, it's an actual strict weak order. It's a bad cho

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-11 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea updated https://github.com/llvm/llvm-project/pull/68485 >From 03276260c48d9cafb2a0d80825156e77cdf02eba Mon Sep 17 00:00:00 2001 From: SuperSodaSea Date: Sat, 7 Oct 2023 21:05:17 +0800 Subject: [PATCH 1/5] [clang] static operators should evaluate object argument

[clang-tools-extra] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Jay Foad via cfe-commits
@@ -3280,7 +3280,7 @@ class llvm::gvn::GVNLegacyPass : public FunctionPass { if (skipFunction(F)) return false; -auto *LIWP = getAnalysisIfAvailable(); +auto &LIWP = getAnalysis(); jayfoad wrote: I prefer not to leave it as is - I think eith

[clang-tools-extra] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Jay Foad via cfe-commits
@@ -261,7 +261,7 @@ bool VirtRegRewriter::runOnMachineFunction(MachineFunction &fn) { Indexes = &getAnalysis(); LIS = &getAnalysis(); VRM = &getAnalysis(); - DebugVars = getAnalysisIfAvailable(); + DebugVars = &getAnalysis(); jayfoad wrote: Thanks! Fi

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86 datalayouts

2023-10-11 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. The buildbot found one more test that needed updating, that was disabled on my system. Created https://github.com/llvm/llvm-project/pull/68781 for that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86310/new/ https://revie

[clang] Draft:[clang][ASTImporter] Fix crash when template class static member imported to other translation unit. (PR #68774)

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

[clang-tools-extra] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Jay Foad via cfe-commits
@@ -935,7 +935,7 @@ bool AArch64ConditionalCompares::runOnMachineFunction(MachineFunction &MF) { SchedModel = MF.getSubtarget().getSchedModel(); MRI = &MF.getRegInfo(); DomTree = &getAnalysis(); - Loops = getAnalysisIfAvailable(); + Loops = &getAnalysis();

[clang] Draft:[clang][ASTImporter] Fix crash when template class static member imported to other translation unit. (PR #68774)

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

[clang] [flang] Add flags controlling whether to run the fir alias tags pass (PR #68595)

2023-10-11 Thread Mats Petersson via cfe-commits
https://github.com/Leporacanthicus approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/68595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Add flags controlling whether to run the fir alias tags pass (PR #68595)

2023-10-11 Thread Mats Petersson via cfe-commits
https://github.com/Leporacanthicus approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/68595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Add flags controlling whether to run the fir alias tags pass (PR #68595)

2023-10-11 Thread David Truby via cfe-commits
https://github.com/DavidTruby approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/68595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-11 Thread Tianlan Zhou via cfe-commits
@@ -7806,7 +7806,8 @@ class ExprEvaluatorBase // Overloaded operator calls to member functions are represented as normal // calls with '*this' as the first argument. const CXXMethodDecl *MD = dyn_cast(FD); - if (MD && MD->isImplicitObjectMemberFunction()

[clang] [flang] Add flags controlling whether to run the fir alias tags pass (PR #68595)

2023-10-11 Thread Tom Eccles via cfe-commits
tblah wrote: > Does `falias-analysis` control the existing TBAA generation as well? Not in this patch while -falias-analysis is kept separate and non-default. But that will be the intention in the future. https://github.com/llvm/llvm-project/pull/68595 _

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-10-11 Thread via cfe-commits
@@ -7098,6 +7052,69 @@ class APValueToBufferConverter { return true; } + bool visitVector(const APValue &Val, QualType Ty, CharUnits Offset) { +const VectorType *VTy = Ty->castAs(); +QualType EltTy = VTy->getElementType(); +unsigned NElts = VTy->getNumElemen

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/68506 >From 32bcab427637432621590a64afaad1677fe832cb Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 19:02:34 +0330 Subject: [PATCH 1/3] [clang] Rename some misleading names (Non-functional) These

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

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

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/68506 >From fdbeba9c94ddb13ee53a761d9e1a95b044f2c20a Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 19:02:34 +0330 Subject: [PATCH 1/3] [clang] Rename some misleading names (Non-functional) These

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/68506 >From fdbeba9c94ddb13ee53a761d9e1a95b044f2c20a Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 19:02:34 +0330 Subject: [PATCH 1/3] [clang] Rename some misleading names (Non-functional) These

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/68506 >From fdbeba9c94ddb13ee53a761d9e1a95b044f2c20a Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 19:02:34 +0330 Subject: [PATCH 1/3] [clang] Rename some misleading names (Non-functional) These

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/68506 >From fdbeba9c94ddb13ee53a761d9e1a95b044f2c20a Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 19:02:34 +0330 Subject: [PATCH 1/3] [clang] Rename some misleading names (Non-functional) These

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/68738 >From f9e29053a7a8fd8222cfbdf579776fafd6564b89 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 10 Oct 2023 21:53:37 +0200 Subject: [PATCH 1/2] [clang-tidy] Add check to flag objects hostile to suspension i

[clang] [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-10-11 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > Because I don't know of any better way to commandeer a patch in GitHub > > > > > > As a maintainer, you can push into this branch > > I had reached out to @ThePhD with an offer to help on this before they opened > this PR, and I now have push access to their fork, wh

[clang] a633a37 - Diagnose problematic uses of constructor/destructor attribute (#67673)

2023-10-11 Thread via cfe-commits
Author: Aaron Ballman Date: 2023-10-11T08:14:45-04:00 New Revision: a633a3761fcbd0799426cbf5fbd7794961080e43 URL: https://github.com/llvm/llvm-project/commit/a633a3761fcbd0799426cbf5fbd7794961080e43 DIFF: https://github.com/llvm/llvm-project/commit/a633a3761fcbd0799426cbf5fbd7794961080e43.diff

[clang-tools-extra] Diagnose problematic uses of constructor/destructor attribute (PR #67673)

2023-10-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/67673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Diagnose problematic uses of constructor/destructor attribute (PR #67673)

2023-10-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/67673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 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 97b989b27496d5aeadb3b90cbb9305ddcd9e35d2 78e3102b83809486fd6b4f255a2e77b59bc4ad0e --

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: > I think there is an opportunity for a small refactor here, but feel free to > land this and we can handle the refactor later as an NFC change if you prefer Is this (344455e) what you had in mind? I only found a few places that could use the factored-out function, and in the "Co

[clang] 0cb6c41 - Revert "Diagnose problematic uses of constructor/destructor attribute (#67673)"

2023-10-11 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-10-11T08:31:13-04:00 New Revision: 0cb6c413b1883a18341a428bb9179fa31cd6e4e3 URL: https://github.com/llvm/llvm-project/commit/0cb6c413b1883a18341a428bb9179fa31cd6e4e3 DIFF: https://github.com/llvm/llvm-project/commit/0cb6c413b1883a18341a428bb9179fa31cd6e4e3.diff

[PATCH] D156784: [AArch64][PAC] Declare FPAC subtarget feature

2023-10-11 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. As discussed in D156716 , it is not clear if I have to add FeatureFPAC to every relevant CPU. Maybe it is worth conservatively assuming that this feature should only be enabled manually by the user as a precaution against "I have CP

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/68738 >From f9e29053a7a8fd8222cfbdf579776fafd6564b89 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 10 Oct 2023 21:53:37 +0200 Subject: [PATCH 1/4] [clang-tidy] Add check to flag objects hostile to suspension i

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-11 Thread via cfe-commits
cor3ntin wrote: Yup, this is what i have in mind. Afaik, the CodeGenFunction.cpp change was a bug that you fixed - just going off the comment. https://github.com/llvm/llvm-project/pull/68506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] 27ecb63 - Diagnose problematic uses of constructor/destructor attribute (#67673)

2023-10-11 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-10-11T08:55:33-04:00 New Revision: 27ecb63c260400dd20b8c5dc16d0dfd2d0e7122e URL: https://github.com/llvm/llvm-project/commit/27ecb63c260400dd20b8c5dc16d0dfd2d0e7122e DIFF: https://github.com/llvm/llvm-project/commit/27ecb63c260400dd20b8c5dc16d0dfd2d0e7122e.diff

[clang] [flang] add tbaa tags to global variables (PR #68727)

2023-10-11 Thread Tom Eccles via cfe-commits
@@ -406,7 +406,7 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v) { attributes.set(Attribute::Pointer); } - if (type == SourceKind::Global) + if (type == SourceKind::Global || type == SourceKind::Direct) tblah wrote: So `SourceK

[clang] ac27228 - Revert "Diagnose problematic uses of constructor/destructor attribute (#67673)"

2023-10-11 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-10-11T09:02:24-04:00 New Revision: ac2722873b26e2623a0be8cd6cacf529aa8f26ca URL: https://github.com/llvm/llvm-project/commit/ac2722873b26e2623a0be8cd6cacf529aa8f26ca DIFF: https://github.com/llvm/llvm-project/commit/ac2722873b26e2623a0be8cd6cacf529aa8f26ca.diff

[clang-tools-extra] Diagnose problematic uses of constructor/destructor attribute (PR #67673)

2023-10-11 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I landed this and compiler-rt is still broken. I tried again to fix it up and wasn't able to find the right way to convince CMake to suppress the diagnostic. I have run out of time to put into trying to solve the build system issues (this was a drive-by set of fixes that ha

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

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

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

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

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/68738 >From f9e29053a7a8fd8222cfbdf579776fafd6564b89 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 10 Oct 2023 21:53:37 +0200 Subject: [PATCH 1/5] [clang-tidy] Add check to flag objects hostile to suspension i

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Utkarsh Saxena (usx95) Changes This check detects **hostile-RAII** objects which should not **persist across a suspension point in a coroutine**. Some objects require that they be destroyed on the same thread that created them. Trad

[PATCH] D159351: [Sema] Change order of displayed overloads in diagnostics

2023-10-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. I think the changes should come with a release note so users know about the improved user experience (it would be great to show the code example from this patch summary in the re

[clang] [clang][dataflow] Add support for lambda captures (PR #68558)

2023-10-11 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/68558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,48 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +This check detects hostile-RAII objects which should not persist across a PiotrZSL wrote: first paragraph in documentation should be sam

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,82 @@ +//===--- CoroutineSuspensionHostileCheck.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: Apache-

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,82 @@ +//===--- CoroutineSuspensionHostileCheck.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: Apache-

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,82 @@ +//===--- CoroutineSuspensionHostileCheck.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: Apache-

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,82 @@ +//===--- CoroutineSuspensionHostileCheck.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: Apache-

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,82 @@ +//===--- CoroutineSuspensionHostileCheck.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: Apache-

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/68738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,82 @@ +//===--- CoroutineSuspensionHostileCheck.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: Apache-

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,131 @@ +// RUN: %check_clang_tidy -std=c++20 %s misc-coroutine-hostile-raii %t \ +// RUN: -config="{CheckOptions: \ +// RUN: {misc-coroutine-hostile-raii.RAIIDenyList: \ +// RUN: 'my::Mutex; ::my::other::Mutex'}}" + +namespace std { + +templa

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,48 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +This check detects hostile-RAII objects which should not persist across a +suspension point in a coroutine. + +Some objects require that they be destroyed

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

2023-10-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/65638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,48 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +This check detects hostile-RAII objects which should not persist across a +suspension point in a coroutine. + +Some objects require that they be destroyed

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,48 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +This check detects hostile-RAII objects which should not persist across a +suspension point in a coroutine. + +Some objects require that they be destroyed

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

2023-10-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this! I think the changes should come with a release note so users know about the fix. I did have a question on the design, but overall the direction seems sensible to me. https://github.com/llvm/llvm-project/pull/65638 __

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,48 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +This check detects hostile-RAII objects which should not persist across a +suspension point in a coroutine. + +Some objects require that they be destroyed

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -241,6 +241,7 @@ Clang-Tidy Checks :doc:`llvmlibc-restrict-system-libc-headers `, "Yes" :doc:`misc-confusable-identifiers `, :doc:`misc-const-correctness `, "Yes" + :doc:`misc-coroutine-hostile-raii `_, "Yes" PiotrZSL wrote: Check does not prov

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,82 @@ +//===--- CoroutineSuspensionHostileCheck.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: Apache-

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

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

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

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

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,131 @@ +// RUN: %check_clang_tidy -std=c++20 %s misc-coroutine-hostile-raii %t \ +// RUN: -config="{CheckOptions: \ +// RUN: {misc-coroutine-hostile-raii.RAIIDenyList: \ +// RUN: 'my::Mutex; ::my::other::Mutex'}}" + +namespace std { + +templa

[PATCH] D154581: [clang][Interp] Track existing InitMaps in InterpState

2023-10-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/Descriptor.cpp:42 const Descriptor *D) { + new (Ptr) InitMapPtr(std::nullopt); + tbaeder wrote: > aaron.ballman wrote: > > This worries me a little bit for a few reaso

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,131 @@ +// RUN: %check_clang_tidy -std=c++20 %s misc-coroutine-hostile-raii %t \ +// RUN: -config="{CheckOptions: \ +// RUN: {misc-coroutine-hostile-raii.RAIIDenyList: \ +// RUN: 'my::Mutex; ::my::other::Mutex'}}" + +namespace std { + +templa

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,131 @@ +// RUN: %check_clang_tidy -std=c++20 %s misc-coroutine-hostile-raii %t \ +// RUN: -config="{CheckOptions: \ +// RUN: {misc-coroutine-hostile-raii.RAIIDenyList: \ +// RUN: 'my::Mutex; ::my::other::Mutex'}}" + +namespace std { + +templa

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-11 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. >From functional point of view doesn't look do bad. My main concerns is about that 3 nested for-loops and ifs, this need to be refactored to show more clear that it's trying to match varDecl defined before suspension point. ht

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

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

[clang] [flang] add tbaa tags to global variables (PR #68727)

2023-10-11 Thread Kiran Chandramohan via cfe-commits
@@ -406,7 +406,7 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v) { attributes.set(Attribute::Pointer); } - if (type == SourceKind::Global) + if (type == SourceKind::Global || type == SourceKind::Direct) kiranchandramohan wrote:

[PATCH] D153001: [clang][ThreadSafety] Add __builtin_instance_member (WIP)

2023-10-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder abandoned this revision. tbaeder added a comment. As discussed via other channels, this is going nowhere and we will take another approach, if any. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153001/new/ https://reviews.llvm.org/D153001

  1   2   3   >