[llvm] [clang] [flang] [Flang][WIP/RFC] Enable TSan for Flang (PR #74643)

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

[libcxxabi] [libc] [mlir] [clang] [libunwind] [libcxx] [clang-tools-extra] [openmp] [lldb] [lld] [llvm] [flang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-12-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/71264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [lldb] [mlir] [libc] [libcxx] [openmp] [libunwind] [clang-tools-extra] [flang] [libcxxabi] [lld] [clang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-12-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. I like the behavior of this and the changes LGTM, but please give @ErichKeane a chance to weigh in as templates code owner before landing. https://github.com/llvm/llvm-project/pull/71264 ___

[llvm] [libcxxabi] [lld] [clang-tools-extra] [clang] [openmp] [libc] [libcxx] [libunwind] [lldb] [mlir] [flang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-12-06 Thread Aaron Ballman via cfe-commits
@@ -898,8 +895,9 @@ void Sema::DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl) { // Make this a warning when MSVC compatibility is requested. unsigned DiagId = getLangOpts().MSVCCompat ? diag::ext_template_param_shadow

[llvm] [lldb] [mlir] [libcxx] [openmp] [flang] [libcxxabi] [compiler-rt] [clang] [AMDGPU] Add GFX12 encoding for VINTERP instructions (PR #74616)

2023-12-06 Thread Jay Foad via cfe-commits
https://github.com/jayfoad updated https://github.com/llvm/llvm-project/pull/74616 >From 69580e5f77514fecf0aabe2a80c98881f9bd7288 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Tue, 7 Feb 2023 16:27:27 + Subject: [PATCH 1/2] [AMDGPU] Add GFX12 encoding for VINTERP instructions --- .../Disa

[clang] [clang][Interp] Implement __builtin_rotate{right, left} (PR #72984)

2023-12-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from a testing request https://github.com/llvm/llvm-project/pull/72984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang][Interp] Implement __builtin_rotate{right, left} (PR #72984)

2023-12-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/72984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement __builtin_rotate{right, left} (PR #72984)

2023-12-06 Thread Aaron Ballman via cfe-commits
@@ -331,3 +331,17 @@ namespace bitreverse { char bitreverse3[__builtin_bitreverse32(0x12345678) == 0x1E6A2C48 ? 1 : -1]; char bitreverse4[__builtin_bitreverse64(0x0123456789ABCDEFULL) == 0xF7B3D591E6A2C480 ? 1 : -1]; } + +namespace rotateleft { + char rotateleft1[__builti

[clang] [clang][Interp] Implement __builtin_ffs (PR #72988)

2023-12-06 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: https://github.com/AaronBallman approved this pull request. It looks like the rotate changes made it into here as well, but otherwise LGTM https://github.com/llvm/llvm-project/pull/72988 ___ cfe-c

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

2023-12-06 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I actually think bdos is more complicated: array bounds checking can handle arbitrary base expressions, so it doesn't need to examine the base expression at all. bdos can't do that, so more work is required to handle precisely the cases you want to handle. https://github

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

2023-12-06 Thread Bill Wendling via cfe-commits
bwendling wrote: > I actually think bdos is more complicated: array bounds checking can handle > arbitrary base expressions, so it doesn't need to examine the base expression > at all. bdos can't do that, so more work is required to handle precisely the > cases you want to handle. Yup! The co

[clang-tools-extra] 0eb7d53 - [clang-tidy] add modernize-use-std-numbers (#66583)

2023-12-06 Thread Piotr Zegar via cfe-commits
Author: Julian Schmidt Date: 2023-12-06T20:49:14Z New Revision: 0eb7d53cfc48f2e9287bb116415620618ca850b7 URL: https://github.com/llvm/llvm-project/commit/0eb7d53cfc48f2e9287bb116415620618ca850b7 DIFF: https://github.com/llvm/llvm-project/commit/0eb7d53cfc48f2e9287bb116415620618ca850b7.diff LOG

[clang-tools-extra] e1fa2fe - [clang-tidy][NFC] Change ArrayRef into std::vector in modernize-use-std-numbers

2023-12-06 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-12-06T20:50:48Z New Revision: e1fa2fea03ff94627008054267a244744d76b5c2 URL: https://github.com/llvm/llvm-project/commit/e1fa2fea03ff94627008054267a244744d76b5c2 DIFF: https://github.com/llvm/llvm-project/commit/e1fa2fea03ff94627008054267a244744d76b5c2.diff LOG: [

[lldb] [libunwind] [clang] [mlir] [libcxx] [clang-tools-extra] [libcxxabi] [lld] [libc] [openmp] [llvm] [flang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-12-06 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I think this is a very positive change, and see nothing besides Aaron's nit to comment on. Thanks! https://github.com/llvm/llvm-project/pull/71264 ___ cfe-commits mailing list cfe-commits@list

[libc] [lld] [libcxxabi] [clang-tools-extra] [llvm] [clang] [flang] [compiler-rt] [lldb] [libcxx] [mlir] [llvm] Support IFuncs on Darwin platforms (PR #73686)

2023-12-06 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/73686 >From bc152095691b32d1ad8539dfd60f5089df5eed8d Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 28 Nov 2023 10:39:44 -0800 Subject: [PATCH 1/9] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[compiler-rt] [lldb] [libc] [clang] [lld] [mlir] [llvm] [libcxxabi] [clang-tools-extra] [flang] [libcxx] [llvm] Support IFuncs on Darwin platforms (PR #73686)

2023-12-06 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/73686 >From bc152095691b32d1ad8539dfd60f5089df5eed8d Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 28 Nov 2023 10:39:44 -0800 Subject: [PATCH 1/9] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] [clang-format] Handle merging functions containing only a block comment (PR #74651)

2023-12-06 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/74651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle merging functions containing only a block comment (PR #74651)

2023-12-06 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited https://github.com/llvm/llvm-project/pull/74651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle merging functions containing only a block comment (PR #74651)

2023-12-06 Thread Björn Schäpers via cfe-commits
@@ -411,9 +411,16 @@ class LineJoiner { } } +const auto *LastNonComment = TheLine->getLastNonComment(); +assert(LastNonComment); +// FIXME: There are probably cases where we should use LastNonComment HazardyKnusperkeks wrote: Is this a l

[lldb] [clang] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread David Blaikie via cfe-commits
dwblaikie wrote: > To support access to such constants from LLDB we'll most likely have to have > to make LLDB find the constants by looking at the containing class first. Tangentially related to: https://discourse.llvm.org/t/rfc-improve-dwarf-5-debug-names-type-lookup-parsing-speed/74151/31?u

[lldb] [clang] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: Could we please land this now? https://github.com/llvm/llvm-project/pull/74580 ___ 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-06 Thread Bill Wendling via cfe-commits
bwendling wrote: It's the __bdos cases that really benefit from the `ExprLValueMap`. The `LocalDeclMap` will have any `allocas` or globals for local C decls. From that, I'll be able to get enough information to generate the `count` lookup. The `ExprLValueMap` improves this by allowing us to us

[clang] [clang-format] Handle merging functions containing only a block comment (PR #74651)

2023-12-06 Thread Owen Pan via cfe-commits
@@ -411,9 +411,16 @@ class LineJoiner { } } +const auto *LastNonComment = TheLine->getLastNonComment(); +assert(LastNonComment); +// FIXME: There are probably cases where we should use LastNonComment owenca wrote: No. This is new from th

[clang] [CUDA][Win32] Add `fma(long double,..)` to math forward declares. (PR #73756)

2023-12-06 Thread Artem Belevich via cfe-commits
@@ -70,6 +70,9 @@ __DEVICE__ double floor(double); __DEVICE__ float floor(float); __DEVICE__ double fma(double, double, double); __DEVICE__ float fma(float, float, float); +#ifdef _MSC_VER +__DEVICE__ long double fma(long double, long double, long double); Arte

[clang-tools-extra] [clang] [compiler-rt] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-06 Thread David Li via cfe-commits
david-xl wrote: > > David says the itanium remapper file was only used once during gcc to llvm > > transition, so not relevant here. > > I believe it was actually for the libstdc++ to libc++ transition (see > https://reviews.llvm.org/D51247 and https://reviews.llvm.org/D51240). > > If it is b

[clang-tools-extra] [clang] [compiler-rt] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-06 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > > > David says the itanium remapper file was only used once during gcc to > > > llvm transition, so not relevant here. > > > > > > I believe it was actually for the libstdc++ to libc++ transition (see > > https://reviews.llvm.org/D51247 and https://reviews.llvm.org/D51240

[clang] Crash when referencing capture in static lambda (PR #74661)

2023-12-06 Thread Ben Jackson via cfe-commits
https://github.com/puremourning created https://github.com/llvm/llvm-project/pull/74661 The constant evaluator could try to reference a lambda capture in a static lambda call operator. Static lambdas can't have captures, so we simply abort. Either the lambda needs to be made non-static, or the

[clang] Crash when referencing capture in static lambda (PR #74661)

2023-12-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ben Jackson (puremourning) Changes The constant evaluator could try to reference a lambda capture in a static lambda call operator. Static lambdas can't have captures, so we simply abort. Either the lambda needs to be made non-static, or

[clang] [lldb] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via cfe-commits
Michael137 wrote: > > To support access to such constants from LLDB we'll most likely have to > > have to make LLDB find the constants by looking at the containing class > > first. > > Tangentially related to: > https://discourse.llvm.org/t/rfc-improve-dwarf-5-debug-names-type-lookup-parsing-

[clang] 4db54e6 - [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (#74580)

2023-12-06 Thread via cfe-commits
Author: Michael Buch Date: 2023-12-06T22:13:54Z New Revision: 4db54e659763401dbf2e5b1f90e9a3391e311e50 URL: https://github.com/llvm/llvm-project/commit/4db54e659763401dbf2e5b1f90e9a3391e311e50 DIFF: https://github.com/llvm/llvm-project/commit/4db54e659763401dbf2e5b1f90e9a3391e311e50.diff LOG:

[clang] [lldb] [clang][DebugInfo] Revert "emit definitions for constant-initialized static data-members" (PR #74580)

2023-12-06 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/74580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Crash when referencing capture in static lambda (PR #74661)

2023-12-06 Thread Ben Jackson via cfe-commits
puremourning wrote: I guess should ping @royjacobson on this one? https://github.com/llvm/llvm-project/pull/74661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a93cacf - [clang driver] Remove a bit of redundant flang specific code [nfc]

2023-12-06 Thread Philip Reames via cfe-commits
Author: Philip Reames Date: 2023-12-06T14:20:36-08:00 New Revision: a93cacf9b08f0780f2ae2832da10a9a841ae7d03 URL: https://github.com/llvm/llvm-project/commit/a93cacf9b08f0780f2ae2832da10a9a841ae7d03 DIFF: https://github.com/llvm/llvm-project/commit/a93cacf9b08f0780f2ae2832da10a9a841ae7d03.diff

[mlir] [clang] [llvm] [flang] [clang-tools-extra] [openmp] [libcxx] Replace memcpy with std::copy (PR #74663)

2023-12-06 Thread Giovanni Martins via cfe-commits
https://github.com/giovannism20 created https://github.com/llvm/llvm-project/pull/74663 22583 >From 992fd1fbc3568116da55c6b7cb40831757e4da6b Mon Sep 17 00:00:00 2001 From: Giovanni Martins Date: Wed, 6 Dec 2023 11:26:53 -0300 Subject: [PATCH 1/4] replace memcpy with std::copy on clang-tidy --

[mlir] [clang] [llvm] [flang] [clang-tools-extra] [openmp] [libcxx] Replace memcpy with std::copy (PR #74663)

2023-12-06 Thread Giovanni Martins via cfe-commits
https://github.com/giovannism20 edited https://github.com/llvm/llvm-project/pull/74663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [llvm] [libcxx] [clang-tools-extra] [mlir] [openmp] Replace memcpy with std::copy (PR #74663)

2023-12-06 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 64454daab0c34d9f3a488979b6b7dfbe315fa9f8 39092c7d3d5acb1cca5927b85e69a98656a22683 --

[flang] [clang] [llvm] [libcxx] [clang-tools-extra] [mlir] [openmp] Replace memcpy with std::copy (PR #74663)

2023-12-06 Thread Giovanni Martins via cfe-commits
https://github.com/giovannism20 updated https://github.com/llvm/llvm-project/pull/74663 >From 992fd1fbc3568116da55c6b7cb40831757e4da6b Mon Sep 17 00:00:00 2001 From: Giovanni Martins Date: Wed, 6 Dec 2023 11:26:53 -0300 Subject: [PATCH 1/5] replace memcpy with std::copy on clang-tidy --- .../

[clang] [Clang] Mark WG14 N2939 (Identifier Syntax Fixes) as available in Clang 15 (PR #74666)

2023-12-06 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann created https://github.com/llvm/llvm-project/pull/74666 WG14 N2939 (Identifier Syntax Fixes) corrects a grammar issue in the C standard but does not otherwise change intended behavior. This change updates the C23 status to note this paper as implemented as of Cla

[clang] [Clang] Mark WG14 N2939 (Identifier Syntax Fixes) as available in Clang 15 (PR #74666)

2023-12-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Honermann (tahonermann) Changes WG14 N2939 (Identifier Syntax Fixes) corrects a grammar issue in the C standard but does not otherwise change intended behavior. This change updates the C23 status to note this paper as implemented as o

[openmp] [libcxxabi] [clang] [compiler-rt] [libc] [mlir] [flang] [libcxx] [llvm] [lldb] [lld] [clang-tools-extra] [libunwind] [Clang][Sema] Don't say "is declared here" for invalid template locations

2023-12-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/71264 >From cab6bcd73081fcbe9807adbf60b345f8d9e654e4 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 3 Nov 2023 18:59:49 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-

[clang] [clang] Crash when referencing capture in static lambda (PR #74661)

2023-12-06 Thread Ben Jackson via cfe-commits
https://github.com/puremourning edited https://github.com/llvm/llvm-project/pull/74661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-12-06 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 updated https://github.com/llvm/llvm-project/pull/73069 From 89281ccb5354e3d6349d10e6f9446194d2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Thu, 16 Nov 2023 22:03:15 -0500 Subject: [PATCH 01/11] =?UTF-8?q?[clang-tidy]=C2=A0

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-12-06 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 updated https://github.com/llvm/llvm-project/pull/73069 From 89281ccb5354e3d6349d10e6f9446194d2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Thu, 16 Nov 2023 22:03:15 -0500 Subject: [PATCH 01/12] =?UTF-8?q?[clang-tidy]=C2=A0

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

2023-12-06 Thread Mike Rice via cfe-commits
https://github.com/mikerice1969 created https://github.com/llvm/llvm-project/pull/74674 Since VD is assigned from a cast it cannot be a nullptr or it would have asserted. Remove the subsequent checks to clear up any misunderstanding. >From 6b3b456534c21a74f12ac022ee99365dd3831dec Mon Sep 17 00

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

2023-12-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mike Rice (mikerice1969) Changes Since VD is assigned from a cast it cannot be a nullptr or it would have asserted. Remove the subsequent checks to clear up any misunderstanding. --- Full diff: https://github.com/llvm/llvm-proje

[clang] 0cd308a - [Clang][Sema] Don't say "is declared here" for invalid template locations

2023-12-06 Thread via cfe-commits
Author: Justin Bogner Date: 2023-12-06T15:10:45-08:00 New Revision: 0cd308aebcde8af4d8b11084a82c8e64b6a828c6 URL: https://github.com/llvm/llvm-project/commit/0cd308aebcde8af4d8b11084a82c8e64b6a828c6 DIFF: https://github.com/llvm/llvm-project/commit/0cd308aebcde8af4d8b11084a82c8e64b6a828c6.diff

[compiler-rt] [llvm] [openmp] [libc] [lldb] [libcxx] [libcxxabi] [libunwind] [lld] [clang-tools-extra] [clang] [flang] [mlir] [Clang][Sema] Don't say "is declared here" for invalid template locations

2023-12-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/71264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [clang-tools-extra] [lldb] [libcxxabi] [mlir] [compiler-rt] [libc] [openmp] [llvm] [libcxx] [flang] [llvm] Support IFuncs on Darwin platforms (PR #73686)

2023-12-06 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/73686 >From bc152095691b32d1ad8539dfd60f5089df5eed8d Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 28 Nov 2023 10:39:44 -0800 Subject: [PATCH 1/9] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

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

2023-12-06 Thread Zixu Wang via cfe-commits
https://github.com/zixu-w created https://github.com/llvm/llvm-project/pull/74676 Add an extension feature `define-target-os-macros` that enables clang to provide definitions of common TARGET_OS_* conditional macros. The extension is enabled in the Darwin toolchain driver. >From 2812f69940451

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

2023-12-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Zixu Wang (zixu-w) Changes Add an extension feature `define-target-os-macros` that enables clang to provide definitions of common TARGET_OS_* conditional macros. The extension is enabled in the Darwin toolchain driver. --- Full di

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

2023-12-06 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 23d402e5b705d98463150302a55623951284b5f2 2812f69940451b810b8aa9a580e98a4a22a89967 --

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-06 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Thanks https://github.com/llvm/llvm-project/pull/66583 ___ 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-06 Thread Zixu Wang via cfe-commits
https://github.com/zixu-w updated https://github.com/llvm/llvm-project/pull/74676 >From cdc7cf721a7d4a6bf318181ea3f37adf7c571ed1 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-format] Handle merging functions containing only a block comment (PR #74651)

2023-12-06 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. Lgtm https://github.com/llvm/llvm-project/pull/74651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 61329bd - [HLSL] RWBuffer should not have a default parameter

2023-12-06 Thread via cfe-commits
Author: Justin Bogner Date: 2023-12-06T15:27:27-08:00 New Revision: 61329b9cb155b4902fd7fa4a2367e796d51a URL: https://github.com/llvm/llvm-project/commit/61329b9cb155b4902fd7fa4a2367e796d51a DIFF: https://github.com/llvm/llvm-project/commit/61329b9cb155b4902fd7fa4a2367e796d51a.diff

[flang] [clang] [mlir] [llvm] [lld] [clang-tools-extra] [openmp] [HLSL] RWBuffer should not have a default parameter (PR #71265)

2023-12-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/71265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [flang] [clang] [lld] [openmp] [llvm] [clang-tools-extra] [HLSL] RWBuffer should not have a default parameter (PR #71265)

2023-12-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/71265 >From 1779fd08dad4f03ae5e9f1803b8ea3d7dc77c093 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 3 Nov 2023 19:03:00 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?UTF-

[openmp] [lld] [clang-tools-extra] [llvm] [flang] [clang] [mlir] [HLSL] RWBuffer should not have a default parameter (PR #71265)

2023-12-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/71265 ___ 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-06 Thread Ian Anderson 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-06 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] [NFC] Remove unneeded nullptr checks after cast<> (PR #74674)

2023-12-06 Thread Mike Rice via cfe-commits
@@ -6454,8 +6454,7 @@ ConstantAddress CodeGenModule::GetAddrOfGlobalTemporary( !EvalResult.hasSideEffects()) Value = &EvalResult.Val; - LangAS AddrSpace = - VD ? GetGlobalVarAddressSpace(VD) : MaterializedType.getAddressSpace(); mikerice1969 wr

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

2023-12-06 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-12-06T18:38:21-05:00 New Revision: 36e4cb7986da455342dfd535b659640ab0692340 URL: https://github.com/llvm/llvm-project/commit/36e4cb7986da455342dfd535b659640ab0692340 DIFF: https://github.com/llvm/llvm-project/commit/36e4cb7986da455342dfd535b659640ab0692340.dif

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

2023-12-06 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed 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

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

2023-12-06 Thread Yaxun Liu via cfe-commits
@@ -596,6 +596,7 @@ static bool mustPreserveGV(const GlobalValue &GV) { if (const Function *F = dyn_cast(&GV)) return F->isDeclaration() || F->getName().startswith("__asan_") || F->getName().startswith("__sanitizer_") || + F->getName() == "__divti3" |

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

2023-12-06 Thread Björn Svensson via cfe-commits
https://github.com/bjosv updated https://github.com/llvm/llvm-project/pull/73119 From 91cf412abcfd231ab399c3e44c6a9bc14109537c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Svensson?= Date: Tue, 21 Nov 2023 23:30:07 +0100 Subject: [PATCH 1/4] [clang-tidy] Add check hicpp-ignored-remove-r

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

2023-12-06 Thread Björn Svensson via cfe-commits
@@ -0,0 +1,28 @@ +//===--- IgnoredRemoveResultCheck.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: Apa

[clang-tools-extra] [clang] [llvm] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-06 Thread David Li via cfe-commits
david-xl wrote: > > > > David says the itanium remapper file was only used once during gcc to > > > > llvm transition, so not relevant here. > > > > > > > > > I believe it was actually for the libstdc++ to libc++ transition (see > > > https://reviews.llvm.org/D51247 and https://reviews.llvm.o

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

2023-12-06 Thread Björn Svensson via cfe-commits
@@ -0,0 +1,17 @@ +.. title:: clang-tidy - hicpp-ignored-remove-result + +hicpp-ignored-remove-result +=== + +Ensure that the result of ``std::remove``, ``std::remove_if`` and ``std::unique`` +are not ignored according to +`rule 17.5.1

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

2023-12-06 Thread Björn Svensson via cfe-commits
@@ -133,6 +133,11 @@ UnusedReturnValueCheck::UnusedReturnValueCheck(llvm::StringRef Name, "::boost::system::error_code"))), AllowCastToVoid(Options.get("AllowCastToVoid", false)) {} +UnusedReturnValueCheck::UnusedReturnValueCh

[clang] e1a4b00 - [clang-format] Handle merging functions containing only a block comment (#74651)

2023-12-06 Thread via cfe-commits
Author: Owen Pan Date: 2023-12-06T16:56:22-08:00 New Revision: e1a4b0032f89355da94a5505bf308ab12668b1b0 URL: https://github.com/llvm/llvm-project/commit/e1a4b0032f89355da94a5505bf308ab12668b1b0 DIFF: https://github.com/llvm/llvm-project/commit/e1a4b0032f89355da94a5505bf308ab12668b1b0.diff LOG:

[clang] [clang-format] Handle merging functions containing only a block comment (PR #74651)

2023-12-06 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c281782 - [clang][Sema] Add -Wswitch-default warning option (#73077)

2023-12-06 Thread via cfe-commits
Author: dong jianqiang Date: 2023-12-07T09:03:15+08:00 New Revision: c28178298513f99dc869daa301fc25257df81688 URL: https://github.com/llvm/llvm-project/commit/c28178298513f99dc869daa301fc25257df81688 DIFF: https://github.com/llvm/llvm-project/commit/c28178298513f99dc869daa301fc25257df81688.diff

[clang] [clang][Sema] Add -Wswitch-default warning option (PR #73077)

2023-12-06 Thread via cfe-commits
https://github.com/hstk30-hw closed https://github.com/llvm/llvm-project/pull/73077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fed4e3a - [clang] Exclude non-template classes when checking if constraint refers to containing template arguments (#74265)

2023-12-06 Thread via cfe-commits
Author: antangelo Date: 2023-12-06T20:17:59-05:00 New Revision: fed4e3a6eb5d04856169951347892d983695f86a URL: https://github.com/llvm/llvm-project/commit/fed4e3a6eb5d04856169951347892d983695f86a DIFF: https://github.com/llvm/llvm-project/commit/fed4e3a6eb5d04856169951347892d983695f86a.diff LOG

[clang] [clang-tools-extra] [compiler-rt] [flang] [llvm] [libc] [clang] Exclude non-template classes when checking if constraint refers to containing template arguments (PR #74265)

2023-12-06 Thread via cfe-commits
https://github.com/antangelo closed https://github.com/llvm/llvm-project/pull/74265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b683709 - [clang-format] Fix a possible crash in `AlignAfterOpenBracket: BlockIndent`

2023-12-06 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-12-06T17:40:41-08:00 New Revision: b683709ea6eec7d0a388bd50c571774c9b9ffdb7 URL: https://github.com/llvm/llvm-project/commit/b683709ea6eec7d0a388bd50c571774c9b9ffdb7 DIFF: https://github.com/llvm/llvm-project/commit/b683709ea6eec7d0a388bd50c571774c9b9ffdb7.diff LOG:

[llvm] [clang] [clang][RISCV] Change default abi when only have f extension but no d extension (PR #73489)

2023-12-06 Thread Jianjian Guan via cfe-commits
https://github.com/jacquesguan updated https://github.com/llvm/llvm-project/pull/73489 >From ce22351f42b0a641000d1aa4db86f090f9b4e6c8 Mon Sep 17 00:00:00 2001 From: Jianjian GUAN Date: Mon, 27 Nov 2023 16:14:04 +0800 Subject: [PATCH] [clang][RISCV] Change default abi with f extension but witho

[llvm] [clang] [clang][RISCV] Change default abi with f extension but without d extension (PR #73489)

2023-12-06 Thread Jianjian Guan via cfe-commits
https://github.com/jacquesguan edited https://github.com/llvm/llvm-project/pull/73489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang][RISCV] Change default abi with f extension but without d extension (PR #73489)

2023-12-06 Thread Jianjian Guan via cfe-commits
@@ -1,4 +1,4 @@ -// Check target CPUs are correctly passed. +·// Check target CPUs are correctly passed. jacquesguan wrote: Fixed https://github.com/llvm/llvm-project/pull/73489 ___ cfe-commits mailing list cfe-commits

[clang] [clang] Crash when referencing capture in static lambda (PR #74661)

2023-12-06 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I think this makes sense but @cor3ntin should look at it. https://github.com/llvm/llvm-project/pull/74661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang-tools-extra] [clang] [llvm] [XCOFF][obj2yaml] support parsing auxiliary symbols for XCOFF (PR #70642)

2023-12-06 Thread via cfe-commits
https://github.com/EsmeYi closed https://github.com/llvm/llvm-project/pull/70642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][driver] Mark -fcommon and -mtune as visible in Flang (PR #68657)

2023-12-06 Thread Fangcao Wang via cfe-commits
@@ -5077,6 +5077,7 @@ def module_file_info : Flag<["-"], "module-file-info">, Flags<[NoXarchOption]>, HelpText<"Provide information about a particular module file">; def mthumb : Flag<["-"], "mthumb">, Group; def mtune_EQ : Joined<["-"], "mtune=">, Group, + Flags<[TargetSpe

[flang] [clang] [flang][driver] Mark -fcommon and -mtune as visible in Flang (PR #68657)

2023-12-06 Thread Fangcao Wang via cfe-commits
https://github.com/LittleMeepo closed https://github.com/llvm/llvm-project/pull/68657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[openmp] [clang] [OpenMP] Fix runtime problem due wrong map size. (PR #74692)

2023-12-06 Thread via cfe-commits
https://github.com/jyu2-git created https://github.com/llvm/llvm-project/pull/74692 Currently we are missing set up-boundary address for FinalArraySection as highests elements in partial struct data. Currently for: \#pragma omp target map(D.a) map(D.b[:2]) The size is: %a = getelementptr inb

[openmp] [clang] [OpenMP] Fix runtime problem due wrong map size. (PR #74692)

2023-12-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (jyu2-git) Changes Currently we are missing set up-boundary address for FinalArraySection as highests elements in partial struct data. Currently for: \#pragma omp target map(D.a) map(D.b[:2]) The size is: %a = getelementptr

[clang] [clang][AMDGPU] Update amdgpu_waves_per_eu attr docs (PR #74587)

2023-12-06 Thread Matt Arsenault via cfe-commits
@@ -2659,8 +2659,9 @@ An error will be given if: - Specified values violate subtarget specifications; - Specified values are not compatible with values provided through other attributes; - - The AMDGPU target backend is unable to create machine code that can meet the

[clang-tools-extra] [llvm] [clang] [XCOFF][obj2yaml] support parsing auxiliary symbols for XCOFF (PR #70642)

2023-12-06 Thread Kai Luo via cfe-commits
@@ -282,45 +282,57 @@ static void auxSymMapping(IO &IO, XCOFFYAML::SectAuxEntForStat &AuxSym) { void MappingTraits>::mapping( IO &IO, std::unique_ptr &AuxSym) { - assert(!IO.outputting() && "We don't dump aux symbols currently."); + + auto ResetAuxSym = [&](auto *AuxEnt

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-06 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -emit-llvm -triple loongarch64 %s -o - | FileCheck %s + +// CHECK: @normal ={{.*}} global i32 0, code_model "small" +int normal __attribute__((model("normal"))); + +// CHECK: @medium ={{.*}} global i32 0, code_model "medium" +int medium __attri

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-06 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -triple aarch64 -verify=expected,aarch64 -fsyntax-only %s +// RUN: %clang_cc1 -triple loongarch64 -verify=expected,loongarch64 -fsyntax-only %s +// RUN: %clang_cc1 -triple mips64 -verify=expected,mips64 -fsyntax-only %s +// RUN: %clang_cc1 -tr

[clang] [clang] Add separate C++23 extension flag for attrs on lambda (PR #74553)

2023-12-06 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/74553 >From 9be87da42e48895cf23d90a3ed735b7a36b1ccb3 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 6 Dec 2023 04:51:45 +0100 Subject: [PATCH 1/4] [clang] Add separate C++23 extension flag for attrs on lambda

[clang] [clang] Crash when referencing capture in static lambda (PR #74661)

2023-12-06 Thread via cfe-commits
cor3ntin wrote: Can you add a release note? Otherwise it looks good to me https://github.com/llvm/llvm-project/pull/74661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Mark WG14 N2939 (Identifier Syntax Fixes) as available in Clang 15 (PR #74666)

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

[llvm] [clang-tools-extra] [clang] [XCOFF][obj2yaml] support parsing auxiliary symbols for XCOFF (PR #70642)

2023-12-06 Thread Kai Luo via cfe-commits
@@ -282,45 +282,57 @@ static void auxSymMapping(IO &IO, XCOFFYAML::SectAuxEntForStat &AuxSym) { void MappingTraits>::mapping( IO &IO, std::unique_ptr &AuxSym) { - assert(!IO.outputting() && "We don't dump aux symbols currently."); + + auto ResetAuxSym = [&](auto *AuxEnt

[llvm] [clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Chen Zheng via cfe-commits
@@ -3412,13 +3416,23 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, return DAG.getNode(PPCISD::ADD_TLS, dl, PtrVT, TLSReg, VariableOffset); } - // Only Local-Exec, Initial-Exec and General-Dynamic TLS models are currently - // supported models. If

[clang] [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (PR #73765)

2023-12-06 Thread Craig Topper via cfe-commits
@@ -1715,6 +1716,130 @@ static void findCSKYMultilibs(const Driver &D, const llvm::Triple &TargetTriple, Result.Multilibs = CSKYMultilibs; } +/// Extend the multi-lib re-use selection mechanism for RISC-V. +/// This function will try to re-use multi-lib if they are compat

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

2023-12-06 Thread Tobias Hieta via cfe-commits
tru wrote: @rnk @amykhuang might be interested in reviewing as well. 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] [llvm] [clang-tools-extra] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-12-06 Thread Fangrui Song via cfe-commits
@@ -738,6 +739,36 @@ objcopy::parseObjcopyOptions(ArrayRef RawArgsArr, if (auto Arg = InputArgs.getLastArg(OBJCOPY_extract_partition)) Config.ExtractPartition = Arg->getValue(); + if (const auto *A = InputArgs.getLastArg(OBJCOPY_gap_fill)) { +if (Config.OutputForma

[llvm] [clang] [clang-tools-extra] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-12-06 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,198 @@ +# RUN: yaml2obj --docnum=1 %s -o %t + +# RUN: not llvm-objcopy --gap-fill 1 %t 2>&1 | FileCheck %s --check-prefix=NOT-BINARY +# NOT-BINARY: error: '--gap-fill' is only supported for binary output + +# RUN: not llvm-objcopy -O binary --gap-fill= %t %t.bin 2>&1 |

[llvm] [clang] [clang-tools-extra] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

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

[clang] [llvm] [clang-tools-extra] [llvm-objcopy] Add --gap-fill and --pad-to options (PR #65815)

2023-12-06 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,198 @@ +# RUN: yaml2obj --docnum=1 %s -o %t + +# RUN: not llvm-objcopy --gap-fill 1 %t 2>&1 | FileCheck %s --check-prefix=NOT-BINARY +# NOT-BINARY: error: '--gap-fill' is only supported for binary output + +# RUN: not llvm-objcopy -O binary --gap-fill= %t %t.bin 2>&1 |

<    1   2   3   4   5   >