[libunwind] [libunwind] Fix wrong end argument passed to decodeEHHdr() (PR #68813)

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

[libunwind] [libunwind] Consistently pass start+length to decodeEHHdr() (PR #68813)

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

[libunwind] [libunwind] Consistently pass start+length to decodeEHHdr() (PR #68813)

2023-10-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/68813 >From ff360ee7f304424dd0d12d00b8c0ba6801241410 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Wed, 11 Oct 2023 08:34:55 -0700 Subject: [PATCH] [libunwind] Fix wrong end argument passed to decodeEHHdr()

[libunwind] [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (PR #68815)

2023-10-11 Thread Saleem Abdulrasool via cfe-commits
@@ -53,8 +53,21 @@ template class EHHeaderParser { template bool EHHeaderParser::decodeEHHdr(A &addressSpace, pint_t ehHdrStart, -pint_t ehHdrEnd, EHHeaderInfo &ehHdrInfo) { +size_t ehHdrSize, EHHeaderIn

[libunwind] [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (PR #68815)

2023-10-11 Thread Alexander Richardson via cfe-commits
@@ -53,8 +53,21 @@ template class EHHeaderParser { template bool EHHeaderParser::decodeEHHdr(A &addressSpace, pint_t ehHdrStart, -pint_t ehHdrEnd, EHHeaderInfo &ehHdrInfo) { +size_t ehHdrSize, EHHeaderIn

[libunwind] [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (PR #68815)

2023-10-11 Thread Alexander Richardson via cfe-commits
@@ -53,8 +53,21 @@ template class EHHeaderParser { template bool EHHeaderParser::decodeEHHdr(A &addressSpace, pint_t ehHdrStart, -pint_t ehHdrEnd, EHHeaderInfo &ehHdrInfo) { +size_t ehHdrSize, EHHeaderIn

[clang] [ASAN] Adjust asan instrumented GlobalVariable size to not include redzone (PR #66666)

2023-10-11 Thread via cfe-commits
skc7 wrote: @hctim, We want to identify global variables instrumented by asan at AsmPrinter stage. I can think of two approaches here: - Add SanitizerMetadata::NoAddress(false) at asan pass and also check if global is present in llvm.compiler.used list. - Create a new attribute (For Ex: "A

[clang] [Driver] Silence stdlib warning when linking C on FreeBSD (PR #68011)

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

[clang] 12b87f6 - [Driver] Silence stdlib warning when linking C on FreeBSD (#68011)

2023-10-11 Thread via cfe-commits
Author: dankm Date: 2023-10-11T12:28:04-04:00 New Revision: 12b87f6ef720080fab1e2d48ca2d8c5ba478ee5d URL: https://github.com/llvm/llvm-project/commit/12b87f6ef720080fab1e2d48ca2d8c5ba478ee5d DIFF: https://github.com/llvm/llvm-project/commit/12b87f6ef720080fab1e2d48ca2d8c5ba478ee5d.diff LOG: [D

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

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

[libunwind] [libunwind] Consistently pass start+length to decodeEHHdr() (PR #68813)

2023-10-11 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd requested changes to this pull request. Can we merge this into #68815 please? https://github.com/llvm/llvm-project/pull/68813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[libunwind] [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (PR #68815)

2023-10-11 Thread Saleem Abdulrasool via cfe-commits
@@ -53,8 +53,21 @@ template class EHHeaderParser { template bool EHHeaderParser::decodeEHHdr(A &addressSpace, pint_t ehHdrStart, -pint_t ehHdrEnd, EHHeaderInfo &ehHdrInfo) { +size_t ehHdrSize, EHHeaderIn

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

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

[clang] [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: Thank you f

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

2023-10-11 Thread Renaud Kauffmann 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) Renaud-K wrote: No, they

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

[clang] [Driver] Silence stdlib warning when linking C on FreeBSD (PR #68011)

2023-10-11 Thread via cfe-commits
dankm wrote: If this looks good to people, is anyone able to merge it? I cannot do it myself. https://github.com/llvm/llvm-project/pull/68011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[libunwind] [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (PR #68815)

2023-10-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Alexander Richardson (arichardson) Changes I was running the tests with baremetal picolibc which has a linker script that __eh_frame_start==__eh_frame_end (not equal to zero) in case there is no .eh_frame_hdr. I noticed that libunwind w

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

2023-10-11 Thread Richard Smith 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

[libunwind] [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (PR #68815)

2023-10-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/68815 I was running the tests with baremetal picolibc which has a linker script that __eh_frame_start==__eh_frame_end (not equal to zero) in case there is no .eh_frame_hdr. I noticed that libunwind was trying to rea

[libunwind] [libunwind] Consistently pass start+length to decodeEHHdr() (PR #68813)

2023-10-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Alexander Richardson (arichardson) Changes It previously took a start+end pint_t, but all but one callsite were actually passing start+length arguments. This should not have any functional change since the end argument is almost alway

[libunwind] [libunwind] Consistently pass start+length to decodeEHHdr() (PR #68813)

2023-10-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/68813 It previously took a start+end pint_t, but all but one callsite were actually passing start+length arguments. This should not have any functional change since the end argument is almost always ignored. I not

[libclc] [OpenMPIRBuilder] Add ThreadLimit and NumTeams clauses to teams construct (PR #68364)

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

[clang-tools-extra] [OpenMPIRBuilder] Add ThreadLimit and NumTeams clauses to teams construct (PR #68364)

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

[clang] [OpenMPIRBuilder] Add ThreadLimit and NumTeams clauses to teams construct (PR #68364)

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

[libunwind] [OpenMPIRBuilder] Add ThreadLimit and NumTeams clauses to teams construct (PR #68364)

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

[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)

2023-10-11 Thread Aaron Ballman via cfe-commits
@@ -1437,7 +1437,7 @@ bool OffsetHelper(InterpState &S, CodePtr OpPC, const T &Offset, return false; }; - unsigned MaxOffset = MaxIndex - Ptr.getIndex(); + T MaxOffset = T::from(MaxIndex - Ptr.getIndex(), Offset.bitWidth()); AaronBallman wrote: I thi

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

2023-10-11 Thread via cfe-commits
Author: Amirreza Ashouri Date: 2023-10-11T17:12:15+02:00 New Revision: 4313351c135cc32cdf3b3fc3e44cf57f100a96ef URL: https://github.com/llvm/llvm-project/commit/4313351c135cc32cdf3b3fc3e44cf57f100a96ef DIFF: https://github.com/llvm/llvm-project/commit/4313351c135cc32cdf3b3fc3e44cf57f100a96ef.di

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

2023-10-11 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/68506 ___ 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
AMP999 wrote: @cor3ntin Can you land this for me? https://github.com/llvm/llvm-project/pull/68506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [mlir][OpenMP] Added omp.region operation (PR #65243)

2023-10-11 Thread via cfe-commits
shraiysh wrote: Sure I'll do that. https://github.com/llvm/llvm-project/pull/65243 ___ 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
@@ -0,0 +1,44 @@ +//===--- CoroutineHostileRAIICheck.h - clang-tidy ---*- C++-*-===// EugeneZelenko wrote: Please add one more dash. https://github.com/llvm/llvm-project/pull/68738 ___ cfe-commits mailing l

[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 cac3c586a85e1070b2d4aa2ccbc1589c1c84105c 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) ---

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

2023-10-11 Thread via cfe-commits
@@ -180,6 +180,12 @@ New checks Detects C++ code where a reference variable is used to extend the lifetime of a temporary object that has just been constructed. +- New :doc:`misc-coroutine-hostile-raii EugeneZelenko wrote: Please keep alphabetical order (

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

2023-10-11 Thread 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 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 via cfe-commits
@@ -0,0 +1,82 @@ +//===--- CoroutineSuspensionHostileCheck.cpp - clang-tidy --===// EugeneZelenko wrote: Please make it same length as line at the end of comment block. https://github.com/llvm/llvm-project/pull/68738 _

[clang] [Driver] Link Flang runtime on Solaris (PR #65644)

2023-10-11 Thread Rainer Orth via cfe-commits
rorth wrote: > I'd like for this to move forward. Agreed: AFAICS the only open issue is whether the Solaris test should use the `GNU` label as I have done, introduce an new common one (like `UNIX`; there's nothing GNU-specific in that test), or really introduce a separate copy of the check un

[clang] [Driver] Link Flang runtime on Solaris (PR #65644)

2023-10-11 Thread Rainer Orth via cfe-commits
rorth wrote: > > I wonder how to proceed with the patch at hand. > > I'm not a Solaris expert, but based on this discussion I'd consider adding > support for `-fuse-ld` in Flang. This sort of changes are often as simple as > updating Options.td. Same for `-r`. Support of `-fuse-ld` is not Sol

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

2023-10-11 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,47 @@ +// test that tbaa attributes can be added to fir.load and fir.store banach-space wrote: Start with upper case https://github.com/llvm/llvm-project/pull/68595 ___ cfe-commits mailing list cfe-commits@l

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

2023-10-11 Thread Andrzej Warzyński via cfe-commits
@@ -214,6 +214,14 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts, clang::driver::options::OPT_fno_loop_versioning, false)) opts.LoopVersioning = 1; + opts.AliasAnalysis = false; + if (auto *arg = + args.getLastArg(cla

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

2023-10-11 Thread Andrzej Warzyński via cfe-commits
@@ -54,6 +54,9 @@ struct FIRToLLVMPassOptions { // Generate TBAA information for FIR types and memory accessing operations. bool applyTBAA = false; + + // force the usage of a unified tbaa tree in TBAABuilder banach-space wrote: Upper case + full stop.

[clang-tools-extra] [OpenMP] Improve omp offload profiler (PR #68016)

2023-10-11 Thread via cfe-commits
https://github.com/fel-cab updated https://github.com/llvm/llvm-project/pull/68016 >From dd44de067c26ba94b6561c5ed7fa4a5d812a3d1a Mon Sep 17 00:00:00 2001 From: Felipe Cabarcas Date: Mon, 18 Sep 2023 12:07:12 + Subject: [PATCH 01/13] testing Profiler features --- openmp/libomptarget/src/i

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

2023-10-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Tagging @llvm/pr-subscribers-compiler-rt-sanitizer for visibility again, since this PR is abandoned. https://github.com/llvm/llvm-project/pull/67673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[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

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

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

[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] [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,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
@@ -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,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
@@ -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
@@ -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 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-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,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,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,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,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] [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

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

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

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

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

<    1   2   3   >