[clang] 2d81994 - [NFC] Add test from issue 61125

2025-05-06 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-05-07T14:47:24+08:00 New Revision: 2d81994c4a41b950eed9bdee189cba9d00381b58 URL: https://github.com/llvm/llvm-project/commit/2d81994c4a41b950eed9bdee189cba9d00381b58 DIFF: https://github.com/llvm/llvm-project/commit/2d81994c4a41b950eed9bdee189cba9d00381b58.diff LO

[clang] [Clang][CodeGen] Add workaround for old glibc `__PTR_ALIGN` macro (PR #137851)

2025-05-06 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/137851 >From 5b3a9ed3ed2f258a178e0c17891e2d9ae4f21446 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 6 May 2025 17:47:07 +0800 Subject: [PATCH 1/4] [Clang][CodeGen] Enable pointer overflow check for GCC worka

[clang] [Clang][CodeGen] Enable pointer overflow check for GCC workaround (PR #137849)

2025-05-06 Thread Yingwei Zheng via cfe-commits
@@ -4169,10 +4169,10 @@ static Value *emitPointerArithmetic(CodeGenFunction &CGF, // The index is not pointer-sized. // The pointer type is not byte-sized. // - if (BinaryOperator::isNullPointerArithmeticExtension(CGF.getContext(), -

[clang] [sanitizer] Add plumbing for -fsanitize-annotate-debug-info and partly replace '-mllvm -array-bounds-pseudofn' (PR #138577)

2025-05-06 Thread Thurston Dang via cfe-commits
@@ -1228,7 +1228,10 @@ void CodeGenFunction::EmitBoundsCheckImpl(const Expr *E, llvm::Value *Bound, SanitizerScope SanScope(this); llvm::DILocation *CheckDI = Builder.getCurrentDebugLocation(); - if (ClArrayBoundsPseudoFn && CheckDI) { + if ((ClArrayBoundsPseudoFn || --

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-05-06 Thread via cfe-commits
@@ -0,0 +1,109 @@ +//===--- Cygwin.cpp - Cygwin ToolChain Implementations --*- C++ -*-===// jeremyd2019 wrote: Like so? https://github.com/llvm/llvm-project/pull/135691 ___ cfe-commits mailing list cfe-commits

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

2025-05-06 Thread via cfe-commits
@@ -6,89 +6,121 @@ void test() { int i = 0; int j = 0; int k = 0; - int c = 10; - int a[c]; + constexpr int c = 10; + int a[c]; // Make 'c' constexpr to avoid variable-length array warnings. - [i,j] { return i; }; + [i] { return i; }; // CHECK: [i] { return i;

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

2025-05-06 Thread via cfe-commits
@@ -598,7 +598,7 @@ struct S1 { }; void foo1() { - auto s0 = S1([name=]() {}); // expected-error {{expected expression}} + auto s0 = S1([]() {}); // Remove invalid capture, no diagnostic expected cor3ntin wrote: @charan-003 https://github.com/llvm/llvm-pr

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

2025-05-06 Thread via cfe-commits
@@ -1255,22 +1255,24 @@ static void tryConsumeLambdaSpecifierToken(Parser &P, DeclEndLoc = SpecifierLoc; }; - while (true) { + // Process lambda specifiers until an invalid token is found + while (P.getCurToken().isOneOf(tok::kw_mutable, tok::kw_static, +

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-05-06 Thread via cfe-commits
https://github.com/jeremyd2019 updated https://github.com/llvm/llvm-project/pull/135691 >From 949ec2a683faf53652b21a4c90206befa498bf4e Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Mon, 14 Apr 2025 10:37:59 -0700 Subject: [PATCH 1/4] [Clang] [Driver] add a Cygwin ToolChain Add a new Cygwin

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-05-06 Thread via cfe-commits
@@ -2632,6 +2632,27 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( return; } + if (TargetTriple.isWindowsCygwinEnvironment()) { +static const char *const CygwinX86Triples[] = {"i686-pc-cygwin", +

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-05-06 Thread via cfe-commits
https://github.com/jeremyd2019 updated https://github.com/llvm/llvm-project/pull/135691 >From 949ec2a683faf53652b21a4c90206befa498bf4e Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Mon, 14 Apr 2025 10:37:59 -0700 Subject: [PATCH 1/3] [Clang] [Driver] add a Cygwin ToolChain Add a new Cygwin

[clang] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments option (PR #137544)

2025-05-06 Thread via cfe-commits
rmarker wrote: It seems like `BinPackParameters` is currently applying to both regular parameters and also template parameters. I think it would be inconsistent if it stopped applying to template parameters only when set to `AlwaysOnePerLine`. What about separating it out into `BinPackTemplate

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

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

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-06 Thread Jacques Pienaar via cfe-commits
https://github.com/jpienaar approved this pull request. https://github.com/llvm/llvm-project/pull/138174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver] Reject -mcmodel=tiny on X86 (PR #125643)

2025-05-06 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/125643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver] Reject -mcmodel=tiny on X86 (PR #125643)

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

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-05-06 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,109 @@ +//===--- Cygwin.cpp - Cygwin ToolChain Implementations --*- C++ -*-===// MaskRay wrote: In new code, can remove the comments per the updated https://llvm.org/docs/CodingStandards.html#file-headers https://github.com/llvm/llvm-project

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-05-06 Thread Fangrui Song via cfe-commits
@@ -2632,6 +2632,27 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( return; } + if (TargetTriple.isWindowsCygwinEnvironment()) { +static const char *const CygwinX86Triples[] = {"i686-pc-cygwin", +

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-05-06 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: LGTM. But I hope folks more familiar with Windows can take a look. Can you describe the support triples in the description and state why we need the msys ones? (Wow, MSYS and Cygwin... familiar names! I used them back in 2009, but then I made the switch to

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

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

[clang] [lldb] [clang] Add `__ptrauth_restricted_intptr` qualifier (PR #137580)

2025-05-06 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/137580 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[clang-tools-extra] 5d305b6 - [clang-tools-extra] Remove redundant calls to std::unique_ptr::get (NFC) (#138774)

2025-05-06 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-06T20:16:54-07:00 New Revision: 5d305b618f3f58a7bbe8340ba88228591d07 URL: https://github.com/llvm/llvm-project/commit/5d305b618f3f58a7bbe8340ba88228591d07 DIFF: https://github.com/llvm/llvm-project/commit/5d305b618f3f58a7bbe8340ba88228591d07.diff L

[clang] [clang-format] Correctly annotate ObjC `* __autoreleasing *` (PR #138799)

2025-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fix #138484 --- Full diff: https://github.com/llvm/llvm-project/pull/138799.diff 3 Files Affected: - (modified) clang/lib/Format/FormatToken.h (+8) - (modified) clang/lib/Format/TokenAnnotator.cpp (+2-1

[clang] [clang-format] Correctly annotate ObjC `* __autoreleasing *` (PR #138799)

2025-05-06 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/138799 Fix #138484 >From ec9f832cedf7abd4d90d8cf3dca45ee128b922a9 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 6 May 2025 20:13:26 -0700 Subject: [PATCH] [clang-format] Correctly annotate ObjC `* __autoreleasing

[clang-tools-extra] [clang-tools-extra] Remove redundant calls to std::unique_ptr::get (NFC) (PR #138774)

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

[clang-tools-extra] 796652d - [clang-doc] Track Descriptions and TypeDeclaration for types (#138058)

2025-05-06 Thread via cfe-commits
Author: Paul Kirth Date: 2025-05-06T20:16:17-07:00 New Revision: 796652dfc198c228b0d917be05ae69073e6c540c URL: https://github.com/llvm/llvm-project/commit/796652dfc198c228b0d917be05ae69073e6c540c DIFF: https://github.com/llvm/llvm-project/commit/796652dfc198c228b0d917be05ae69073e6c540c.diff LO

[clang-tools-extra] [clang-doc] Add Mustache template assets (PR #138059)

2025-05-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/138059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add Mustache template assets (PR #138059)

2025-05-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/138059 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang-tools-extra] [clang-doc] Track Descriptions and TypeDeclaration for types (PR #138058)

2025-05-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/138058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Track Descriptions and TypeDeclaration for types (PR #138058)

2025-05-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/138058 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang-tools-extra] [clang-doc] Track Descriptions and TypeDeclaration for types (PR #138058)

2025-05-06 Thread Paul Kirth via cfe-commits
ilovepi wrote: ### Merge activity * **May 6, 11:12 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/138058). https://github.com/llvm/llvm-project/pull/138058

[clang] [llvm] [sancov] Introduce optional callback for stack-depth tracking (PR #138323)

2025-05-06 Thread Kees Cook via cfe-commits
@@ -1078,22 +1091,65 @@ void ModuleSanitizerCoverage::InjectCoverageAtBlock(Function &F, BasicBlock &BB, Store->setNoSanitizeMetadata(); } if (Options.StackDepth && IsEntryBB && !IsLeafFunc) { -// Check stack depth. If it's the deepest so far, record it. Modu

[clang] [sanitizer] Add plumbing for -fsanitize-annotate-debug-info and partly replace '-mllvm -array-bounds-pseudofn' (PR #138577)

2025-05-06 Thread Thurston Dang via cfe-commits
thurstond wrote: > Seems like the fsanitize test is failing now Fixed https://github.com/llvm/llvm-project/pull/138577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [sancov] Introduce optional callback for stack-depth tracking (PR #138323)

2025-05-06 Thread Kees Cook via cfe-commits
@@ -158,6 +158,7 @@ struct SanitizerCoverageOptions { bool PCTable = false; bool NoPrune = false; bool StackDepth = false; + int StackDepthCallbackMin = 0; kees wrote: Yeah, I wasn't sure if I should keep it with the other StackDepth var. I've moved it

[clang] [clang] Function type attribute to prevent CFI instrumentation (PR #135836)

2025-05-06 Thread via cfe-commits
https://github.com/PiJoules updated https://github.com/llvm/llvm-project/pull/135836 >From fc0a5f17e670818c08ceefc68887902dc7bc7984 Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Wed, 9 Apr 2025 14:21:00 -0700 Subject: [PATCH] [clang] Function type attribute to prevent CFI instrumentation

[clang] [llvm] [HIP][HIPSTDPAR] Re-work allocation interposition for `hipstdpar` (PR #138790)

2025-05-06 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx created https://github.com/llvm/llvm-project/pull/138790 The allocation interposition mode had a number of issues, which are primarily addressed in the library component via . However, it is necessary to interpose some add

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-05-06 Thread Deepak Eachempati via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [clang] Function type attribute to prevent CFI instrumentation (PR #135836)

2025-05-06 Thread via cfe-commits
PiJoules wrote: Ok rather than making the attr its own AST node, I found it much simpler to make it part of the function type. Rather than adding it to `FunctionTypeExtraBitfields` I instead added it to `ExtInfo`. I did since it looks like if I wanted to add a bit to `FunctionTypeExtraBitfield

[clang] [llvm] [HIP][HIPSTDPAR] Re-work allocation interposition for `hipstdpar` (PR #138790)

2025-05-06 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/138790 >From 865ff3dff1833607f0d546ab0ebd95b98a8ed71b Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Wed, 7 May 2025 01:25:17 +0100 Subject: [PATCH 1/2] Re-work allocation interposition for `hipstdpar`. --- clang/do

[clang] [llvm] [HIP][HIPSTDPAR] Re-work allocation interposition for `hipstdpar` (PR #138790)

2025-05-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions c,cpp -- clang/lib/Frontend/InitPreprocessor.cpp clang/test

[clang] [clang] Function type attribute to prevent CFI instrumentation (PR #135836)

2025-05-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp,h,c -- clang/test/CodeGen/cfi-unchecked-callee-attribute

[clang] [llvm] [HIP][HIPSTDPAR] Re-work allocation interposition for `hipstdpar` (PR #138790)

2025-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-transforms Author: Alex Voicu (AlexVlx) Changes The allocation interposition mode had a number of issues, which are primarily addressed in the library component via ;. However,

[clang] [clang] Function type attribute to prevent CFI instrumentation (PR #135836)

2025-05-06 Thread via cfe-commits
https://github.com/PiJoules updated https://github.com/llvm/llvm-project/pull/135836 >From d90d4a95a3205e8eda1ce1bd28e97e2950580b44 Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Wed, 9 Apr 2025 14:21:00 -0700 Subject: [PATCH] [clang] Function type attribute to prevent CFI instrumentation

[clang] [Clang][CMake] use CMakePushCheckState (PR #138783)

2025-05-06 Thread via cfe-commits
https://github.com/jeremyd2019 created https://github.com/llvm/llvm-project/pull/138783 The previous approach of using list(REMOVE ...) would remove *all* occurences of the given item, not just the one appended above. Rate limit · GitHub body { b

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
cassiebeckley wrote: Done. https://github.com/llvm/llvm-project/pull/134034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Handle invalid variable template specialization whose type depends on itself (PR #134522)

2025-05-06 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Yes. Please help me merge this PR. Thank you for your review! https://github.com/llvm/llvm-project/pull/134522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Handle invalid variable template specialization whose type depends on itself (PR #134522)

2025-05-06 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/134522 >From ccab3dc1f18ffeda9acb07c0bd5f80f65cc788b9 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Sun, 6 Apr 2025 15:06:56 +0800 Subject: [PATCH 1/4] Handle invalid variable template specialization whose type depend

[clang] 1897023 - [AMDGPU] Fix gfx1201 check line in the amdgpu-features.cl. NFC. (#138743)

2025-05-06 Thread via cfe-commits
Author: Stanislav Mekhanoshin Date: 2025-05-06T17:05:44-07:00 New Revision: 189702326a3a4c9072e346a8197913a4d968cbe3 URL: https://github.com/llvm/llvm-project/commit/189702326a3a4c9072e346a8197913a4d968cbe3 DIFF: https://github.com/llvm/llvm-project/commit/189702326a3a4c9072e346a8197913a4d968cb

[clang] [AMDGPU] Fix gfx1201 check line in the amdgpu-features.cl. NFC. (PR #138743)

2025-05-06 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec closed https://github.com/llvm/llvm-project/pull/138743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS (PR #138587)

2025-05-06 Thread via cfe-commits
jeremyd2019 wrote: Also, should all of those projects be updated in one pull request, or do I need to open a half-dozen more? https://github.com/llvm/llvm-project/pull/138587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [Clang][CMake] use CMakePushCheckState (PR #138783)

2025-05-06 Thread via cfe-commits
jeremyd2019 wrote: split from #138587 - requesting review from @petrhosek https://github.com/llvm/llvm-project/pull/138783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CMake] use CMakePushCheckState (PR #138783)

2025-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (jeremyd2019) Changes The previous approach of using list(REMOVE ...) would remove *all* occurences of the given item, not just the one appended above. --- Full diff: https://github.com/llvm/llvm-project/pull/138783.diff 1 Files Af

[clang-tools-extra] [clang-tools-extra] Remove redundant calls to std::unique_ptr::get (NFC) (PR #138774)

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

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -3332,6 +3388,39 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, } return HasNoTypeMember; } + + case BTK__hlsl_spirv_type: { +assert(Converted.size() == 4); + +if (!Context.getTargetInfo().getTriple().isSPIRV()) { + SemaRef.Di

[clang] [clang-tools-extra] [lldb] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-05-06 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/132853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 32fb8c5 - [clang][modules] Lazily load by name lookups in module maps (#132853)

2025-05-06 Thread via cfe-commits
Author: Michael Spencer Date: 2025-05-06T16:40:01-07:00 New Revision: 32fb8c5f5fdeb20de28846e2fe9e2c7525f62086 URL: https://github.com/llvm/llvm-project/commit/32fb8c5f5fdeb20de28846e2fe9e2c7525f62086 DIFF: https://github.com/llvm/llvm-project/commit/32fb8c5f5fdeb20de28846e2fe9e2c7525f62086.dif

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -0,0 +1,68 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \ +// RUN: -o - | FileCheck %s + +template +using Array = vk::SpirvOpaqueType>; + +template +using ArrayBuffer = Array, Size

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.0-compute %s \ +// RUN: -fsyntax-only -verify + +typedef vk::SpirvType<12, 2, 4, float> InvalidType1; // expected-error {{use of undeclared identifier 'vk'}} +vk::Li

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
cassiebeckley wrote: Done. https://github.com/llvm/llvm-project/pull/134034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
cassiebeckley wrote: Done. https://github.com/llvm/llvm-project/pull/134034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.0-compute %s \ +// RUN: -fsyntax-only -verify + +typedef vk::SpirvType<12, 2, 4, float> InvalidType1; // expected-error {{use of undeclared identifier 'vk'}} +vk::Li

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -369,14 +369,102 @@ llvm::Type *CommonSPIRTargetCodeGenInfo::getOpenCLType(CodeGenModule &CGM, return nullptr; } +// Gets a spirv.IntegralConstant or spirv.Literal. If IntegralType is present, +// returns an IntegralConstant, otherwise returns a Literal. +static llvm::Ty

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -369,14 +369,102 @@ llvm::Type *CommonSPIRTargetCodeGenInfo::getOpenCLType(CodeGenModule &CGM, return nullptr; } +// Gets a spirv.IntegralConstant or spirv.Literal. If IntegralType is present, +// returns an IntegralConstant, otherwise returns a Literal. +static llvm::Ty

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -1832,6 +1832,48 @@ ExpectedType clang::ASTNodeImporter::VisitHLSLAttributedResourceType( ToWrappedType, ToContainedType, ToAttrs); } +ExpectedType clang::ASTNodeImporter::VisitHLSLInlineSpirvType( +const clang::HLSLInlineSpirvType *T) { + Error Err = Error::suc

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -877,6 +878,11 @@ bool CodeGenTypes::isZeroInitializable(QualType T) { if (const MemberPointerType *MPT = T->getAs()) return getCXXABI().isZeroInitializable(MPT); + // HLSL Inline SPIR-V types are non-zero-initializable. + if (T->getAs()) { +return false; + } -

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -5444,6 +5459,31 @@ QualType ASTContext::getHLSLAttributedResourceType( return QualType(Ty, 0); } + +QualType ASTContext::getHLSLInlineSpirvType(uint32_t Opcode, uint32_t Size, +uint32_t Alignment, +

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -11763,6 +11804,22 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS, bool OfBlockPointer, return LHS; return {}; } + case Type::HLSLInlineSpirv: +const HLSLInlineSpirvType *LHSTy = LHS->castAs(); +const HLSLInlineSpirvType *RHSTy = RHS->cas

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -3228,6 +3228,62 @@ static QualType builtinCommonTypeImpl(Sema &S, TemplateName BaseTemplate, } } +static bool isInVkNamespace(const RecordType *RT) { + DeclContext *DC = RT->getDecl()->getDeclContext(); + if (!DC) +return false; + + NamespaceDecl *ND = dyn_cast(D

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -3228,6 +3228,62 @@ static QualType builtinCommonTypeImpl(Sema &S, TemplateName BaseTemplate, } } +static bool isInVkNamespace(const RecordType *RT) { + DeclContext *DC = RT->getDecl()->getDeclContext(); + if (!DC) +return false; + + NamespaceDecl *ND = dyn_cast(D

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -0,0 +1,28 @@ +//===- hlsl_spirv.h - HLSL definitions for SPIR-V target --===// +// +// 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] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -6165,6 +6254,18 @@ bool UnnamedLocalNoLinkageFinder::VisitHLSLAttributedResourceType( return Visit(T->getWrappedType()); } +bool UnnamedLocalNoLinkageFinder::VisitHLSLInlineSpirvType( +const HLSLInlineSpirvType *T) { + for (auto &Operand : T->getOperands()) { +

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -6330,6 +6331,140 @@ class HLSLAttributedResourceType : public Type, public llvm::FoldingSetNode { findHandleTypeOnResource(const Type *RT); }; +/// Instances of this class represent operands to a SPIR-V type instruction. +class SpirvOperand { +public: + enum SpirvOpera

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -3332,6 +3388,39 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, } return HasNoTypeMember; } + + case BTK__hlsl_spirv_type: { +assert(Converted.size() == 4); + +if (!Context.getTargetInfo().getTriple().isSPIRV()) { + SemaRef.Di

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -6330,6 +6331,140 @@ class HLSLAttributedResourceType : public Type, public llvm::FoldingSetNode { findHandleTypeOnResource(const Type *RT); }; +/// Instances of this class represent operands to a SPIR-V type instruction. +class SpirvOperand { +public: + enum SpirvOpera

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
@@ -6330,6 +6331,140 @@ class HLSLAttributedResourceType : public Type, public llvm::FoldingSetNode { findHandleTypeOnResource(const Type *RT); }; +/// Instances of this class represent operands to a SPIR-V type instruction. +class SpirvOperand { +public: + enum SpirvOpera

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-06 Thread Cassandra Beckley via cfe-commits
https://github.com/cassiebeckley updated https://github.com/llvm/llvm-project/pull/134034 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-05-06 Thread Eli Friedman via cfe-commits
@@ -486,6 +486,39 @@ ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty, bool IsVariadicFn, } Size = llvm::alignTo(Size, Alignment); +// If the Aggregate is made up of pointers, use an array of pointers for the +// coerced type. This prevents having

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-05-06 Thread Eli Friedman via cfe-commits
@@ -486,6 +486,39 @@ ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty, bool IsVariadicFn, } Size = llvm::alignTo(Size, Alignment); +// If the Aggregate is made up of pointers, use an array of pointers for the +// coerced type. This prevents having

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-05-06 Thread Eli Friedman via cfe-commits
@@ -486,6 +486,39 @@ ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty, bool IsVariadicFn, } Size = llvm::alignTo(Size, Alignment); +// If the Aggregate is made up of pointers, use an array of pointers for the +// coerced type. This prevents having

[clang] [clang-tools-extra] [lldb] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-05-06 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Test change LGTM, I was probably trying to get to a minimal test-case and ended up with something that was relying on implementation details. https://github.com/llvm/llvm-project/pull/132853 ___ cfe-commits mailing list cfe-commits

[clang] [llvm] [sancov] Introduce optional callback for stack-depth tracking (PR #138323)

2025-05-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/138323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [StaticAnalyzer] Make it a noop when initializing a field of empty record (PR #138594)

2025-05-06 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/138594 >From 4e6f2ce82744322a35614532732281eacb2fe79a Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Mon, 5 May 2025 14:27:48 -0700 Subject: [PATCH 1/2] [StaticAnalyzer] Make it a noop when initializing a field

[clang-tools-extra] [clang-doc] Add regression test for test comments in macros (PR #132510)

2025-05-06 Thread via cfe-commits
github-actions[bot] wrote: @ZhongUncle 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 bui

[clang-tools-extra] a63fd59 - [clang-doc] Add regression test for test comments in macros (#132510)

2025-05-06 Thread via cfe-commits
Author: ZhongUncle Date: 2025-05-06T16:00:02-07:00 New Revision: a63fd59d95397d236b03e964287728a35efa296b URL: https://github.com/llvm/llvm-project/commit/a63fd59d95397d236b03e964287728a35efa296b DIFF: https://github.com/llvm/llvm-project/commit/a63fd59d95397d236b03e964287728a35efa296b.diff LO

[clang-tools-extra] [clang-doc] Add regression test for test comments in macros (PR #132510)

2025-05-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/132510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add regression test for test comments in macros (PR #132510)

2025-05-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. https://github.com/llvm/llvm-project/pull/132510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-05-06 Thread Justin Cai via cfe-commits
@@ -338,6 +382,87 @@ static Error runSPIRVCodeGen(StringRef File, const ArgList &Args, return Error::success(); } +/// Run AOT compilation for Intel CPU. +/// Calls opencl-aot tool to generate device code for Intel CPU backend. jzc wrote: Changed to `Calls

[clang] [Cygwin] Export global symbols, template instantiations, RTTI and VTable are exported correctly (PR #138773)

2025-05-06 Thread Tomohiro Kashiwada via cfe-commits
https://github.com/kikairoya edited https://github.com/llvm/llvm-project/pull/138773 ___ 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] Remove redundant calls to std::unique_ptr::get (NFC) (PR #138774)

2025-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/138774.diff 2 Files Affected: - (modified) clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp (+3-4) - (modified) clang-tools-ex

[clang-tools-extra] [clang-tools-extra] Remove redundant calls to std::unique_ptr::get (NFC) (PR #138774)

2025-05-06 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/138774 None >From a524a8098d5a513259d0d82b262d4b5a769d4d1f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 6 May 2025 15:20:38 -0700 Subject: [PATCH] [clang-tools-extra] Remove redundant calls to std::un

[clang] [sanitizer] Add plumbing for -fsanitize-annotate-debug-info and partly replace '-mllvm -array-bounds-pseudofn' (PR #138577)

2025-05-06 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/138577 >From 1cb28ef0b3313c3fd60667cc7928f0fed8d1838a Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Mon, 5 May 2025 20:11:09 + Subject: [PATCH 1/9] [sanitizer] Add plumbing for -fsanitize-add-pseudo-functio

[clang] [clang-sycl-linker] Add AOT compilation support for Intel GPUs/CPUs (PR #133194)

2025-05-06 Thread Justin Cai via cfe-commits
https://github.com/jzc edited https://github.com/llvm/llvm-project/pull/133194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][SYCL] Add AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-05-06 Thread Justin Cai via cfe-commits
@@ -440,9 +570,15 @@ int main(int argc, char **argv) { DryRun = Args.hasArg(OPT_dry_run); SaveTemps = Args.hasArg(OPT_save_temps); - OutputFile = "a.out"; - if (Args.hasArg(OPT_o)) -OutputFile = Args.getLastArgValue(OPT_o); + IsAOTCompileNeeded = IsIntelOffloadArch(

[clang] [Cygwin] Export global symbols, template instantiations, RTTI and VTable are exported correctly (PR #138773)

2025-05-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tomohiro Kashiwada (kikairoya) Changes MinGW-GCC and MinGW-Clang exports these symbols. Cygwin-GCC also exports them, so Cygwin-Clang should do so. Some of tests have new DAG pattern because i686-cygwin don't use __thiscall but __cdecl fo

[clang] [Cygwin] Export global symbols, template instantiations, RTTI and VTable are exported correctly (PR #138773)

2025-05-06 Thread Tomohiro Kashiwada via cfe-commits
https://github.com/kikairoya created https://github.com/llvm/llvm-project/pull/138773 MinGW-GCC and MinGW-Clang exports these symbols. Cygwin-GCC also exports them, so Cygwin-Clang should do so. Some of tests have new DAG pattern because i686-cygwin don't use __thiscall but __cdecl for member

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-06 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: > So I don't believe this is correct either. We want it to always say the > namespace. So clang::unknown will diagnose as unknown attribute > 'clang::unknown' ignored @erichkeane @AaronBallman Thanks for the feedback. I've made changes to include the _scope_ in the diagnost

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-06 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/138519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-05-06 Thread Alexey Bataev via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [Clang][CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS (PR #138587)

2025-05-06 Thread via cfe-commits
jeremyd2019 wrote: > I agree that the second change, that is using `LLVMConfig.cmake`'s > `LLVM_DEFINITIONS`, should be applied to other projects that support > standalone builds like LLD. Is there a list somewhere or do I just rely on my grep-foo? * bolt * clang * flang * lld * lldb * mlir g

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-06 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/138519 >From cbbca4d26b8d00eb103f110c2341fab2e4a2e40d Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Mon, 5 May 2025 15:30:14 +0300 Subject: [PATCH] [Clang] diagnose unknown attribute namespaces --- clang

  1   2   3   4   >