[clang] [OpenACC] Implement 'wait' construct parsing (PR #74752)

2023-12-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/74752 The 'wait' construct comes in two forms: one with no parens, the second with a 'wait-argument'. This implements both forms for constructs. Additionally, the 'wait-argument' parsing is split into its own funct

[clang] [OpenACC] Implement 'wait' construct parsing (PR #74752)

2023-12-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes The 'wait' construct comes in two forms: one with no parens, the second with a 'wait-argument'. This implements both forms for constructs. Additionally, the 'wait-argument' parsing is split into its own fu

[clang] 4e80bc7 - [Clang] Introduce scoped variants of GNU atomic functions (#72280)

2023-12-07 Thread via cfe-commits
Author: Joseph Huber Date: 2023-12-07T13:40:25-06:00 New Revision: 4e80bc7d716b1f2344ffd7ad109413bfe5390879 URL: https://github.com/llvm/llvm-project/commit/4e80bc7d716b1f2344ffd7ad109413bfe5390879 DIFF: https://github.com/llvm/llvm-project/commit/4e80bc7d716b1f2344ffd7ad109413bfe5390879.diff

[clang] [Clang] Introduce scoped variants of GNU atomic functions (PR #72280)

2023-12-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/72280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxxabi] [libc] [clang] [clang-tools-extra] [lld] [openmp] [compiler-rt] [libcxx] [flang] [lldb] [mlir] [llvm] [libc++] Fix `take_view::__sentinel`'s `operator==` (PR #74655)

2023-12-07 Thread Jakub Mazurkiewicz via cfe-commits
https://github.com/JMazurkiewicz updated https://github.com/llvm/llvm-project/pull/74655 >From b3de573887cdd86fd6ce168bdcc6d729d73b13b2 Mon Sep 17 00:00:00 2001 From: Jakub Mazurkiewicz Date: Wed, 6 Dec 2023 14:03:51 +0100 Subject: [PATCH 01/10] [libc++] Fix `take_view::__sentinel`'s `operator=

[clang-tools-extra] 3ed940a - [clang-tidy] Add check hicpp-ignored-remove-result (#73119)

2023-12-07 Thread via cfe-commits
Author: Björn Svensson Date: 2023-12-07T20:55:17+01:00 New Revision: 3ed940ac3dac03d044a8d1e51005cec84dd128f9 URL: https://github.com/llvm/llvm-project/commit/3ed940ac3dac03d044a8d1e51005cec84dd128f9 DIFF: https://github.com/llvm/llvm-project/commit/3ed940ac3dac03d044a8d1e51005cec84dd128f9.diff

[clang-tools-extra] [clang-tidy] Add check hicpp-ignored-remove-result (PR #73119)

2023-12-07 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson Message-ID: In-Reply-To: https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/73119 ___ cfe-commits mailing list

[flang] [clang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

2023-12-07 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > The CI errors are Flang specific on Windows... Do we care about those? We do care about those, I just need to ping somebody with a Windows machine to help me fix that. https://github.com/llvm/llvm-project/pull/74377 ___ cfe-comm

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-12-07 Thread John McCall via cfe-commits
rjmccall wrote: Right, I'd just like to make sure that we're not deepening a divergence here. It would be good to get agreement from the GCC devs that they think `ms_struct` probably ought to do something on e.g. ARM MinGW targets and that they consider this a bug (in a feature that they may

[libcxx] [clang] [flang] [compiler-rt] [llvm] [clang-tools-extra] [libcxxabi] [lldb] [mlir] [openmp] [MachineCopyPropagation] When the source of PreviousCopy is undef, we cannot replace sub register (

2023-12-07 Thread David Green via cfe-commits
davemgreen wrote: Hello. I think that if you removed undef from the first instruction the result would still be incorrect. With: ``` $x8 = ORRXrs $xzr, $x0, 0, implicit $w0 $w8 = ORRWrs $wzr, $w0, 0, implicit-def $x8 ``` The second instruction will zero-extend the w0 register to x8. It would be

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Bill Wendling via cfe-commits
@@ -3022,18 +3022,24 @@ class CodeGenFunction : public CodeGenTypeCache { void EmitBoundsCheck(const Expr *E, const Expr *Base, llvm::Value *Index, QualType IndexType, bool Accessed); + void EmitBoundsCheck(const Expr *E, llvm::Value *Bound, llvm::Val

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Bill Wendling via cfe-commits
@@ -4022,8 +4168,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Bill Wendling via cfe-commits
@@ -994,31 +1010,55 @@ class MemberExprBaseVisitor // } Expr *Visit(Expr *E) { -return StmtVisitor::Visit(E); +return StmtVisitor::Visit(E); } - Expr *VisitCastExpr(CastExpr *E) { -return IsExpectedRecordDecl(E) ? E : Visit(E->getSubExpr()); - } - E

[clang] [flang] [flang][driver] Add -fno-fortran-main (link time) option to remove Fortran_main from link line (PR #74139)

2023-12-07 Thread Michael Klemm via cfe-commits
@@ -6345,6 +6345,10 @@ def J : JoinedOrSeparate<["-"], "J">, Group, Alias; +def no_fortran_main : Flag<["-"], "fno-fortran-main">, + Visibility<[FlangOption]>, Group, + HelpText<"Don't link in Fortran main">; + mjklemm wrote: @banach-space ``` let Vis

[clang] [flang] [flang][driver] Add -fno-fortran-main (link time) option to remove Fortran_main from link line (PR #74139)

2023-12-07 Thread Michael Klemm via cfe-commits
mjklemm wrote: > I know that it's extra work, but it's also super useful bit of documentation. > And I would only rarely try to track the history beyond commit messages > (there's just too much otherwise). I can absolutely do that. I'll craft some wording for the rationale behind that change

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-12-07 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Right, I'd just like to make sure that we're not deepening a divergence here. > It would be good to get agreement from the GCC devs that they think > `ms_struct` probably ought to do something on e.g. ARM MinGW targets and that > they consider this a bug (in a feature that th

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2023-12-07 Thread Jon Roelofs via cfe-commits
@@ -1344,6 +1344,15 @@ static void InitializePredefinedMacros(const TargetInfo &TI, if (TI.getTriple().isOSBinFormatELF()) Builder.defineMacro("__ELF__"); + // Target OS macro definitions. + if (PPOpts.DefineTargetOSMacros) { +const llvm::Triple &Triple = TI.getTr

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2023-12-07 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,131 @@ +// RUN: %clang -### --target=arm64-apple-darwin %s 2>&1 | FileCheck %s --check-prefix=DEFAULT-OPTION + +// RUN: %clang -dM -E --target=arm64-apple-macos %s 2>&1 \ +// RUN: | FileCheck %s -DMAC=1 \ +// RUN:-DOSX=1 \ +// RUN:

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2023-12-07 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,131 @@ +// RUN: %clang -### --target=arm64-apple-darwin %s 2>&1 | FileCheck %s --check-prefix=DEFAULT-OPTION + +// RUN: %clang -dM -E --target=arm64-apple-macos %s 2>&1 \ +// RUN: | FileCheck %s -DMAC=1 \ +// RUN:-DOSX=1 \ +// RUN:

[flang] [clang] [flang][driver] Add -fno-fortran-main (link time) option to remove Fortran_main from link line (PR #74139)

2023-12-07 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm edited https://github.com/llvm/llvm-project/pull/74139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Remove unneeded nullptr checks after cast<> (PR #74674)

2023-12-07 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/74674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-07 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: Plan to merge this PR tomorrow. https://github.com/llvm/llvm-project/pull/74020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Eli Friedman via cfe-commits
@@ -994,31 +1010,55 @@ class MemberExprBaseVisitor // } Expr *Visit(Expr *E) { -return StmtVisitor::Visit(E); +return StmtVisitor::Visit(E); } - Expr *VisitCastExpr(CastExpr *E) { -return IsExpectedRecordDecl(E) ? E : Visit(E->getSubExpr()); - } - E

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Eli Friedman via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[clang] [OpenACC] Implement 'wait' construct parsing (PR #74752)

2023-12-07 Thread Alexey Bataev via cfe-commits
@@ -251,6 +254,67 @@ void ParseOpenACCClauseList(Parser &P) { } // namespace +/// OpenACC 3.3, section 2.16: +/// In this section and throughout the specification, the term wait-argument +/// means: +/// [ devnum : int-expr : ] [ queues : ] async-argument-list +bool Parser::P

[llvm] [clang] [CUDA][HIP] Improve variable registration with the new driver (PR #73177)

2023-12-07 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. LGTM. Thanks https://github.com/llvm/llvm-project/pull/73177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Remove experimental from Vector Crypto extensions (PR #74213)

2023-12-07 Thread Craig Topper via cfe-commits
@@ -370,6 +371,10 @@ bool RISCVTargetInfo::handleTargetFeatures(std::vector &Features, ISAInfo = std::move(*ParseResult); } + if (std::find(Features.begin(), Features.end(), "+experimental") != topperc wrote: Use llvm::find. Or even better, maybe we c

[llvm] [clang] [RISCV] Remove experimental from Vector Crypto extensions (PR #74213)

2023-12-07 Thread Craig Topper via cfe-commits
@@ -28,6 +28,7 @@ class RISCVTargetInfo : public TargetInfo { protected: std::string ABI, CPU; std::unique_ptr ISAInfo; + bool HasExperimental = false; topperc wrote: Can this be private like `FastUnalignedAccess`? https://github.com/llvm/llvm-project/pu

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Bill Wendling via cfe-commits
@@ -994,31 +1010,55 @@ class MemberExprBaseVisitor // } Expr *Visit(Expr *E) { -return StmtVisitor::Visit(E); +return StmtVisitor::Visit(E); } - Expr *VisitCastExpr(CastExpr *E) { -return IsExpectedRecordDecl(E) ? E : Visit(E->getSubExpr()); - } - E

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Bill Wendling via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[clang] [OpenACC] Implement 'wait' construct parsing (PR #74752)

2023-12-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/74752 >From 8b7d70d55395d9a75968deeac8a13d88aae62a00 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Thu, 7 Dec 2023 08:55:46 -0800 Subject: [PATCH 1/2] [OpenACC] Implement 'wait' construct parsing The 'wait' const

[clang] [OpenACC] Implement 'wait' construct parsing (PR #74752)

2023-12-07 Thread Erich Keane via cfe-commits
@@ -251,6 +254,67 @@ void ParseOpenACCClauseList(Parser &P) { } // namespace +/// OpenACC 3.3, section 2.16: +/// In this section and throughout the specification, the term wait-argument +/// means: +/// [ devnum : int-expr : ] [ queues : ] async-argument-list +bool Parser::P

[clang] [OpenACC] Implement 'wait' construct parsing (PR #74752)

2023-12-07 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/74752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] add function attrbute amdgpu-lib-fun (PR #74737)

2023-12-07 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/74737 >From b4a30a6c89e59f11368fb71040539d24cacccbfc Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Thu, 7 Dec 2023 11:45:14 -0500 Subject: [PATCH] [AMDGPU] add function attrbute amdgpu-lib-fun Add a function

[clang] c79f94d - [clang][NFC] Fill in historical data on when C++ DRs 700-1999 were fixed

2023-12-07 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-08T00:38:42+03:00 New Revision: c79f94d85121347d28f894d837f173f90f368e92 URL: https://github.com/llvm/llvm-project/commit/c79f94d85121347d28f894d837f173f90f368e92 DIFF: https://github.com/llvm/llvm-project/commit/c79f94d85121347d28f894d837f173f90f368e92.

[clang] [clang][NFC] Refactor expected directives in C++ DRs 700-1999 (PR #74767)

2023-12-07 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR is created to check the patch against CI. https://github.com/llvm/llvm-project/pull/74767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor expected directives in C++ DRs 700-1999 (PR #74767)

2023-12-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch continues the work started with ea5b1ef016d020c37f903d6c7d4f623be975dab8. See that commit and its corresponding PR for details. --- Patch is 210.38 KiB, truncated to 20.00 KiB below, full

[clang] 97f3be2 - [CUDA][HIP] Improve variable registration with the new driver (#73177)

2023-12-07 Thread via cfe-commits
Author: Joseph Huber Date: 2023-12-07T15:44:23-06:00 New Revision: 97f3be2c5a0295632321141bdc001d4f81821958 URL: https://github.com/llvm/llvm-project/commit/97f3be2c5a0295632321141bdc001d4f81821958 DIFF: https://github.com/llvm/llvm-project/commit/97f3be2c5a0295632321141bdc001d4f81821958.diff

[llvm] [clang] [CUDA][HIP] Improve variable registration with the new driver (PR #73177)

2023-12-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/73177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Eli Friedman via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[lldb] [compiler-rt] [lld] [libcxxabi] [clang-tools-extra] [llvm] [libc] [libcxx] [flang] [mlir] [clang] [openmp] [libc++] Fix `take_view::__sentinel`'s `operator==` (PR #74655)

2023-12-07 Thread via cfe-commits
https://github.com/huixie90 approved this pull request. LGTM with green CI https://github.com/llvm/llvm-project/pull/74655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang-tools-extra] [libcxxabi] [openmp] [libc] [mlir] [flang] [lldb] [compiler-rt] [libcxx] [clang] [llvm] [libc++] Fix `take_view::__sentinel`'s `operator==` (PR #74655)

2023-12-07 Thread via cfe-commits
@@ -183,7 +183,7 @@ class take_view<_View>::__sentinel { template requires sentinel_for, iterator_t<__maybe_const<_OtherConst, _View>>> _LIBCPP_HIDE_FROM_ABI - friend constexpr bool operator==(const _Iter<_Const>& __lhs, const __sentinel& __rhs) { + friend constexpr

[llvm] [compiler-rt] [mlir] [lld] [clang-tools-extra] [openmp] [flang] [libcxxabi] [libcxx] [libc] [clang] [lldb] [libc++] Fix `take_view::__sentinel`'s `operator==` (PR #74655)

2023-12-07 Thread via cfe-commits
https://github.com/huixie90 edited https://github.com/llvm/llvm-project/pull/74655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [lldb] [libc] [clang-tools-extra] [flang] [llvm] [libcxxabi] [openmp] [lld] [compiler-rt] [libcxx] [clang] [libc++] Fix `take_view::__sentinel`'s `operator==` (PR #74655)

2023-12-07 Thread via cfe-commits
https://github.com/huixie90 edited https://github.com/llvm/llvm-project/pull/74655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [driver] Respect the mode the driver is in for autocomplete (PR #74770)

2023-12-07 Thread Philip Reames via cfe-commits
https://github.com/preames created https://github.com/llvm/llvm-project/pull/74770 The previous code was always auto-completing options for the clang mode. We'd special cases flang to allow both clang and flang options, but this doesn't match either the help output or the actual argument pars

[clang] [driver] Respect the mode the driver is in for autocomplete (PR #74770)

2023-12-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Philip Reames (preames) Changes The previous code was always auto-completing options for the clang mode. We'd special cases flang to allow both clang and flang options, but this doesn't match either the help output or the actual a

[clang] [driver] Respect the mode the driver is in for autocomplete (PR #74770)

2023-12-07 Thread Philip Reames via cfe-commits
https://github.com/preames edited https://github.com/llvm/llvm-project/pull/74770 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [driver] Respect the mode the driver is in for autocomplete (PR #74770)

2023-12-07 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 58c2a4e806b2882c0622cbded923b32f94c5b47b 255c261df90bd15d3bcee7a212758c2de4c56e69 --

[polly] [llvm] [clang-tools-extra] [clang] Reduction series : Refactor reduction detection code (PR #72343)

2023-12-07 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/72343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[polly] [llvm] [clang-tools-extra] [clang] Reduction series : Refactor reduction detection code (PR #72343)

2023-12-07 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/72343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2023-12-07 Thread Zixu Wang via cfe-commits
https://github.com/zixu-w updated https://github.com/llvm/llvm-project/pull/74676 >From f02d0c7323fa8fb357bd0228f6746b7f878eaa59 Mon Sep 17 00:00:00 2001 From: Zixu Wang Date: Thu, 14 Sep 2023 17:06:24 -0700 Subject: [PATCH] [clang][PP] Add extension to predefine target OS macros Add an extens

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2023-12-07 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/74676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Bill Wendling via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2023-12-07 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder approved this pull request. https://github.com/llvm/llvm-project/pull/74676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Bill Wendling via cfe-commits
https://github.com/bwendling edited https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [HIP] support 128 bit int division (PR #71978)

2023-12-07 Thread Yaxun Liu via cfe-commits
@@ -3630,10 +3631,17 @@ SDValue SITargetLowering::LowerCall(CallLoweringInfo &CLI, std::vector Ops; Ops.push_back(Chain); + bool AddTargetGlobalAddr = true; + // Try to find the callee in the current module. + if (isa(Callee)) { +Callee = DAG.getSymbolFunctionGloba

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-07 Thread Richard Dzenis via cfe-commits
https://github.com/RIscRIpt updated https://github.com/llvm/llvm-project/pull/71300 >From d2b4e14210d7ac24e4a48407e8dc7dac9d97a549 Mon Sep 17 00:00:00 2001 From: Richard Dzenis Date: Thu, 20 Jul 2023 00:18:50 +0300 Subject: [PATCH 1/2] [clang-cl] Add support for [[msvc::constexpr]] C++11 attri

[compiler-rt] [clang] [HIP] support 128 bit int division (PR #71978)

2023-12-07 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/71978 >From f2a6e4e2bb2554d55243385ddbae9cceebd081c9 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Thu, 7 Dec 2023 17:10:23 -0500 Subject: [PATCH] [HIP] support 128 bit int division Currently nvcc supports 1

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-07 Thread Richard Dzenis via cfe-commits
https://github.com/RIscRIpt commented: Addressed review comments; updated my tests to use changed diagnostic messages. Next I'll upload my branch rebased onto main. https://github.com/llvm/llvm-project/pull/71300 ___ cfe-commits mailing list cfe-commi

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-07 Thread Richard Dzenis via cfe-commits
https://github.com/RIscRIpt edited https://github.com/llvm/llvm-project/pull/71300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-07 Thread Richard Dzenis via cfe-commits
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return : Warning< InGroup, DefaultIgnore; def note_constexpr_body_previous_return : Note< "previous return statement is here">; +def err_ms_constexpr_not_distinct : Error< + "[[msvc::constexpr]] cannot b

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-07 Thread Richard Dzenis via cfe-commits
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return : Warning< InGroup, DefaultIgnore; def note_constexpr_body_previous_return : Note< "previous return statement is here">; +def err_ms_constexpr_not_distinct : Error< + "[[msvc::constexpr]] cannot b

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-07 Thread Richard Dzenis via cfe-commits
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return : Warning< InGroup, DefaultIgnore; def note_constexpr_body_previous_return : Note< "previous return statement is here">; +def err_ms_constexpr_not_distinct : Error< + "[[msvc::constexpr]] cannot b

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-07 Thread Richard Dzenis via cfe-commits
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return : Warning< InGroup, DefaultIgnore; def note_constexpr_body_previous_return : Note< "previous return statement is here">; +def err_ms_constexpr_not_distinct : Error< + "[[msvc::constexpr]] cannot b

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-07 Thread Richard Dzenis via cfe-commits
@@ -217,6 +217,8 @@ C23 Feature Support Non-comprehensive list of changes in this release - +- The default value of `_MSC_VER` was raised from 1920 to 1933. + MSVC 19.33 added undocumented attribute ``[[msvc::constexpr]]``.

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-07 Thread Richard Dzenis via cfe-commits
@@ -3612,6 +3612,22 @@ an error: }]; } +def MSConstexprDocs : Documentation { + let Category = DocCatStmt; + let Content = [{ +The ``[[msvc::constexpr]]`` attribute can be applied only to a function +definition or a ``return`` statement. It does not impact function declarati

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-07 Thread Richard Dzenis via cfe-commits
@@ -2861,8 +2861,8 @@ def warn_cxx17_compat_constexpr_local_var_no_init : Warning< "is incompatible with C++ standards before C++20">, InGroup, DefaultIgnore; def ext_constexpr_function_never_constant_expr : ExtWarn< - "%select{constexpr|consteval}1 %select{function|const

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-07 Thread Richard Dzenis via cfe-commits
https://github.com/RIscRIpt edited https://github.com/llvm/llvm-project/pull/71300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [llvm] [lldb] [lld] [clang-tools-extra] [flang] [compiler-rt] [libcxxabi] [clang] [mlir] [libc] [openmp] [libc++] Fix `take_view::__sentinel`'s `operator==` (PR #74655)

2023-12-07 Thread Jakub Mazurkiewicz via cfe-commits
@@ -183,7 +183,7 @@ class take_view<_View>::__sentinel { template requires sentinel_for, iterator_t<__maybe_const<_OtherConst, _View>>> _LIBCPP_HIDE_FROM_ABI - friend constexpr bool operator==(const _Iter<_Const>& __lhs, const __sentinel& __rhs) { + friend constexpr

[compiler-rt] [clang] [HIP] support 128 bit int division (PR #71978)

2023-12-07 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > Would it be feasible to consider switching to the new offloading driver mode > and really link with the library instead? It may be a conveniently isolated > use case with little/no existing users that would disrupt. It is needed by an important HIP app for which the new drive

[clang] [Clang][C++20] Implement constexpr std::bit_cast for bit-fields (& [Sema] Print more static_assert exprs) (PR #74775)

2023-12-07 Thread via cfe-commits
https://github.com/sethp created https://github.com/llvm/llvm-project/pull/74775 After this commit, clang permits constructions like: ```c++ struct bits { unsigned char : 7; unsigned char flag : 1; } static_assert(std::bit_cast(0x80).flag); // succeeds on little-endian systems ``` A fe

[clang] [Clang][C++20] Implement constexpr std::bit_cast for bit-fields (& [Sema] Print more static_assert exprs) (PR #74775)

2023-12-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (sethp) Changes After this commit, clang permits constructions like: ```c++ struct bits { unsigned char : 7; unsigned char flag : 1; } static_assert(std::bit_cast(0x80).flag); // succeeds on little-endian systems ``` A

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Eli Friedman via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[compiler-rt] [clang] [HIP] support 128 bit int division (PR #71978)

2023-12-07 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > > Would it be feasible to consider switching to the new offloading driver > > mode and really link with the library instead? It may be a conveniently > > isolated use case with little/no existing users that would disrupt. > > I've thought a reasonable amount about a `compiler

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-12-07 Thread Richard Dzenis via cfe-commits
https://github.com/RIscRIpt updated https://github.com/llvm/llvm-project/pull/71300 >From 3be36c6100801195f8f1f5167bdaa289bc8cb175 Mon Sep 17 00:00:00 2001 From: Richard Dzenis Date: Thu, 20 Jul 2023 00:18:50 +0300 Subject: [PATCH 1/2] [clang-cl] Add support for [[msvc::constexpr]] C++11 attri

[clang] Fix to msvc::no_unique_address causing assert when used with __declspec(empty_bases) (PR #74776)

2023-12-07 Thread Amy Huang via cfe-commits
https://github.com/amykhuang created https://github.com/llvm/llvm-project/pull/74776 no_unique_address makes it possible for a class to be empty and have non-zero virtual size, so just remove this assert. Bug: https://github.com/llvm/llvm-project/issues/74442 >From c3dedfd535f037fb54a8e04640f

[clang] Add size filter for stack auto init (PR #74777)

2023-12-07 Thread via cfe-commits
https://github.com/haopliu created https://github.com/llvm/llvm-project/pull/74777 Add a clang flag, "-ftrivial-auto-var-init-size-bound=" so that clang skips auto-init a variable if its size exceeds the flag setting. Note that this skipping doesn't apply to runtime-sized variables like VLA.

[clang] Fix to msvc::no_unique_address causing assert when used with __declspec(empty_bases) (PR #74776)

2023-12-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amy Huang (amykhuang) Changes no_unique_address makes it possible for a class to be empty and have non-zero virtual size, so just remove this assert. Bug: https://github.com/llvm/llvm-project/issues/74442 --- Full diff: https://github.co

[clang] Add size filter for stack auto init (PR #74777)

2023-12-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (haopliu) Changes Add a clang flag, "-ftrivial-auto-var-init-size-bound=" so that clang skips auto-init a variable if its size exceeds the flag setting. Note that this skipping doesn't apply to runtime-sized variables like VL

[clang] Add size filter for stack auto init (PR #74777)

2023-12-07 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 c6805ea44af3bfd57e6b46f2d65ec6b0d0d6c64a 00af66353d938c6ce59dada49c8bededb06ac4fc --

[clang] Fix to msvc::no_unique_address causing assert when used with __declspec(empty_bases) (PR #74776)

2023-12-07 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 c6805ea44af3bfd57e6b46f2d65ec6b0d0d6c64a c3dedfd535f037fb54a8e04640f9332e655a9a7d --

[clang] Add size filter for stack auto init (PR #74777)

2023-12-07 Thread via cfe-commits
https://github.com/haopliu edited https://github.com/llvm/llvm-project/pull/74777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix tests clang-offload-bundler-zlib/zstd.c (PR #74504)

2023-12-07 Thread Joseph Huber via cfe-commits
jhuber6 wrote: I got this fail just now after doing a pull. ``` FAIL: Clang :: Driver/hip-offload-compress-zstd.hip (477 of 1078) TEST 'Clang :: Driver/hip-offload-compress-zstd.hip' FAILED Exit Code: 1 Command Output (stderr): -- RUN: at line 7: rm -rf

[clang] bfd41c3 - [LinkerWrapper][Obvious] Fix missing use of texture data type

2023-12-07 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-12-07T16:55:14-06:00 New Revision: bfd41c3f8cc70bd65461a6d767f55c14d72150d9 URL: https://github.com/llvm/llvm-project/commit/bfd41c3f8cc70bd65461a6d767f55c14d72150d9 DIFF: https://github.com/llvm/llvm-project/commit/bfd41c3f8cc70bd65461a6d767f55c14d72150d9.diff

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-07 Thread Bill Wendling via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[clang] Add size filter for stack auto init (PR #74777)

2023-12-07 Thread via cfe-commits
https://github.com/haopliu updated https://github.com/llvm/llvm-project/pull/74777 >From bb5acad16c6a627d73a5af96e3dd4eba2ebe1a5d Mon Sep 17 00:00:00 2001 From: Haopeng Liu Date: Thu, 7 Dec 2023 21:25:33 + Subject: [PATCH 1/3] Add size filter for stack auto init --- .../include/clang/Basi

[clang] Add size filter for stack auto init (PR #74777)

2023-12-07 Thread via cfe-commits
https://github.com/haopliu updated https://github.com/llvm/llvm-project/pull/74777 >From bb5acad16c6a627d73a5af96e3dd4eba2ebe1a5d Mon Sep 17 00:00:00 2001 From: Haopeng Liu Date: Thu, 7 Dec 2023 21:25:33 + Subject: [PATCH 1/4] Add size filter for stack auto init --- .../include/clang/Basi

[clang] Fix tests clang-offload-bundler-zlib/zstd.c (PR #74504)

2023-12-07 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > I got this fail just now after doing a pull. > > ``` > FAIL: Clang :: Driver/hip-offload-compress-zstd.hip (477 of 1078) > TEST 'Clang :: Driver/hip-offload-compress-zstd.hip' > FAILED > Exit Code: 1 > > Command Output (stderr): > --

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/74782 The existing code incorrectly assumes that `Path` can be empty. It can't, it always contains at least `<` or `"`. On Unix, this patch fixes an incorrect diagnostics that instead of `"/Users/blah"` suggested

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes The existing code incorrectly assumes that `Path` can be empty. It can't, it always contains at least `<` or `"`. On Unix, this patch fixes an incorrect diagnostics that instead of `"/Users/blah"` sugges

[clang] Fix tests hip-offload-compress-zlib/zstd.hip (PR #74783)

2023-12-07 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/74783 Use %t in output file name as %T is non-unique. >From d95bc5d805a5ee267959ee342bc40b02c5fa4c22 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Thu, 7 Dec 2023 18:25:33 -0500 Subject: [PATCH] Fix tests hi

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/74782 >From 6ab18edae7b86ca216848b7fcaff5e58fb3e186c Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Dec 2023 15:15:16 -0800 Subject: [PATCH] [clang][lex] Fix non-portability diagnostics with absolute pat

[clang] Fix tests hip-offload-compress-zlib/zstd.hip (PR #74783)

2023-12-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Yaxun (Sam) Liu (yxsamliu) Changes Use %t in output file name as %T is non-unique. --- Full diff: https://github.com/llvm/llvm-project/pull/74783.diff 2 Files Affected: - (modified) clang/test/Driver/hip-offload-compress-zlib.hip

[clang] Fix tests hip-offload-compress-zlib/zstd.hip (PR #74783)

2023-12-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes Use %t in output file name as %T is non-unique. --- Full diff: https://github.com/llvm/llvm-project/pull/74783.diff 2 Files Affected: - (modified) clang/test/Driver/hip-offload-compress-zlib.hip (+3-3)

[clang] Fix tests clang-offload-bundler-zlib/zstd.c (PR #74504)

2023-12-07 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: fix another two tests by https://github.com/llvm/llvm-project/pull/74783 https://github.com/llvm/llvm-project/pull/74504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix tests hip-offload-compress-zlib/zstd.hip (PR #74783)

2023-12-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/74783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add size filter for stack auto init (PR #74777)

2023-12-07 Thread via cfe-commits
https://github.com/haopliu updated https://github.com/llvm/llvm-project/pull/74777 >From bb5acad16c6a627d73a5af96e3dd4eba2ebe1a5d Mon Sep 17 00:00:00 2001 From: Haopeng Liu Date: Thu, 7 Dec 2023 21:25:33 + Subject: [PATCH 1/5] Add size filter for stack auto init --- .../include/clang/Basi

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-07 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/74782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-07 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM with small comments. https://github.com/llvm/llvm-project/pull/74782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-07 Thread Steven Wu via cfe-commits
@@ -2466,15 +2466,21 @@ Preprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport( // The drive letter is optional for absolute paths on Windows, but // clang currently cannot process absolute paths in #include lines that // don't have a driv

<    1   2   3   4   >