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

[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][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] 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/include/c

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

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

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

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

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

[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 &Call, } } -/// TODO: Handle explicit casts. -/// Handle C++ casts. -/// -/// Precondition: the cast is between ObjCObjectPointers. ExplodedNode *DynamicTypePropagation::dynamicTypePropa

[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 &Call, } } -/// TODO: Handle explicit casts. -/// Handle C++ casts. -/// -/// Precondition: the cast is between ObjCObjectPointers. ExplodedNode *DynamicTypePropagation::dynamicTypePropa

[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 &State, SymbolRef Sym, /// symbol and the destination type of the cast are unrelated, report an error. void DynamicTypePropagation::checkPostStmt(const CastExpr *CE, Checke

[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
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-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
@@ -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' arg

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

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

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

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

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

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

[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-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] [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/include/c

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

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

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

2023-10-16 Thread Erich Keane 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-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-16 Thread Erich Keane 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] 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

[libunwind] 45d1511 - [libunwind][AIX] Fix problem with stepping up from a leaf function when unwinding started in a signal handler

2023-10-16 Thread Xing Xue via cfe-commits
Author: Xing Xue Date: 2023-10-16T12:24:05-04:00 New Revision: 45d151138008c4880c8f9b77ffc43c23e0a9f1cb URL: https://github.com/llvm/llvm-project/commit/45d151138008c4880c8f9b77ffc43c23e0a9f1cb DIFF: https://github.com/llvm/llvm-project/commit/45d151138008c4880c8f9b77ffc43c23e0a9f1cb.diff LOG:

[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] e32cde6 - [clang] Use IgnoreParensSingleStep in more places

2023-10-16 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2023-10-16T09:34:03-07:00 New Revision: e32cde6f41cd93b7a20b64a1abc8d5c488c8fe51 URL: https://github.com/llvm/llvm-project/commit/e32cde6f41cd93b7a20b64a1abc8d5c488c8fe51 DIFF: https://github.com/llvm/llvm-project/commit/e32cde6f41cd93b7a20b64a1abc8d5c488c8fe51.diff

[PATCH] D151479: [clang] Use IgnoreParensSingleStep in more places

2023-10-16 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe32cde6f41cd: [clang] Use IgnoreParensSingleStep in more places (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

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

2023-10-16 Thread Arthur Eubanks 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: Apac

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

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

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

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

[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)

2023-10-16 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/68846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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] 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
@@ -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
@@ -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][NFC] Replace TypeAlignment with alignof(T) (PR #69185)

2023-10-16 Thread via cfe-commits
cor3ntin wrote: Should we remove `TypeAlignment` then ? I don't see it used anywhere else https://github.com/llvm/llvm-project/pull/69185 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

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

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

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

[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)

2023-10-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Thank you for updating our status page! The following papers were applied as defect reports. Have you considered them? N4891: P2156 (Allow Duplicate Attributes) N4916: P2280 (Using unknown pointers and references in constant expressions) I agree with your analysis in "Unchanged"

[clang] [HLSL] Support vector swizzles on scalars (PR #67700)

2023-10-16 Thread Chris B via cfe-commits
llvm-beanz wrote: > This is the documentation i found. Can you confirm the intent is only to > support `.x???` and `r???` ? It alludes to more options. Maybe we need a > `isHLSLSwizzleStart` function to avoid comparing to `'x'` and `'r'` in > multiple places. The documentation for this is bad

[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)

2023-10-16 Thread via cfe-commits
cor3ntin wrote: > I agree with your analysis in "Unchanged" section. As for [P2460R2 Relax > requirements on wchar_t to match existing > practices](https://wg21.link/p2460r2), it indeed seem like a pure wording > change, but I'm not sure as well. Maybe @cor3ntin has an opinion on this. Yes. I

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

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

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

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

[clang] [Windows] Add git-clang-format wrapper bat file (PR #69228)

2023-10-16 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/69228 This allows git-clang-format to be used on a Windows terminal without manually needing to find the path and invoke the python interpreter. We have a similar script for `scan-build`. >From 8d56f363230ff064fc3

[clang] [Windows] Add git-clang-format wrapper bat file (PR #69228)

2023-10-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Chris B (llvm-beanz) Changes This allows git-clang-format to be used on a Windows terminal without manually needing to find the path and invoke the python interpreter. We have a similar script for `scan-build`. --- Full diff: http

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

2023-10-16 Thread via cfe-commits
cor3ntin 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 https://github.com/llvm/llvm-project/pull/69185 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [mlir] Add ContractionOpInterface utility functions for vector matrix multiplication (PR #68945)

2023-10-16 Thread Jerry Wu via cfe-commits
@@ -240,4 +240,134 @@ TEST(isRowMajorBatchMatmul, FirstInputSwapped) { EXPECT_THAT(maps, Not(Truly(isRowMajorBatchMatmul))); } +TEST(isVecmat, Simple) { + MLIRContext context; + + AffineExpr k, n; + bindDims(&context, k, n); + auto mapA = AffineMapAttr::get(AffineMap::ge

[clang] [mlir] Add ContractionOpInterface utility functions for vector matrix multiplication (PR #68945)

2023-10-16 Thread Jerry Wu via cfe-commits
@@ -240,4 +240,134 @@ TEST(isRowMajorBatchMatmul, FirstInputSwapped) { EXPECT_THAT(maps, Not(Truly(isRowMajorBatchMatmul))); } +TEST(isVecmat, Simple) { + MLIRContext context; + + AffineExpr k, n; + bindDims(&context, k, n); + auto mapA = AffineMapAttr::get(AffineMap::ge

[clang] [mlir] Add ContractionOpInterface utility functions for vector matrix multiplication (PR #68945)

2023-10-16 Thread Jerry Wu via cfe-commits
@@ -240,4 +240,134 @@ TEST(isRowMajorBatchMatmul, FirstInputSwapped) { EXPECT_THAT(maps, Not(Truly(isRowMajorBatchMatmul))); } +TEST(isVecmat, Simple) { + MLIRContext context; + + AffineExpr k, n; + bindDims(&context, k, n); + auto mapA = AffineMapAttr::get(AffineMap::ge

[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] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

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

[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] [clang][dataflow] Check for backedges directly (instead of loop statements). (PR #68923)

2023-10-16 Thread Yitzhak Mandelbaum via cfe-commits
@@ -502,14 +490,15 @@ runTypeErasedDataflowAnalysis( PostVisitCFG) { PrettyStackTraceAnalysis CrashInfo(CFCtx, "runTypeErasedDataflowAnalysis"); - PostOrderCFGView POV(&CFCtx.getCFG()); - ForwardDataflowWorklist Worklist(CFCtx.getCFG(), &POV); + const clang::CFG &

[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

[clang] [clang][Interp] Check pointer inc/dec ops for null (PR #69168)

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

[clang] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2023-10-16 Thread Pierre-Andre Saulais via cfe-commits
https://github.com/pasaulais created https://github.com/llvm/llvm-project/pull/69229 On some systems and when accessing certain memory areas it is not safe to use atomic xor with AMDGPU. This may be the case when using fine-grained memory allocations (e.g. through `hipAllocManaged`) and when t

[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
@@ -122,6 +122,8 @@ Improvements to clang-tidy if any :program:`clang-tidy` subprocess exits with a non-zero code or if exporting fixes fails. +- Do not emit a `return` for fixes of `modernize-avoid-bind` when the function returns void. PiotrZSL wrote: w

[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 &Result) { LP.Callable.Materialization = getCallableMaterialization(Result); LP.Callable.Decl = getCallMethodDecl(Result, LP.Callable.Type, LP.Callable.Materialization); + if (LP.Callable.Decl) +

[clang] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2023-10-16 Thread Pierre-Andre Saulais via cfe-commits
https://github.com/pasaulais edited https://github.com/llvm/llvm-project/pull/69229 ___ 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
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/69185 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-10-16 Thread via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= ,

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

2023-10-16 Thread 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][Diagnostics] Highlight code snippets (PR #66514)

2023-10-16 Thread via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= ,

[clang] [clang][dataflow] Check for backedges directly (instead of loop statements). (PR #68923)

2023-10-16 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand updated https://github.com/llvm/llvm-project/pull/68923 >From 83486a35e6d0e754dd99369fc546d04afedbe923 Mon Sep 17 00:00:00 2001 From: Yitzhak Mandelbaum Date: Thu, 12 Oct 2023 19:35:54 + Subject: [PATCH 1/3] [clang][dataflow] Check for backedges directly (instead of

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-16 Thread Alexander Richardson via cfe-commits
arichardson wrote: > > Since the langref definition is based on GEP, can we use index width > > instead of pointer width? If you disagree with this, it would still be good > > if you could add a test where the datalayout has index width < pointer > > width to show the current semantics. > > A

[clang] [clang][dataflow] Check for backedges directly (instead of loop statements). (PR #68923)

2023-10-16 Thread Yitzhak Mandelbaum via cfe-commits
@@ -53,19 +52,8 @@ static int blockIndexInPredecessor(const CFGBlock &Pred, return BlockPos - Pred.succ_begin(); } -static bool isLoopHead(const CFGBlock &B) { - if (const auto *T = B.getTerminatorStmt()) -switch (T->getStmtClass()) { - case Stmt::WhileStmtClass: -

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

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

2023-10-16 Thread Ulrich Weigand via cfe-commits
@@ -976,6 +976,24 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +int32_t ProductVersion, ProductRelea

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

2023-10-16 Thread Ulrich Weigand via cfe-commits
@@ -2267,6 +2268,14 @@ void Clang::AddSystemZTargetArgs(const ArgList &Args, CmdArgs.push_back("-mfloat-abi"); CmdArgs.push_back("soft"); } + + if (Triple.isOSzOS()) { +CmdArgs.push_back("-mllvm"); +CmdArgs.push_back( +Args.MakeArgString(llvm::Twine("

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

2023-10-16 Thread Ulrich Weigand via cfe-commits
@@ -10,9 +10,49 @@ #include "clang/Config/config.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/FormatVariadic.h" #include "llvm/TargetParser/Triple.h" using namespace clang; +const char *clang::languageToString(Languag

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

2023-10-16 Thread Ulrich Weigand via cfe-commits
@@ -1026,6 +1036,68 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module &M) { + if (auto *VersionVal = cast_or_null( + M.getModuleFlag("Product Major Version"))) +return cast(VersionVal->getValue(

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

2023-10-16 Thread Ulrich Weigand via cfe-commits
@@ -976,6 +976,24 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +int32_t ProductVersion, ProductRelea

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

2023-10-16 Thread Ulrich Weigand via cfe-commits
@@ -1296,6 +1372,124 @@ void SystemZAsmPrinter::emitPPA1(MCSymbol *FnEndSym) { 4); } +void SystemZAsmPrinter::emitStartOfAsmFile(Module &M) { + if (TM.getTargetTriple().isOSzOS()) +emitPPA2(M); + AsmPrinter::emitStartOfAsmFile(M); +}

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-16 Thread Nikita Popov via cfe-commits
nikic wrote: We should update LangRef and require that the integer arg has the size of the pointer index type (with current GEP semantics implying a 1-extend to pointer type width), implement a Verifier check for that, and add an assert in SDAG lowering that the index type size is the pointer

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

2023-10-16 Thread Tarun Prabhu via cfe-commits
tarunprabhu 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. Thanks @luporl. Any help is most appreciated. https://github.com/llvm/llvm-project/pull/66702 ___ cfe-commits ma

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

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

[clang] 342dca7 - [clang][dataflow] Check for backedges directly (instead of loop statements). (#68923)

2023-10-16 Thread via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-10-16T14:07:16-04:00 New Revision: 342dca7528116439f3e9c8492a452765d802681a URL: https://github.com/llvm/llvm-project/commit/342dca7528116439f3e9c8492a452765d802681a DIFF: https://github.com/llvm/llvm-project/commit/342dca7528116439f3e9c8492a452765d802681a.

[clang] [clang-format] Fix a bug in mis-annotating arrows (PR #67780)

2023-10-16 Thread Petr Hosek via cfe-commits
petrhosek wrote: This introduced a regression where Clang-Format misformats Thread Safety Analysis annotations that include an arrow, #69234 has more details. Would it be possible to take a look? https://github.com/llvm/llvm-project/pull/67780 ___ cf

[clang] [clang][dataflow] Check for backedges directly (instead of loop statements). (PR #68923)

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

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

2023-10-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed 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] 5b07de1 - [clang][ASTMatcher] fix hasAnyBase not binding submatchers (#67939)

2023-10-16 Thread via cfe-commits
Author: 5chmidti Date: 2023-10-16T14:09:46-04:00 New Revision: 5b07de1a5faf4a22ae6fd982b877c5e7e3a76559 URL: https://github.com/llvm/llvm-project/commit/5b07de1a5faf4a22ae6fd982b877c5e7e3a76559 DIFF: https://github.com/llvm/llvm-project/commit/5b07de1a5faf4a22ae6fd982b877c5e7e3a76559.diff LOG:

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

2023-10-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I think this can be merged, but I don't have write access. Ah, thank you for letting me know! https://github.com/llvm/llvm-project/pull/67939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

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

2023-10-16 Thread via cfe-commits
philnik777 wrote: Wouldn't it be better to go the other way around? i.e. have a `[[clang::compressed_bitfield]]` (or whatever) which influences the ABI, so it's possible to do stuff like ```c++ [[clang::compressed_bitfield]] bool IsSomething : 1; [[clang::compressed_bitfield]] MyEnum Whatever :

<    1   2   3   4   >