[clang] [Sema] Use llvm::is_contained (NFC) (PR #139833)

2025-05-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/22351 Here is the relevant piece of the build lo

[clang] [Sema] Use llvm::is_contained (NFC) (PR #139833)

2025-05-13 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/139833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

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

[clang] [Sema] Use llvm::is_contained (NFC) (PR #139833)

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

[clang] 65eb5e8 - [Sema] Use llvm::is_contained (NFC) (#139833)

2025-05-13 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-13T23:52:51-07:00 New Revision: 65eb5e8b87f2d5755988e3d0eee4461180298b4d URL: https://github.com/llvm/llvm-project/commit/65eb5e8b87f2d5755988e3d0eee4461180298b4d DIFF: https://github.com/llvm/llvm-project/commit/65eb5e8b87f2d5755988e3d0eee4461180298b4d.diff L

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-05-13 Thread via cfe-commits
github-actions[bot] wrote: @jj-marr Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang] b77109f - Better diagnostics when assertion fails in `consteval` (#130458)

2025-05-13 Thread via cfe-commits
Author: JJ Marr Date: 2025-05-14T08:47:38+02:00 New Revision: b77109ff8c17cd20ac2c791761028a358c9e3447 URL: https://github.com/llvm/llvm-project/commit/b77109ff8c17cd20ac2c791761028a358c9e3447 DIFF: https://github.com/llvm/llvm-project/commit/b77109ff8c17cd20ac2c791761028a358c9e3447.diff LOG:

[clang] 6c1bb48 - [Clang] Remove workaround for libstdc++4.7 (#139693)

2025-05-13 Thread via cfe-commits
Author: cor3ntin Date: 2025-05-14T08:41:10+02:00 New Revision: 6c1bb48cc45396894597c8cb897c31205d1bdeb6 URL: https://github.com/llvm/llvm-project/commit/6c1bb48cc45396894597c8cb897c31205d1bdeb6 DIFF: https://github.com/llvm/llvm-project/commit/6c1bb48cc45396894597c8cb897c31205d1bdeb6.diff LOG:

[clang] [Clang] Remove workaround for libstdc++4.7 (PR #139693)

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

[clang] [clang][NFC] Regroup declarations in `Parser` (PR #138511)

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

[clang] [clang][PAC] Add __builtin_get_vtable_pointer (PR #139790)

2025-05-13 Thread Oliver Hunt via cfe-commits
@@ -1825,6 +1825,37 @@ static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *Call) { return Call; } +static ExprResult GetVTablePointer(Sema &S, CallExpr *Call) { + if (S.checkArgCount(Call, 1)) +return ExprError(); + ExprResult ThisArg = S.DefaultFuncti

[clang] [llvm] [AArch64][SelectionDAG] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-05-13 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: > If you would like to credit the original author for the PTRADD nodd that > would be @davidchisnall (and probably some parts by @jrtc27, although that > might just be the combines). I don't see any problems in landing that part > separately Sounds like a good use for GitHub

[clang] [clang][PAC] Add __builtin_get_vtable_pointer (PR #139790)

2025-05-13 Thread via cfe-commits
@@ -1825,6 +1825,37 @@ static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *Call) { return Call; } +static ExprResult GetVTablePointer(Sema &S, CallExpr *Call) { + if (S.checkArgCount(Call, 1)) +return ExprError(); + ExprResult ThisArg = S.DefaultFuncti

[clang] [clang][PAC] Add __builtin_get_vtable_pointer (PR #139790)

2025-05-13 Thread via cfe-commits
@@ -1825,6 +1825,37 @@ static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *Call) { return Call; } +static ExprResult GetVTablePointer(Sema &S, CallExpr *Call) { + if (S.checkArgCount(Call, 1)) +return ExprError(); + ExprResult ThisArg = S.DefaultFuncti

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-05-13 Thread JJ Marr via cfe-commits
jj-marr wrote: OK, merge whenever. https://github.com/llvm/llvm-project/pull/130458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-05-13 Thread via cfe-commits
cor3ntin wrote: > Is it something I can actually do myself? Or can only maintainers merge? Yes, only maintainers can do it (you can become a maintainer after you make a few contributions) https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access https://github.com/llvm/llvm-project/p

[clang] [llvm] [RISCV] Add Andes XAndesVDot (Andes Vector Dot Product) extension. (PR #139849)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Jim Lin (tclin914) Changes The spec can be found at: https://github.com/andestech/andes-v5-isa/releases/tag/ast-v5_4_0-release. This patch only supports assembler. Intrinsics support will be added in a later patch. --- Full diff

[clang] [llvm] [RISCV] Add Andes XAndesVDot (Andes Vector Dot Product) extension. (PR #139849)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Jim Lin (tclin914) Changes The spec can be found at: https://github.com/andestech/andes-v5-isa/releases/tag/ast-v5_4_0-release. This patch only supports assembler. Intrinsics support will be added in a later patch. --- Full diff: https://gi

[clang] [llvm] [RISCV] Add Andes XAndesVDot (Andes Vector Dot Product) extension. (PR #139849)

2025-05-13 Thread Jim Lin via cfe-commits
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/139849 The spec can be found at: https://github.com/andestech/andes-v5-isa/releases/tag/ast-v5_4_0-release. This patch only supports assembler. Intrinsics support will be added in a later patch. >From bc8ae48aa392d2

[clang] [clang][PAC] Add __builtin_get_vtable_pointer (PR #139790)

2025-05-13 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/139790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PAC] Add __builtin_get_vtable_pointer (PR #139790)

2025-05-13 Thread via cfe-commits
https://github.com/cor3ntin commented: Can you add tests for const types, and tests that check `__is_same_as(decltype(__builtin_get_vtable_pointer(foo)), const void*)` ? LGTM otherwise https://github.com/llvm/llvm-project/pull/139790 ___ cfe-commits m

[clang] [clang][PAC] Add __builtin_get_vtable_pointer (PR #139790)

2025-05-13 Thread via cfe-commits
@@ -1825,6 +1825,37 @@ static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *Call) { return Call; } +static ExprResult GetVTablePointer(Sema &S, CallExpr *Call) { + if (S.checkArgCount(Call, 1)) +return ExprError(); + ExprResult ThisArg = S.DefaultFuncti

[clang] [clang][PAC] Add __builtin_get_vtable_pointer (PR #139790)

2025-05-13 Thread via cfe-commits
@@ -1825,6 +1825,37 @@ static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *Call) { return Call; } +static ExprResult GetVTablePointer(Sema &S, CallExpr *Call) { + if (S.checkArgCount(Call, 1)) +return ExprError(); + ExprResult ThisArg = S.DefaultFuncti

[clang] [llvm] [NVPTX] Add intrinsics and clang builtins for conversions of f4x2 type (PR #139244)

2025-05-13 Thread Srinivasa Ravi via cfe-commits
https://github.com/Wolfram70 updated https://github.com/llvm/llvm-project/pull/139244 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] Implement src:*=sanitize for UBSan (PR #139772)

2025-05-13 Thread Vitaly Buka via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsanitize=signed-integer-overflow -fsanitize-ignorelist=%t/src.ignorelist -emit-llvm %t/test1.c -o - | FileCheck %s -check-prefix=CHECK-ALLOWLIST +// RUN: %clang_cc1 -trip

[clang] [Clang] Remove workaround for libstdc++4.7 (PR #139693)

2025-05-13 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/139693 >From 79bb502c9ca1e35fb76b71b528cc7a12940ce1d8 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 13 May 2025 11:00:51 +0200 Subject: [PATCH] [Clang] Remove workaround for libstdc++4.7 We document libstd

[clang] [llvm] [NVPTX] Add intrinsics and clang builtins for conversions of f4x2 type (PR #139244)

2025-05-13 Thread Srinivasa Ravi via cfe-commits
https://github.com/Wolfram70 updated https://github.com/llvm/llvm-project/pull/139244 >From a9588758d03a80ce055725d7d7db0b0deb685f96 Mon Sep 17 00:00:00 2001 From: Srinivasa Ravi Date: Wed, 7 May 2025 14:41:48 +0530 Subject: [PATCH] [NVPTX] Add intrinsics and clang builtins for conversions of

[clang] [clang] Save ShuffleVectorExpr args as ConstantExpr (PR #139709)

2025-05-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/139709 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] Implement src:*=sanitize for UBSan (PR #139772)

2025-05-13 Thread Vitaly Buka via cfe-commits
@@ -44,7 +44,8 @@ bool NoSanitizeList::containsFunction(SanitizerMask Mask, bool NoSanitizeList::containsFile(SanitizerMask Mask, StringRef FileName, StringRef Category) const { - return SSCL->inSection(Mask, "src", FileName, Category); + bo

[clang] [llvm] [CMake] Add a linker test for -Bsymbolic-functions to AddLLVM (PR #79539)

2025-05-13 Thread via cfe-commits
@@ -314,6 +308,11 @@ function(add_link_opts target_name) set_property(TARGET ${target_name} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-brtl") endif() + + if (NOT MINGW) +llvm_check_linker_flag(CXX "-Wl,-Bsymbolic-functions" +

[clang] [Clang][PGO][UserManual] Specify usage of -b flag (PR #139763)

2025-05-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu` running on `sie-linux-worker3` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/17728 Her

[clang] [clang][bytecode] Use IsNonNull op in visitBool() (PR #139846)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We don't need to emit the nullptr and compare to it anymore. --- Full diff: https://github.com/llvm/llvm-project/pull/139846.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+2-5)

[clang] [clang][bytecode][NFC] Avoid an implicit integer conversion (PR #139845)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes getCharByteWidth() returns an unsigned. --- Full diff: https://github.com/llvm/llvm-project/pull/139845.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+1-1) ``diff diff

[clang] [clang][bytecode] Use IsNonNull op in visitBool() (PR #139846)

2025-05-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139846 We don't need to emit the nullptr and compare to it anymore. >From 0339fcfd54521c35b3612e2c91805dc179ed9fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 14 May 2025 06:57:55 +0200 Su

[clang] [clang][bytecode][NFC] Avoid an implicit integer conversion (PR #139845)

2025-05-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139845 getCharByteWidth() returns an unsigned. >From 4fa9f128a32eb30865cbf760c13091b6804a87c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 14 May 2025 06:57:39 +0200 Subject: [PATCH] [clang

[clang] [HLSL][NFC] Simplify resource constructors codegen tests (PR #139842)

2025-05-13 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/139842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Simplify resource constructors codegen tests (PR #139842)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/139842.diff 3 Files Affected: - (modified) clang/test/CodeGenHLSL/builtins/ByteAddressBuffers-constructors.hlsl (+8-45)

[clang] [HLSL] Simplify resource constructors codegen tests (PR #139842)

2025-05-13 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/139842 None Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] aef39f5 - [Clang][PGO][UserManual] Specify usage of -b flag (#139763)

2025-05-13 Thread via cfe-commits
Author: Madhur Amilkanthwar Date: 2025-05-14T10:23:17+05:30 New Revision: aef39f5dcb8b0c73cef4192c5d49a32de7d4ef44 URL: https://github.com/llvm/llvm-project/commit/aef39f5dcb8b0c73cef4192c5d49a32de7d4ef44 DIFF: https://github.com/llvm/llvm-project/commit/aef39f5dcb8b0c73cef4192c5d49a32de7d4ef44

[clang] [Clang][PGO][UserManual] Specify usage of -b flag (PR #139763)

2025-05-13 Thread Madhur Amilkanthwar via cfe-commits
https://github.com/madhur13490 closed https://github.com/llvm/llvm-project/pull/139763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-13 Thread Owen Pan 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] [llvm] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-05-13 Thread Owen Pan via cfe-commits
@@ -619,20 +619,39 @@ TEST(ConfigParseTest, ParsesConfiguration) { CHECK_PARSE("AllowShortBlocksOnASingleLine: true", AllowShortBlocksOnASingleLine, FormatStyle::SBS_Always); - Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline; CHECK_PARSE("A

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

2025-05-13 Thread Owen Pan 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-13 Thread Owen Pan 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-13 Thread Owen Pan 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/ owenca wrote: Why this? https://github.com/llvm/llvm-project/pull/134337 _

[clang] [Sema] Use llvm::is_contained (NFC) (PR #139833)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/139833.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaARM.cpp (+1-1) ``diff diff --git a/clang/lib/Sema/SemaARM.

[clang] [Sema] Use llvm::is_contained (NFC) (PR #139833)

2025-05-13 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/139833 None Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica

[clang] [clang][NFC] Regroup declarations in `Parser` (PR #138511)

2025-05-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Numbers for clang-format uncleanliness of `Parser.h` with changes from this PR: `92 insertions(+), 87 deletions(-)` (all in grammar productions). https://github.com/llvm/llvm-project/pull/138511 ___ cfe-commits mailing list cfe-commits@

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-13 Thread Oliver Hunt via cfe-commits
@@ -1207,12 +1222,61 @@ void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, // for e.g., [n{0}] { }; <-- if no is included. // FIXME: we should create the init capture variable and mark it invalid // in this case. - if (C->InitCaptu

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-13 Thread Oliver Hunt via cfe-commits
@@ -575,8 +577,7 @@ void Sema::ActOnLambdaExplicitTemplateParameterList( assert(LSI->TemplateParams.empty() && "Explicit template parameters should come " "before invented (auto) ones"); - assert(!TParams.empty() && - "No template parameters to act

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-13 Thread Oliver Hunt via cfe-commits
@@ -676,17 +677,18 @@ static EnumDecl *findCommonEnumForBlockReturns(ArrayRef returns) { } // Never infer an anonymous enum type. - if (!ED->hasNameForLinkage()) return nullptr; + if (!ED->hasNameForLinkage()) ojhunt wrote: NFC formatting change https

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-13 Thread Oliver Hunt via cfe-commits
@@ -662,12 +662,13 @@ static EnumDecl *findEnumForBlockReturn(ReturnStmt *ret) { /// Attempt to find a common type T for which all of the returned /// expressions in a block are enumerator-like expressions of that /// type. -static EnumDecl *findCommonEnumForBlockReturns(ArrayR

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-13 Thread Oliver Hunt via cfe-commits
@@ -1207,12 +1222,61 @@ void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, // for e.g., [n{0}] { }; <-- if no is included. // FIXME: we should create the init capture variable and mark it invalid // in this case. - if (C->InitCaptu

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-13 Thread Oliver Hunt via cfe-commits
@@ -597,8 +598,7 @@ static EnumDecl *findEnumForBlockReturn(Expr *E) { // - it is an enumerator whose enum type is T or if (DeclRefExpr *DRE = dyn_cast(E)) { -if (EnumConstantDecl *D - = dyn_cast(DRE->getDecl())) { +if (EnumConstantDecl *D = dyn_cast(DRE-

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-13 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/117953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-13 Thread Oliver Hunt via cfe-commits
@@ -1186,15 +1188,28 @@ void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, CheckCXXThisCapture(C->Loc, /*Explicit=*/true, /*BuildAndDiagnose*/ true, /*FunctionScopeIndexToStopAtPtr*/ nullptr, C->Ki

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-13 Thread Oliver Hunt via cfe-commits
@@ -1247,12 +1311,12 @@ void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, if (C->Kind == LCK_ByRef && Intro.Default == LCD_ByRef) { Diag(C->Loc, diag::err_reference_capture_with_reference_default) << FixItHint::CreateRemoval( -

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-13 Thread Oliver Hunt via cfe-commits
@@ -219,11 +222,10 @@ UnsignedOrNone clang::getStackIndexOfNearestEnclosingCaptureCapableLambda( // Check if the capture-ready lambda can truly capture 'this' by checking // whether all enclosing lambdas of the capture-ready lambda can capture // 'this'. -const

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-13 Thread Oliver Hunt via cfe-commits
@@ -238,7 +240,7 @@ getGenericLambdaTemplateParameterList(LambdaScopeInfo *LSI, Sema &SemaRef) { /*Template kw loc*/ SourceLocation(), /*L angle loc*/ LSI->ExplicitTemplateParamsRange.getBegin(), LSI->TemplateParams, -/*R angle loc*/LSI->Explici

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-13 Thread Oliver Hunt via cfe-commits
@@ -662,12 +662,13 @@ static EnumDecl *findEnumForBlockReturn(ReturnStmt *ret) { /// Attempt to find a common type T for which all of the returned /// expressions in a block are enumerator-like expressions of that /// type. -static EnumDecl *findCommonEnumForBlockReturns(ArrayR

[clang] [llvm] [CMake] Add a linker test for -Bsymbolic-functions to AddLLVM (PR #79539)

2025-05-13 Thread Brad Smith via cfe-commits
@@ -314,6 +308,11 @@ function(add_link_opts target_name) set_property(TARGET ${target_name} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-brtl") endif() + + if (NOT MINGW) +llvm_check_linker_flag(CXX "-Wl,-Bsymbolic-functions" +

[clang] [Clang] Stop changing DC when instantiating dependent friend specializations (PR #139436)

2025-05-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/139436 >From 1756fbcd874097fdea256c2c5986810a011eafed Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 11 May 2025 12:54:12 +0800 Subject: [PATCH 1/3] [Clang] Stop looking for DC from dependent friend specializa

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change adds support for splat op for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 --- Full diff: https://github.com/llvm/llvm-project/pull/139827.diff 7 Files Affected: -

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes This change adds support for splat op for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 --- Full diff: https://github.com/llvm/llvm-project/pull/139827.diff 7 Files Affected: - (m

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-05-13 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: More test cases will be added when Bin and Comp operators are upstreamed for Vector https://github.com/llvm/llvm-project/pull/139827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-05-13 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/139827 This change adds support for splat op for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 >From e9b7f553f7ad8a9167a9aa4a11c86ccdb8472cdd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Dat

[clang] [CIR] Upstream support for FlattenCFG switch and SwitchFlatOp (PR #139154)

2025-05-13 Thread via cfe-commits
Andres-Salamanca wrote: > This is also missing a end-to-end test that proves we generate switchflatop > if we are coming all the way from source code. There are examples in the > incubator on how to check if a pass runs (you can use print-before/after) and > the IR for it. In the incubator, t

[clang] [CIR] Upstream support for FlattenCFG switch and SwitchFlatOp (PR #139154)

2025-05-13 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/139154 >From f77464dbe1de51c89fbde5e5decfc2314cd7dba6 Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Thu, 8 May 2025 15:39:49 -0500 Subject: [PATCH 1/4] Add support for FlattenCFG switch and introduce

[clang] [CIR] Upstream support for FlattenCFG switch and SwitchFlatOp (PR #139154)

2025-05-13 Thread via cfe-commits
@@ -171,6 +171,232 @@ class CIRScopeOpFlattening : public mlir::OpRewritePattern { } }; +class CIRSwitchOpFlattening : public mlir::OpRewritePattern { +public: + using OpRewritePattern::OpRewritePattern; + + inline void rewriteYieldOp(mlir::PatternRewriter &rewriter, +

[clang] [CIR] Upstream support for FlattenCFG switch and SwitchFlatOp (PR #139154)

2025-05-13 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/139154 >From f77464dbe1de51c89fbde5e5decfc2314cd7dba6 Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Thu, 8 May 2025 15:39:49 -0500 Subject: [PATCH 1/3] Add support for FlattenCFG switch and introduce

[clang] [CIR] Upstream support for FlattenCFG switch and SwitchFlatOp (PR #139154)

2025-05-13 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/139154 >From f77464dbe1de51c89fbde5e5decfc2314cd7dba6 Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Thu, 8 May 2025 15:39:49 -0500 Subject: [PATCH 1/2] Add support for FlattenCFG switch and introduce

[clang] Implement src:*=sanitize for UBSan (PR #139772)

2025-05-13 Thread Vitaly Buka via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsanitize=signed-integer-overflow -fsanitize-ignorelist=%t/src.ignorelist -emit-llvm %t/test1.c -o - | FileCheck %s -check-prefix=CHECK-ALLOWLIST +// RUN: %clang_cc1 -trip

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-13 Thread Helena Kotas via cfe-commits
@@ -55,11 +55,33 @@ export void foo() { // CHECK-SAME: i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) // CHECK-NEXT: ret void -// Buf2 initialization part 1 - FIXME: constructor with implicit binding does not exist yet; -// the global init function currently

[clang] Implement src:*=sanitize for UBSan (PR #139772)

2025-05-13 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Reminder to @thurstond as well :) Please figure out https://llvm.org/docs/GitHub.html#stacked-pull-requests https://github.com/llvm/llvm-project/pull/139772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-13 Thread Helena Kotas via cfe-commits
@@ -668,6 +668,26 @@ BuiltinTypeDeclBuilder::addHandleConstructorFromBinding() { .finalize(); } +BuiltinTypeDeclBuilder & +BuiltinTypeDeclBuilder::addHandleConstructorFromImplicitBinding() { + if (Record->isCompleteDefinition()) hekota wrote: If I reca

[clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-13 Thread Helena Kotas via cfe-commits
@@ -3269,27 +3285,42 @@ static bool initVarDeclWithCtor(Sema &S, VarDecl *VD, return true; } -static bool initGlobalResourceDecl(Sema &S, VarDecl *VD) { +bool SemaHLSL::initGlobalResourceDecl(VarDecl *VD) { + std::optional RegisterSlot; + uint32_t SpaceNo = 0; HLSLResou

[clang] Avoid emitting a linker options section in the compiler if it is empty. (PR #139821)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang-codegen Author: None (dyung) Changes Recently in some of our internal testing, we noticed that the compiler was sometimes generating an empty linker.options section which seems unnecessary. This proposed change

[clang] Avoid emitting a linker options section in the compiler if it is empty. (PR #139821)

2025-05-13 Thread via cfe-commits
https://github.com/dyung created https://github.com/llvm/llvm-project/pull/139821 Recently in some of our internal testing, we noticed that the compiler was sometimes generating an empty linker.options section which seems unnecessary. This proposed change causes the compiler to simply omit emi

[clang] [clang][analyzer] Fix a nullptr dereference when `-ftime-trace` is used (PR #139820)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Fangyi Zhou (fangyi-zhou) Changes Fixes #139779. The bug was introduced in #137355 in `SymbolConjured::getStmt`, when trying to obtain a statement for a CFG initializer without an initializer.

[clang] [clang][analyzer] Fix a nullptr dereference when `-ftime-trace` is used (PR #139820)

2025-05-13 Thread Fangyi Zhou via cfe-commits
https://github.com/fangyi-zhou created https://github.com/llvm/llvm-project/pull/139820 Fixes #139779. The bug was introduced in #137355 in `SymbolConjured::getStmt`, when trying to obtain a statement for a CFG initializer without an initializer. This commit adds a null check before access.

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Florian Mayer via cfe-commits
@@ -96,9 +96,9 @@ double f1(int b, int i) { // CHECK-TRAP: [[DBG28]] = !DILocation(line: 66, column: 3, scope: [[DBG4]]) //. // CHECK-NOTRAP: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C11, file: [[META1:![0-9]+]], isOptimized: false, runtimeVersion: 0, emi

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Florian Mayer via cfe-commits
@@ -68,9 +68,9 @@ double f1(int b, int i) { //. // CHECK-TRAP: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C11, file: [[META1:![0-9]+]], isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) -// CHEC

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
thurstond wrote: > > > I am not a fan of the change to the function used for array-bounds. > > > > > > More specific? I like it in general. It's about just about the name of a > > new fake function? > > Sorry, I meant the new name. > > I don't like that it has a `-` in it, and I don't like t

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/139809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
@@ -3353,6 +3353,17 @@ class CodeGenFunction : public CodeGenTypeCache { SanitizerSet SkippedChecks = SanitizerSet(), llvm::Value *ArraySize = nullptr); + /// Returns debug info, with additional annotation if enabled by + /// CGM.get

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
@@ -2779,13 +2779,47 @@ void CodeGenFunction::EmitTypeMetadataCodeForVCall(const CXXRecordDecl *RD, } } +void CodeGenFunction::ParseCFITypeCheckKind(CFITypeCheckKind TCK, thurstond wrote: Fixed in https://github.com/llvm/llvm-project/pull/139809/commits/f

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
@@ -89,7 +89,7 @@ double f1(int b, int i) { // CHECK-TRAP: [[DBG21]] = !DILocation(line: 65, column: 3, scope: [[DBG4]]) // CHECK-TRAP: [[DBG22]] = !DILocation(line: 66, column: 12, scope: [[DBG4]]) // CHECK-TRAP: [[DBG23]] = !DILocation(line: 0, scope: [[META24:![0-9]+]], inl

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/139809 >From ead256dfd33d04877766ddb26830f264682e9b48 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 7 May 2025 23:33:21 + Subject: [PATCH 1/4] [cfi] Enable -fsanitize-annotate-debug-info functionality

[clang] Implement src:*=sanitize for UBSan (PR #139772)

2025-05-13 Thread Vitaly Buka via cfe-commits
@@ -44,7 +44,8 @@ bool NoSanitizeList::containsFunction(SanitizerMask Mask, bool NoSanitizeList::containsFile(SanitizerMask Mask, StringRef FileName, StringRef Category) const { - return SSCL->inSection(Mask, "src", FileName, Category); + bo

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Florian Mayer via cfe-commits
fmayer wrote: > > I am not a fan of the change to the function used for array-bounds. > > More specific? I like it in general. It's about just about the name of a new > fake function? Sorry, I meant the new name. I don't like that it has a `-` in it, and I don't like that it changed for no g

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > I am not a fan of the change to the function used for array-bounds. More specific? I like it in general. It's about just about the name of a new fake function? https://github.com/llvm/llvm-project/pull/139809 ___ cfe-commits mailin

[clang] [HLSL] Add various overloads for MiniEngine (PR #139800)

2025-05-13 Thread Sarah Spall via cfe-commits
@@ -158,6 +158,42 @@ namespace hlsl { return fn((float4)V1, (float4)V2, (float4)V3); \ } +#define _DXC_COMPAT_BINARY_VECTOR_SCALAR_OVERLOADS(fn) \ + template \ + cons

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Florian Mayer via cfe-commits
fmayer wrote: I am not a fan of the change to the function used for array-bounds. https://github.com/llvm/llvm-project/pull/139809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/139809 >From ead256dfd33d04877766ddb26830f264682e9b48 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 7 May 2025 23:33:21 + Subject: [PATCH 1/2] [cfi] Enable -fsanitize-annotate-debug-info functionality

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Thurston Dang (thurstond) Changes This connects the -fsanitize-annotate-debug-info plumbing (https://github.com/llvm/llvm-project/pull/138577) to CFI check codegen. Updates the tests from https://github.com/llvm/llvm-project/pull/

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Thurston Dang (thurstond) Changes This connects the -fsanitize-annotate-debug-info plumbing (https://github.com/llvm/llvm-project/pull/138577) to CFI check codegen. Updates the tests from https://github.com/llvm/llvm-project/pull/139149.

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/139809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [cfi] Enable -fsanitize-annotate-debug-info functionality for CFI checks (PR #139809)

2025-05-13 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/139809 This connects the -fsanitize-annotate-debug-info plumbing (https://github.com/llvm/llvm-project/pull/138577) to CFI check codegen. Updates the tests from https://github.com/llvm/llvm-project/pull/139149. A s

[clang] [HLSL] Add various overloads for MiniEngine (PR #139800)

2025-05-13 Thread Ashley Coleman via cfe-commits
@@ -179,3 +179,41 @@ half3 test_lerp_half_scalar(half3 x, half3 y, half s) { return lerp(x, y, s); } float3 test_lerp_float_scalar(float3 x, float3 y, float s) { return lerp(x, y, s); } + +// CHECK: define [[FNATTRS]] <2 x float> @_Z23test_lerp_float_scalar1Dv2_ff( +// CHECK

[clang] [HLSL] Add various overloads for MiniEngine (PR #139800)

2025-05-13 Thread Ashley Coleman via cfe-commits
@@ -236,6 +257,22 @@ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(cosh) _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(degrees) _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(degrees) +//===--===// +// dot builtins overloads +//===--

  1   2   3   4   5   6   >