[clang] [clang-format] Fix a serious bug in `git clang-format -f` (PR #102629)

2024-08-09 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/102629 ___ 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 CastRParen (PR #102261)

2024-08-09 Thread Pierre Jolivet via cfe-commits
prj- wrote: Nevermind, this bug (not sure if it's a bug or not) is already present in clang-format 18. See https://github.com/llvm/llvm-project/issues/102727. https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@li

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-09 Thread Pierre Jolivet via cfe-commits
prj- wrote: This introduced a regression though. ```diff - for (i = 0, k = 1; i < ((PetscInt)local_n0) * partial_dim; i++, k++) { + for (i = 0, k = 1; i < ((PetscInt)local_n0)*partial_dim; i++, k++) { ``` https://github.com/llvm/llvm-project/pull/102261

[clang] [clang][Interp] Start implementing unions and changing the active member (PR #102723)

2024-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/102723.diff 10 Files Affected: - (modified) clang/lib/AST/Interp/Compiler.cpp (+10-6) - (modified) clang/lib/AST/Interp/Descriptor.cpp (+30-19) -

[clang] [clang][Interp] Start implementing unions and changing the active member (PR #102723)

2024-08-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/102723 None >From 5d00cf049b64bf31a6039c1c4761dca64483a4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 9 Aug 2024 15:30:30 +0200 Subject: [PATCH] [clang][Interp] Start implementing unions

[clang] [Clang][Concepts] Fix a constraint comparison regression for out-of-line ClassTemplateDecls (PR #102587)

2024-08-09 Thread Younan Zhang via cfe-commits
@@ -599,3 +599,39 @@ template unsigned long DerivedCollection::index() {} } // namespace GH72557 + +namespace GH102320 { + +template +concept Constrained = true; + +template class C { + template > class D; + template +requires Constrained + class E; +}; + +template

[clang] [Clang][Concepts] Fix a constraint comparison regression for out-of-line ClassTemplateDecls (PR #102587)

2024-08-09 Thread Younan Zhang via cfe-commits
@@ -599,3 +599,39 @@ template unsigned long DerivedCollection::index() {} } // namespace GH72557 + +namespace GH102320 { + +template +concept Constrained = true; + +template class C { + template > class D; + template +requires Constrained + class E; +}; + +template

[clang] [clang] Use llvm::is_contained (NFC) (PR #102720)

2024-08-09 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/102720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7a6acd9 - [clang] Use llvm::is_contained (NFC) (#102720)

2024-08-09 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-08-09T22:39:19-07:00 New Revision: 7a6acd9844d61e48cbfecbdd1cbbb53080fc7059 URL: https://github.com/llvm/llvm-project/commit/7a6acd9844d61e48cbfecbdd1cbbb53080fc7059 DIFF: https://github.com/llvm/llvm-project/commit/7a6acd9844d61e48cbfecbdd1cbbb53080fc7059.diff L

[clang] [Clang][Concepts] Fix a constraint comparison regression for out-of-line ClassTemplateDecls (PR #102587)

2024-08-09 Thread Qizhi Hu via cfe-commits
@@ -599,3 +599,39 @@ template unsigned long DerivedCollection::index() {} } // namespace GH72557 + +namespace GH102320 { + +template +concept Constrained = true; + +template class C { + template > class D; + template +requires Constrained + class E; +}; + +template

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-09 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/102691 >From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Fri, 28 Jun 2024 12:39:19 -0500 Subject: [PATCH 1/5] Changes from old gpuprof branch --- clan

[clang] [clang] Use llvm::is_contained (NFC) (PR #102720)

2024-08-09 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/102720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use llvm::is_contained (NFC) (PR #102720)

2024-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format @llvm/pr-subscribers-clang-driver Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/102720.diff 2 Files Affected: - (modified) clang/lib/Driver/Driver.cpp (+1-1) - (modified) clang/li

[clang] [clang] Use llvm::is_contained (NFC) (PR #102720)

2024-08-09 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/102720 None >From 4f216905a659d4cd323721d9457f19d646b07f9e Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 9 Aug 2024 21:51:04 -0700 Subject: [PATCH] [clang] Use llvm::is_contained (NFC) --- clang/lib/D

[clang] [clang-tools-extra] [clang-tidy] Add support for bsl::optional (PR #101450)

2024-08-09 Thread Chris Cotter via cfe-commits
@@ -38,10 +38,22 @@ namespace clang { namespace dataflow { -static bool isTopLevelNamespaceWithName(const NamespaceDecl &NS, -llvm::StringRef Name) { - return NS.getDeclName().isIdentifier() && NS.getName() == Name && - NS.getPa

[clang] [Clang][Concepts] Fix a constraint comparison regression for out-of-line ClassTemplateDecls (PR #102587)

2024-08-09 Thread Younan Zhang via cfe-commits
@@ -971,9 +971,12 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( // this may happen while we're comparing two templates' constraint // equivalence. LocalInstantiationScope ScopeForParameters(S); - if (auto *FD = DeclInfo.getDecl()->getAsFunctio

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-09 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/102691 >From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Fri, 28 Jun 2024 12:39:19 -0500 Subject: [PATCH 1/4] Changes from old gpuprof branch --- clan

[clang] [Clang][Concepts] Fix a constraint comparison regression for out-of-line ClassTemplateDecls (PR #102587)

2024-08-09 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @jcsxky Thanks for spotting that. That is indeed a regression and I think that can be resolved by not letting out-of-line specializations contribute to template arguments. https://github.com/llvm/llvm-project/pull/102587 ___ cfe-commit

[clang] [Clang][Concepts] Fix a constraint comparison regression for out-of-line ClassTemplateDecls (PR #102587)

2024-08-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/102587 >From 62218a472c88764472ffba69ceca1825686fe1b9 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 9 Aug 2024 16:32:30 +0800 Subject: [PATCH 1/2] [Clang][Concepts] Fix a constraint comparison regression for

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-09 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/102691 >From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Fri, 28 Jun 2024 12:39:19 -0500 Subject: [PATCH 1/4] Changes from old gpuprof branch --- clan

[clang] [Clang][Sema][OpenMP] Allow `thread_limit` to accept multiple expressions (PR #102715)

2024-08-09 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/102715 >From fd59f45bbe6912e3683f4a684fccdcc459bdd58a Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 9 Aug 2024 22:14:36 -0400 Subject: [PATCH] [Clang][Sema][OpenMP] Allow `thread_limit` to accept multiple exp

[clang] [Clang][OpenMP] Fix the wrong transform of `num_teams` claused introduced in #99732 (PR #102716)

2024-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shilei Tian (shiltian) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/102716.diff 1 Files Affected: - (modified) clang/lib/Sema/TreeTransform.h (+9-4) ``diff diff --git a/clang/lib/Sema/TreeTransform.h b/cl

[clang] [Clang][OpenMP] Fix the wrong transform of `num_teams` claused introduced in #99732 (PR #102716)

2024-08-09 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#102716** https://app.graphite.dev/github/pr/llvm/llvm-project/102716?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 * `main` This stack of pull requests is managed by Grap

[clang] [Clang][OpenMP] Fix the wrong transform of `num_teams` claused introduced in #99732 (PR #102716)

2024-08-09 Thread Shilei Tian via cfe-commits
https://github.com/shiltian ready_for_review https://github.com/llvm/llvm-project/pull/102716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Fix the wrong transform of `num_teams` claused introduced in #99732 (PR #102716)

2024-08-09 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/102716 None >From 2850033e440d7c43fcd7bdf55ed05de482697eaa Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 9 Aug 2024 23:11:43 -0400 Subject: [PATCH] [Clang][OpenMP] Fix the wrong transform of `num_teams` clau

[clang] [Clang][Sema][OpenMP] Allow `thread_limit` to accept multiple expressions (PR #102715)

2024-08-09 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 3696a34e59396d09231def9ded3d0577dd0f7503 ef8bfef43762120d25dda14ff003a322f63d4898 --e

[clang] [Clang][Sema][OpenMP] Allow `thread_limit` to accept multiple expressions (PR #102715)

2024-08-09 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/102715 >From ef8bfef43762120d25dda14ff003a322f63d4898 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 9 Aug 2024 22:14:36 -0400 Subject: [PATCH] [Clang][Sema][OpenMP] Allow `thread_limit` to accept multiple exp

[clang] [Clang][Sema][OpenMP] Allow `thread_limit` to accept multiple expressions (PR #102715)

2024-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Shilei Tian (shiltian) Changes --- Patch is 32.41 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/102715.diff 19 Files Affected: - (modified) clang/docs/OpenMPSupport.rst (+2-1) - (

[clang] [Clang][Sema][OpenMP] Allow `thread_limit` to accept multiple expressions (PR #102715)

2024-08-09 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#102715** https://app.graphite.dev/github/pr/llvm/llvm-project/102715?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 * `main` This stack of pull requests is managed by Grap

[clang] [Clang][Sema][OpenMP] Allow `thread_limit` to accept multiple expressions (PR #102715)

2024-08-09 Thread Shilei Tian via cfe-commits
https://github.com/shiltian ready_for_review https://github.com/llvm/llvm-project/pull/102715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema][OpenMP] Allow `thread_limit` to accept multiple expressions (PR #102715)

2024-08-09 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/102715 None >From 9925e4dc538ffddb86ceff2cc068e3f1ba9f0602 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 9 Aug 2024 22:14:36 -0400 Subject: [PATCH] [Clang][Sema][OpenMP] Allow `thread_limit` to accept multipl

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-09 Thread Longsheng Mou via cfe-commits
@@ -3124,26 +3124,40 @@ RValue X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 1)); RegAddr = Tmp.withElementType(LTy); - } else if (neededInt) { -RegAddr = Address(CGF.Builder.CreateG

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-09 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker updated https://github.com/llvm/llvm-project/pull/101639 >From 328ae6052894eb45c4e7541dadf63a3a04540cda Mon Sep 17 00:00:00 2001 From: Longsheng Mou Date: Fri, 2 Aug 2024 16:36:31 +0800 Subject: [PATCH 1/2] [X86_64] Fix empty field error in vaarg of C++. Such struct

[clang] [Clang] Overflow Pattern Exclusions (PR #100272)

2024-08-09 Thread Bill Wendling via cfe-commits
@@ -4759,6 +4759,55 @@ ParenListExpr *ParenListExpr::CreateEmpty(const ASTContext &Ctx, return new (Mem) ParenListExpr(EmptyShell(), NumExprs); } +namespace { bwendling wrote: You don't need both an anonymous namespace and marking the function 'static'. I

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-08-09 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > I remain concerned that newly developed instrumentations may require this > > special property. Is it useful to restrict this to HIP programs, at least > > before we gain more experience to comfortably apply this to other > > configurations? > > I'm also worried that this ch

[clang] [lld] [llvm] [mlir] [NFC][IWYU] Update Support library with IWYU. (PR #102707)

2024-08-09 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang] [lld] [llvm] [mlir] [NFC][IWYU] Update Support library with IWYU. (PR #102707)

2024-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-bolt @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-lld-elf Author: Daniil Fukalov (dfukalov) Changes Update according IWYU - include files in lib/ADT and - both include and cpp files in lib/Support. Firstly processed the sources by scripts fr

[clang] [lld] [llvm] [mlir] [NFC][IWYU] Update Support library with IWYU. (PR #102707)

2024-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniil Fukalov (dfukalov) Changes Update according IWYU - include files in lib/ADT and - both include and cpp files in lib/Support. Firstly processed the sources by scripts from https://github.com/include-what-you-use/include-what-you-use

[clang] [lld] [llvm] [mlir] [NFC][IWYU] Update Support library with IWYU. (PR #102707)

2024-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lld-macho Author: Daniil Fukalov (dfukalov) Changes Update according IWYU - include files in lib/ADT and - both include and cpp files in lib/Support. Firstly processed the sources by scripts from https://github.com/include-what-you-use/include-what-you

[clang] [llvm-lit] Use lit Syntax for Environment Variables in Clang subproject (PR #102647)

2024-08-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/102647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm-lit] Use lit Syntax for Environment Variables in Clang subproject (PR #102647)

2024-08-09 Thread Paul Kirth via cfe-commits
@@ -87,8 +87,8 @@ /// -gcc has lowest priority so -gcc /// on PATH beats default triple in program path -// RUN: DEFAULT_TRIPLE=`%t/clang --version | grep "Target:" | cut -d ' ' -f2` -// RUN: touch %t/$DEFAULT_TRIPLE-gcc && chmod +x %t/$DEFAULT_TRIPLE-gcc +// RUN: %clang --ver

[clang] [llvm-lit] Use lit Syntax for Environment Variables in Clang subproject (PR #102647)

2024-08-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM, once that last nit is fixed, assuming CI is passing. https://github.com/llvm/llvm-project/pull/102647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [lld] [llvm] [mlir] [NFC][IWYU] Update includes in Support lib with IWYU. (PR #102306)

2024-08-09 Thread Daniil Fukalov via cfe-commits
https://github.com/dfukalov closed https://github.com/llvm/llvm-project/pull/102306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-09 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/102683 >From f604acbb260911be7eb25d927aa91dc5b2994e93 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 9 Aug 2024 10:48:10 -0700 Subject: [PATCH 1/8] suboptimal expansion of normalize done --- clang/include/

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-09 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/102683 >From f604acbb260911be7eb25d927aa91dc5b2994e93 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 9 Aug 2024 10:48:10 -0700 Subject: [PATCH 1/7] suboptimal expansion of normalize done --- clang/include/

[clang] [WIP][Clang] Add __builtin_get_counted_by builtin (PR #102549)

2024-08-09 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/102549 >From 7ba43ae2b737fbd868848a23b58b3965f8d36ce1 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 6 Aug 2024 17:49:01 -0700 Subject: [PATCH 01/10] [WIP][Clang] Add __builtin_get_counted_by builtin The __

[clang] [attributes][-Wunsafe-buffer-usage] Support adding unsafe_buffer_usage attribute to struct fields (PR #101585)

2024-08-09 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak updated https://github.com/llvm/llvm-project/pull/101585 >From 1ecd91c03f6de92153809402b10f99e5f649787f Mon Sep 17 00:00:00 2001 From: MalavikaSamak Date: Thu, 1 Aug 2024 11:01:36 -0700 Subject: [PATCH 1/5] [-Wunsafe-buffer-usage] Support adding unsafe_buffer_u

[clang-tools-extra] [clang-doc] add support for enums comments in html generation (PR #101282)

2024-08-09 Thread Paul Kirth via cfe-commits
@@ -653,15 +697,35 @@ static std::vector> genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) { std::vector> Out; std::string EnumType = I.Scoped ? "enum class " : "enum "; + // Determine if enum members have comments attached + bool HasComments = false; + for (cons

[clang-tools-extra] [clang-doc] add support for enums comments in html generation (PR #101282)

2024-08-09 Thread Paul Kirth via cfe-commits
@@ -394,10 +394,20 @@ static void parseEnumerators(EnumInfo &I, const EnumDecl *D) { std::string ValueExpr; if (const Expr *InitExpr = E->getInitExpr()) ValueExpr = getSourceCode(D, InitExpr->getSourceRange()); - SmallString<16> ValueStr; E->getInitVal(

[clang-tools-extra] [clang-doc] add support for enums comments in html generation (PR #101282)

2024-08-09 Thread Paul Kirth via cfe-commits
@@ -653,15 +697,35 @@ static std::vector> genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) { std::vector> Out; std::string EnumType = I.Scoped ? "enum class " : "enum "; + // Determine if enum members have comments attached + bool HasComments = false; + for (cons

[clang-tools-extra] [clang-doc] add support for enums comments in html generation (PR #101282)

2024-08-09 Thread Paul Kirth via cfe-commits
@@ -372,14 +397,33 @@ genEnumsBlock(const std::vector &Enums, } static std::unique_ptr -genEnumMembersBlock(const llvm::SmallVector &Members) { +genEnumMembersBlock(const llvm::SmallVector &Members, +bool HasComments) { if (Members.empty()) return n

[clang-tools-extra] [clang-doc] add support for enums comments in html generation (PR #101282)

2024-08-09 Thread Paul Kirth via cfe-commits
@@ -431,6 +431,8 @@ struct EnumValueInfo { // Stores the user-supplied initialization expression for this enumeration // constant. This will be empty for implicit enumeration values. SmallString<16> ValueExpr; + + std::vector Description; // Comment description of this f

[clang] [WIP][Clang] Add __builtin_get_counted_by builtin (PR #102549)

2024-08-09 Thread Bill Wendling via cfe-commits
bwendling wrote: > So the idea here is that if the struct in question uses counted_by, you > automatically set the count... and if, for whatever reason, the compiler > can't find the corresponding field, you just throw away the count? That seems > like an terrifying API; it's impossible to pre

[clang-tools-extra] [clang-doc] add support for comments for members in HTML output (PR #101255)

2024-08-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. https://github.com/llvm/llvm-project/pull/101255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ethan Luis McDonough (EthanLuisMcDonough) Changes This pull request is a revised version of #76587. This pull request fixes some build issues that were present in the previous version of this change. > This pull request is the first part

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-pgo Author: Ethan Luis McDonough (EthanLuisMcDonough) Changes This pull request is a revised version of #76587. This pull request fixes some build issues that were present in the previous version of this change. > This pull request is the first part o

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-09 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough created https://github.com/llvm/llvm-project/pull/102691 This pull request is a revised version of #76587. This pull request fixes some build issues that were present in the previous version of this change. > This pull request is the first part of an ongoi

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-08-09 Thread Paul Kirth via cfe-commits
@@ -632,6 +633,19 @@ static std::unique_ptr genHTML(const CommentInfo &I) { return std::move(ParagraphComment); } + if (I.Kind == "BlockCommandComment") { +auto BlockComment = std::make_unique(HTMLTag::TAG_DIV); +BlockComment->Children.emplace_back( +st

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-08-09 Thread via cfe-commits
b-sumner wrote: Also > I remain concerned that newly developed instrumentations may require this > special property. Is it useful to restrict this to HIP programs, at least > before we gain more experience to comfortably apply this to other > configurations? > > I'm also worried that this c

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-08-09 Thread Paul Kirth via cfe-commits
@@ -59,32 +59,63 @@ // HTML-SHAPE: class Shape // HTML-SHAPE: Defined at line 8 of file {{.*}}Shape.h +// HTML-SHAPE: brief +// HTML-SHAPE: Abstract base class for shapes. // HTML-SHAPE: Provides a common interface for different types of shapes. // HTML-SHAPE: Functions

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-08-09 Thread Paul Kirth via cfe-commits
@@ -59,32 +59,63 @@ // HTML-SHAPE: class Shape // HTML-SHAPE: Defined at line 8 of file {{.*}}Shape.h +// HTML-SHAPE: brief +// HTML-SHAPE: Abstract base class for shapes. // HTML-SHAPE: Provides a common interface for different types of shapes. // HTML-SHAPE: Functions

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-08-09 Thread Paul Kirth via cfe-commits
@@ -632,6 +633,19 @@ static std::unique_ptr genHTML(const CommentInfo &I) { return std::move(ParagraphComment); } + if (I.Kind == "BlockCommandComment") { +auto BlockComment = std::make_unique(HTMLTag::TAG_DIV); +BlockComment->Children.emplace_back( +st

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-08-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM. I left a few minor comments. Feel free to land once those are done and CI is passing. https://github.com/llvm/llvm-project/pull/101108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-08-09 Thread Paul Kirth via cfe-commits
@@ -632,6 +633,19 @@ static std::unique_ptr genHTML(const CommentInfo &I) { return std::move(ParagraphComment); } + if (I.Kind == "BlockCommandComment") { +auto BlockComment = std::make_unique(HTMLTag::TAG_DIV); +auto Command = std::make_unique(HTMLTag::TAG_DIV

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-08-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/101108 ___ 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 bugprone-move-shared-pointer-contents check. (PR #67467)

2024-08-09 Thread via cfe-commits
@@ -0,0 +1,142 @@ +//===--- MoveSharedPointerContentsCheck.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: Ap

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-08-09 Thread via cfe-commits
@@ -0,0 +1,142 @@ +//===--- MoveSharedPointerContentsCheck.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: Ap

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-08-09 Thread via cfe-commits
@@ -0,0 +1,142 @@ +//===--- MoveSharedPointerContentsCheck.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: Ap

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-08-09 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 01/12] [clang-tidy] Add bugprone-move-shared-pointer-contents chec

[clang] [CUDA] Emit used function list in deterministic order. (PR #102661)

2024-08-09 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B updated https://github.com/llvm/llvm-project/pull/102661 >From 0f3944e1c12baa958f52c3c015a0cf5f9aeff1ed Mon Sep 17 00:00:00 2001 From: Artem Belevich Date: Fri, 9 Aug 2024 11:51:23 -0700 Subject: [PATCH 1/2] [CUDA] Emit used function list in deterministic order. Fixe

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-09 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/102683 >From f604acbb260911be7eb25d927aa91dc5b2994e93 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 9 Aug 2024 10:48:10 -0700 Subject: [PATCH 1/6] suboptimal expansion of normalize done --- clang/include/

[clang] [CUDA] Emit used function list in deterministic order. (PR #102661)

2024-08-09 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/102661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] Emit used function list in deterministic order. (PR #102661)

2024-08-09 Thread Artem Belevich via cfe-commits
@@ -950,6 +950,9 @@ void CodeGenModule::Release() { UsedArray.push_back(llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast( GetAddrOfGlobal(GD), Int8PtrTy)); } +// Sort decls by name to always emit them in deterministic order. Artem-B

[clang] [Clang][CodeGen] Fix bad codegen when building Clang with latest MSVC (PR #102681)

2024-08-09 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Might be nice to clean this up in the future but hen Microsoft releases a fix. https://github.com/llvm/llvm-project/pull/102681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-09 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/101802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-08-09 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > I remain concerned that newly developed instrumentations may require this > special property. Is it useful to restrict this to HIP programs, at least > before we gain more experience to comfortably apply this to other > configurations? > > I'm also worried that this change

[clang] [CodeGen][NFCI] Don't re-implement parts of ASTContext::getIntWidth (PR #101765)

2024-08-09 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 closed https://github.com/llvm/llvm-project/pull/101765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e91e0f5 - [CodeGen][NFCI] Don't re-implement parts of ASTContext::getIntWidth (#101765)

2024-08-09 Thread via cfe-commits
Author: Jessica Clarke Date: 2024-08-09T22:52:08+01:00 New Revision: e91e0f52895e2b23bd690a86dbaafd979e027d29 URL: https://github.com/llvm/llvm-project/commit/e91e0f52895e2b23bd690a86dbaafd979e027d29 DIFF: https://github.com/llvm/llvm-project/commit/e91e0f52895e2b23bd690a86dbaafd979e027d29.diff

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-09 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/101802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-09 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/101802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-09 Thread Jannick Kremer via cfe-commits
@@ -386,6 +386,10 @@ def __contains__(self, other): # same file, in between lines if self.start.line < other.line < self.end.line: return True +# between columns in one-liner range +elif self.start.line == other.line == self.end.line:

[clang] [CUDA] Emit used function list in deterministic order. (PR #102661)

2024-08-09 Thread Reid Kleckner via cfe-commits
@@ -950,6 +950,9 @@ void CodeGenModule::Release() { UsedArray.push_back(llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast( GetAddrOfGlobal(GD), Int8PtrTy)); } +// Sort decls by name to always emit them in deterministic order. rnk wrot

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-08-09 Thread Fangrui Song via cfe-commits
MaskRay wrote: I am still nervous as newer instrumentations might all need to know about the special property. Is it useful to restrict this to HIP programs, at least before we gain more experience to comfortably apply this to other configurations? I do worry that such a change will cause us n

[clang] [Clang][CodeGen] Fix bad codegen when building Clang with latest MSVC (PR #102681)

2024-08-09 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea edited https://github.com/llvm/llvm-project/pull/102681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-09 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/102683 >From f604acbb260911be7eb25d927aa91dc5b2994e93 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 9 Aug 2024 10:48:10 -0700 Subject: [PATCH 1/5] suboptimal expansion of normalize done --- clang/include/

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-09 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag edited https://github.com/llvm/llvm-project/pull/102602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-09 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag deleted https://github.com/llvm/llvm-project/pull/102602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-09 Thread Pavel Skripkin via cfe-commits
@@ -50,6 +101,44 @@ class BuiltinFunctionChecker : public Checker { } // namespace +void BuiltinFunctionChecker::HandleOverflowBuiltin(const CallEvent &Call, + CheckerContext &C, +

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-09 Thread Pavel Skripkin via cfe-commits
@@ -50,6 +101,44 @@ class BuiltinFunctionChecker : public Checker { } // namespace +void BuiltinFunctionChecker::HandleOverflowBuiltin(const CallEvent &Call, + CheckerContext &C, +

[clang] [Clang][CodeGen] Fix bad codegen when building Clang with latest MSVC (PR #102681)

2024-08-09 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea edited https://github.com/llvm/llvm-project/pull/102681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-09 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag updated https://github.com/llvm/llvm-project/pull/102602 >From 3e0fcffa8fbea5f89ab927fd897c451bcafd8e5e Mon Sep 17 00:00:00 2001 From: Pavel Skripkin Date: Fri, 9 Aug 2024 14:37:47 +0300 Subject: [PATCH 1/2] clang/csa: add initial support for builtin overflow --- ..

[clang] [clang] Implement -fptrauth-auth-traps. (PR #102417)

2024-08-09 Thread Anton Korobeynikov via cfe-commits
asl wrote: > Failed to cherry-pick: > [d179acd](https://github.com/llvm/llvm-project/commit/d179acd0484bac30c5ebbbed4d29a4734d92ac93) > > https://github.com/llvm/llvm-project/actions/runs/10324823761 > > Please manually backport the fix and push it to your github fork. Once this > is done, pl

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-09 Thread Pavel Skripkin via cfe-commits
@@ -278,6 +278,23 @@ int *mallocRegion(void) { return mem; } +int *custom_calloc(size_t a, size_t b) { + size_t res; + if (__builtin_mul_overflow(a, b, &res)) +return 0; + + return malloc(res); +} + +int *mallocRegionOverflow(void) { + int *mem = (int*)custom_calloc(

[clang] [Clang][CodeGen] Fix bad codegen when building Clang with latest MSVC (PR #102681)

2024-08-09 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea edited https://github.com/llvm/llvm-project/pull/102681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm-lit] Use lit Syntax for Environment Variables in Clang subproject (PR #102647)

2024-08-09 Thread via cfe-commits
@@ -87,12 +87,13 @@ /// -gcc has lowest priority so -gcc /// on PATH beats default triple in program path -// RUN: DEFAULT_TRIPLE=`%t/clang --version | grep "Target:" | cut -d ' ' -f2` -// RUN: touch %t/$DEFAULT_TRIPLE-gcc && chmod +x %t/$DEFAULT_TRIPLE-gcc -// RUN: touch %t/%

[clang] [llvm-lit] Use lit Syntax for Environment Variables in Clang subproject (PR #102647)

2024-08-09 Thread via cfe-commits
https://github.com/Harini0924 updated https://github.com/llvm/llvm-project/pull/102647 >From 658af04b25dfdb00d418936d576d13f301ffe0e6 Mon Sep 17 00:00:00 2001 From: Harini Date: Tue, 6 Aug 2024 04:40:30 + Subject: [PATCH 1/3] [llvm-lit] Replace Shell Substitutions with lit Syntax for Envir

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-09 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 d0fe470fd2b32de96762465fac130c13e9a1f782 fae41f3ac5befcd6890b174d9ac08487ae088a58 --e

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-09 Thread Pavel Skripkin via cfe-commits
@@ -21,16 +21,67 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/Checker

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Joshua Batista (bob80905) Changes This PR adds the normalize intrinsic and an HLSL function that uses it. The SPIRV backend is also implemented. Used https://github.com/llvm/llvm-project/pull/101256 as a reference, along with https:

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-directx Author: Joshua Batista (bob80905) Changes This PR adds the normalize intrinsic and an HLSL function that uses it. The SPIRV backend is also implemented. Used https://github.com/llvm/llvm-project/pull/101256 as a reference, along with ht

  1   2   3   4   5   >