[clang] [clang][bytecode] Add a scope to function calls (PR #140441)

2025-05-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We need a place to destroy the temporaries created for call arguments. --- Full diff: https://github.com/llvm/llvm-project/pull/140441.diff 3 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cp

[clang] [clang][bytecode] Add a scope to function calls (PR #140441)

2025-05-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140441 We need a place to destroy the temporaries created for call arguments. >From 47a04ed14736a66d6f437e704322397ca3b2d255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 16 May 2025 12:47:3

[clang] [AST] Remove "const" from "const ArrayRef" (NFC) (PR #140437)

2025-05-17 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/140437 ___ 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 avoid-pragma-once. (PR #140388)

2025-05-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Tommy Chen (dl8sd11) Changes #139618 --- Full diff: https://github.com/llvm/llvm-project/pull/140388.diff 9 Files Affected: - (added) clang-tools-extra/clang-tidy/portability/AvoidPragmaOnceCheck.cpp (+49) - (added) clan

[clang-tools-extra] [clang-tidy] Add avoid-pragma-once. (PR #140388)

2025-05-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Tommy Chen (dl8sd11) Changes #139618 --- Full diff: https://github.com/llvm/llvm-project/pull/140388.diff 9 Files Affected: - (added) clang-tools-extra/clang-tidy/portability/AvoidPragmaOnceCheck.cpp (+49) - (added) clang-tools

[clang-tools-extra] [clang-tidy] Add avoid-pragma-once. (PR #140388)

2025-05-17 Thread Tommy Chen via cfe-commits
https://github.com/dl8sd11 ready_for_review https://github.com/llvm/llvm-project/pull/140388 ___ 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 avoid-pragma-once. (PR #140388)

2025-05-17 Thread Tommy Chen via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: %check_clang_tidy %s portability-avoid-pragma-once %t \ +// RUN: -- -- -isystem %S/Inputs/avoid-pragma-once + +#include +// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: Avoid pragma once. [portability-avoid-pragma-once] dl8sd11 wrote: Tha

[clang] [AST] Remove "const" from "const ArrayRef" (NFC) (PR #140437)

2025-05-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/140437.diff 1 Files Affected: - (modified) clang/include/clang/AST/ExprCXX.h (+2-2) ``diff diff --git a/clang/include/clang/AST/Ex

[clang] [AST] Remove "const" from "const ArrayRef" (NFC) (PR #140437)

2025-05-17 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/140437 None >From 0226419ba795d16457c9a6aa45c4b89c20d4494b Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 17 May 2025 22:31:37 -0700 Subject: [PATCH] [AST] Remove "const" from "const ArrayRef" (NFC) ---

[clang] [libclang/python] Add typing annotations for the Type class (PR #140378)

2025-05-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/140378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add typing annotations for the Type class (PR #140378)

2025-05-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/140378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add typing annotations for the Type class (PR #140378)

2025-05-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Our error-handling story is bad and inconsistent, but that's out of scope of this PR https://github.com/llvm/llvm-project/pull/140378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang-tools-extra] [clang-tidy] Add avoid-pragma-once. (PR #140388)

2025-05-17 Thread Tommy Chen via cfe-commits
https://github.com/dl8sd11 updated https://github.com/llvm/llvm-project/pull/140388 >From 5bc074dadddb094bf954388a95ecb818abe17b56 Mon Sep 17 00:00:00 2001 From: dl8sd11 Date: Sat, 17 May 2025 17:23:26 + Subject: [PATCH 1/4] [clang-tidy] Add avoid-pragma-once. --- .../portability/AvoidPra

[clang] [clang] Use llvm::max_element (NFC) (PR #140435)

2025-05-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/140435.diff 4 Files Affected: - (modified) clang/lib/CodeGen/CGOpenMPRuntime.cpp (+1-2) - (modified) clang/lib/CodeGen/CodeGenPGO.cp

[clang] [clang] Use llvm::max_element (NFC) (PR #140435)

2025-05-17 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/140435 None >From b83d98ae890773513065cad304cf6a805e96138c Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 17 May 2025 21:27:54 -0700 Subject: [PATCH] [clang] Use llvm::max_element (NFC) --- clang/lib/C

[clang-tools-extra] [clang-tidy] Add avoid-pragma-once. (PR #140388)

2025-05-17 Thread Tommy Chen via cfe-commits
https://github.com/dl8sd11 updated https://github.com/llvm/llvm-project/pull/140388 >From 5bc074dadddb094bf954388a95ecb818abe17b56 Mon Sep 17 00:00:00 2001 From: dl8sd11 Date: Sat, 17 May 2025 17:23:26 + Subject: [PATCH 1/3] [clang-tidy] Add avoid-pragma-once. --- .../portability/AvoidPra

[clang] [Clang] Fix missed initializer instantiation bug for variable templates (PR #138122)

2025-05-17 Thread via cfe-commits
https://github.com/dty2 updated https://github.com/llvm/llvm-project/pull/138122 >From 7935656c30762df9a253fdfa9039c1ca10dad190 Mon Sep 17 00:00:00 2001 From: hunter <284050...@qq.com> Date: Thu, 1 May 2025 18:52:34 +0800 Subject: [PATCH] [Clang] Fix missed initializer instantiation bug for varia

[clang] [Clang] Fix missed initializer instantiation bug for variable templates (PR #138122)

2025-05-17 Thread via cfe-commits
https://github.com/dty2 updated https://github.com/llvm/llvm-project/pull/138122 >From a36e3e758221afd97626819e00772ac1e132d927 Mon Sep 17 00:00:00 2001 From: hunter <284050...@qq.com> Date: Thu, 1 May 2025 18:52:34 +0800 Subject: [PATCH 1/2] [Clang] Fix missed initializer instantiation bug for

[clang] [Clang] Fix missed initializer instantiation bug for variable templates (PR #138122)

2025-05-17 Thread via cfe-commits
https://github.com/dty2 updated https://github.com/llvm/llvm-project/pull/138122 >From a36e3e758221afd97626819e00772ac1e132d927 Mon Sep 17 00:00:00 2001 From: hunter <284050...@qq.com> Date: Thu, 1 May 2025 18:52:34 +0800 Subject: [PATCH 1/2] [Clang] Fix missed initializer instantiation bug for

[clang] [Clang] Fix missed initializer instantiation bug for variable templates (PR #138122)

2025-05-17 Thread via cfe-commits
https://github.com/dty2 updated https://github.com/llvm/llvm-project/pull/138122 >From a36e3e758221afd97626819e00772ac1e132d927 Mon Sep 17 00:00:00 2001 From: hunter <284050...@qq.com> Date: Thu, 1 May 2025 18:52:34 +0800 Subject: [PATCH] [Clang] Fix missed initializer instantiation bug for varia

[clang] [CodeGen] Use DenseMap::try_emplace (NFC) (PR #140430)

2025-05-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kazu Hirata (kazutakahirata) Changes We can simplify the code with DenseMap::try_emplace and structured binding. Note that DenseMap::try_emplace default-constructs the value if omitted. --- Full diff: https://github.com/llvm/llvm

[clang] [CodeGen] Use DenseMap::try_emplace (NFC) (PR #140430)

2025-05-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes We can simplify the code with DenseMap::try_emplace and structured binding. Note that DenseMap::try_emplace default-constructs the value if omitted. --- Full diff: https://github.com/llvm/llvm-project

[clang] [CodeGen] Use DenseMap::try_emplace (NFC) (PR #140430)

2025-05-17 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/140430 We can simplify the code with DenseMap::try_emplace and structured binding. Note that DenseMap::try_emplace default-constructs the value if omitted. >From 9a898fe585ed452ddcb2888bfdee4440687948dc Mon Se

[clang-tools-extra] [clang-tidy] Add avoid-pragma-once. (PR #140388)

2025-05-17 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: %check_clang_tidy %s portability-avoid-pragma-once %t \ +// RUN: -- -- -isystem %S/Inputs/avoid-pragma-once + +#include +// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: Avoid pragma once. [portability-avoid-pragma-once] zwuis wrote: You c

[clang] [CIR] Upstream support for lowering cir.switch to LLVM (PR #140425)

2025-05-17 Thread via cfe-commits
Andres-Salamanca wrote: @andykaylor https://github.com/llvm/llvm-project/pull/140425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for lowering cir.switch to LLVM (PR #140425)

2025-05-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: None (Andres-Salamanca) Changes This PR adds support for lowering the `cir.switch` operation to LLVM. It includes tests for lowering from `.cir` as well as end-to-end source code tests. --- Patch is 26.83 KiB, truncated to 20.00 KiB be

[clang] [CIR] Upstream support for lowering cir.switch to LLVM (PR #140425)

2025-05-17 Thread via cfe-commits
https://github.com/Andres-Salamanca created https://github.com/llvm/llvm-project/pull/140425 This PR adds support for lowering the `cir.switch` operation to LLVM. It includes tests for lowering from `.cir` as well as end-to-end source code tests. >From 384ec2904b91cbed8757720373b451389f5f1a1a

[clang] [clang] Use llvm::stable_sort (NFC) (PR #140413)

2025-05-17 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/140413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6290cc3 - [clang] Use llvm::stable_sort (NFC) (#140413)

2025-05-17 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-17T17:02:45-07:00 New Revision: 6290cc33e9a6541ccb4711991247a77e0a5b9412 URL: https://github.com/llvm/llvm-project/commit/6290cc33e9a6541ccb4711991247a77e0a5b9412 DIFF: https://github.com/llvm/llvm-project/commit/6290cc33e9a6541ccb4711991247a77e0a5b9412.diff L

[clang-tools-extra] 1a40edf - [clang-tools-extra] Use llvm::find_if (NFC) (#140411)

2025-05-17 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-17T17:01:37-07:00 New Revision: 1a40edf2c08297bde3e651a521d74356ee94e238 URL: https://github.com/llvm/llvm-project/commit/1a40edf2c08297bde3e651a521d74356ee94e238 DIFF: https://github.com/llvm/llvm-project/commit/1a40edf2c08297bde3e651a521d74356ee94e238.diff L

[clang-tools-extra] [clang-tools-extra] Use llvm::find_if (NFC) (PR #140411)

2025-05-17 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/140411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] c0ca030 - [clang-include-fixer] Remove an unused "using" decl (NFC) (#140354)

2025-05-17 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-17T17:00:40-07:00 New Revision: c0ca030782f9c572a5df5f3506652e81aeecad0d URL: https://github.com/llvm/llvm-project/commit/c0ca030782f9c572a5df5f3506652e81aeecad0d DIFF: https://github.com/llvm/llvm-project/commit/c0ca030782f9c572a5df5f3506652e81aeecad0d.diff L

[clang-tools-extra] [clang-include-fixer] Remove an unused "using" decl (NFC) (PR #140354)

2025-05-17 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/140354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tools-extra] Use llvm::find_if (NFC) (PR #140411)

2025-05-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/140411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tools-extra] Use llvm::find_if (NFC) (PR #140411)

2025-05-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/140411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-include-fixer] Remove an unused "using" decl (NFC) (PR #140354)

2025-05-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/140354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-include-fixer] Remove an unused "using" decl (NFC) (PR #140354)

2025-05-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/140354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use llvm::stable_sort (NFC) (PR #140413)

2025-05-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/140413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use llvm::stable_sort (NFC) (PR #140413)

2025-05-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/140413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use llvm::stable_sort (NFC) (PR #140413)

2025-05-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/140413.diff 6 Files Affected: - (modified) clang/lib/AST/VTableBuilder.cpp (+2-2) - (modified) clang/lib/Lex/ModuleMap.cpp (+1-1) -

[clang] [clang] Use llvm::stable_sort (NFC) (PR #140413)

2025-05-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/140413.diff 6 Files Affected: - (modified) clang/lib/AST/VTableBuilder.cpp (+2-2) - (modified) clang/lib/Lex/ModuleMap.cpp (+1-1) - (modifi

[clang] [clang] Use llvm::stable_sort (NFC) (PR #140413)

2025-05-17 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/140413 None >From 9f7a4c77bd4621edab8a53350a67e46dbb1923ed Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 17 May 2025 14:41:32 -0700 Subject: [PATCH] [clang] Use llvm::stable_sort (NFC) --- clang/lib/A

[clang-tools-extra] [clang-tools-extra] Use llvm::find_if (NFC) (PR #140411)

2025-05-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/140411.diff 2 Files Affected: - (modified) clang-tools-extra/clang-tidy/misc/NewDeleteOverloadsCheck.cpp (+15-16) - (modified) clang-tools

[clang-tools-extra] [clang-tools-extra] Use llvm::find_if (NFC) (PR #140411)

2025-05-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/140411.diff 2 Files Affected: - (modified) clang-tools-extra/clang-tidy/misc/NewDeleteOverloadsCh

[clang-tools-extra] [clang-tools-extra] Use llvm::find_if (NFC) (PR #140411)

2025-05-17 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/140411 None >From b1dde26817af09f18cfe5fd4a1779d3720b7f6b8 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 17 May 2025 14:36:45 -0700 Subject: [PATCH] [clang-tools-extra] Use llvm::find_if (NFC) --- ...

[clang] [llvm] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-05-17 Thread via cfe-commits
@@ -622,15 +622,38 @@ template <> struct ScalarEnumerationTraits { } }; -template <> struct ScalarEnumerationTraits { - static void enumeration(IO &IO, FormatStyle::ShortFunctionStyle &Value) { -IO.enumCase(Value, "None", FormatStyle::SFS_None); -IO.enumCase(Value,

[clang] [llvm] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-05-17 Thread via cfe-commits
@@ -1500,7 +1523,10 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.AllowShortCaseLabelsOnASingleLine = false; LLVMStyle.AllowShortCompoundRequirementOnASingleLine = true; LLVMStyle.AllowShortEnumsOnASingleLine = true; - LLVMStyle.AllowShortF

[clang] [llvm] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-05-17 Thread via cfe-commits
@@ -73,3 +73,4 @@ pythonenv* /clang/utils/analyzer/projects/*/RefScanBuildResults # automodapi puts generated documentation files here. /lldb/docs/python_api/ +clang-build/ irymarchyk wrote: Sorry, pushed by mistake; removed https://github.com/llvm/llvm-proje

[clang] [llvm] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-05-17 Thread via cfe-commits
@@ -293,15 +293,14 @@ class LineJoiner { auto ShouldMergeShortFunctions = [this, &I, &NextLine, PreviousLine, TheLine]() { - if (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All) + if (Style.AllowShortFunctionsO

[clang] c6ad464 - [NFC] Run code formatter on Diagnostic.h/cpp ProfileList.cpp SpecialCaseList.cpp

2025-05-17 Thread via cfe-commits
Author: Qinkun Bao Date: 2025-05-17T17:11:49-04:00 New Revision: c6ad46434790ebcab6394dbe2381bebcf05c30f7 URL: https://github.com/llvm/llvm-project/commit/c6ad46434790ebcab6394dbe2381bebcf05c30f7 DIFF: https://github.com/llvm/llvm-project/commit/c6ad46434790ebcab6394dbe2381bebcf05c30f7.diff LO

[clang] [llvm] [NFC] Run code formatter on Diagnostic.h/cpp ProfileList.cpp SpecialCaseList.cpp (PR #140316)

2025-05-17 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao closed https://github.com/llvm/llvm-project/pull/140316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC] Run code formatter on Diagnostic.h/cpp ProfileList.cpp SpecialCaseList.cpp (PR #140316)

2025-05-17 Thread Qinkun Bao via cfe-commits
qinkunbao wrote: > But I guess convention is to reformat only parts you are going to change - > less noise in blame output, and less conflict resolution for others who have > pending PRs here. Thank you for the comments. Yeah, I am changing these files. I feel like reformatting these files ma

[clang] [clang] Add -Wimplicit-fallthrough to -Wextra (PR #97926)

2025-05-17 Thread Max Coplan via cfe-commits
https://github.com/vegerot updated https://github.com/llvm/llvm-project/pull/97926 >From c9891ac089e6591ddf1dbbfbdffc19832ed76816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20=F0=9F=91=A8=F0=9F=8F=BD=E2=80=8D=F0=9F=92=BB=20Copl?= =?UTF-8?q?an?= Date: Sat, 6 Jul 2024 17:22:55 -0700 Subject: [

[clang] [lld] [llvm] [polly] Fix regression tests with bad FileCheck checks (PR #140373)

2025-05-17 Thread Muhammad Bashir via cfe-commits
https://github.com/youngbash88 updated https://github.com/llvm/llvm-project/pull/140373 >From c843a56e74763d624bf298ff172a08a38e6e8443 Mon Sep 17 00:00:00 2001 From: bashir Date: Sat, 17 May 2025 14:24:04 +0300 Subject: [PATCH 1/2] tests: Fix FileCheck prefix typos --- clang/test/AST/ast-dump

[clang] [clang] Add -Wimplicit-fallthrough to -Wextra (PR #97926)

2025-05-17 Thread Max Coplan via cfe-commits
vegerot wrote: Sorry, this fell off my radar too! :D @nikic could we do another run please? https://github.com/llvm/llvm-project/pull/97926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [clang] Remove redundant control flow statements (NFC) (PR #140359)

2025-05-17 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/140359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f9f69da - [clang] Remove redundant control flow statements (NFC) (#140359)

2025-05-17 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-17T12:59:47-07:00 New Revision: f9f69dac2a63afd9b317033bfe055a174bdd180f URL: https://github.com/llvm/llvm-project/commit/f9f69dac2a63afd9b317033bfe055a174bdd180f DIFF: https://github.com/llvm/llvm-project/commit/f9f69dac2a63afd9b317033bfe055a174bdd180f.diff L

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-17 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > RT is not a concern to me in this case. The reason why I decided to check the runtime is because you said that "It not only simplifies it but also makes if faster. " in an earlier commit. My first runtime measurement finished and unfortunately it seems that this PR somehow

[clang] [clang] Remove redundant control flow statements (NFC) (PR #140359)

2025-05-17 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/140359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Cygwin][MinGW] Internal class in explicitly-instantiation-declarated template should be instantiated (PR #140145)

2025-05-17 Thread via cfe-commits
jeremyd2019 wrote: I'm running just a libc++ test (with the toolchain built from the previous run, so it shouldn't take 7 hours this time) in https://github.com/jeremyd2019/llvm-mingw/actions/runs/15087868464 https://github.com/llvm/llvm-project/pull/140145

[clang] [llvm] [NFC] Run code formatter on Diagnostic.h/cpp ProfileList.cpp SpecialCaseList.cpp (PR #140316)

2025-05-17 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. I don't have issues with reformatting the entire files, and https://www.llvm.org/docs/Contributing.html says nothing about that. But I guess convention is to reformat only parts you are going to change - less noise in blame output, and

[clang-tools-extra] [clang-tidy] Add avoid-pragma-once. (PR #140388)

2025-05-17 Thread Tommy Chen via cfe-commits
https://github.com/dl8sd11 updated https://github.com/llvm/llvm-project/pull/140388 >From 5bc074dadddb094bf954388a95ecb818abe17b56 Mon Sep 17 00:00:00 2001 From: dl8sd11 Date: Sat, 17 May 2025 17:23:26 + Subject: [PATCH 1/2] [clang-tidy] Add avoid-pragma-once. --- .../portability/AvoidPra

[clang-tools-extra] [clang-tidy] Add avoid-pragma-once. (PR #140388)

2025-05-17 Thread Tommy Chen via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: %check_clang_tidy %s portability-avoid-pragma-once %t \ +// RUN: -- -- -isystem %S/Inputs/avoid-pragma-once + +#include +// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: Avoid pragma once. [portability-avoid-pragma-once] dl8sd11 wrote: I'm

[clang-tools-extra] [clang-tidy] Add avoid-pragma-once. (PR #140388)

2025-05-17 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 HEAD~1 HEAD --extensions cpp,h -- clang-tools-extra/clang-tidy/portability/AvoidPragm

[clang-tools-extra] [clang-tidy] Add avoid-pragma-once. (PR #140388)

2025-05-17 Thread Tommy Chen via cfe-commits
https://github.com/dl8sd11 created https://github.com/llvm/llvm-project/pull/140388 #139618 >From 5bc074dadddb094bf954388a95ecb818abe17b56 Mon Sep 17 00:00:00 2001 From: dl8sd11 Date: Sat, 17 May 2025 17:23:26 + Subject: [PATCH] [clang-tidy] Add avoid-pragma-once. --- .../portability/A

[clang] [WIP][analyzer] Refactor `ExplodedGraph::trim()` (PR #139939)

2025-05-17 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To:

[clang] f695c8d - [DirectX][SPIRV] Fix the lowering of dot4add (#140315)

2025-05-17 Thread via cfe-commits
Author: Justin Bogner Date: 2025-05-17T10:38:24-07:00 New Revision: f695c8d529eae4b8cf6583bdd02824d24c47b0b0 URL: https://github.com/llvm/llvm-project/commit/f695c8d529eae4b8cf6583bdd02824d24c47b0b0 DIFF: https://github.com/llvm/llvm-project/commit/f695c8d529eae4b8cf6583bdd02824d24c47b0b0.diff

[clang] [llvm] [DirectX][SPIRV] Fix the lowering of dot4add (PR #140315)

2025-05-17 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/140315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX][SPIRV] Fix the lowering of dot4add (PR #140315)

2025-05-17 Thread Justin Bogner via cfe-commits
@@ -1,17 +1,19 @@ -// RUN: %clang_cc1 -finclude-default-header -triple \ -// RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -disable-llvm-passes -o - | \ -// RUN: FileCheck %s -DTARGET=dx -// RUN: %clang_cc1 -finclude-default-header -triple \ -// RUN: spirv-pc-vulkan-com

[clang] [llvm] [DirectX][SPIRV] Fix the lowering of dot4add (PR #140315)

2025-05-17 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/140315 >From e4d7bfd8226d730fc8c12e5af765f22069a0d8bf Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Wed, 7 May 2025 16:11:28 -0700 Subject: [PATCH 1/2] [DirectX][SPIRV] Fix the lowering of dot4add There were some

[clang] [CMake][Release] Build with -ffat-lto-objects (PR #140381)

2025-05-17 Thread Tom Stellard via cfe-commits
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/140381 Fixes #133580 >From abf0d25f2197cb154ec7afd7bca5962975742b44 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 17 May 2025 16:40:51 + Subject: [PATCH] [CMake][Release] Build with -ffat-lto-objects Fi

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-17 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-17 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang] [CMake][Release] Build with -ffat-lto-objects (PR #140381)

2025-05-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Stellard (tstellar) Changes Fixes #133580 --- Full diff: https://github.com/llvm/llvm-project/pull/140381.diff 1 Files Affected: - (modified) clang/cmake/caches/Release.cmake (+4-1) ``diff diff --git a/clang/cmake/caches/

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-17 Thread Sirui Mu via cfe-commits
@@ -1500,6 +1507,14 @@ static void prepareTypeConverter(mlir::LLVMTypeConverter &converter, converter.addConversion([&](cir::BF16Type type) -> mlir::Type { return mlir::BFloat16Type::get(type.getContext()); }); + converter.addConversion([&](cir::FuncType type) -> mlir

[clang] Ast importer visitors (PR #138838)

2025-05-17 Thread Balázs Kéri via cfe-commits
balazske wrote: I have now a working patch for "splitting" `ASTImporter` from `AST`. If this change will be accepted it is possible to add the new visit functions. The "split" change may require discussion on discord because it affects clang code layout. https://github.com/llvm/llvm-project/p

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-17 Thread Sirui Mu via cfe-commits
https://github.com/Lancern edited https://github.com/llvm/llvm-project/pull/139748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] libcxx: std::ostream::sentry should be exported (PR #140169)

2025-05-17 Thread via cfe-commits
https://github.com/jeremyd2019 closed https://github.com/llvm/llvm-project/pull/140169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-17 Thread Sirui Mu via cfe-commits
https://github.com/Lancern edited https://github.com/llvm/llvm-project/pull/139748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-17 Thread Sirui Mu via cfe-commits
https://github.com/Lancern edited https://github.com/llvm/llvm-project/pull/139748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-17 Thread Sirui Mu via cfe-commits
@@ -937,8 +937,28 @@ CIRGenCallee CIRGenFunction::emitCallee(const clang::Expr *e) { return emitDirectCallee(cgm, funcDecl); } - cgm.errorNYI(e->getSourceRange(), "Unsupported callee kind"); - return {}; + assert(!cir::MissingFeatures::opCallPseudoDtor());

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-17 Thread Sirui Mu via cfe-commits
@@ -539,15 +573,16 @@ mlir::ParseResult cir::CallOp::parse(mlir::OpAsmParser &parser, } void cir::CallOp::print(mlir::OpAsmPrinter &p) { - printCallCommon(*this, getCalleeAttr(), p); + mlir::Value indirectCallee = isIndirect() ? getIndirectCall() : nullptr; + printCallComm

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-17 Thread Sirui Mu via cfe-commits
@@ -464,15 +464,35 @@ OpFoldResult cir::CastOp::fold(FoldAdaptor adaptor) { // CallOp //===--===// +mlir::OperandRange cir::CallOp::getArgOperands() { + if (isIndirect()) +return getArgs().drop_front(1);

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-17 Thread Sirui Mu via cfe-commits
@@ -1861,13 +1867,23 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { let arguments = commonArgs; let builders = [OpBuilder<(ins "mlir::SymbolRefAttr":$callee, - "mlir::Type":$resType, - "mlir::V

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-17 Thread Sirui Mu via cfe-commits
@@ -1861,13 +1867,23 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { let arguments = commonArgs; let builders = [OpBuilder<(ins "mlir::SymbolRefAttr":$callee, - "mlir::Type":$resType, - "mlir::V

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-17 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/139748 >From 614849751f24c47c6da53ebc1fb296b806223557 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Thu, 15 May 2025 23:01:18 +0800 Subject: [PATCH] [CIR] Add support for indirect calls --- .../CIR/Dialect/Builder/CI

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-17 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/139748 >From eb08d386728d1d9876f68dc40b4042bace9e5d5c Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Thu, 15 May 2025 23:01:18 +0800 Subject: [PATCH] [CIR] Add support for indirect calls --- .../CIR/Dialect/Builder/CI

[clang] [lld] [llvm] [polly] Fix regression tests with bad FileCheck checks (PR #140373)

2025-05-17 Thread David Green via cfe-commits
@@ -22,7 +22,7 @@ define signext i8 @test1(i32 %A) { ; CHECK-V7: @ %bb.0: ; CHECK-V7-NEXT:sbfx r0, r0, #8, #8 ; CHECK-V7-NEXT:bx lr -; CHECk-V7: sbfx r0, r0, #8, #8 +; CHECK-V7: sbfx r0, r0, #8, #8 davemgreen wrote: Same here. https://github.com

[clang] [lld] [llvm] [polly] Fix regression tests with bad FileCheck checks (PR #140373)

2025-05-17 Thread David Green via cfe-commits
@@ -121,7 +121,7 @@ define i32 @test_orr_extract_from_mul_1(i32 %x, i32 %y) { ; CHECK-THUMB-NEXT:orrs r0, r1 ; CHECK-THUMB-NEXT:bx lr entry: -; CHECk-THUMB: orrs r0, r1 +; CHECK-THUMB: orrs r0, r1 davemgreen wrote: You can remove this line entirely, th

[clang-tools-extra] [clang-tidy] Added check 'bugprone-function-visibility-change' (PR #140086)

2025-05-17 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/140086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-17 Thread Donát Nagy via cfe-commits
NagyDonat wrote: ## Accommodating the modeling checkers in the checker family framework _I thought a bit about the place of the modeling checkers in the checker family framework (which is introduced in this PR). This question is a bit architectural, so in theory this post would "belong to" dis

[clang-tools-extra] [clang-tidy] Added check 'bugprone-function-visibility-change' (PR #140086)

2025-05-17 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,74 @@ +//===--- FunctionVisibilityChangeCheck.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-tidy] Added check 'bugprone-function-visibility-change' (PR #140086)

2025-05-17 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: I think we should make change the name of the check to include "method" or "member-function" words in it. It will make clear that we check for methods visibility and not some visibility attributes on functions. Possible names: bugprone-member-function-visi

[clang] [llvm] [mlir] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()` (PR #140289)

2025-05-17 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/140289 >From b1f2cf5a9dd1eb27458ac586706c460bb0f00c25 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Fri, 16 May 2025 10:54:33 -0700 Subject: [PATCH] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-05-17 Thread Baranov Victor via cfe-commits
vbvictor wrote: For now, I think you should wait for an approval/review from one of the clang-tidy maintainers (PiotrZSL, HerrCai0907) that will also help merge this PR. It can take some time, but the new release will only be in July, so don't need to worry about missing your changes for now.

[clang-tools-extra] [clang-tidy] Added check 'bugprone-function-visibility-change' (PR #140086)

2025-05-17 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,74 @@ +//===--- FunctionVisibilityChangeCheck.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] Add check 'cppcoreguidelines-use-enum-class' (PR #138282)

2025-05-17 Thread Baranov Victor via cfe-commits
vbvictor wrote: You should wait for an approval from one of the clang-tidy maintainers (PiotrZSL, carlosgalvezp, HerrCai0907) that will also help merge this PR. It can take some time, but the new release will only be in July, so don't need to worry about it for now. You can "Ping" reviewers wi

[clang] [llvm] [mlir] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()` (PR #140289)

2025-05-17 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/140289 >From a410f0a4a8eb35301ba92462ab476c8d85d7017b Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Fri, 16 May 2025 10:54:33 -0700 Subject: [PATCH] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()

[clang-tools-extra] Add check 'cppcoreguidelines-use-enum-class' (PR #138282)

2025-05-17 Thread Baranov Victor via cfe-commits
@@ -130,6 +130,11 @@ New checks Finds unintended character output from ``unsigned char`` and ``signed char`` to an ``ostream``. +- New :doc:`cppcoreguidelines-use-enum-class + ` check. + + Finds plain non-class ``enum`` definitions that could use ``enum class``.

[clang] [Clang] enhance loop analysis to handle variable changes inside lambdas (PR #135573)

2025-05-17 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: > I question if -Wloop-analysis should be completely rewritten using dataflow > analysis, rather than AST based matching. should changes inside functions be handled in the following cases? https://github.com/llvm/llvm-project/blob/db0f754c5af8e6c96770533520bf8b17fc0dc977/clan

  1   2   >