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

2023-10-16 Thread Utkarsh Saxena 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:

[clang] [clang][ASTMatcher] fix hasAnyBase not binding submatchers (PR #67939)

2023-10-16 Thread via cfe-commits
5chmidti wrote: I think this can be merged, but I don't have write access. https://github.com/llvm/llvm-project/pull/67939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Ignore non-clang pch files when -include a.h probes a.h.gch (PR #69204)

2023-10-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Hans (zmodem) Changes Instead of deprecating the "gch probe" as in f726da1193baf51e0a66453cc32dcffb8a9121d4, this makes clang ignore files which are not clang pch files (See discussion on PR #67084). This fixes the issues mentioned in

[PATCH] D151197: [Clang][SVE2p1] Add svpsel builtins

2023-10-16 Thread Caroline via Phabricator via cfe-commits
CarolineConcatto added inline comments. Herald added a subscriber: wangpc. Comment at: clang/include/clang/Basic/arm_sve.td:2123 + +def SVPSEL_COUNT_ALIAS_B : SInst<"svpsel_lane_c8", "}}Pmi", "Pc", MergeNone, "", [], [ImmCheck<3, ImmCheck0_15>]>; +def SVPSEL_COUNT_ALIAS_H :

[clang] [clang][Interp] Only diagnose null field access in constant contexts (PR #69223)

2023-10-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69223 >From 8f92935def398da8de21146e4e308a49746ae320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 16 Oct 2023 17:51:44 +0200 Subject: [PATCH] [clang][Interp] Only diagnose null field access

[clang] [clang][Sema] Don't assert non-empty unexpanded packs following Colle… (PR #69224)

2023-10-16 Thread via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/69224 >From e8f9d89bda1c5d84ddaa09cf1e328769d39cd50a Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 16 Oct 2023 22:50:08 +0800 Subject: [PATCH 1/2] [clang][Sema] Don't assert non-empty unexpanded packs

[clang] [clang][Sema] Don't assert non-empty unexpanded packs following Colle… (PR #69224)

2023-10-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (zyn0217) Changes …ctUnexpandedParameterPacksVisitor Closes https://github.com/llvm/llvm-project/issues/61460. We have FunctionParmPackExpr that serves as the unexpanded expression but from which the visitor collects none, which

[clang] de9b3c5 - [clang][Interp] Handle delegating constructors (#67823)

2023-10-16 Thread via cfe-commits
Author: Timm Baeder Date: 2023-10-16T14:11:25+02:00 New Revision: de9b3c5eba41fd024aef6dfa4dab0c8feae29b18 URL: https://github.com/llvm/llvm-project/commit/de9b3c5eba41fd024aef6dfa4dab0c8feae29b18 DIFF: https://github.com/llvm/llvm-project/commit/de9b3c5eba41fd024aef6dfa4dab0c8feae29b18.diff

[clang] [clang][Interp] Handle delegating constructors (PR #67823)

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

[clang] c202a17 - [clang][analyzer] Move checker alpha.unix.StdCLibraryFunctions out of alpha. (#66207)

2023-10-16 Thread via cfe-commits
Author: Balázs Kéri Date: 2023-10-16T14:51:05+02:00 New Revision: c202a17d024068c70364116f2d06535d79535b30 URL: https://github.com/llvm/llvm-project/commit/c202a17d024068c70364116f2d06535d79535b30 DIFF: https://github.com/llvm/llvm-project/commit/c202a17d024068c70364116f2d06535d79535b30.diff

[clang] [clang][analyzer] Move checker alpha.unix.StdCLibraryFunctions out of alpha. (PR #66207)

2023-10-16 Thread Balázs Kéri via cfe-commits
https://github.com/balazske closed https://github.com/llvm/llvm-project/pull/66207 ___ 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-16 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:

[clang] [Clang] Fix dependence handling of nttp for variable templates (PR #69075)

2023-10-16 Thread Erich Keane via cfe-commits
@@ -1299,8 +1299,9 @@ static bool checkTupleLikeDecomposition(Sema , // in the associated namespaces. Expr *Get = UnresolvedLookupExpr::Create( S.Context, nullptr, NestedNameSpecifierLoc(), SourceLocation(), - DeclarationNameInfo(GetDN, Loc),

[clang] [Clang] Fix dependence handling of nttp for variable templates (PR #69075)

2023-10-16 Thread Erich Keane via cfe-commits
@@ -165,3 +165,18 @@ namespace BindingInStmtExpr { using U = decltype(num_bindings()); // expected-note {{previous}} using U = N<3>; // expected-error-re {{type alias redefinition with different types ('N<3>' vs {{.*}}N<2>}} } + +namespace PR65153 { +struct A{}; +

[clang] [Clang] Fix dependence handling of nttp for variable templates (PR #69075)

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

[clang] [OpenMP][libomptarget] Add map checks when running under unified shared memory (PR #69005)

2023-10-16 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -444,6 +486,29 @@ DeviceTy::getTgtPtrBegin(void *HstPtrBegin, int64_t Size, bool UpdateRefCount, LR.TPR.getEntry()->dynRefCountToStr().c_str(), DynRefCountAction, LR.TPR.getEntry()->holdRefCountToStr().c_str(), HoldRefCountAction);

[clang] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

2023-10-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/69057 >From 8ed4effd114ebd83d4ceaa37655ffd9b7105b28e Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sat, 14 Oct 2023 15:51:42 +0200 Subject: [PATCH 1/3] [analyzer] Trust base to derived casts for dynamic types

[clang] [clang][Interp] Only diagnose null field access in constant contexts (PR #69223)

2023-10-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/69223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
https://github.com/lawben updated https://github.com/llvm/llvm-project/pull/69010 >From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001 From: Lawrence Benson Date: Wed, 11 Oct 2023 17:26:11 +0200 Subject: [PATCH 1/6] Add __builtin_vectorelements to get the number of elements

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
@@ -13595,6 +13595,15 @@ bool IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr( Info.Ctx.getOpenMPDefaultSimdAlign(E->getArgumentType())) .getQuantity(), E); + case UETT_VectorElements: { +QualType Ty = E->getTypeOfArgument(); +

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
@@ -10136,6 +10136,9 @@ def err_vec_builtin_incompatible_vector : Error< def err_vsx_builtin_nonconstant_argument : Error< "argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">; +def err_vectorelements_non_vector : Error< + "'__builtin_vectorelements'

[clang] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

2023-10-16 Thread Balazs Benics via cfe-commits
@@ -392,19 +393,26 @@ void DynamicTypePropagation::checkPostCall(const CallEvent , } } -/// TODO: Handle explicit casts. -/// Handle C++ casts. -/// -/// Precondition: the cast is between ObjCObjectPointers. ExplodedNode

[clang] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

2023-10-16 Thread Balazs Benics via cfe-commits
@@ -609,9 +617,13 @@ storeWhenMoreInformative(ProgramStateRef , SymbolRef Sym, /// symbol and the destination type of the cast are unrelated, report an error. void DynamicTypePropagation::checkPostStmt(const CastExpr *CE,

[clang-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
https://github.com/lawben updated https://github.com/llvm/llvm-project/pull/69010 >From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001 From: Lawrence Benson Date: Wed, 11 Oct 2023 17:26:11 +0200 Subject: [PATCH 1/6] Add __builtin_vectorelements to get the number of elements

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
https://github.com/lawben updated https://github.com/llvm/llvm-project/pull/69010 >From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001 From: Lawrence Benson Date: Wed, 11 Oct 2023 17:26:11 +0200 Subject: [PATCH 1/6] Add __builtin_vectorelements to get the number of elements

[clang] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

2023-10-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/69057 >From 8ed4effd114ebd83d4ceaa37655ffd9b7105b28e Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sat, 14 Oct 2023 15:51:42 +0200 Subject: [PATCH 1/4] [analyzer] Trust base to derived casts for dynamic types

[clang] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

2023-10-16 Thread Balazs Benics via cfe-commits
@@ -392,19 +393,26 @@ void DynamicTypePropagation::checkPostCall(const CallEvent , } } -/// TODO: Handle explicit casts. -/// Handle C++ casts. -/// -/// Precondition: the cast is between ObjCObjectPointers. ExplodedNode

[clang] [Driver] Ignore non-clang pch files when -include a.h probes a.h.gch (PR #69204)

2023-10-16 Thread via cfe-commits
https://github.com/zmodem created https://github.com/llvm/llvm-project/pull/69204 Instead of deprecating the "gch probe" as in f726da1193baf51e0a66453cc32dcffb8a9121d4, this makes clang ignore files which are not clang pch files (See discussion on PR #67084). This fixes the issues mentioned

[clang] [clang] Add information about lld presence in RISCVToolchain. (PR #68904)

2023-10-16 Thread Bushev Dmitry via cfe-commits
https://github.com/dybv-sc updated https://github.com/llvm/llvm-project/pull/68904 >From d1ceb3258b0ade810ebdcb3bf2c5727026bef17f Mon Sep 17 00:00:00 2001 From: Dmitry Bushev Date: Mon, 9 Oct 2023 19:49:09 +0300 Subject: [PATCH] [clang] Add information about lld presence in RISCVToolchain.

[clang] [Clang] Fix dependence handling of nttp for variable templates (PR #69075)

2023-10-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This needs a release note, else I think it is OK. https://github.com/llvm/llvm-project/pull/69075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] modernize-avoid-bind only return for non-void function (PR #69207)

2023-10-16 Thread via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/69207 >From 7771acd00ace1362e580531f1a3ed63f81cfa5a3 Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Mon, 14 Aug 2023 03:04:36 +0200 Subject: [PATCH 1/2] [clang-tidy]

[clang] [OpenMP][libomptarget] Add map checks when running under unified shared memory (PR #69005)

2023-10-16 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/69005 >From cb4121c466a0fc357d6ca129bfdd4e7c5e2d11ee Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 16 Nov 2022 17:23:48 -0600 Subject: [PATCH 1/2] Fix declare target implementation to support enter. ---

[clang] [clang-format] Allow default values for template parameters in lambda (PR #69052)

2023-10-16 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/69052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D143813: [ClangFE] Check that __sync builtins are naturally aligned.

2023-10-16 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. This introduced a build failure on s390x: https://github.com/llvm/llvm-project/issues/69146 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143813/new/ https://reviews.llvm.org/D143813 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy] modernize-avoid-bind only return for non-void function (PR #69207)

2023-10-16 Thread via cfe-commits
@@ -554,6 +555,8 @@ getLambdaProperties(const MatchFinder::MatchResult ) { LP.Callable.Materialization = getCallableMaterialization(Result); LP.Callable.Decl = getCallMethodDecl(Result, LP.Callable.Type, LP.Callable.Materialization); + if (LP.Callable.Decl) +

[clang-tools-extra] [clang-tidy] modernize-avoid-bind only return for non-void function (PR #69207)

2023-10-16 Thread via cfe-commits
5chmidti wrote: Any particular reason for the `+-`? Maybe it can be resolved? https://github.com/llvm/llvm-project/pull/69207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix dependence handling of nttp for variable templates (PR #69075)

2023-10-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/69075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
@@ -3083,6 +3083,19 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( E->getTypeOfArgument()->getPointeeType())) .getQuantity(); return llvm::ConstantInt::get(CGF.SizeTy, Alignment); + } else if (E->getKind() == UETT_VectorElements) { +

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
@@ -10136,6 +10136,9 @@ def err_vec_builtin_incompatible_vector : Error< def err_vsx_builtin_nonconstant_argument : Error< "argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">; +def err_vectorelements_non_vector : Error< + "'__builtin_vectorelements'

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
@@ -3083,6 +3083,19 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( E->getTypeOfArgument()->getPointeeType())) .getQuantity(); return llvm::ConstantInt::get(CGF.SizeTy, Alignment); + } else if (E->getKind() == UETT_VectorElements) { +

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
@@ -0,0 +1,121 @@ +// RUN: %clang_cc1 -O1 -triple aarch64 -target-feature +neon %s -emit-llvm -o - | FileCheck --check-prefixes=CHECK,NEON %s lawben wrote: Done. https://github.com/llvm/llvm-project/pull/69010 ___

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
@@ -0,0 +1,121 @@ +// RUN: %clang_cc1 -O1 -triple aarch64 -target-feature +neon %s -emit-llvm -o - | FileCheck --check-prefixes=CHECK,NEON %s lawben wrote: Done. https://github.com/llvm/llvm-project/pull/69010 ___

[clang-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
@@ -10136,6 +10136,9 @@ def err_vec_builtin_incompatible_vector : Error< def err_vsx_builtin_nonconstant_argument : Error< "argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">; +def err_vectorelements_non_vector : Error< + "'__builtin_vectorelements'

[clang-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
@@ -0,0 +1,121 @@ +// RUN: %clang_cc1 -O1 -triple aarch64 -target-feature +neon %s -emit-llvm -o - | FileCheck --check-prefixes=CHECK,NEON %s lawben wrote: Done. https://github.com/llvm/llvm-project/pull/69010 ___

[clang] [CUDA][HIP] Fix host/device context in concept (PR #67721)

2023-10-16 Thread Yaxun Liu via cfe-commits
@@ -176,3 +176,34 @@ Predefined Macros * - ``HIP_API_PER_THREAD_DEFAULT_STREAM`` - Alias to ``__HIP_API_PER_THREAD_DEFAULT_STREAM__``. Deprecated. +C++20 Concepts with HIP and CUDA + + +In Clang, when working with HIP or CUDA, it's

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Nikita Popov via cfe-commits
@@ -3083,6 +3083,19 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( E->getTypeOfArgument()->getPointeeType())) .getQuantity(); return llvm::ConstantInt::get(CGF.SizeTy, Alignment); + } else if (E->getKind() == UETT_VectorElements) { +

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Nikita Popov via cfe-commits
@@ -3083,6 +3083,19 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( E->getTypeOfArgument()->getPointeeType())) .getQuantity(); return llvm::ConstantInt::get(CGF.SizeTy, Alignment); + } else if (E->getKind() == UETT_VectorElements) { +

[clang] [clang] use relative paths for builtin headers during module compilation (PR #68023)

2023-10-16 Thread Richard Howell via cfe-commits
rmaz wrote: @jansvoboda11 still good with this change, or is there a less invasive way to get this done? https://github.com/llvm/llvm-project/pull/68023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [OpenMP][libomptarget] Add map checks when running under unified shared memory (PR #69005)

2023-10-16 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/69005 >From cb4121c466a0fc357d6ca129bfdd4e7c5e2d11ee Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 16 Nov 2022 17:23:48 -0600 Subject: [PATCH 1/2] Fix declare target implementation to support enter. ---

[clang] [Clang] Fix dependence handling of nttp for variable templates (PR #69075)

2023-10-16 Thread via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/69075 From e7c7969f69755cff939c88f52987fedcb1ffcd76 Mon Sep 17 00:00:00 2001 From: letrec Date: Sun, 8 Oct 2023 00:44:11 +0800 Subject: [PATCH 1/2] Fix dependence handling for variable templates ---

[clang] [Clang] Fix dependence handling of nttp for variable templates (PR #69075)

2023-10-16 Thread via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/69075 From e7c7969f69755cff939c88f52987fedcb1ffcd76 Mon Sep 17 00:00:00 2001 From: letrec Date: Sun, 8 Oct 2023 00:44:11 +0800 Subject: [PATCH 1/2] Fix dependence handling for variable templates ---

[clang] [clang] Add information about lld presence in RISCVToolchain. (PR #68904)

2023-10-16 Thread Bushev Dmitry via cfe-commits
https://github.com/dybv-sc updated https://github.com/llvm/llvm-project/pull/68904 >From 51a150e7abd2ff88261f82fc4a4c799f2a1fb11d Mon Sep 17 00:00:00 2001 From: Dmitry Bushev Date: Mon, 9 Oct 2023 19:49:09 +0300 Subject: [PATCH] [clang] Add information about lld presence in RISCVToolchain.

[clang] [clang] Add information about lld presence in RISCVToolchain. (PR #68904)

2023-10-16 Thread Bushev Dmitry via cfe-commits
https://github.com/dybv-sc updated https://github.com/llvm/llvm-project/pull/68904 >From d61eacc29e0b70dc50ee7eeb96446b7b66dc2e1d Mon Sep 17 00:00:00 2001 From: Dmitry Bushev Date: Mon, 9 Oct 2023 19:49:09 +0300 Subject: [PATCH] [clang] Add information about lld presence in RISCVToolchain.

[clang] [Driver] Ignore non-clang pch files when -include a.h probes a.h.gch (PR #69204)

2023-10-16 Thread via cfe-commits
zmodem wrote: Please take a look. This has the benefit of fixing users broken by gcc-generated .gch files without having to wait a release cycle for deprecation, while at the same time not breaking users relying clang performing these probes at all. cc folks from the previous pr: @MaskRay

[clang-tools-extra] [clang-tidy] modernize-avoid-bind only return for non-void function (PR #69207)

2023-10-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (5chmidti) Changes - only return when the return type is non-void - fix missing return on member functions --- Full diff: https://github.com/llvm/llvm-project/pull/69207.diff 2 Files Affected: - (modified)

[PATCH] D151307: [Clang][SVE2.1] Add svwhile (predicate-as-counter) builtins

2023-10-16 Thread Caroline via Phabricator via cfe-commits
CarolineConcatto added inline comments. Comment at: clang/include/clang/Basic/arm_sve.td:2129 +def SVWHILEGE_COUNT : SInst<"svwhilege_{d}", "}lli", "QcQsQiQl", MergeNone, "aarch64_sve_whilege_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>; +def SVWHILEGT_COUNT :

[libunwind] [OpenMP][libomptarget] Add map checks when running under unified shared memory (PR #69005)

2023-10-16 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/69005 >From cb4121c466a0fc357d6ca129bfdd4e7c5e2d11ee Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 16 Nov 2022 17:23:48 -0600 Subject: [PATCH 1/2] Fix declare target implementation to support enter. ---

[clang-tools-extra] [clang-tidy] modernize-avoid-bind only return for non-void function (PR #69207)

2023-10-16 Thread Piotr Zegar via cfe-commits
@@ -554,6 +555,8 @@ getLambdaProperties(const MatchFinder::MatchResult ) { LP.Callable.Materialization = getCallableMaterialization(Result); LP.Callable.Decl = getCallMethodDecl(Result, LP.Callable.Type, LP.Callable.Materialization); + if (LP.Callable.Decl) +

[clang] Null field access (PR #69223)

2023-10-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69223 Looks like this should work as long as we don't dereference the value. Note: This is a change from my local branch where I introduce integral pointers. One

[clang] [clang][Sema] Don't assert non-empty unexpanded packs following Colle… (PR #69224)

2023-10-16 Thread via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/69224 …ctUnexpandedParameterPacksVisitor Closes https://github.com/llvm/llvm-project/issues/61460. We have FunctionParmPackExpr that serves as the unexpanded expression but from which the visitor collects none,

[clang-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Nikita Popov via cfe-commits
@@ -3083,6 +3083,19 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( E->getTypeOfArgument()->getPointeeType())) .getQuantity(); return llvm::ConstantInt::get(CGF.SizeTy, Alignment); + } else if (E->getKind() == UETT_VectorElements) { +

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

2023-10-16 Thread Utkarsh Saxena 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:

[clang] [libc++] Add assertions for potential OOB reads in std::nth_element (PR #67023)

2023-10-16 Thread Daniel Kutenin via cfe-commits
danlark1 wrote: >Also @danlark1 if you rebase onto main the issues with macOS in the CI should >be fixed now. @ldionne, Done https://github.com/llvm/llvm-project/pull/67023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [libc++] Add assertions for potential OOB reads in std::nth_element (PR #67023)

2023-10-16 Thread Daniel Kutenin via cfe-commits
danlark1 wrote: >Also @danlark1 if you rebase onto main the issues with macOS in the CI should >be fixed now. @ldionne, Done https://github.com/llvm/llvm-project/pull/67023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Driver] -include: deprecate probing .gch (PR #67084)

2023-10-16 Thread via cfe-commits
zmodem wrote: I've posted an alternative patch in https://github.com/llvm/llvm-project/pull/69204 which I believe is fixing the issues mentioned in this pr better (users don't have to wait another release), while not breaking builds relying on gch probing.

[clang-tools-extra] [clang-tidy] modernize-avoid-bind only return for non-void function (PR #69207)

2023-10-16 Thread via cfe-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/69207 - only return when the return type is non-void - fix missing return on member functions >From 7771acd00ace1362e580531f1a3ed63f81cfa5a3 Mon Sep 17 00:00:00 2001 From: Julian Schmidt

[clang] [OpenMP][libomptarget] Add map checks when running under unified shared memory (PR #69005)

2023-10-16 Thread Gheorghe-Teodor Bercea via cfe-commits
https://github.com/doru1004 updated https://github.com/llvm/llvm-project/pull/69005 >From cb4121c466a0fc357d6ca129bfdd4e7c5e2d11ee Mon Sep 17 00:00:00 2001 From: Doru Bercea Date: Wed, 16 Nov 2022 17:23:48 -0600 Subject: [PATCH 1/2] Fix declare target implementation to support enter. ---

[clang-tools-extra] [clang-tidy] modernize-avoid-bind only return for non-void function (PR #69207)

2023-10-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Release notes Except that looks +- fine for me. https://github.com/llvm/llvm-project/pull/69207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Sema] Don't assert non-empty unexpanded packs following Colle… (PR #69224)

2023-10-16 Thread Erich Keane via cfe-commits
erichkeane wrote: @cor3ntin : Lambda stuff, I think you're more familiar than I am with this. Mind taking a pass? https://github.com/llvm/llvm-project/pull/69224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [flang][Driver] Support -rpath, -shared, and -static in the frontend (PR #66702)

2023-10-16 Thread Leandro Lupori via cfe-commits
luporl wrote: I'll try to test this patch on a Windows on ARM machine. But it may take some time to setup and build flang on it. https://github.com/llvm/llvm-project/pull/66702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
lawben wrote: > Also, needs a release note. How do I do this? I cannot seem to find documentation on the process... https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
lawben wrote: > Also, needs a release note. How do I do this? I cannot seem to find documentation on the process... https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Also, needs a release note. > > How do I do this? I cannot seem to find documentation on the process... See docs/ReleaseNotes.rst. https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list

[clang-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Also, needs a release note. > > How do I do this? I cannot seem to find documentation on the process... See docs/ReleaseNotes.rst. https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Also, needs a release note. > > How do I do this? I cannot seem to find documentation on the process... See docs/ReleaseNotes.rst. https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list

[clang] [Inliner] Add argument/function attribute propagation before inlining. (PR #68164)

2023-10-16 Thread via cfe-commits
goldsteinn wrote: ping. https://github.com/llvm/llvm-project/pull/68164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] -fsanitize=alignment: add cl::opt sanitize-alignment-builtin to disable memcpy instrumentation (PR #69240)

2023-10-16 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: For reference, can you give a couple examples of code where this is triggering? If this is triggering in practice, do we want a real driver option to control the sanitizer? The alignment attributes themselves? https://github.com/llvm/llvm-project/pull/69240

[clang] [clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes (PR #68379)

2023-10-16 Thread via cfe-commits
https://github.com/antangelo updated https://github.com/llvm/llvm-project/pull/68379 >From 8e37e6f9e9d2cd2cd142165fe886c11a0bd1f3ab Mon Sep 17 00:00:00 2001 From: Antonio Abbatangelo Date: Thu, 5 Oct 2023 21:07:37 -0400 Subject: [PATCH 1/2] [clang][Sema] Use original template pattern when

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

2023-10-16 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 {

[clang] [clang] Add clang::debug_info_type attribute for bitfields (PR #69104)

2023-10-16 Thread David Blaikie via cfe-commits
dwblaikie wrote: Seems a bit unfortunate/bit of a heavyweight workaround - but I don't fundamentally object if @AaronBallman or co are OK with the new attribute for this. https://github.com/llvm/llvm-project/pull/69104 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy] modernize-avoid-bind only return for non-void function (PR #69207)

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

[clang-tools-extra] [clang-tidy] modernize-avoid-bind only return for non-void function (PR #69207)

2023-10-16 Thread Piotr Zegar via cfe-commits
@@ -343,6 +343,10 @@ Changes in existing checks ` check to identify calls to static member functions with out-of-class inline definitions. +- Improved :doc:`modernize-avoid-bind PiotrZSL wrote: put this in alphabetical order, use double `` for return,

[clang-tools-extra] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-16 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,220 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [Clang] Support target attr specifying CPU (PR #68678)

2023-10-16 Thread Erich Keane via cfe-commits
@@ -560,11 +560,12 @@ ParsedTargetAttr TargetInfo::parseTargetAttr(StringRef Features) const { } // While we're here iterating check for a different target cpu. -if (Feature.startswith("arch=")) { +if (Feature.startswith("arch=") ||

[clang-tools-extra] [Clang] Support target attr specifying CPU (PR #68678)

2023-10-16 Thread Erich Keane via cfe-commits
@@ -560,11 +560,12 @@ ParsedTargetAttr TargetInfo::parseTargetAttr(StringRef Features) const { } // While we're here iterating check for a different target cpu. -if (Feature.startswith("arch=")) { +if (Feature.startswith("arch=") ||

[clang-tools-extra] [Clang] Support target attr specifying CPU (PR #68678)

2023-10-16 Thread Erich Keane via cfe-commits
@@ -2420,11 +2420,11 @@ command line. The current set of options correspond to the existing "subtarget features" for the target with or without a "-mno-" in front corresponding to the absence -of the feature, as well as ``arch="CPU"`` which will change the default "CPU" -for

[clang] [CONCEPTS]Corrected comparison of constraints with out of line CTD (PR #69244)

2023-10-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes Out of line class template declaration specializations aren't created at the time they have their template arguments checked, so we previously weren't doing any amount of work to substitute the

[clang-tools-extra] [Clang] Support target attr specifying CPU (PR #68678)

2023-10-16 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/68678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating TrailingReturnArrow (PR #69249)

2023-10-16 Thread Björn Schäpers via cfe-commits
@@ -3497,6 +3497,15 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine ) const { Tok->setType(TT_TrailingReturnArrow); break; } +if (Tok->isNot(TT_TrailingAnnotation)) + continue; +const auto *Next =

[clang] [clang-format] Fix a bug in annotating TrailingReturnArrow (PR #69249)

2023-10-16 Thread Björn Schäpers via cfe-commits
@@ -3497,6 +3497,15 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine ) const { Tok->setType(TT_TrailingReturnArrow); break; } +if (Tok->isNot(TT_TrailingAnnotation)) HazardyKnusperkeks wrote: Why do you

[clang-tools-extra] Fix #68492: point to the correct const location (PR #69103)

2023-10-16 Thread via cfe-commits
@@ -293,6 +293,10 @@ Changes in existing checks ` check to enforce a stricter match with the swap function signature, eliminating false-positives. +- Improved :doc:`readability-const-params-in-decls EugeneZelenko wrote: Please keep alphabetical order (by

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-16 Thread Yusra Syeda via cfe-commits
ysyeda wrote: ping https://github.com/llvm/llvm-project/pull/68926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Don't assert non-empty unexpanded packs following Colle… (PR #69224)

2023-10-16 Thread via cfe-commits
cor3ntin wrote: I think the issue here is that we make the assumption that a full expression cannot contain an unexpanded pack But that does not hold for lambda. Maybe instead of removing the assert entirely we could check whether one of the enclosing scope is a lambda. While I think the

[clang] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2023-10-16 Thread David Li via cfe-commits
@@ -0,0 +1,65 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [clang][Sema] Don't assert non-empty unexpanded packs following Colle… (PR #69224)

2023-10-16 Thread via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -std=c++17 %s -fsyntax-only -verify +// expected-no-diagnostics +template void g(Ts... p1s) { + (void)[&](auto... p2s) { ([&] { p1s; p2s; }, ...); }; +} cor3ntin wrote:

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
https://github.com/lawben updated https://github.com/llvm/llvm-project/pull/69010 >From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001 From: Lawrence Benson Date: Wed, 11 Oct 2023 17:26:11 +0200 Subject: [PATCH 1/7] Add __builtin_vectorelements to get the number of elements

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Lawrence Benson via cfe-commits
https://github.com/lawben updated https://github.com/llvm/llvm-project/pull/69010 >From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001 From: Lawrence Benson Date: Wed, 11 Oct 2023 17:26:11 +0200 Subject: [PATCH 1/7] Add __builtin_vectorelements to get the number of elements

[clang] [clang][NFC] Replace TypeAlignment with alignof(T) (PR #69185)

2023-10-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: It's in our public headers, and downstream users were supposed to rely on it, because `alignof` for `Type` and all its derived types reported the wrong value. So while I agree with you, I lean towards it being a breaking change which should be handled appropriately.

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

2023-10-16 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: 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] [clang][NFC] Replace TypeAlignment with alignof(T) (PR #69185)

2023-10-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I'm not sure we care (the api is not meant to be stable - that's why we have > a c wrapper) but @AaronBallman should weight on that Basically none of our internal C++ APIs have a stability guarantee, so we're free to refactor as we see fit. In this case, I don't see much

  1   2   3   4   >