[clang] [RISCV] Disallow target attribute use in multiversioning (PR #85899)

2024-04-07 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85899 >From 0bbffb92e7f36957c042cab9a67a483571d9b3f9 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Mon, 18 Mar 2024 05:07:14 -0700 Subject: [PATCH 1/3] [RISCV] Disallow target attribute use in multiversioning ---

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-07 Thread Congcong Cai via cfe-commits
Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= Message-ID: In-Reply-To: https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/87832

[clang] [clang-tools-extra] [clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference (PR #87954)

2024-04-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/87954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang analysis] ExprMutationAnalyzer support recursive forwarding reference (PR #87954)

2024-04-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/87954 >From 19f66851204547232d586288fba79d8770837350 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 8 Apr 2024 09:20:58 +0800 Subject: [PATCH 1/2] [clang analysis] ExprMutationAnalyzer support recursive

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-04-07 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786 >From 239b404203c66ab5336ffdfb45969a50c439a1c0 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Tue, 19 Mar 2024 06:22:17 -0700 Subject: [PATCH 1/6] [RISCV][FMV] Support target_clones ---

[clang] [libclc] [libcxx] [lld] [llvm] [openmp] llvm encode decode (PR #87187)

2024-04-07 Thread Yingchi Long via cfe-commits
https://github.com/inclyc converted_to_draft https://github.com/llvm/llvm-project/pull/87187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-04-07 Thread Qizhi Hu via cfe-commits
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) { cast(D)->isFunctionTemplateSpecialization()) return; + if (isa(D) && D->getDeclName().isEmpty()) { jcsxky wrote: Ah, I see. I skip those checking

[clang] [clang analysis] ExprMutationAnalyzer support recursive forwarding reference (PR #87954)

2024-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Congcong Cai (HerrCai0907) Changes Partialy fixes: #60895 --- Full diff: https://github.com/llvm/llvm-project/pull/87954.diff 3 Files Affected: - (modified) clang/include/clang/Analysis/Analyses/ExprMutationAnalyzer.h (+33-7) -

[clang] [clang analysis] ExprMutationAnalyzer support recursive forwarding reference (PR #87954)

2024-04-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/87954 Partialy fixes: #60895 >From 19f66851204547232d586288fba79d8770837350 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 8 Apr 2024 09:20:58 +0800 Subject: [PATCH] [clang analysis] ExprMutationAnalyzer

[clang] [clang-tools-extra] [clang][modules] Do not resolve `HeaderFileInfo` externally in `ASTWriter` (PR #87848)

2024-04-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/87848 >From ee56548604be9473f33cd809c901886f37a3d8e9 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 5 Apr 2024 15:12:39 -0700 Subject: [PATCH 1/2] [clang][modules] Do not resolve `HeaderFileInfo`

[clang] [polly] [clang-format] Correctly annotate braces in macros (PR #87953)

2024-04-07 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/87953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [polly] [clang-format] Correctly annotate braces in macros (PR #87953)

2024-04-07 Thread Owen Pan via cfe-commits
owenca wrote: The polly formatting failure should be ignored as CI is using clang-format 18.1.1 instead of the version built from this patch. https://github.com/llvm/llvm-project/pull/87953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [polly] [clang-format] Correctly annotate braces in macros (PR #87953)

2024-04-07 Thread Owen Pan via cfe-commits
@@ -538,16 +538,6 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) { if (Style.Language == FormatStyle::LK_Proto) { ProbablyBracedList = NextTok->isOneOf(tok::comma, tok::r_square); } else { - // Skip NextTok over

[clang] [polly] [clang-format] Correctly annotate braces in macros (PR #87953)

2024-04-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 943db678dadd6088629d08ec3e582bea0595f2d2 6d0c7e5602a227b1b7310be46553aa689e6a93e7 --

[clang] [polly] [clang-format] Correctly annotate braces in macros (PR #87953)

2024-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Also fix unit tests and reformat polly. Fixes #86550. --- Full diff: https://github.com/llvm/llvm-project/pull/87953.diff 4 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp

[clang] [polly] [clang-format] Correctly annotate braces in macros (PR #87953)

2024-04-07 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/87953 Also fix unit tests and reformat polly. Fixes #86550. >From 6d0c7e5602a227b1b7310be46553aa689e6a93e7 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 7 Apr 2024 17:27:21 -0700 Subject: [PATCH] [clang-format]

[clang] [clang][FMV] Pass the '+fmv' target-feature when FMV is enabled. (PR #87942)

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

[clang] [clang-format] Added unittest of TableGen formatting w.r.t. block type calculation. (PR #87924)

2024-04-07 Thread Owen Pan via cfe-commits
@@ -290,6 +290,16 @@ TEST_F(FormatTestTableGen, MultiClass) { "}\n"); } +TEST_F(FormatTestTableGen, MultiClassesWithPasteOperator) { + // This is a sensitive example for the handling of the paste operators in + // brace type calculation. +

[clang] [clang-format][NFC] Add getNextNonComment() to FormatTokenSource (PR #87868)

2024-04-07 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/87868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 943db67 - [clang-format][NFC] Add getNextNonComment() to FormatTokenSource (#87868)

2024-04-07 Thread via cfe-commits
Author: Owen Pan Date: 2024-04-07T13:58:49-07:00 New Revision: 943db678dadd6088629d08ec3e582bea0595f2d2 URL: https://github.com/llvm/llvm-project/commit/943db678dadd6088629d08ec3e582bea0595f2d2 DIFF: https://github.com/llvm/llvm-project/commit/943db678dadd6088629d08ec3e582bea0595f2d2.diff

[clang] [clang][FMV] Pass the '+fmv' target-feature when FMV is enabled. (PR #87942)

2024-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Alexandros Lamprineas (labrinea) Changes This will allow the backend to enable the corresponding subtarget feature (FeatureFMV), which in turn can be queried for llvm codegen decisions. See #87939 for example. --- Full diff:

[clang] [clang][FMV] Pass the '+fmv' target-feature when FMV is enabled. (PR #87942)

2024-04-07 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/87942 This will allow the backend to enable the corresponding subtarget feature (FeatureFMV), which in turn can be queried for llvm codegen decisions. See #87939 for example. >From

[clang] [ARM64EC] Add support for parsing __vectorcall (PR #87725)

2024-04-07 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 approved this pull request. https://github.com/llvm/llvm-project/pull/87725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM64EC] Add support for parsing __vectorcall (PR #87725)

2024-04-07 Thread Max Winkler via cfe-commits
MaxEW707 wrote: LGTM. >From memory, its been a while since I've had to ship on ARM64EC, all instances >of `__vectorcall` are supposed to be rejected by msvc. That also aligns with >the `__vectorcall` docs on MSDN. I am not sure what clang's policy is with potentially allowing code that

[clang] [llvm] [InstCombine] Infer nsw/nuw for trunc (PR #87910)

2024-04-07 Thread via cfe-commits
goldsteinn wrote: LGTM. https://github.com/llvm/llvm-project/pull/87910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add ``ignoringParenImpCasts`` in ``hasAnyArgument`` fix#75754 (PR #87268)

2024-04-07 Thread via cfe-commits
https://github.com/komalverma04 updated https://github.com/llvm/llvm-project/pull/87268 >From 9b5781108081565e4009c3809eab623387655f1c Mon Sep 17 00:00:00 2001 From: komalverma04 Date: Mon, 1 Apr 2024 22:43:10 +0530 Subject: [PATCH 1/4] [clang-tidy] Add ignoringParenImpCasts in hasAnyArgument

[clang] [llvm] [InstCombine] Infer nsw/nuw for trunc (PR #87910)

2024-04-07 Thread via cfe-commits
goldsteinn wrote: Not an issue now but I think we should look into updating `computeKnownBitsFromContext` to look use `trunc nsw/nuw` uses of `X`. If the use is dominating / noundef, we can infer bits about `X`. Not really an issue if we only use `KnownBits` to infer `nuw`/`nsw`, but once we

[clang] [clang-format] Added unittest of TableGen formatting w.r.t. block type calculation. (PR #87924)

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

[clang] [clang-format][NFC] Add getNextNonComment() to FormatTokenSource (PR #87868)

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

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-04-07 Thread Richard Smith via cfe-commits
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) { cast(D)->isFunctionTemplateSpecialization()) return; + if (isa(D) && D->getDeclName().isEmpty()) { zygoloid wrote: The reserved identifier check

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-07 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/87832 From 2c4dd9281b1bf6bb02ff7efb6421f22bd35e27b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Fri, 5 Apr 2024 23:41:50 +0200 Subject: [PATCH 1/5] [clang-tidy] Ignore non-forwarded

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-07 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/87832 From 2c4dd9281b1bf6bb02ff7efb6421f22bd35e27b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Fri, 5 Apr 2024 23:41:50 +0200 Subject: [PATCH 1/5] [clang-tidy] Ignore non-forwarded

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

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

[clang] [Clang] Support lifetime extension of temporary created by aggregate initialization using a default member initializer (PR #87933)

2024-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes This PR complete [DR1815](https://wg21.link/CWG1815) under the guidance of `FIXME` comments. And reuse `CXXDefaultInitExpr` rewrite machinery to clone the initializer expression on each use that would lifetime

[clang] [Clang] Support lifetime extension of temporary created by aggregate initialization using a default member initializer (PR #87933)

2024-04-07 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/87933 This PR complete [DR1815](https://wg21.link/CWG1815) under the guidance of `FIXME` comments. And reuse `CXXDefaultInitExpr` rewrite machinery to clone the initializer expression on each use that would lifetime

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-07 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny edited https://github.com/llvm/llvm-project/pull/87832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Infer nsw/nuw for trunc (PR #87910)

2024-04-07 Thread via cfe-commits
@@ -897,7 +897,20 @@ Instruction *InstCombinerImpl::visitTrunc(TruncInst ) { } } - return nullptr; + bool Changed = false; + if (!Trunc.hasNoSignedWrap() && + ComputeMaxSignificantBits(Src, /*Depth=*/0, ) <= DestWidth) { +Trunc.setHasNoSignedWrap(true); +

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

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

[clang] [Clang] Refactor implementation of "Lifetime extension in range-based for loops" (PR #87930)

2024-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes This PR remove `InMaterializeTemporaryObjectContext` , because it's redundant, materialize non-cv void prvalue temporaries in discarded expressions can only appear under lifetime-extension context. --- Full diff:

[clang] [Clang] Refactor implementation of "Lifetime extension in range-based for loops" (PR #87930)

2024-04-07 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/87930 This PR remove `InMaterializeTemporaryObjectContext` , because it's redundant, materialize non-cv void prvalue temporaries in discarded expressions can only appear under lifetime-extension context. >From

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

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

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

2024-04-07 Thread via cfe-commits
yronglin wrote: This PR does so many things that I will split it into multiple smaller PRs to make it easier to review. https://github.com/llvm/llvm-project/pull/86960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Sema] Avoid guessing unexpanded packs' size in getFullyPackExpandedSize (PR #87768)

2024-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes There has been an optimization for `SizeOfPackExprs` since c5452ed9, in which we overlooked a case where the template arguments were not yet formed into a `PackExpansionType` at the token annotation stage.

[clang] [clang][Sema] Avoid guessing unexpanded packs' size in getFullyPackExpandedSize (PR #87768)

2024-04-07 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/87768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-04-07 Thread Richard Smith via cfe-commits
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) { cast(D)->isFunctionTemplateSpecialization()) return; + if (isa(D) && D->getDeclName().isEmpty()) { zygoloid wrote: For what name? The `using enum`

[clang] [clang][Sema] Avoid guessing unexpanded packs' size in getFullyPackExpandedSize (PR #87768)

2024-04-07 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/87768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Avoid guessing unexpanded packs' size in getFullyPackExpandedSize (PR #87768)

2024-04-07 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/87768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Avoid guessing unexpanded packs' size in getFullyPackExpandedSize (PR #87768)

2024-04-07 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/87768 >From bcebf176cd078c59bca9a2301931f0ec072b66c7 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 5 Apr 2024 19:12:28 +0800 Subject: [PATCH] [Clang][Sema] Avoid guessing unexpanded packs' size in

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

2024-04-07 Thread via cfe-commits
@@ -1230,11 +1230,26 @@ CodeGenFunction::EmitCXXForRangeStmt(const CXXForRangeStmt , JumpDest LoopExit = getJumpDestInCurrentScope("for.end"); LexicalScope ForScope(*this, S.getSourceRange()); + const DeclStmt *RangeDS = cast(S.getRangeStmt()); + const VarDecl

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

2024-04-07 Thread via cfe-commits
@@ -311,9 +311,9 @@ pushTemporaryCleanup(CodeGenFunction , const MaterializeTemporaryExpr *M, CleanupKind CleanupKind; if (Lifetime == Qualifiers::OCL_Strong) { const ValueDecl *VD = M->getExtendingDecl(); - bool Precise = - VD

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

2024-04-07 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/86960 >From e5f2bfb1652118be0112b8242263942063b75b89 Mon Sep 17 00:00:00 2001 From: yronglin Date: Tue, 2 Apr 2024 23:47:33 +0800 Subject: [PATCH 1/2] [Clang] Extend lifetime of temporaries in mem-default-init for

[clang] [clang] Introduce `SemaHLSL` (PR #87912)

2024-04-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/87912 >From 4a60eb0da7d74ca002040aede6ffc9220314ca33 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 7 Apr 2024 12:35:07 +0300 Subject: [PATCH 1/2] [clang] Introduce `SemaHLSL` ---

[clang] [clang] Introduce `SemaHLSL` (PR #87912)

2024-04-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/87912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaHLSL` (PR #87912)

2024-04-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/87912 >From 4a60eb0da7d74ca002040aede6ffc9220314ca33 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 7 Apr 2024 12:35:07 +0300 Subject: [PATCH] [clang] Introduce `SemaHLSL` ---

[clang] [clang-format] Added unittest of TableGen formatting w.r.t. block type calculation. (PR #87924)

2024-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Hirofumi Nakamura (hnakamura5) Changes The test I mentioned here https://github.com/llvm/llvm-project/pull/87450 . This is a regression test to detect the case block type is not calculated due to the paste `#` operator

[clang] [clang-format] Added unittest of TableGen formatting w.r.t. block type calculation. (PR #87924)

2024-04-07 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 created https://github.com/llvm/llvm-project/pull/87924 The test I mentioned here https://github.com/llvm/llvm-project/pull/87450 . This is a regression test to detect the case block type is not calculated due to the paste `#` operator misunderstood as

[clang] [clang][NFC] Remove "Sema" prefix from Sema-related functions (PR #87914)

2024-04-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/87914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-04-07 Thread Qizhi Hu via cfe-commits
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) { cast(D)->isFunctionTemplateSpecialization()) return; + if (isa(D) && D->getDeclName().isEmpty()) { jcsxky wrote: These checks include name conflict

[clang-tools-extra] [clangd] Add support for textDocument/rangesFormatting (LSP 3.18) (PR #80180)

2024-04-07 Thread Tom Praschan via cfe-commits
tom-anders wrote: Rebased to fixed merge conflict, extend lit test with test for new `rangesFormatting` request @sam-mccall @HighCommander4 ping https://github.com/llvm/llvm-project/pull/80180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-07 Thread Danny Mösch via cfe-commits
@@ -125,12 +127,13 @@ void MissingStdForwardCheck::registerMatchers(MatchFinder *Finder) { hasAncestor(expr(hasUnevaluatedContext()); Finder->addMatcher( - parmVarDecl(parmVarDecl().bind("param"), isTemplateTypeParameter(), -

[clang-tools-extra] [clangd] Add support for textDocument/rangesFormatting (LSP 3.18) (PR #80180)

2024-04-07 Thread Tom Praschan via cfe-commits
https://github.com/tom-anders updated https://github.com/llvm/llvm-project/pull/80180 >From 19ae86fb821c908fbd29515f36282c3aa0745048 Mon Sep 17 00:00:00 2001 From: tom-anders <13141438+tom-and...@users.noreply.github.com> Date: Thu, 18 May 2023 12:05:01 +0200 Subject: [PATCH] [clangd] Add

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-07 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/87832 From 2c4dd9281b1bf6bb02ff7efb6421f22bd35e27b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Fri, 5 Apr 2024 23:41:50 +0200 Subject: [PATCH 1/4] [clang-tidy] Ignore non-forwarded

[clang-tools-extra] [clang-tidy] Add fix-its to `readability-avoid-return-with-void-value` check (PR #81420)

2024-04-07 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny edited https://github.com/llvm/llvm-project/pull/81420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add fix-its to `avoid-return-with-void-value` check (PR #81420)

2024-04-07 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny closed https://github.com/llvm/llvm-project/pull/81420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 7a4e897 - [clang-tidy] Add fix-its to `readability-avoid-return-with-void-value` check (#81420)

2024-04-07 Thread via cfe-commits
Author: Danny Mösch Date: 2024-04-07T13:28:29+02:00 New Revision: 7a4e89761a13bfad27a2614ecea5e8698f50336c URL: https://github.com/llvm/llvm-project/commit/7a4e89761a13bfad27a2614ecea5e8698f50336c DIFF: https://github.com/llvm/llvm-project/commit/7a4e89761a13bfad27a2614ecea5e8698f50336c.diff

[clang] [clang][NFC] Remove "Sema" prefix from Sema-related functions (PR #87914)

2024-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes @AaronBallman once noted that this prefix is a historical accident, and shouldn't be there. I agree. --- Patch is 124.11 KiB, truncated to 20.00 KiB below, full version:

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-04-07 Thread Richard Smith via cfe-commits
@@ -1537,6 +1537,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) { cast(D)->isFunctionTemplateSpecialization()) return; + if (isa(D) && D->getDeclName().isEmpty()) { zygoloid wrote: Are those useful checks? It seems

[clang] [clang] Introduce `SemaHLSL` (PR #87912)

2024-04-07 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: clang-format 18.1.1 that we use in the workflow is complaining, because it's missing #82097. https://github.com/llvm/llvm-project/pull/87912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Introduce `SemaHLSL` (PR #87912)

2024-04-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 da5a86b53e7d6e7ff7407b16c2c869894493ee99 4a60eb0da7d74ca002040aede6ffc9220314ca33 --

[clang] [clang] Introduce `SemaHLSL` (PR #87912)

2024-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Vlad Serebrennikov (Endilll) Changes This patch introduces `SemaHLSL` class, and moves some HLSL-related functions there. No functional changes intended. This is a part of the effort to split `Sema` into smaller manageable parts, and

[clang] [clang] Introduce `SemaHLSL` (PR #87912)

2024-04-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/87912 This patch introduces `SemaHLSL` class, and moves some HLSL-related functions there. No functional changes intended. This is a part of the effort to split `Sema` into smaller manageable parts, and follows the

[clang] [clang] Add tests for some CWG 5xx issues (PR #87909)

2024-04-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/87909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add tests for some CWG 5xx issues (PR #87909)

2024-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch covers [CWG393](https://cplusplus.github.io/CWG/issues/393.html) "Pointer to array of unknown bound in template argument list in parameter"

[clang] [clang] Add tests for some CWG 5xx issues (PR #87909)

2024-04-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/87909 This patch covers [CWG393](https://cplusplus.github.io/CWG/issues/393.html) "Pointer to array of unknown bound in template argument list in parameter" [CWG528](https://cplusplus.github.io/CWG/issues/528.html)

[clang] [X86_64] fix arg pass error in struct. (PR #86902)

2024-04-07 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker updated https://github.com/llvm/llvm-project/pull/86902 >From eb425dbaed73a58b5f8e05e425a1972aa1288fa9 Mon Sep 17 00:00:00 2001 From: Longsheng Mou Date: Fri, 15 Mar 2024 20:50:54 +0800 Subject: [PATCH] [X86_64] fix arg pass error in struct. In some struct like

[clang-tools-extra] [clang-tidy] rename designated initializers (PR #86976)

2024-04-07 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/86976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-07 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: @@ -125,12 +127,13 @@ void MissingStdForwardCheck::registerMatchers(MatchFinder *Finder) { hasAncestor(expr(hasUnevaluatedContext()); Finder->addMatcher( -

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-07 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: @@ -79,6 +79,8 @@ AST_MATCHER_P(LambdaExpr, hasCaptureDefaultKind, LambdaCaptureDefault, Kind) { return Node.getCaptureDefault() == Kind; } +AST_MATCHER(ParmVarDecl, hasAnyName) { return !Node.getName().empty(); }

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-07 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/87832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-07 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?M=C3=B6sch?= Message-ID: In-Reply-To: https://github.com/PiotrZSL commented: Current code is fine, wound be good ignore also unused. https://github.com/llvm/llvm-project/pull/87832 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy] Add fix-its to `avoid-return-with-void-value` check (PR #81420)

2024-04-07 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/81420 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy] Add fix-its to `avoid-return-with-void-value` check (PR #81420)

2024-04-07 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: @@ -0,0 +1,168 @@ +//===--- BracesAroundStatement.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the

[clang-tools-extra] [clang-tidy] Add fix-its to `avoid-return-with-void-value` check (PR #81420)

2024-04-07 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= Message-ID: In-Reply-To: https://github.com/PiotrZSL approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/81420

[clang] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one. (PR #83108)

2024-04-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/83108 >From 2a9dfdab30467bef5361cea743be0dc215011685 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 7 Jan 2018 15:16:11 +0200 Subject: [PATCH 1/3] D41416: [modules] [pch] Do not deserialize all lazy