[clang] [Clang][Cygwin] Remove erroneous _WIN32 define and clean up Cygwin code (PR #138120)

2025-05-02 Thread Mateusz Mikuła via cfe-commits
mati865 wrote: Looks good, thanks. https://github.com/llvm/llvm-project/pull/138120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Refactor IntType constraints (PR #138106)

2025-05-02 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-no-asserts` running on `doug-worker-6` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/202/builds/1014

[clang] [OpenACC] Implement better dupe catching for device_type clauses (PR #138196)

2025-05-02 Thread via cfe-commits
@@ -335,29 +335,103 @@ class SemaOpenACCClauseVisitor { // For 'tile' and 'collapse', only allow 1 per 'device_type'. // Also applies to num_worker, num_gangs, vector_length, and async. + // This does introspection into the actual device-types to prevent duplicates + //

[clang] [OpenACC] Implement better dupe catching for device_type clauses (PR #138196)

2025-05-02 Thread via cfe-commits
@@ -335,29 +335,103 @@ class SemaOpenACCClauseVisitor { // For 'tile' and 'collapse', only allow 1 per 'device_type'. // Also applies to num_worker, num_gangs, vector_length, and async. + // This does introspection into the actual device-types to prevent duplicates + //

[clang] 8b752b9 - [clang] Add test for QualTypes in template class NNS (#137804)

2025-05-02 Thread via cfe-commits
Author: Jonas Hahnfeld Date: 2025-05-02T09:04:03+02:00 New Revision: 8b752b9874489229e4afceadd958fdc9ff7a2edb URL: https://github.com/llvm/llvm-project/commit/8b752b9874489229e4afceadd958fdc9ff7a2edb DIFF: https://github.com/llvm/llvm-project/commit/8b752b9874489229e4afceadd958fdc9ff7a2edb.diff

[clang] [clang] Add test for QualTypes in template class NNS (PR #137804)

2025-05-02 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo closed https://github.com/llvm/llvm-project/pull/137804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

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

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2025-05-02 Thread via cfe-commits
cor3ntin wrote: @ldionne Feel free to reopen, but I will close that to avoid duplicates. https://github.com/llvm/llvm-project/pull/120149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang-format] RemoveParentheses shouldn't remove empty parentheses (PR #138229)

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

[clang] [clang-format] Fix a crash on formatting missing r_paren/r_brace (PR #138230)

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

[clang] [CIR] Refactor IntType constraints (PR #138106)

2025-05-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/138106 >From 4e5819cf7c8e0eb2ca4e2ab354a17d1fce67dafe Mon Sep 17 00:00:00 2001 From: xlauko Date: Thu, 1 May 2025 12:32:12 +0200 Subject: [PATCH] [CIR] Refactor IntType constraints - Adds `CIR_` prefixes to integer typ

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #138234)

2025-05-02 Thread via cfe-commits
@@ -1366,6 +1366,15 @@ ToolChain::CXXStdlibType ToolChain::GetCXXStdlibType(const ArgList &Args) const{ return *cxxStdlibType; } +/// Utility function to add a system framework directory to CC1 arguments. +/*static*/ void cor3ntin wrote: ```suggestion void

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #138234)

2025-05-02 Thread via cfe-commits
@@ -1,13 +0,0 @@ -// RUN: %clang -cc1 -fcuda-is-device -isysroot /var/empty \ cor3ntin wrote: Should we keep this test but set the -isysroot to %S/Inputs/MacOSX15.1.sdk ? https://github.com/llvm/llvm-project/pull/138234 __

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #138234)

2025-05-02 Thread via cfe-commits
@@ -1396,6 +1405,17 @@ void ToolChain::addExternCSystemIncludeIfExists(const ArgList &DriverArgs, addExternCSystemInclude(DriverArgs, CC1Args, Path); } +/// Utility function to add a list of system framework directories to CC1. +/*static*/ void cor3ntin w

[clang] [CIR] Refactor IntType constraints (PR #138106)

2025-05-02 Thread Henrich Lauko via cfe-commits
xlauko wrote: ### Merge activity * **May 2, 3:15 AM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/138106). https://github.com/llvm/llvm-project/pull/138106 __

[clang] [CIR] Refactor floating point type constraints (PR #138112)

2025-05-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/138112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Refactor IntType constraints (PR #138106)

2025-05-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko closed https://github.com/llvm/llvm-project/pull/138106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3f367a6 - [CIR] Refactor IntType constraints (#138106)

2025-05-02 Thread via cfe-commits
Author: Henrich Lauko Date: 2025-05-02T09:15:56+02:00 New Revision: 3f367a65d31a7178e222a7babae7baa0a93ff292 URL: https://github.com/llvm/llvm-project/commit/3f367a65d31a7178e222a7babae7baa0a93ff292 DIFF: https://github.com/llvm/llvm-project/commit/3f367a65d31a7178e222a7babae7baa0a93ff292.diff

[clang] [CIR] Refactor floating point type constraints (PR #138112)

2025-05-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/138112 >From fbbee19aa597583de7740bd293ee8a2ecd65a430 Mon Sep 17 00:00:00 2001 From: xlauko Date: Thu, 1 May 2025 12:48:17 +0200 Subject: [PATCH] [CIR] Refactor floating point type constraints - This cleans up moves ci

[clang] [Clang] Implement CWG3005 Function parameters should never be name-independent (PR #138245)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes We already attempted to implement this (it was the intent of the paper), in that parameters were never considered name-independent. However, we failed to check that any previously found parameter declaration wa

[clang] [Clang] Implement CWG3005 Function parameters should never be name-independent (PR #138245)

2025-05-02 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/138245 We already attempted to implement this (it was the intent of the paper), in that parameters were never considered name-independent. However, we failed to check that any previously found parameter declaration w

[clang] [Clang][AArch64] Add pessimistic vscale_range for sve/sme (PR #137624)

2025-05-02 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau edited https://github.com/llvm/llvm-project/pull/137624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ff8060a - [clang][NFC] Convert `Sema::AssignConvertType` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T12:30:08+03:00 New Revision: ff8060a642377a17a1dfadb865634583cde4e097 URL: https://github.com/llvm/llvm-project/commit/ff8060a642377a17a1dfadb865634583cde4e097 DIFF: https://github.com/llvm/llvm-project/commit/ff8060a642377a17a1dfadb865634583cde4e097.

[clang] [llvm] [NFC] Fix c++ style comment in c file (PR #138244)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support @llvm/pr-subscribers-clang Author: Björn Pettersson (bjope) Changes Fix "C++ style comments are not allowed in ISO C90" warnings in some C files. --- Full diff: https://github.com/llvm/llvm-project/pull/138244.diff 2 Files Affected: - (m

[clang] [Clang][AArch64] Add pessimistic vscale_range for sve/sme (PR #137624)

2025-05-02 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/137624 >From 9bed3ae2f1bb98fc6f53a17cca98da4b1562e1a7 Mon Sep 17 00:00:00 2001 From: Matthew Devereau Date: Wed, 23 Apr 2025 12:27:02 + Subject: [PATCH 1/4] [Clang][AArch64] Add pessimistic vscale_range when sve

[clang] 461255e - [clang][NFC] Convert `Sema::AllocationFunctionScope` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T12:38:52+03:00 New Revision: 461255e0c17265141009437ba3887f49f9838a40 URL: https://github.com/llvm/llvm-project/commit/461255e0c17265141009437ba3887f49f9838a40 DIFF: https://github.com/llvm/llvm-project/commit/461255e0c17265141009437ba3887f49f9838a40.

[clang] c0917ab - [clang][NFC] Convert `Sema::IfExistsResult` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T13:05:37+03:00 New Revision: c0917ab2e1cf603c3746f519fe1826869767bd8b URL: https://github.com/llvm/llvm-project/commit/c0917ab2e1cf603c3746f519fe1826869767bd8b DIFF: https://github.com/llvm/llvm-project/commit/c0917ab2e1cf603c3746f519fe1826869767bd8b.

[clang] [Clang][OpenCL][AMDGPU] OpenCL Kernel stubs should be assigned alwaysinline attribute (PR #137769)

2025-05-02 Thread Matt Arsenault via cfe-commits
@@ -6174,6 +6174,19 @@ void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD, CodeGenFunction(*this).GenerateCode(GD, Fn, FI); setNonAliasAttributes(GD, Fn); + + bool ShouldAddOptNone = !CodeGenOpts.DisableO0ImplyOptNone && + (CodeGenOpt

[clang] 4ba2778 - [clang][NFC] Convert `Sema::CorrectTypoKind` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T13:20:41+03:00 New Revision: 4ba27780d34916d4a856e6593035b15a5cace56e URL: https://github.com/llvm/llvm-project/commit/4ba27780d34916d4a856e6593035b15a5cace56e DIFF: https://github.com/llvm/llvm-project/commit/4ba27780d34916d4a856e6593035b15a5cace56e.

[clang] [Clang][OpenCL][AMDGPU] OpenCL Kernel stubs should be assigned alwaysinline attribute (PR #137769)

2025-05-02 Thread Aniket Lal via cfe-commits
@@ -6174,6 +6174,19 @@ void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD, CodeGenFunction(*this).GenerateCode(GD, Fn, FI); setNonAliasAttributes(GD, Fn); + + bool ShouldAddOptNone = !CodeGenOpts.DisableO0ImplyOptNone && + (CodeGenOpt

[clang] [Clang] Implement CWG3005 Function parameters should never be name-independent (PR #138245)

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'm not going to bother you with the description of what I want to see in this file. Here you go: ```cpp // RUN: %clang_cc1 -std=c++98 -pedantic-errors -verify=expected %s // RUN: %clang_cc1 -std=c++11 -pedantic-errors -verify=expected %s // RUN:

[clang] [llvm] Reland: [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #136046)

2025-05-02 Thread David Spickett via cfe-commits
DavidSpickett wrote: I've [disabled](https://github.com/llvm/llvm-project/commit/f7fdc8d0cf7cd5caa7d463e1e80e0d5a08c71bb2) the test when threads are disabled. I don't think it needs to be limited to Apple Silicon actually, because a new OS thread should pass the test (and apparently does). Bu

[clang] [Clang] Fix handling of reference types in tryEvaluateBuiltinObjectSize (PR #138247)

2025-05-02 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/138247 The order of operation was slightly incorrect, as we were checking for incomplete types *before* handling reference types. Fixes #129397 >From 3248349d04e756c0f4b9418025ac66476ace5807 Mon Sep 17 00:00:00 2001

[clang] [Clang] Fix handling of reference types in tryEvaluateBuiltinObjectSize (PR #138247)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes The order of operation was slightly incorrect, as we were checking for incomplete types *before* handling reference types. Fixes #129397 --- Full diff: https://github.com/llvm/llvm-project/pull/138247.diff 3

[clang] cf2f13a - [clang][NFC] Convert `Sema::CCEKind` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T14:01:40+03:00 New Revision: cf2f13a867fb86b5c7ce33df8a569477dce71f4f URL: https://github.com/llvm/llvm-project/commit/cf2f13a867fb86b5c7ce33df8a569477dce71f4f DIFF: https://github.com/llvm/llvm-project/commit/cf2f13a867fb86b5c7ce33df8a569477dce71f4f.

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-05-02 Thread Jay Foad via cfe-commits
@@ -2641,6 +2641,28 @@ def int_amdgcn_perm : // GFX9 Intrinsics //===--===// +/// This is a general-purpose intrinsic for all operations that take a pointer +/// a base location in LDS, and a data size and us

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

2025-05-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/138174 >From 705699c4b1772915f6d8773ce786d5601de0a926 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 30 Apr 2025 23:47:37 -0700 Subject: [PATCH] [NFC][Support] Add llvm::uninitialized_copy Add `llvm::uninitiali

[libunwind] [libunwind] [SEH] Implement parsing of ARM pdata/xdata (PR #137950)

2025-05-02 Thread Jacek Caban via cfe-commits
Martin =?utf-8?q?Storsjö?= Message-ID: In-Reply-To: @@ -2064,6 +2077,51 @@ bool UnwindCursor::getInfoFromSEH(pint_t pc) { } } } +#elif defined(_LIBUNWIND_TARGET_ARM) cjacek wrote: Given how similar the code is to the aarch64 version, it's a bit

[clang] [llvm] [mlir] [ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (PR #138251)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Nikita Popov (nikic) Changes This implements the result of the discussion at: https://discourse.llvm.org/t/rfc-report-fatal-error-and-the-default-value-of-gencrashdialog/73587 There are two different use cases for report_fatal_err

[clang] [llvm] [mlir] [ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (PR #138251)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikita Popov (nikic) Changes This implements the result of the discussion at: https://discourse.llvm.org/t/rfc-report-fatal-error-and-the-default-value-of-gencrashdialog/73587 There are two different use cases for report_fatal_error, so re

[clang] [llvm] [mlir] [ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (PR #138251)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Nikita Popov (nikic) Changes This implements the result of the discussion at: https://discourse.llvm.org/t/rfc-report-fatal-error-and-the-default-value-of-gencrashdialog/73587 There are two different use cases for report_fatal_err

[clang] [llvm] [mlir] [ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (PR #138251)

2025-05-02 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/138251 This implements the result of the discussion at: https://discourse.llvm.org/t/rfc-report-fatal-error-and-the-default-value-of-gencrashdialog/73587 There are two different use cases for report_fatal_error, so repla

[clang] [llvm] [mlir] [ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (PR #138251)

2025-05-02 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/lib/AST/ExternalASTSource.cpp clang/tools/cl

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

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

[clang] 3d4f979 - [C] Allow __attribute__((nonstring)) on multidimensional arrays (#138133)

2025-05-02 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-05-02T07:19:36-04:00 New Revision: 3d4f979e271d2a1fe0906f4d1b16db108838f98f URL: https://github.com/llvm/llvm-project/commit/3d4f979e271d2a1fe0906f4d1b16db108838f98f DIFF: https://github.com/llvm/llvm-project/commit/3d4f979e271d2a1fe0906f4d1b16db108838f98f.diff

[clang] [C] Allow __attribute__((nonstring)) on multidimensional arrays (PR #138133)

2025-05-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/138133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 85c8100 - [C] Diagnose use of C++ keywords in C (#137234)

2025-05-02 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-05-02T07:20:02-04:00 New Revision: 85c810060e1a2a90dc4ec184b4c4275db17ef28f URL: https://github.com/llvm/llvm-project/commit/85c810060e1a2a90dc4ec184b4c4275db17ef28f DIFF: https://github.com/llvm/llvm-project/commit/85c810060e1a2a90dc4ec184b4c4275db17ef28f.diff

[clang] [llvm] Reland: [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #136046)

2025-05-02 Thread David Spickett via cfe-commits
DavidSpickett wrote: That build sets `-DLLVM_ENABLE_THREADS=OFF`. `LLVM_HAS_SPLIT_STACKS_AARCH64` and `LLVM_HAS_SPLIT_STACKS` are false, which means we use: ``` void llvm::runOnNewStack(unsigned StackSize, function_ref Fn) { llvm::thread Thread( StackSize == 0 ? std::nullopt : std::optio

[clang] [llvm] Reland: [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #136046)

2025-05-02 Thread David Spickett via cfe-commits
DavidSpickett wrote: Same sort of thing on our Armv8 32-bit build: https://lab.llvm.org/buildbot/#/builders/122/builds/1478 ``` ../llvm/llvm/unittests/Support/ProgramStackTest.cpp:32 Expected: (StackDistance) > (llvm::sys::Process::getPageSizeEstimate()), actual: 8 vs 4096 ``` https://github.

[clang] [Clang][AArch64] Add pessimistic vscale_range when sve is in target-f… (PR #137624)

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

[clang] [llvm] [NFC] Fix c++ style comment in c file (PR #138244)

2025-05-02 Thread Björn Pettersson via cfe-commits
https://github.com/bjope created https://github.com/llvm/llvm-project/pull/138244 Fix "C++ style comments are not allowed in ISO C90" warnings in some C files. Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; f

[clang] [Clang][AArch64] Add pessimistic vscale_range for sve/sme (PR #137624)

2025-05-02 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau edited https://github.com/llvm/llvm-project/pull/137624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix handling of explicit-`this` functions as template arguments (PR #133748)

2025-05-02 Thread via cfe-commits
@@ -7558,6 +7558,18 @@ ExprResult Sema::BuildExpressionFromDeclTemplateArgument( } else { assert(ParamType->isReferenceType() && "unexpected type for decl template argument"); + +if (auto *Method = dyn_cast(VD); +Method && Method->isExplicitObjectMe

[clang] [clang] Fix handling of explicit-`this` functions as template arguments (PR #133748)

2025-05-02 Thread via cfe-commits
cor3ntin wrote: @offsetof Are you still working on that? https://github.com/llvm/llvm-project/pull/133748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenCL][AMDGPU] OpenCL Kernel stubs should be assigned alwaysinline attribute (PR #137769)

2025-05-02 Thread Aniket Lal via cfe-commits
@@ -6174,6 +6174,19 @@ void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD, CodeGenFunction(*this).GenerateCode(GD, Fn, FI); setNonAliasAttributes(GD, Fn); + + bool ShouldAddOptNone = !CodeGenOpts.DisableO0ImplyOptNone && + (CodeGenOpt

[clang] 6e63b68 - [clang][NFC] Convert `Sema::OverloadKind` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T13:44:32+03:00 New Revision: 6e63b68389983194b5007d8d489e74d1ffcea500 URL: https://github.com/llvm/llvm-project/commit/6e63b68389983194b5007d8d489e74d1ffcea500 DIFF: https://github.com/llvm/llvm-project/commit/6e63b68389983194b5007d8d489e74d1ffcea500.

[libunwind] [libunwind] [SEH] Set NonVolatileRegisters before calling a personality function (PR #137951)

2025-05-02 Thread Jacek Caban via cfe-commits
@@ -212,6 +212,11 @@ __libunwind_seh_personality(int version, _Unwind_Action state, ms_exc.ExceptionInformation[2] = state; DISPATCHER_CONTEXT *disp_ctx = __unw_seh_get_disp_ctx((unw_cursor_t *)context); +#if defined(__aarch64__) + disp_ctx->NonVolatileRegisters = (

[libunwind] [libunwind] [SEH] Implement parsing of aarch64 pdata/xdata (PR #137949)

2025-05-02 Thread Jacek Caban via cfe-commits
https://github.com/cjacek approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e4d9be3 - [Clang][AArch64] make bitperm intrinsics available in streaming mode (#129700)

2025-05-02 Thread via cfe-commits
Author: Lukacma Date: 2025-05-02T11:52:09+01:00 New Revision: e4d9be3d1205ddcdc131658409fcfa0f76aa1317 URL: https://github.com/llvm/llvm-project/commit/e4d9be3d1205ddcdc131658409fcfa0f76aa1317 DIFF: https://github.com/llvm/llvm-project/commit/e4d9be3d1205ddcdc131658409fcfa0f76aa1317.diff LOG:

[clang] [Clang][AArch64] make bitperm intrinsics available in streaming mode (PR #129700)

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

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-05-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/137234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (PR #138251)

2025-05-02 Thread Jay Foad via cfe-commits
jayfoad wrote: Thanks for doing this. I like it. Definitely an improvement on the status quo. I would be tempted to go further, and replace all uses of `report_fatal_error`. https://github.com/llvm/llvm-project/pull/138251 ___ cfe-commits mailing list

[clang] [C] Warn on uninitialized const objects (PR #137166)

2025-05-02 Thread Aaron Ballman via cfe-commits
@@ -8197,6 +8197,16 @@ def err_address_space_qualified_new : Error< def err_address_space_qualified_delete : Error< "'delete' cannot delete objects of type %0 in address space '%1'">; +def note_default_init_const_member : Note< + "member %0 declared 'const' here">; +def war

[clang] [llvm] [mlir] [ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (PR #138251)

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

[clang] [llvm] [mlir] [ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (PR #138251)

2025-05-02 Thread Matt Arsenault via cfe-commits
arsenm wrote: Next step is to avoid all instances of "not --crash", which #128495 has a big chunk of https://github.com/llvm/llvm-project/pull/138251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [C] Add -Wduplicate-decl-specifier to -Wc++-compat (PR #138012)

2025-05-02 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wduplicate-decl-specifier %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wc++-compat %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-duplicate-decl-specifier -Wc++-compat %s +// RUN: %clang_cc1 -fsyntax-only -verify=goo

[clang] f33dc8e - Add additional test coverage

2025-05-02 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-05-02T07:39:27-04:00 New Revision: f33dc8e4388cb1cc6a9212bc0618542c80b5c1ee URL: https://github.com/llvm/llvm-project/commit/f33dc8e4388cb1cc6a9212bc0618542c80b5c1ee DIFF: https://github.com/llvm/llvm-project/commit/f33dc8e4388cb1cc6a9212bc0618542c80b5c1ee.diff

[clang] [clang][lex] Fix lexing malformed pragma within include directive (PR #138165)

2025-05-02 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Thanks for the fix! Given the nature of the issue, I would probably introduce a new test file rather than modify an existing one. But I think it should live in `clang/test/Preprocessor`. https://github.com/llvm/llvm-project/pull/138165 __

[clang] [llvm] [mlir] [ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (PR #138251)

2025-05-02 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph approved this pull request. LG https://github.com/llvm/llvm-project/pull/138251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

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

[clang] [llvm] [mlir] [ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (PR #138251)

2025-05-02 Thread Mehdi Amini via cfe-commits
@@ -59,22 +59,41 @@ namespace llvm { ~ScopedFatalErrorHandler() { remove_fatal_error_handler(); } }; -/// Reports a serious error, calling any installed error handler. These -/// functions are intended to be used for error conditions which are outside -/// the control of

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2025-05-02 Thread Zishan Mirza via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf

[clang] [C] Add -Wjump-bypasses-init (PR #138009)

2025-05-02 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=c,both -Wjump-bypasses-init %s +// RUN: %clang_cc1 -fsyntax-only -verify=c,both -Wc++-compat %s +// RUN: %clang_cc1 -fsyntax-only -verify=good %s +// RUN: %clang_cc1 -fsyntax-only -verify=cxx,both -x c++ %s +// good-no-dia

[clang] [clang][lex] Fix lexing malformed pragma within include directive (PR #138165)

2025-05-02 Thread Stefan Weigl-Bosker via cfe-commits
https://github.com/sweiglbosker updated https://github.com/llvm/llvm-project/pull/138165 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

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

2025-05-02 Thread Rahul Joshi via cfe-commits
@@ -2981,7 +2981,7 @@ ScalarEvolution::getOrCreateAddExpr(ArrayRef Ops, static_cast(UniqueSCEVs.FindNodeOrInsertPos(ID, IP)); if (!S) { const SCEV **O = SCEVAllocator.Allocate(Ops.size()); -std::uninitialized_copy(Ops.begin(), Ops.end(), O); +llvm::uninitial

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

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

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

2025-05-02 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-enum-class %t vbvictor wrote: ```suggestion // RUN: %check_clang_tidy -std=c++11-or-later %s modernize-use-enum-class %t ``` https://github.com/llvm/llvm-project/pull/138282 ___

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

2025-05-02 Thread Baranov Victor via cfe-commits
@@ -115,6 +115,11 @@ New checks Gives warnings for tagged unions, where the number of tags is different from the number of data members inside the union. +- New :doc:`modernize-use-enum-class + ` check. + + Finds plain non-class enum definitions that could use ``enum cla

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

2025-05-02 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,26 @@ +.. title:: clang-tidy - modernize-use-enum-class + +modernize-use-enum-class += + +Scoped enums (enum class) should be preferred over unscoped enums: vbvictor wrote: The first statement in this doc should be the same

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

2025-05-02 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,34 @@ +//===--- UseEnumClassCheck.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 'modernize-use-enum-class' (PR #138282)

2025-05-02 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,26 @@ +.. title:: clang-tidy - modernize-use-enum-class + +modernize-use-enum-class += + +Scoped enums (enum class) should be preferred over unscoped enums: +https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Renum-class + +Unscoped

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

2025-05-02 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: Overall, good niche check that may find its user, however some work need to be done. Move this check to `cppcoreguidelines-` section, you can use `clang-tools-extra\clang-tidy\rename_check.py` for that. `modernize-` checks are used for smooth codebase imp

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

2025-05-02 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,34 @@ +//===--- UseEnumClassCheck.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 'modernize-use-enum-class' (PR #138282)

2025-05-02 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,34 @@ +//===--- UseEnumClassCheck.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 'modernize-use-enum-class' (PR #138282)

2025-05-02 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,34 @@ +//===--- UseEnumClassCheck.h - clang-tidy ---*- C++ -*-===// +// +// 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 'modernize-use-enum-class' (PR #138282)

2025-05-02 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,34 @@ +//===--- UseEnumClassCheck.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] [lldb] [windows] fix flaky linker error when building LLDB (PR #138249)

2025-05-02 Thread Charles Zablit via cfe-commits
https://github.com/charles-zablit edited https://github.com/llvm/llvm-project/pull/138249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC] Fix potential nullptr dereference. (PR #138283)

2025-05-02 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > Did you run code sanitizer over all clang-tidy code or you only interested in > this particular file? I think there are many more places where such `nullptr` > dereference can happen, e.g. > > https://github.com/llvm/llvm-project/blob/52d2b589b2d7adc3e2b4ea503df4131e088de61f/

[clang] [clang][analyzer][NFC] Improve Clang Static Analyzer performance. (PR #138295)

2025-05-02 Thread via cfe-commits
https://github.com/tigbr updated https://github.com/llvm/llvm-project/pull/138295 >From faf0d6120ae1dd8b411e29d51cff344a9d042cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20T=C3=B3thv=C3=A1ri?= Date: Sun, 20 Apr 2025 23:23:43 +0200 Subject: [PATCH 1/2] [clang][analyzer][NFC] Improve

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

2025-05-02 Thread Rahul Joshi via cfe-commits
@@ -2981,7 +2981,7 @@ ScalarEvolution::getOrCreateAddExpr(ArrayRef Ops, static_cast(UniqueSCEVs.FindNodeOrInsertPos(ID, IP)); if (!S) { const SCEV **O = SCEVAllocator.Allocate(Ops.size()); -std::uninitialized_copy(Ops.begin(), Ops.end(), O); +llvm::uninitial

[clang] [HLSL][SPIRV] Add CLI option `-fspv-extension` (PR #137985)

2025-05-02 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts approved this pull request. https://github.com/llvm/llvm-project/pull/137985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Update the -Wdefault-const-init-unsafe wording (PR #138266)

2025-05-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/138266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a635bbf - [C] Update the -Wdefault-const-init-unsafe wording (#138266)

2025-05-02 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-05-02T12:23:40-04:00 New Revision: a635bbf1418e351651ed86230eab3d13f871f971 URL: https://github.com/llvm/llvm-project/commit/a635bbf1418e351651ed86230eab3d13f871f971 DIFF: https://github.com/llvm/llvm-project/commit/a635bbf1418e351651ed86230eab3d13f871f971.diff

[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)

2025-05-02 Thread via cfe-commits
@@ -428,6 +429,52 @@ mlir::LogicalResult CIRGenFunction::emitBreakStmt(const clang::BreakStmt &s) { return mlir::success(); } +const CaseStmt *CIRGenFunction::foldCaseStmt(const clang::CaseStmt &s, + mlir::Type condType, +

[clang] e777e7a - [OpenACC] Implement better dupe catching for device_type clauses (#138196)

2025-05-02 Thread via cfe-commits
Author: Erich Keane Date: 2025-05-02T09:01:31-07:00 New Revision: e777e7a5d21b2fb3e77f16b86c4531f35a0a5cac URL: https://github.com/llvm/llvm-project/commit/e777e7a5d21b2fb3e77f16b86c4531f35a0a5cac DIFF: https://github.com/llvm/llvm-project/commit/e777e7a5d21b2fb3e77f16b86c4531f35a0a5cac.diff L

[clang] [OpenACC] Implement better dupe catching for device_type clauses (PR #138196)

2025-05-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/138196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [ErrorHandling] Add reportFatalInternalError + reportFatalUsageError (NFC) (PR #138251)

2025-05-02 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. https://github.com/llvm/llvm-project/pull/138251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][lex] Fix lexing malformed pragma within include directive (PR #138165)

2025-05-02 Thread Stefan Weigl-Bosker via cfe-commits
https://github.com/sweiglbosker updated https://github.com/llvm/llvm-project/pull/138165 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

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

2025-05-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited 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] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
jurahul wrote: > This looks right, but I'd like someone else to go through to make sure it is > right everywhere. > > Also, the md5 change looks... odd and counts a lot on the internal > representation of md5, so I'm not sure about that one, but at least it is > right NOW (Since MD5 inherits

<    1   2   3   4   5   6   7   >