[clang] [analyzer] Keep alive short-circuiting condition subexpressions in a conditional (PR #100745)

2024-07-26 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. Nice fix, thanks for upstreaming this! https://github.com/llvm/llvm-project/pull/100745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [analyzer] Keep alive short-circuiting condition subexpressions in a conditional (PR #100745)

2024-07-26 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto edited https://github.com/llvm/llvm-project/pull/100745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/100747 https://cplusplus.github.io/CWG/issues/713.html https://cplusplus.github.io/CWG/issues/1584.html >From 1ba0cbc3f3fc1d7982c36172ffd0e72245593e6c Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Fri, 26 Jul 20

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes https://cplusplus.github.io/CWG/issues/713.html https://cplusplus.github.io/CWG/issues/1584.html --- Full diff: https://github.com/llvm/llvm-project/pull/100747.diff 3 Files Affected: - (modified) clang/

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @Endilll The problem with the CWG713 test in Clang 18 was with parsing the type trait (#81298), they weren't actually considered `const`: https://godbolt.org/z/snde76brE Also, I would think since the resolution is purely editorial (it just changes notes, nothing normative),

[clang] 7e04937 - [clang][Interp][NFC] Improve InterpFrame::dump

2024-07-26 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-07-26T16:09:02+02:00 New Revision: 7e049373f4d26780f558f798b403a8477dd6af08 URL: https://github.com/llvm/llvm-project/commit/7e049373f4d26780f558f798b403a8477dd6af08 DIFF: https://github.com/llvm/llvm-project/commit/7e049373f4d26780f558f798b403a8477dd6af08.diff LO

[clang] [Clang] Demote always_inline error to warning for mismatching SME attrs (PR #100740)

2024-07-26 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm updated https://github.com/llvm/llvm-project/pull/100740 >From 596654157c6e1124d5eac9fd415d957179897b90 Mon Sep 17 00:00:00 2001 From: Sander de Smalen Date: Fri, 26 Jul 2024 13:24:10 +0100 Subject: [PATCH 1/2] [Clang] Demote always_inline error to warning for

[clang] [CLANG][AArch64]Add Neon vectors for fpm8_t (PR #99865)

2024-07-26 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: Is it possible to use TargetExtType for the scalar type given this is a target specific type. I fully expect LLVM not to support vector's of TargetExtType but I wonder if that can be relaxed given our only use case is to pass them to intrinsics. For anything more exotic

[clang] [Clang] Remove `IDNS_Ordinary` flag in `IndirectFieldDecl::IdentifierNamespace` (PR #100525)

2024-07-26 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > I don’t believe the standard supports anonymous structs in C++ > > Do we need tests about anonymous union? C++ standard supports it. Yes, we should add tests for C++ as well; good call @cor3ntin and @Sirraide! https://github.com/llvm/llvm-project/pull/100525 ___

[clang] [Clang] Demote always_inline error to warning for mismatching SME attrs (PR #100740)

2024-07-26 Thread Sander de Smalen via cfe-commits
sdesmalen-arm wrote: > At a glance, this seems like a good use case for a warning + `DefaultError`? I'd rather not make that change, because in practice it will be unlikely that inlining will result in changes to runtime behaviour. We'd rather not burden the users with explicit errors for some

[clang] [Clang] Demote always_inline error to warning for mismatching SME attrs (PR #100740)

2024-07-26 Thread via cfe-commits
Sirraide wrote: > it's more a limitation of Clang that it has to emit this message in the first > place Fair enough, that makes sense https://github.com/llvm/llvm-project/pull/100740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [Clang] Qualified functions can't decay into pointers (PR #90353)

2024-07-26 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/90353 >From d983badd09dcc227f5945f4b4759214b7b6adbf5 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Fri, 26 Jul 2024 08:44:19 +0100 Subject: [PATCH 1/5] [Clang] Qualified functions can't decay into pointers ---

[clang] [clang] Handle tm mangling on Solaris in PPMacroExpansion.cpp (PR #100724)

2024-07-26 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Whatever the case, we need at least a short-term solution now: the Solaris > buildbots have been broken for two days now. Agreed that we need something in the short term, I'm just trying to find the cleanest "something" under the assumption that this hack will live for a

[clang] [C++20][Modules] Allow using stdarg.h with header units (PR #100739)

2024-07-26 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/100739 >From edc7f5c84caefeae197a5884c91ec2194fd3148b Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Fri, 26 Jul 2024 05:02:52 -0700 Subject: [PATCH 1/2] [C++20][Modules] Allow using stdarg.h with header units

[clang] [NFC] Reduce size of FunctionEffect to 1 byte. (PR #100753)

2024-07-26 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos created https://github.com/llvm/llvm-project/pull/100753 As a preliminary to PR https://github.com/llvm/llvm-project/pull/99656 , reduce the size of `FunctionEffect` to 1 byte. >From 3cc18ded835f3a25dc98bc81988d3a2f1181c300 Mon Sep 17 00:00:00 2001 From: Doug Wyatt

[clang] [NFC] Reduce size of FunctionEffect to 1 byte. (PR #100753)

2024-07-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Doug Wyatt (dougsonos) Changes As a preliminary to PR https://github.com/llvm/llvm-project/pull/99656 , reduce the size of `FunctionEffect` to 1 byte. --- Full diff: https://github.com/llvm/llvm-project/pull/100753.diff 1 Files Affected

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread Doug Wyatt via cfe-commits
@@ -4699,7 +4699,7 @@ class FunctionEffect { private: LLVM_PREFERRED_TYPE(Kind) - unsigned FKind : 3; + uint8_t FKind : 3; dougsonos wrote: Opened PR https://github.com/llvm/llvm-project/pull/100753 for this. https://github.com/llvm/llvm-project/pull/996

[clang] [C++20][Modules] Allow using stdarg.h with header units (PR #100739)

2024-07-26 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/100739 >From edc7f5c84caefeae197a5884c91ec2194fd3148b Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Fri, 26 Jul 2024 05:02:52 -0700 Subject: [PATCH 1/3] [C++20][Modules] Allow using stdarg.h with header units

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Also, I would think since the resolution is purely editorial (it just changes > notes, nothing normative), it would be considered implemented in any clang > version? The question "availability" answers is "What is the first Clang version that exhibits the correct behavior?",

[clang] [clang] Handle tm mangling on Solaris in PPMacroExpansion.cpp (PR #100724)

2024-07-26 Thread Rainer Orth via cfe-commits
rorth wrote: > > Whatever the case, we need at least a short-term solution now: the Solaris > > buildbots have been broken for two days now. > > Agreed that we need something in the short term, I'm just trying to find the > cleanest "something" under the assumption that this hack will live for

[clang] [NFC] Reduce size of FunctionEffect to 1 byte. (PR #100753)

2024-07-26 Thread via cfe-commits
@@ -4699,16 +4699,16 @@ class FunctionEffect { private: LLVM_PREFERRED_TYPE(Kind) - unsigned FKind : 3; + uint8_t FKind : 3; Sirraide wrote: I mean, if this is the only field, then can’t we just make the actual type of this `Kind` since that’s a `uint8_t

[clang] [C++20][Modules] Allow using stdarg.h with header units (PR #100739)

2024-07-26 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/100739 >From edc7f5c84caefeae197a5884c91ec2194fd3148b Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Fri, 26 Jul 2024 05:02:52 -0700 Subject: [PATCH 1/4] [C++20][Modules] Allow using stdarg.h with header units

[clang] [analyzer] Keep alive short-circuiting condition subexpressions in a conditional (PR #100745)

2024-07-26 Thread Balazs Benics via cfe-commits
steakhal wrote: We'll merge this on Monday. https://github.com/llvm/llvm-project/pull/100745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-26 Thread via cfe-commits
darkbuck wrote: > We should be removing the source level convergent attribute, not adding more > uses of it. It was a mistake to define it in the positive direction, and it > is completely unusable for end users. Every piece of code that transitively > calls the function in the entire program

[clang] [clang] Handle tm mangling on Solaris in PPMacroExpansion.cpp (PR #100724)

2024-07-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM; if we find a better approach post-commit, this is easy enough to remove. Thanks! https://github.com/llvm/llvm-project/pull/100724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Handle tm mangling on Solaris in PPMacroExpansion.cpp (PR #100724)

2024-07-26 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > Whatever the case, we need at least a short-term solution now: the > > > Solaris buildbots have been broken for two days now. > > > > > > Agreed that we need something in the short term, I'm just trying to find > > the cleanest "something" under the assumption that t

[clang] [NFC] Reduce size of FunctionEffect to 1 byte. (PR #100753)

2024-07-26 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos updated https://github.com/llvm/llvm-project/pull/100753 >From 3cc18ded835f3a25dc98bc81988d3a2f1181c300 Mon Sep 17 00:00:00 2001 From: Doug Wyatt Date: Sun, 5 May 2024 12:36:53 -0700 Subject: [PATCH 1/2] Reduce size of FunctionEffect to 1 byte. --- clang/include/c

[clang] [NFC] Reduce size of FunctionEffect to 1 byte. (PR #100753)

2024-07-26 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/100753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)

2024-07-26 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 f1b76c53b6312a10d2ee4219e980498e7cbe5d53 6f6eea486dd514fff4a4ce200481d6e1a71f6d5c --e

[clang] [clang] Handle tm mangling on Solaris in PPMacroExpansion.cpp (PR #100724)

2024-07-26 Thread Rainer Orth via cfe-commits
rorth wrote: Right, as is it's just a ugly hack with the underlying problem like to rear its ugly head again in the future. https://github.com/llvm/llvm-project/pull/100724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [CLANG][AArch64]Add Neon vectors for fpm8_t (PR #99865)

2024-07-26 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: Sorry for the noise but I think I've a more wellformed question this time. Is it be possible to use `AArch64SVEACLETypes.def` to reduce some of the boilerplate changes? I'm not sure how much of this is tied to SVE (or rather scalable types) but I'm wondering if clang can

[clang] 599de13 - [clang] Handle tm mangling on Solaris in PPMacroExpansion.cpp (#100724)

2024-07-26 Thread via cfe-commits
Author: Rainer Orth Date: 2024-07-26T16:51:08+02:00 New Revision: 599de135551cdb95a479b7f1f032aff506effeac URL: https://github.com/llvm/llvm-project/commit/599de135551cdb95a479b7f1f032aff506effeac DIFF: https://github.com/llvm/llvm-project/commit/599de135551cdb95a479b7f1f032aff506effeac.diff L

[clang] [clang] Handle tm mangling on Solaris in PPMacroExpansion.cpp (PR #100724)

2024-07-26 Thread Rainer Orth via cfe-commits
https://github.com/rorth closed https://github.com/llvm/llvm-project/pull/100724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e603df0 - [NvlinkWrapper] Add relocatable link support to LTO pass

2024-07-26 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2024-07-26T09:51:25-05:00 New Revision: e603df083be3d41680c6289bce549b022dcfe7d5 URL: https://github.com/llvm/llvm-project/commit/e603df083be3d41680c6289bce549b022dcfe7d5 DIFF: https://github.com/llvm/llvm-project/commit/e603df083be3d41680c6289bce549b022dcfe7d5.diff

[clang] [NFC] Reduce size of FunctionEffect to 1 byte. (PR #100753)

2024-07-26 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/100753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][NEON] Add intrinsics for LUTI (PR #96883)

2024-07-26 Thread via cfe-commits
https://github.com/CarolineConcatto approved this pull request. https://github.com/llvm/llvm-project/pull/96883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Build release binaries for multiple targets (PR #98431)

2024-07-26 Thread Tom Stellard via cfe-commits
tstellar wrote: Only 2 (linux x86 and macOS AArch64) of the 4 configurations are passing currently, but I still think it makes sense to merge this so we can start building binaries for 19.1.0-rc1. I can work on fixing the other configurations in a follow up patch. https://github.com/llvm/ll

[clang] [flang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-07-26 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/88978 >From 3acc848f4fcc68445dfc849f9c6f8d384d3692af Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Tue, 16 Apr 2024 13:09:58 -0700 Subject: [PATCH 01/11] Adding C23 constexpr math functions fmin and frexp.

[clang] [llvm] Build release binaries for multiple targets (PR #98431)

2024-07-26 Thread Tobias Hieta via cfe-commits
https://github.com/tru approved this pull request. https://github.com/llvm/llvm-project/pull/98431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] support the zig c++ compiler wrapper (PR #100759)

2024-07-26 Thread Duncan Ogilvie via cfe-commits
https://github.com/mrexodia created https://github.com/llvm/llvm-project/pull/100759 When using `zig c++` for cross-compiling `clangd` removes the zig command from the command line. Because of this the system include extraction fails. This change detects that the driver executable is named `zi

[clang-tools-extra] [clangd] support the zig c++ compiler wrapper (PR #100759)

2024-07-26 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [Clang] Do not pass `-shared` when using `-r` for AMDGPU (PR #100760)

2024-07-26 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/100760 Summary: We can use `-r` and `--lto-emit-llvm` to get the LTO pass to optimize + link LLVM-IR. Currently this doesn't work on AMDGPU because it always passes `-shared` which is incompatible with `-r`. Fix that so

[clang-tools-extra] [clangd] support the zig c++ compiler wrapper (PR #100759)

2024-07-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Duncan Ogilvie (mrexodia) Changes When using `zig c++` for cross-compiling `clangd` removes the zig command from the command line. Because of this the system include extraction fails. This change detects that the driver execut

[clang] [Clang] Do not pass `-shared` when using `-r` for AMDGPU (PR #100760)

2024-07-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu @llvm/pr-subscribers-clang-driver Author: Joseph Huber (jhuber6) Changes Summary: We can use `-r` and `--lto-emit-llvm` to get the LTO pass to optimize + link LLVM-IR. Currently this doesn't work on AMDGPU because it always passes `-shared

[clang] [Clang] Do not pass `-shared` when using `-r` for AMDGPU (PR #100760)

2024-07-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: We can use `-r` and `--lto-emit-llvm` to get the LTO pass to optimize + link LLVM-IR. Currently this doesn't work on AMDGPU because it always passes `-shared` which is incompatible with `-r`. Fix that

[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-26 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/100761 Fix the location of `diag::note_constexpr_uninitialized_base`, make it same as current interpreter. >From eb237d1b6434c16366f8095f47af1456cb776a27 Mon Sep 17 00:00:00 2001 From: yronglin Date: Fri, 26 Jul 202

[clang-tools-extra] [clangd] support the zig c++ compiler wrapper (PR #100759)

2024-07-26 Thread Duncan Ogilvie via cfe-commits
https://github.com/mrexodia edited https://github.com/llvm/llvm-project/pull/100759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement NEON vamin/vamax intrinsics (PR #99041)

2024-07-26 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/99041 >From 8e0aba5bcfd0a5f861c9ebb30a28c05eb0d6dcf5 Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Mon, 15 Jul 2024 17:50:43 +0100 Subject: [PATCH 1/2] [AArch64] Implement NEON vamin/vamax intrinsics Th

[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes Fix the location of `diag::note_constexpr_uninitialized_base`, make it same as current interpreter. --- Full diff: https://github.com/llvm/llvm-project/pull/100761.diff 3 Files Affected: - (modified) clang/lib/A

[clang] [llvm] [AArch64] Implement NEON vamin/vamax intrinsics (PR #99041)

2024-07-26 Thread Momchil Velikov via cfe-commits
@@ -5985,6 +5985,26 @@ multiclass SIMDThreeSameVectorFP opc, [(set (v2f64 V128:$Rd), (OpNode (v2f64 V128:$Rn), (v2f64 V128:$Rm)))]>; } +let mayRaiseFPException = 1, Uses = [FPCR] in +multiclass SIMDThreeVectorFP opc, momchil-velikov wrote: Removed.

[clang-tools-extra] [clangd] support the zig c++ compiler wrapper (PR #100759)

2024-07-26 Thread Duncan Ogilvie via cfe-commits
https://github.com/mrexodia edited https://github.com/llvm/llvm-project/pull/100759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. https://github.com/llvm/llvm-project/pull/100747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Vlad Serebrennikov via cfe-commits
@@ -71,6 +76,17 @@ namespace cwg712 { // cwg712: partial #endif } +namespace cwg713 { // cwg713: yes Endilll wrote: Please check how just released Clang 19.1-rc1 handles this test, and choose between 19 and 20 accordingly. https://github.com/llvm/llvm-proje

[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-26 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/100761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-26 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/100761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-26 Thread Younan Zhang via cfe-commits
@@ -4006,6 +4007,37 @@ class TreeTransform { NumExpansions); } + void RebuildLambdaExprImpl(SourceLocation StartLoc, SourceLocation EndLoc, + LambdaScopeInfo *LSI) {} + + ExprResult RebuildLambdaExpr(SourceL

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-26 Thread Younan Zhang via cfe-commits
@@ -8270,6 +8303,15 @@ TreeTransform::TransformDeclStmt(DeclStmt *S) { if (Transformed != D) DeclChanged = true; +if (LSI && isa(Transformed)) + LSI->ContainsUnexpandedParameterPack |= + getSema() + .getASTContext() + .getT

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-26 Thread Younan Zhang via cfe-commits
@@ -1394,7 +1395,22 @@ namespace { SourceRange PatternRange, ArrayRef Unexpanded, bool &ShouldExpand, bool &RetainExpansion, - std::optional &NumEx

[clang] [Clang] Do not pass `-shared` when using `-r` for AMDGPU (PR #100760)

2024-07-26 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/100760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-26 Thread Younan Zhang via cfe-commits
@@ -14636,6 +14645,20 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { /*IsInstantiation*/ true); SavedContext.pop(); + // Parts other than the capture e.g. the lambda body might still contain a + // pattern that an outer fold exp

[clang] [AIX] Detect `#pragma mc_func` (PR #99888)

2024-07-26 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > Is that not the case? It does not seem so. See [here](https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename:'1',fontScale:14,fontUsePx:'0',j:1,lang:___c,selection:(endColumn:40,endLineNumber:8,positionColumn:40,positionLineNumber:8,selectionStartColumn:40,selectionSta

[clang] 50835f0 - [Clang] Do not pass `-shared` when using `-r` for AMDGPU (#100760)

2024-07-26 Thread via cfe-commits
Author: Joseph Huber Date: 2024-07-26T10:25:28-05:00 New Revision: 50835f0a364e850e097c40f81364909c72bb2156 URL: https://github.com/llvm/llvm-project/commit/50835f0a364e850e097c40f81364909c72bb2156 DIFF: https://github.com/llvm/llvm-project/commit/50835f0a364e850e097c40f81364909c72bb2156.diff

[clang] [Clang] Do not pass `-shared` when using `-r` for AMDGPU (PR #100760)

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

[clang] [NFC] Reduce size of FunctionEffect to 1 byte. (PR #100753)

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

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86265 >From 6e7b38b3e3f781e11db2fa5d552fdfb6123609df Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 22 Mar 2024 17:34:08 +0800 Subject: [PATCH 01/18] [Sema] Preserve ContainsUnexpandedParameterPack in Transfor

[clang] [llvm] [Clang][LLVM][AArch64] Add intrinsic for MOVT SME2 instruction (PR #97602)

2024-07-26 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/97602 >From 70d1ec0e1c1bd896cf753510a8452325b086430e Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Wed, 3 Jul 2024 15:55:45 + Subject: [PATCH 1/3] [Clang][LLVM][AArch64] Add intrinsic for MOVT SME

[clang] [Clang] Demote always_inline error to warning for mismatching SME attrs (PR #100740)

2024-07-26 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm updated https://github.com/llvm/llvm-project/pull/100740 >From 596654157c6e1124d5eac9fd415d957179897b90 Mon Sep 17 00:00:00 2001 From: Sander de Smalen Date: Fri, 26 Jul 2024 13:24:10 +0100 Subject: [PATCH 1/2] [Clang] Demote always_inline error to warning for

[clang] [clang] Add test for CWG2091 "Deducing reference non-type template arguments" (PR #100765)

2024-07-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Ideally we should wait for #97200 to land first, then update this PR with the output of `make_cxx_dr_status`. https://github.com/llvm/llvm-project/pull/100765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Mital Ashok via cfe-commits
MitalAshok wrote: New test compiles down to clang 3.0 (except warnings for https://cplusplus.github.io/CWG/issues/547.html) but do not compile before that because of the lack of `__is_const`/`__is_volatile` type traits. Function types with cv- qualifiers were added for Clang 2.5 in 22c40fa285

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/100747 >From 1ba0cbc3f3fc1d7982c36172ffd0e72245593e6c Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Fri, 26 Jul 2024 13:34:00 +0100 Subject: [PATCH 1/3] [clang][Tests][NFC] Add CWG713 test; add example from CWG1

[clang] [clang][CGDebugInfo] Don't generate an implicit 'this' parameter if one was specified explicitly (PR #100767)

2024-07-26 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/100767 >From 427fe3468534d31778ae361cc057dad817ecffea Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 26 Jul 2024 16:40:04 +0100 Subject: [PATCH 1/2] [clang][CGDebugInfo] Don't generate an implicit 'this' pa

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread Doug Wyatt via cfe-commits
@@ -15609,6 +15661,10 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, getCurLexicalContext()->getDeclKind() != Decl::ObjCImplementation) Diag(FD->getLocation(), diag::warn_function_def_in_objc_container); + if (Context.hasAnyFunctionEffects()) +

[clang] [clang][CGDebugInfo] Don't generate an implicit 'this' parameter if one was specified explicitly (PR #100767)

2024-07-26 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 56c4ec92024ae9a425d29599d27885e4d45a309f 427fe3468534d31778ae361cc057dad817ecffea --e

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/100747 >From 1ba0cbc3f3fc1d7982c36172ffd0e72245593e6c Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Fri, 26 Jul 2024 13:34:00 +0100 Subject: [PATCH 1/3] [clang][Tests][NFC] Add CWG713 test; add example from CWG1

[clang] 4084e31 - [Driver] Use hasArg to fix -Wunused-but-set-variable after #97342

2024-07-26 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-07-26T08:52:04-07:00 New Revision: 4084e31d3369521615c706a3995566aa7165be97 URL: https://github.com/llvm/llvm-project/commit/4084e31d3369521615c706a3995566aa7165be97 DIFF: https://github.com/llvm/llvm-project/commit/4084e31d3369521615c706a3995566aa7165be97.diff

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread Doug Wyatt via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread via cfe-commits
@@ -15609,6 +15661,10 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, getCurLexicalContext()->getDeclKind() != Decl::ObjCImplementation) Diag(FD->getLocation(), diag::warn_function_def_in_objc_container); + if (Context.hasAnyFunctionEffects()) +

[clang] [Clang] Fix Handling of Init Capture with Parameter Packs in LambdaScopeForCallOperatorInstantiationRAII (PR #100766)

2024-07-26 Thread Yupei Liu via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/100766 >From bae8f7c203573bf75e6838551e5203b3ef8d01b8 Mon Sep 17 00:00:00 2001 From: letrec Date: Fri, 26 Jul 2024 22:25:10 +0800 Subject: [PATCH 1/2] add init capture packs to requires scope --- clang/include/clan

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > New test compiles down to clang 3.0 (except warnings for > https://cplusplus.github.io/CWG/issues/547.html) but do not compile before > that because of the lack of `__is_const`/`__is_volatile` type traits. > > Function types with cv- qualifiers were added for Clang 2.5 in > [

[clang] [llvm] [AArch64] Implement NEON vscale intrinsics (PR #100347)

2024-07-26 Thread via cfe-commits
@@ -5985,6 +5985,27 @@ multiclass SIMDThreeSameVectorFP opc, [(set (v2f64 V128:$Rd), (OpNode (v2f64 V128:$Rn), (v2f64 V128:$Rm)))]>; } +// As above, but only floating point elements supported. CarolineConcatto wrote: nit: I believe we can remove this

[clang] [Clang] Fix Handling of Init Capture with Parameter Packs in LambdaScopeForCallOperatorInstantiationRAII (PR #100766)

2024-07-26 Thread Yupei Liu via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/100766 >From bae8f7c203573bf75e6838551e5203b3ef8d01b8 Mon Sep 17 00:00:00 2001 From: letrec Date: Fri, 26 Jul 2024 22:25:10 +0800 Subject: [PATCH 1/3] add init capture packs to requires scope --- clang/include/clan

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-26 Thread via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] [Clang] Fix Handling of Init Capture with Parameter Packs in LambdaScopeForCallOperatorInstantiationRAII (PR #100766)

2024-07-26 Thread Yupei Liu via cfe-commits
https://github.com/LYP951018 edited https://github.com/llvm/llvm-project/pull/100766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] {CXXDefaultArgExpr, CXXDefaultInitExpr}::hasRewrittenInit return true iff the init expression was really rebuild (PR #99748)

2024-07-26 Thread via cfe-commits
yronglin wrote: Thanks for the review! Hmm, this patch was splitted from https://github.com/llvm/llvm-project/pull/91879. In that patch, we should guarantee the sub-expression was actually rebuilt when CXXDefaultInitExpr::hasRewrittenInit() returns true. But https://github.com/llvm/llvm-proje

[clang] [Clang] Fix Handling of Init Capture with Parameter Packs in LambdaScopeForCallOperatorInstantiationRAII (PR #100766)

2024-07-26 Thread Yupei Liu via cfe-commits
https://github.com/LYP951018 edited https://github.com/llvm/llvm-project/pull/100766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Mital Ashok via cfe-commits
MitalAshok wrote: > Based on https://godbolt.org/z/n6oPdMT91, I think `3.1` is the correct > availability here, but I can be persuaded for `3.0`. The warnings are because of how the test is written, the tested behaviour ("function types are never const or volatile") is still true in Clang 3.0

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/100747 >From 1ba0cbc3f3fc1d7982c36172ffd0e72245593e6c Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Fri, 26 Jul 2024 13:34:00 +0100 Subject: [PATCH 1/4] [clang][Tests][NFC] Add CWG713 test; add example from CWG1

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-07-26 Thread Kevin Wolf via cfe-commits
kevmw wrote: I'm the person who asked @tbaederr last year if this could be added for the benefit of QEMU, and as I'm looking at it again now, I thought maybe I should leave a comment here. In QEMU, we currently handle the problem with a coding convention (public functions get TSA attributes _

[clang] [Clang][AST] {CXXDefaultArgExpr, CXXDefaultInitExpr}::hasRewrittenInit return true iff the init expression was really rebuild (PR #99748)

2024-07-26 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/99748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] {CXXDefaultArgExpr, CXXDefaultInitExpr}::hasRewrittenInit return true iff the init expression was really rebuild (PR #99748)

2024-07-26 Thread via cfe-commits
https://github.com/Sirraide commented: Taking another look at this, there’s one thing I’m confused about, but other than that it seems fine. (Side note in case anyone else gets confused by this: `ASTStmtReader`/`Writer` already (de)serialises this, so no changes are needed there.) https://git

[clang] [Clang][AST] {CXXDefaultArgExpr, CXXDefaultInitExpr}::hasRewrittenInit return true iff the init expression was really rebuild (PR #99748)

2024-07-26 Thread via cfe-commits
@@ -1013,15 +1013,15 @@ CXXDefaultArgExpr *CXXDefaultArgExpr::CreateEmpty(const ASTContext &C, return new (Mem) CXXDefaultArgExpr(EmptyShell(), HasRewrittenInit); } -CXXDefaultArgExpr *CXXDefaultArgExpr::Create(const ASTContext &C, -

[clang] [Clang][AST] {CXXDefaultArgExpr, CXXDefaultInitExpr}::hasRewrittenInit return true iff the init expression was really rebuild (PR #99748)

2024-07-26 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/99748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] Reapply "[Clang] Implement resolution for CWG1835 (#92957, #98547)" (PR #100425)

2024-07-26 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @AaronBallman @cor3ntin @mizvekov So, I've made improvements to our implementation of `isTemplateArgumentList` that allow us to issue a warning instead of an error for most of the cases where applying the DR breaks existing code: ```cpp template struct A { int x; }; template

[clang] 0413328 - [clang][Sema][NFC] remove unreachable return statement (#100642)

2024-07-26 Thread via cfe-commits
Author: Mike Rice Date: 2024-07-26T09:35:11-07:00 New Revision: 04133283a9f5a15fba810ed34ff445d61203fcce URL: https://github.com/llvm/llvm-project/commit/04133283a9f5a15fba810ed34ff445d61203fcce DIFF: https://github.com/llvm/llvm-project/commit/04133283a9f5a15fba810ed34ff445d61203fcce.diff LOG

[clang] [clang][Sema][NFC] remove unreachable return statement (PR #100642)

2024-07-26 Thread Mike Rice via cfe-commits
https://github.com/mikerice1969 closed https://github.com/llvm/llvm-project/pull/100642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-26 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > This should be controllable via -fms-extensions/-fno-ms-extensions; having > its own dialect flag is a bit novel but I'm not strongly opposed. CC @MaskRay > @jansvoboda11 for driver/options opinions For this feedback I intentionally didn't do this because this ms extension i

[clang] [Clang] Demote always_inline error to warning for mismatching SME attrs (PR #100740)

2024-07-26 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/100740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Extend support for specifying languages and version in add_new_check.py (PR #100129)

2024-07-26 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/100129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-07-26 Thread Mike Rice via cfe-commits
@@ -290,3 +294,296 @@ void SemaHLSL::DiagnoseAttrStageMismatch( << A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage) << (AllowedStages.size() != 1) << join(StageStrings, ", "); } + +namespace { + +/// This class implements HLSL availability diagnostics for default

[clang] [libcxx] Reapply "[Clang] Implement resolution for CWG1835 (#92957, #98547)" (PR #100425)

2024-07-26 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > @AaronBallman @cor3ntin @mizvekov So, I've made improvements to our > implementation of `isTemplateArgumentList` (not on this branch) that allow us > to issue a warning instead of an error for most of the cases where applying > the DR breaks existing code: > That's great, t

<    1   2   3   4   >