[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-16 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/77066 >From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Fri, 5 Jan 2024 10:11:20 +0100 Subject: [PATCH 01/14] [coroutines] Detect lifetime issues with coroutine lambda cap

[clang] [NFC][Clang][Headers] Update refs to ACLE in comments (PR #78297)

2024-01-16 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 c1a442462d9d47f86392da7e7019ab218d7a3088 5306cac319986b110638148cb28b2a0f4a4b1ce4 --

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-16 Thread Ilya Biryukov via cfe-commits
@@ -15845,8 +15845,10 @@ void Sema::CheckCoroutineWrapper(FunctionDecl *FD) { RecordDecl *RD = FD->getReturnType()->getAsRecordDecl(); if (!RD || !RD->getUnderlyingDecl()->hasAttr()) return; - // Allow `get_return_object()`. - if (FD->getDeclName().isIdentifier() && +

[clang] 7b8f7f7 - [OpenACC] Implement copyin/create clause parsing.

2024-01-16 Thread via cfe-commits
Author: erichkeane Date: 2024-01-16T07:47:07-08:00 New Revision: 7b8f7f75a0be5571f3b01a9cebbfce929bbc76b3 URL: https://github.com/llvm/llvm-project/commit/7b8f7f75a0be5571f3b01a9cebbfce929bbc76b3 DIFF: https://github.com/llvm/llvm-project/commit/7b8f7f75a0be5571f3b01a9cebbfce929bbc76b3.diff LO

[clang] [Clang][OpenMP] Add a NULL check (PR #77131)

2024-01-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/77131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Alright, I've applied. Thanks! https://github.com/llvm/llvm-project/pull/78274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Add a NULL check (PR #77131)

2024-01-16 Thread Shilei Tian via cfe-commits
shiltian wrote: Can you add a test? https://github.com/llvm/llvm-project/pull/77131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [clang] [libc++] Re-enable the clang_modules_include test for Objective-C++ (PR #66801)

2024-01-16 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/66801 >From f056692eff4cc4ee9315a40a32ddd025be5d7e8d Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 23 Aug 2023 22:23:17 -0400 Subject: [PATCH] [libc++] Re-enable the clang_modules_include test for Objective-C

[libcxx] [clang] [libc++] Re-enable the clang_modules_include test for Objective-C++ (PR #66801)

2024-01-16 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/66801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [libc++] Re-enable the clang_modules_include test for Objective-C++ (PR #66801)

2024-01-16 Thread Louis Dionne via cfe-commits
ldionne wrote: Thanks folks! I rebased and I'm re-running the CI. I'll merge once it's green. https://github.com/llvm/llvm-project/pull/66801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-01-16 Thread via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %clang_cc1 -std=c++2a -verify %s + +struct A { + int a, b[3], c; + bool operator==(const A&) const = default; +}; + +constexpr auto a0 = A{0, 0, 3, 4, 5}; + +// expected-note@+1 {{evaluates to 'A{0, {0, 3, 4}, 5} == A{1, {2, 3, 4}, 5}'}} +static_assert

[clang] [libcxx] [libc++] Re-enable the clang_modules_include test for Objective-C++ (PR #66801)

2024-01-16 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r c1a442462d9d47f86392da7e7019ab218d7a3088...f056692eff4cc4ee9315a40a32ddd025be5d7e8d libcx

[clang] [Clang] Amend SME attributes with support for ZT0. (PR #77941)

2024-01-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: The additional size of ExtProtoInfo and FunctionType are both, IMO, problematic, we should be shrinking these. >This also make me wonder if we should be reserving some extra bits for future >state that may need adding? The point is to minimize the siz

[clang] [Clang] Amend SME attributes with support for ZT0. (PR #77941)

2024-01-16 Thread Erich Keane via cfe-commits
@@ -4253,7 +4260,7 @@ class FunctionProtoType final FunctionType::ExtInfo ExtInfo; unsigned Variadic : 1; unsigned HasTrailingReturn : 1; -unsigned AArch64SMEAttributes : 6; erichkeane wrote: Note that thanks to bitfield packing, this is expand

[clang] [Clang] Amend SME attributes with support for ZT0. (PR #77941)

2024-01-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/77941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Amend SME attributes with support for ZT0. (PR #77941)

2024-01-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/77941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [clang] [libc++] Re-enable the clang_modules_include test for Objective-C++ (PR #66801)

2024-01-16 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/66801 >From f056692eff4cc4ee9315a40a32ddd025be5d7e8d Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 23 Aug 2023 22:23:17 -0400 Subject: [PATCH 1/2] [libc++] Re-enable the clang_modules_include test for Objecti

[clang] [llvm] [RISCV] CodeGen of RVE and ilp32e/lp64e ABIs (PR #76777)

2024-01-16 Thread via cfe-commits
koute wrote: As a third-party bystander I just want to say, thank you to everyone involved! And especially @wangpc-pp, a huge thank you for pushing this through! https://github.com/llvm/llvm-project/pull/76777 ___ cfe-commits mailing list cfe-commits@

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-01-16 Thread Erich Keane via cfe-commits
@@ -3167,6 +3167,15 @@ Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, DeclaratorInfo.complete(ThisDecl); +if (TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate) { + if (Tok.is(tok::comma)) { +Diag(Tok, diag::err_multiple_template_declarato

[clang] [NFC][Clang][Headers] Update refs to ACLE in comments (PR #78305)

2024-01-16 Thread Victor Campos via cfe-commits
https://github.com/vhscampos created https://github.com/llvm/llvm-project/pull/78305 None >From 9a72dd14c75670bcfb2de73754f5366d792b99cc Mon Sep 17 00:00:00 2001 From: Max Iyengar Date: Mon, 18 Sep 2023 13:21:28 +0100 Subject: [PATCH] [NFC][Clang][Headers] Update refs to ACLE in comments ---

[clang] [NFC][Clang][Headers] Update refs to ACLE in comments (PR #78305)

2024-01-16 Thread Victor Campos via cfe-commits
https://github.com/vhscampos updated https://github.com/llvm/llvm-project/pull/78305 >From bc6d669367ff399fddfb9b1bbc2fdc8effbfc408 Mon Sep 17 00:00:00 2001 From: Max Iyengar Date: Mon, 18 Sep 2023 13:21:28 +0100 Subject: [PATCH] [NFC][Clang][Headers] Update refs to ACLE in comments --- clang

[clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-01-16 Thread Erich Keane via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %clang_cc1 -std=c++2a -verify %s + +struct A { + int a, b[3], c; + bool operator==(const A&) const = default; +}; + +constexpr auto a0 = A{0, 0, 3, 4, 5}; + +// expected-note@+1 {{evaluates to 'A{0, {0, 3, 4}, 5} == A{1, {2, 3, 4}, 5}'}} +static_assert

[clang-tools-extra] [llvm] [compiler-rt] [clang] [flang] [Flang][OpenMP] Push genEval closer to leaf lowering functions (PR #77760)

2024-01-16 Thread via cfe-commits
@@ -3189,13 +3208,15 @@ static void genOMP(Fortran::lower::AbstractConverter &converter, if ((llvm::omp::allTargetSet & llvm::omp::loopConstructSet) .test(ompDirective)) { validDirective = true; - genTargetOp(converter, eval, semanticsContext, curren

[clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-01-16 Thread via cfe-commits
sethp wrote: Yeah, definitely agree about adding no new issues like https://github.com/llvm/llvm-project/issues/71675 . The good news is that ought to make for an easy test case: something like `struct { _BitInt(__BITINT_MAXWIDTH__ >> 6) F }` should do it. I'll take a look! https://github.com

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: A vast majority of this is parser related, and I'm not super familiar there, so @cor3ntin is likely a better reviewer here. https://github.com/llvm/llvm-project/pull/78274 ___ cfe-commits mailing list cfe-commi

[clang] [NFC][Clang][Headers] Update refs to ACLE in comments (PR #78305)

2024-01-16 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 6c1b5ec213ee7376bed9357211e5582931318974 bc6d669367ff399fddfb9b1bbc2fdc8effbfc408 --

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-16 Thread Erich Keane via cfe-commits
@@ -6070,7 +6070,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, /// /// The result of this call will never be null, but the associated /// type may be a null type if there's an unrecoverable error. -TypeSourceInfo *Sema::GetTypeForDeclarator(D

[clang] cbaadb1 - [clang][ASTMatcher] Add matchers for CXXFoldExpr (#71245)

2024-01-16 Thread via cfe-commits
Author: Julian Schmidt Date: 2024-01-16T17:13:38+01:00 New Revision: cbaadb1f0ff9966a65c926b3d8c32f2f47281b73 URL: https://github.com/llvm/llvm-project/commit/cbaadb1f0ff9966a65c926b3d8c32f2f47281b73 DIFF: https://github.com/llvm/llvm-project/commit/cbaadb1f0ff9966a65c926b3d8c32f2f47281b73.diff

[clang] [clang][ASTMatcher] Add matchers for CXXFoldExpr (PR #71245)

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

[libc] [lldb] [libunwind] [libcxx] [clang-tools-extra] [libcxxabi] [llvm] [compiler-rt] [lld] [clang] [flang] [mlir] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-16 Thread Mark de Wever via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// 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

[compiler-rt] [flang] [clang] [clang-tools-extra] [llvm] [Flang][OpenMP] Push genEval closer to leaf lowering functions (PR #77760)

2024-01-16 Thread Krzysztof Parzyszek via cfe-commits
@@ -3189,13 +3208,15 @@ static void genOMP(Fortran::lower::AbstractConverter &converter, if ((llvm::omp::allTargetSet & llvm::omp::loopConstructSet) .test(ompDirective)) { validDirective = true; - genTargetOp(converter, eval, semanticsContext, curren

[libc] [llvm] [lld] [flang] [libcxx] [libunwind] [mlir] [clang] [compiler-rt] [lldb] [libcxxabi] [clang-tools-extra] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-16 Thread Mark de Wever via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// 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

[lld] [llvm] [libunwind] [compiler-rt] [libcxx] [clang-tools-extra] [libc] [libcxxabi] [flang] [lldb] [mlir] [clang] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-16 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// 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

[clang-tools-extra] [lldb] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-16 Thread Erich Keane via cfe-commits
@@ -551,6 +646,18 @@ static const T &DiagTemplateArg(const T &DB, const TemplateArgument &Arg) { case TemplateArgument::Integral: return DB << toString(Arg.getAsIntegral(), 10); + case TemplateArgument::StructuralValue: { +// FIXME: We're guessing at LangOptions! -

[clang] [clang-tools-extra] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/78041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I would love it if @efriedma-quic / @rjmccall looked at the mangling parts, and @dwblaikie looked at the Debug info. Else, LGTM. https://github.com/llvm/llvm-project/pull/78041 ___ cfe-commits mailing list cfe

[clang-tools-extra] [clang] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-16 Thread Erich Keane via cfe-commits
@@ -12,6 +12,7 @@ #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/DeclVisitor.h" +#include "clang/AST/ODRHash.h" erichkeane wrote: We shouldn't be minimizing the #include set, but it is often a 'red flag' when someone ad

[clang] [Clang] Amend SME attributes with support for ZT0. (PR #77941)

2024-01-16 Thread Aaron Ballman via cfe-commits
@@ -4253,7 +4260,7 @@ class FunctionProtoType final FunctionType::ExtInfo ExtInfo; unsigned Variadic : 1; unsigned HasTrailingReturn : 1; -unsigned AArch64SMEAttributes : 6; AaronBallman wrote: Looking through the review which started introduc

[clang] [Clang] Amend SME attributes with support for ZT0. (PR #77941)

2024-01-16 Thread Aaron Ballman via cfe-commits
@@ -4068,7 +4075,7 @@ class FunctionType : public Type { /// Any AArch64 SME ACLE type attributes that need to be propagated /// on declarations and function pointers. -unsigned AArch64SMEAttributes : 6; +unsigned AArch64SMEAttributes : 8; Aaro

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2024-01-16 Thread via cfe-commits
@@ -3767,6 +3767,57 @@ void DependentDecltypeType::Profile(llvm::FoldingSetNodeID &ID, E->Profile(ID, Context, true); } +PackIndexingType::PackIndexingType(const ASTContext &Context, + QualType Canonical, QualType Pattern, +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Saleem Abdulrasool via cfe-commits
@@ -2601,6 +2604,22 @@ def SwiftError : InheritableAttr { let Documentation = [SwiftErrorDocs]; } +def SwiftImportAsNonGeneric : InheritableAttr { compnerd wrote: Ah, okay. https://github.com/llvm/llvm-project/pull/73017 ___

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69900 >From 58ff884a20816526ea1b3e4035a65ab435e2396d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 22 Oct 2023 19:47:33 +0200 Subject: [PATC

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -198,6 +198,27 @@ bool ByteCodeStmtGen::visitFunc(const FunctionDecl *F) { return false; if (!this->emitInitPtrPop(InitExpr)) return false; + } else if (const IndirectFieldDecl *IFD = Init->

[clang] [clang] Fix CTAD not work for function-type and array-type arguments. (PR #78159)

2024-01-16 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > > Can you please provide a more detailed summary, since these are usually > > what goes in the git log. It should describe the cause and the approach of > > the fix. It is also helpful for reviewers as well. > > Done, added details in the description. Thank you! Much appreciat

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69900 >From 58ff884a20816526ea1b3e4035a65ab435e2396d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 22 Oct 2023 19:4

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Saleem Abdulrasool via cfe-commits
@@ -7539,74 +7559,65 @@ static NullabilityKind mapNullabilityAttrKind(ParsedAttr::Kind kind) { } } -/// Applies a nullability type specifier to the given type, if possible. -/// -/// \param state The type processing state. -/// -/// \param type The type to which the nullabi

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: Do we want to submit the first three in the series and then take on the topmost commit? https://github.com/llvm/llvm-project/pull/73017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang] emit an error when the same identifier appears with both internal and external linkage in a translation unit (PR #78064)

2024-01-16 Thread Aaron Ballman via cfe-commits
@@ -918,6 +918,10 @@ Bug Fixes to C++ Support (`#57410 `_) and (`#76604 `_) +- Emit an error when the same identifier appears with both internal and + external linkage in

[clang] [clang] emit an error when the same identifier appears with both internal and external linkage in a translation unit (PR #78064)

2024-01-16 Thread Aaron Ballman via cfe-commits
@@ -4754,6 +4754,11 @@ void Sema::MergeVarDecl(VarDecl *New, LookupResult &Previous) { return New->setInvalidDecl(); } + if (Old->getFormalLinkage() != New->getFormalLinkage()) { +Diag(New->getLocation(), diag::err_multiple_linkage) << New->getDeclName(); +retu

[clang] [clang] emit an error when the same identifier appears with both internal and external linkage in a translation unit (PR #78064)

2024-01-16 Thread Aaron Ballman via cfe-commits
@@ -5,10 +5,10 @@ static int g0; // expected-note{{previous definition}} int g0; // expected-error{{non-static declaration of 'g0' follows static declaration}} static int g1; -extern int g1; +extern int g1; // expected-error{{the same identifier 'g1' appears with both intern

[clang] [Clang] Amend SME attributes with support for ZT0. (PR #77941)

2024-01-16 Thread Erich Keane via cfe-commits
@@ -4068,7 +4075,7 @@ class FunctionType : public Type { /// Any AArch64 SME ACLE type attributes that need to be propagated /// on declarations and function pointers. -unsigned AArch64SMEAttributes : 6; +unsigned AArch64SMEAttributes : 8; eric

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: > Do we want to submit the first three in the series and then take on the > topmost commit? Sounds good, let me remove the 4th commit from this PR https://github.com/llvm/llvm-project/pull/73017 ___ cfe-commits mailing list cfe-commi

[clang] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (PR #78311)

2024-01-16 Thread Craig Topper via cfe-commits
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/78311 EnumConstantDecl is allocated by the ASTContext allocator so the destructor is never called. This patch takes a similar approach to IntegerLiteral by using APIntStorage to allocate large APSInts using the ASTCo

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2024-01-16 Thread Erich Keane via cfe-commits
@@ -3767,6 +3767,57 @@ void DependentDecltypeType::Profile(llvm::FoldingSetNodeID &ID, E->Profile(ID, Context, true); } +PackIndexingType::PackIndexingType(const ASTContext &Context, + QualType Canonical, QualType Pattern, +

[clang] 7fe5269 - [RISCV] Bump Zfbfmin, Zvfbfmin, and Zvfbfwma to 1.0. (#78021)

2024-01-16 Thread via cfe-commits
Author: Craig Topper Date: 2024-01-16T08:42:21-08:00 New Revision: 7fe5269b544b33c9e32de50b76fe0b67022de6d3 URL: https://github.com/llvm/llvm-project/commit/7fe5269b544b33c9e32de50b76fe0b67022de6d3 DIFF: https://github.com/llvm/llvm-project/commit/7fe5269b544b33c9e32de50b76fe0b67022de6d3.diff

[clang] [llvm] [RISCV] Bump Zfbfmin, Zvfbfmin, and Zvfbfwma to 1.0. (PR #78021)

2024-01-16 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/78021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Use APIntStorage to fix memory leak in EnumConstantDecl. (PR #78311)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang-codegen Author: Craig Topper (topperc) Changes EnumConstantDecl is allocated by the ASTContext allocator so the destructor is never called. This patch takes a similar approach to IntegerLiteral by using APIntSto

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/73017 >From 447aabfbf20c8d286caf6ad3f2e30da116592860 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Mon, 20 Nov 2023 18:03:18 + Subject: [PATCH 1/3] [APINotes] Upstream attributes that are created implicitly fr

[clang] [APINotes] Upstream dependencies of Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan edited https://github.com/llvm/llvm-project/pull/73017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-16 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/69900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-16 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -198,6 +198,26 @@ bool ByteCodeStmtGen::visitFunc(const FunctionDecl *F) { return false; if (!this->emitInitPtrPop(InitExpr)) return false; + } else if (const Indire

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-16 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: https://github.com/AaronBallman approved this pull request. LGTM assuming no testing surprises come up https://github.com/llvm/llvm-project/pull/69900 ___ cfe-commits

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-16 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -1133,3 +1133,75 @@ namespace AccessOnNullptr { // ref-error {{not an integral constant expression}} \ // ref-note {{in call to 'a2()'}}

[clang] [APINotes] Upstream dependencies of Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/73017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] document correct defaults for `-fms-compatibility-version` / `-fmsc-version` (PR #76418)

2024-01-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you for the fix! https://github.com/llvm/llvm-project/pull/76418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69900 >From 58ff884a20816526ea1b3e4035a65ab435e2396d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Da

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-01-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman this looks sensible. WDYT? It's sensible but still seems to be failing CI. https://github.com/llvm/llvm-project/pull/71709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-16 Thread via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/78315 This commit improves alpha.security.ArrayBoundV2 in two connected areas: (1) It calls `markInteresting()` on the symbolic values that are responsible for the out of bounds access. (2) Its index-is-in-bounds ass

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-01-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Yeah, I remember I was able to get past the first round of test failures, only to find another one waiting for me. Once again I need to sit and debug AST serizalization and deserialization, but I've been occupied with other stuff since then. I'm not giving up on this just yet, as

[clang] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (NagyDonat) Changes This commit improves alpha.security.ArrayBoundV2 in two connected areas: (1) It calls `markInteresting()` on the symbolic values that are responsible for the out of boun

[llvm] [clang] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-01-16 Thread via cfe-commits
zmodem wrote: We're hitting the same assert (tracking in https://crbug.com/1518841) but don't have a good reproducer to share (it's during lto of a large binary). Jeremy's reproducer seems good though. Can we revert this while it's being investigated, please? https://github.com/llvm/llvm-proj

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
@@ -6070,7 +6070,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, /// /// The result of this call will never be null, but the associated /// type may be a null type if there's an unrecoverable error. -TypeSourceInfo *Sema::GetTypeForDeclarator(D

[llvm] [clang] [ASan][Driver] Add sanitize-target flag to support enabling ASan in device or host compilation (PR #76127)

2024-01-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman requested changes to this pull request. I had some conversations with @jinge90 offline and we're now thinking that perhaps a better approach is to have a more general feature for specifying host-only and target-only options instead of having each option split int

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
@@ -3167,6 +3167,15 @@ Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, DeclaratorInfo.complete(ThisDecl); +if (TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate) { + if (Tok.is(tok::comma)) { +Diag(Tok, diag::err_multiple_template_declarato

[clang] [Clang][Sema] Diagnose function/variable templates that shadow their own template parameters (PR #78274)

2024-01-16 Thread Erich Keane via cfe-commits
@@ -6070,7 +6070,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, /// /// The result of this call will never be null, but the associated /// type may be a null type if there's an unrecoverable error. -TypeSourceInfo *Sema::GetTypeForDeclarator(D

[clang] 9c4e7a1 - [OpenACC] Implement 'self' clause parsing on 'update'.

2024-01-16 Thread via cfe-commits
Author: erichkeane Date: 2024-01-16T09:25:34-08:00 New Revision: 9c4e7a159b1f2228ddf146c58c2478418cd63e86 URL: https://github.com/llvm/llvm-project/commit/9c4e7a159b1f2228ddf146c58c2478418cd63e86 DIFF: https://github.com/llvm/llvm-project/commit/9c4e7a159b1f2228ddf146c58c2478418cd63e86.diff LO

[clang] [clang] Fix assertion failure with deleted overloaded unary operators (PR #78316)

2024-01-16 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/78316 When emitting notes related to wrong number of arguments do not consider implicit object argument. Fixes https://github.com/llvm/llvm-project/issues/78314 >From cf33d7ce01aafe0fa29b8a38a9824a0b03d24f05 Mon Se

[clang] [clang] Fix assertion failure with deleted overloaded unary operators (PR #78316)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes When emitting notes related to wrong number of arguments do not consider implicit object argument. Fixes https://github.com/llvm/llvm-project/issues/78314 --- Full diff: https://github.com/llvm/l

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2024-01-16 Thread via cfe-commits
@@ -3767,6 +3767,57 @@ void DependentDecltypeType::Profile(llvm::FoldingSetNodeID &ID, E->Profile(ID, Context, true); } +PackIndexingType::PackIndexingType(const ASTContext &Context, + QualType Canonical, QualType Pattern, +

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-16 Thread Bhuminjay Soni via cfe-commits
11happy wrote: Hello @PiotrZSL , @felix642 , @EugeneZelenko I am not able to get macro thing done, I request your guidance. Thank you https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [compiler-rt] [clang-tools-extra] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-16 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: thanks for the fix! One test `Clang :: Preprocessor/init.c` failed (https://lab.llvm.org/buildbot/#/builders/74/builds/24843) and the error is due to mismatched macros (if I'm reading correctly wants `__LONG_LONG_MAX__` right after `__LLONG_WIDTH__` but sees `__LLVM_INSTR_P

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2024-01-16 Thread Erich Keane via cfe-commits
@@ -3767,6 +3767,57 @@ void DependentDecltypeType::Profile(llvm::FoldingSetNodeID &ID, E->Profile(ID, Context, true); } +PackIndexingType::PackIndexingType(const ASTContext &Context, + QualType Canonical, QualType Pattern, +

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-16 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Ping. Any more comments? https://github.com/llvm/llvm-project/pull/76976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] fix misc-const-correctnes false-positive for fold expressions (PR #78320)

2024-01-16 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/78320 The check no longer emits a diagnostic for variables used as the initializer of C++17 fold expressions. The operator used is type-dependent because of the parameter pack and can therefore not be guaranteed to not

[clang-tools-extra] [clang] [clang-tidy] fix misc-const-correctnes false-positive for fold expressions (PR #78320)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang Author: Julian Schmidt (5chmidti) Changes The check no longer emits a diagnostic for variables used as the initializer of C++17 fold expressions. The operator used is type-dependent because of the parameter pack and

[clang] [SemaCXX] Make __builtin_addressof more like std::addressof (PR #78035)

2024-01-16 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78035 >From 33af5fc0a2e1ec2168a1609508cb119034801908 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 13 Jan 2024 10:48:21 + Subject: [PATCH] [SemaCXX] Make __builtin_addressof more like std::addressof Pro

[clang] [clang][ASTMatcher] Add matchers for CXXFoldExpr (PR #71245)

2024-01-16 Thread Julian Schmidt via cfe-commits
5chmidti wrote: I have posted the mentioned fix for `ExprMutationAnalyzer`: #78320 https://github.com/llvm/llvm-project/pull/71245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [compiler-rt] [clang] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-16 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > thanks for the fix! > > One test `Clang :: Preprocessor/init.c` failed > (https://lab.llvm.org/buildbot/#/builders/74/builds/24843) and the error is > due to mismatched macros (if I'm reading correctly wants `__LONG_LONG_MAX__` > right after `__LLONG_WIDTH__` but sees `__LL

[clang-tools-extra] [clang] [clang-tidy] fix misc-const-correctnes false-positive for fold expressions (PR #78320)

2024-01-16 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/78320 >From 1951630fd6a0edc5258f5a775c95b9e9c30106df Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 28 Oct 2023 18:39:18 +0200 Subject: [PATCH] [clang-tidy] fix mi

[clang] [clang] Fix assertion failure with deleted overloaded unary operators (PR #78316)

2024-01-16 Thread via cfe-commits
@@ -598,3 +598,30 @@ namespace B { } void g(B::X x) { A::f(x); } } + +namespace GH78314 { + +class a { +public: + void operator--() = delete; // expected-note {{candidate function has been explicitly deleted}} \ + // expected-note {{candidate func

[flang] [clang] [flang][driver] Allow explicit specification of -lFortran_main (PR #78152)

2024-01-16 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/78152 >From 5c7fa9c3ef911674e5b6888fcba4289834d04fda Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Mon, 15 Jan 2024 11:27:46 + Subject: [PATCH 1/4] [flang][driver] Allow explicit specification of -lFortran_main I

[flang] [clang] [flang][driver] Allow explicit specification of -lFortran_main (PR #78152)

2024-01-16 Thread Tom Eccles via cfe-commits
tblah wrote: > How would `flang-new -fno-fortran-main t.f -lFortran_main` work? This works because I only remove `-lFortran_main` when it is going to be added implicitly. `-fno-fortran-main` ensures that we never reach this branch. I've added a test to verify this. https://github.com/llvm/llv

[clang] [clang][dataflow] Fix bug in `Value` comparison. (PR #76746)

2024-01-16 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand updated https://github.com/llvm/llvm-project/pull/76746 >From 7a41ed57e7597c9f40ce7d8727833132d05c7d6a Mon Sep 17 00:00:00 2001 From: Yitzhak Mandelbaum Date: Tue, 2 Jan 2024 19:27:21 + Subject: [PATCH] [clang][dataflow] Fix bug in `Value` comparison. Makes value eq

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-16 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/78195 >From f354ca458c1fa3cebb375f756f1a87fcf0586c3c Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 15 Jan 2024 18:09:48 +0100 Subject: [PATCH 1/4] [Clang] Implement CWG2598: Union of non-literal types A un

[clang] [clang][dataflow] Fix bug in `Value` comparison. (PR #76746)

2024-01-16 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand closed https://github.com/llvm/llvm-project/pull/76746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 65ecbdf - [clang][dataflow] Fix bug in `Value` comparison. (#76746)

2024-01-16 Thread via cfe-commits
Author: Yitzhak Mandelbaum Date: 2024-01-16T13:03:49-05:00 New Revision: 65ecbdf61f5a3fb53f05abc610b90a8671f93730 URL: https://github.com/llvm/llvm-project/commit/65ecbdf61f5a3fb53f05abc610b90a8671f93730 DIFF: https://github.com/llvm/llvm-project/commit/65ecbdf61f5a3fb53f05abc610b90a8671f93730.

[clang-tools-extra] [clang] [clang-tidy] fix misc-const-correctnes false-positive for fold expressions (PR #78320)

2024-01-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, but i'm not 100% sure about ExprMutationAnalyzer part (if thats a right place). Leave it open for few days, so others could comment if they have objections. https://github.com/llvm/llvm-project/pull/78320

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-16 Thread Erich Keane via cfe-commits
@@ -1389,7 +1389,11 @@ bool CXXRecordDecl::isLiteral() const { : hasTrivialDestructor())) return false; - if (isLambda() && !LangOpts.CPlusPlus17) + // Lambdas are literal types since C++17. erichkeane wrote: So why is `isAg

[clang-tools-extra] [clang-tidy] Add readability-redundant-casting check (PR #70595)

2024-01-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/70595 >From ff65fcca6047b0eebf73a87285dcff5f641a8ef0 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Tue, 10 Oct 2023 20:37:05 + Subject: [PATCH 1/5] [clang-tidy] Add readability-redundant-casting check Detects

<    1   2   3   4   5   6   >