[clang-tools-extra] [clang-tidy] Add UnusedIncludes/MissingIncludes options to misc-include-cleaner (PR #140600)

2025-05-20 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/140600 >From 5f4601e6cfa185a6eacb044a9cfbd88008df60ea Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 19 May 2025 21:39:32 +0200 Subject: [PATCH] [clang-tidy] Add UnusedIncludes/MissingIncludes options to

[clang] [C] Don't diagnose null pointer macros in -Wimplicit-void-ptr-cast (PR #140724)

2025-05-20 Thread Aaron Ballman via cfe-commits
@@ -9966,8 +9966,13 @@ AssignConvertType Sema::CheckSingleAssignmentConstraints(QualType LHSType, // If there is a conversion of some kind, check to see what kind of // pointer conversion happened so we can diagnose a C++ compatibility // diagnostic if the co

[clang] [Clang][Sema] Reject array prvalue operands (PR #140702)

2025-05-20 Thread via cfe-commits
languagelawyer wrote: > Is this going to break behavior in C? Array **prvalues** is C++11+ exclusive thing. Compound literals are lvalues in C https://port70.net/~nsz/c/c11/n1570.html#6.5.2.5p4 Anyway, here is a check: ```sh $ build/bin/clang -fsyntax-only test.c test.c:2:3: warning: expression

[clang] [llvm] [CodeGen] Expose the extensibility of PassConfig to plugins (PR #139059)

2025-05-20 Thread via cfe-commits
https://github.com/Tcc100 updated https://github.com/llvm/llvm-project/pull/139059 >From 0b9f452fff11853207e0eab6108e47e8c7469295 Mon Sep 17 00:00:00 2001 From: T Date: Thu, 8 May 2025 11:56:00 +0200 Subject: [PATCH] [CodeGen] Expose the extensibility of PassConfig to plugins --- clang/test/C

[clang] [llvm] [CodeGen] Expose the extensibility of PassConfig to plugins (PR #139059)

2025-05-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Tcc100) Changes This PR exposes the backend pass config to plugins via a callback. Plugin authors can register a callback that is being triggered before the target backend adds their passes to the pipeline. In the callback they then

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-20 Thread CHANDRA GHALE via cfe-commits
@@ -1481,6 +1482,8 @@ void CodeGenFunction::EmitOMPReductionClauseFinal( Privates.append(C->privates().begin(), C->privates().end()); LHSExprs.append(C->lhs_exprs().begin(), C->lhs_exprs().end()); RHSExprs.append(C->rhs_exprs().begin(), C->rhs_exprs().end()); +I

[clang] [clang][lex] Introduce new single-module-parse mode (PR #135813)

2025-05-20 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/135813 >From 5cab1328fd689783ac4117083e231e7f0a49c3db Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 9 Apr 2025 13:11:38 -0700 Subject: [PATCH] [clang][lex] Introduce new single-module-parse mode --- clan

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH 1/3] [Clang] Add __builtin_invoke and recognize std::invoke a

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Nikolas Klauser via cfe-commits
@@ -5406,6 +5408,101 @@ ExprResult Sema::ConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, RParenLoc, CurFPFeatureOverrides()); } +ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) { + auto Loc = TheCall->getBeginLoc(); + auto Args = Mutab

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Nikolas Klauser via cfe-commits
@@ -5406,6 +5408,103 @@ ExprResult Sema::ConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, RParenLoc, CurFPFeatureOverrides()); } +ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) { + SourceLocation Loc = TheCall->getBeginLoc(); + auto Ar

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH 1/4] [Clang] Add __builtin_invoke and recognize std::invoke a

[clang] [C] Don't diagnose null pointer macros in -Wimplicit-void-ptr-cast (PR #140724)

2025-05-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes This silences the diagnostic when the right-hand side is a null pointer constant that comes from a macro expansion, such as NULL. However, we do not limit to just NULL because other custom macros may e

[clang] 4fa2c62 - Fix MSVC "not all control paths return a value" warning. NFC.

2025-05-20 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2025-05-20T14:18:56+01:00 New Revision: 4fa2c62e324afacf2788e60cc34bcfe7ee62d06d URL: https://github.com/llvm/llvm-project/commit/4fa2c62e324afacf2788e60cc34bcfe7ee62d06d DIFF: https://github.com/llvm/llvm-project/commit/4fa2c62e324afacf2788e60cc34bcfe7ee62d06d.diff

[clang] [C] Don't diagnose null pointer macros in -Wimplicit-void-ptr-cast (PR #140724)

2025-05-20 Thread Aaron Ballman via cfe-commits
@@ -9966,8 +9966,13 @@ AssignConvertType Sema::CheckSingleAssignmentConstraints(QualType LHSType, // If there is a conversion of some kind, check to see what kind of // pointer conversion happened so we can diagnose a C++ compatibility // diagnostic if the co

[clang] [C] Don't diagnose null pointer macros in -Wimplicit-void-ptr-cast (PR #140724)

2025-05-20 Thread Erich Keane via cfe-commits
@@ -9966,8 +9966,13 @@ AssignConvertType Sema::CheckSingleAssignmentConstraints(QualType LHSType, // If there is a conversion of some kind, check to see what kind of // pointer conversion happened so we can diagnose a C++ compatibility // diagnostic if the co

[clang] [C] Don't diagnose null pointer macros in -Wimplicit-void-ptr-cast (PR #140724)

2025-05-20 Thread Erich Keane via cfe-commits
@@ -9966,8 +9966,13 @@ AssignConvertType Sema::CheckSingleAssignmentConstraints(QualType LHSType, // If there is a conversion of some kind, check to see what kind of // pointer conversion happened so we can diagnose a C++ compatibility // diagnostic if the co

[clang-tools-extra] [clang-tidy] Add UnusedIncludes/MissingIncludes options to misc-include-cleaner (PR #140600)

2025-05-20 Thread Baranov Victor via cfe-commits
@@ -225,6 +225,11 @@ Changes in existing checks tolerating fix-it breaking compilation when functions is used as pointers to avoid matching usage of functions within the current compilation unit. +- Improved :doc:`misc-include-cleaner vbvictor wrote: Plea

[clang] [C] Do not diagnose unions with -Wdefault-const-init (PR #140725)

2025-05-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/140725 A default-initialized union with a const member is generally reasonable in C and isn't necessarily incompatible with C++, so we now silence the diagnostic in that case. However, we do still diagnose a cons

[clang] [C] Do not diagnose unions with -Wdefault-const-init (PR #140725)

2025-05-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes A default-initialized union with a const member is generally reasonable in C and isn't necessarily incompatible with C++, so we now silence the diagnostic in that case. However, we do still diagnose a

[clang] d56d537 - [Clang] Allow vector and matrix type attributes for sub-byte _BitInt (#140253)

2025-05-20 Thread via cfe-commits
Author: Dmitry Sidorov Date: 2025-05-20T15:06:36+02:00 New Revision: d56d537f9b003869e9376fd9e15bff99423ca4af URL: https://github.com/llvm/llvm-project/commit/d56d537f9b003869e9376fd9e15bff99423ca4af DIFF: https://github.com/llvm/llvm-project/commit/d56d537f9b003869e9376fd9e15bff99423ca4af.diff

[clang-tools-extra] [clang-tools-extra] Add include mappings for getopt.h (PR #140726)

2025-05-20 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer created https://github.com/llvm/llvm-project/pull/140726 None >From 6345651bcbcee651922b04121662763e4cec48a3 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 20 May 2025 15:05:21 +0200 Subject: [PATCH] [clang-tools-extra] Add include mappings for getopt.h

[clang] [llvm] [Clang] Allow vector and matrix type attributes for sub-byte _BitInt (PR #140253)

2025-05-20 Thread Dmitry Sidorov via cfe-commits
https://github.com/MrSidims closed https://github.com/llvm/llvm-project/pull/140253 ___ 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] Add include mappings for getopt.h (PR #140726)

2025-05-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clangd Author: Daan De Meyer (DaanDeMeyer) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/140726.diff 2 Files Affected: - (modified) clang-tools-extra/clang-include-fixer/find-all-symbols/STL

[clang-tools-extra] [clang-tools-extra] Add include mappings for getopt.h (PR #140726)

2025-05-20 Thread Daan De Meyer via cfe-commits
DaanDeMeyer wrote: @kadircet Do you know if either of these two mappings get used by clang-include-cleaner? I couldn't find out where it does the mapping from glibc internal headers to public ones. https://github.com/llvm/llvm-project/pull/140726 ___

[clang] [C] Do not diagnose unions with -Wdefault-const-init (PR #140725)

2025-05-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/140725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64]Add FP8 ACLE macros implementation (PR #140591)

2025-05-20 Thread Paul Walker via cfe-commits
@@ -744,3 +744,34 @@ // CHECK-SMEB16B16: __ARM_FEATURE_SME2 1 // CHECK-SMEB16B16: __ARM_FEATURE_SME_B16B16 1 // CHECK-SMEB16B16: __ARM_FEATURE_SVE_B16B16 1 +// +// RUN: %clang --target=aarch64 -march=armv9-a+fp8 -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-FP8 %s +//

[clang] [C] Don't diagnose null pointer macros in -Wimplicit-void-ptr-cast (PR #140724)

2025-05-20 Thread Aaron Ballman via cfe-commits
@@ -9966,8 +9966,13 @@ AssignConvertType Sema::CheckSingleAssignmentConstraints(QualType LHSType, // If there is a conversion of some kind, check to see what kind of // pointer conversion happened so we can diagnose a C++ compatibility // diagnostic if the co

[clang] 2f66e5f - [OpenACC] Fixed error recovery during jump diagnostics for OpenACC

2025-05-20 Thread via cfe-commits
Author: erichkeane Date: 2025-05-20T06:31:13-07:00 New Revision: 2f66e5fcbad211e0d71b1a533071d31b36f088ec URL: https://github.com/llvm/llvm-project/commit/2f66e5fcbad211e0d71b1a533071d31b36f088ec DIFF: https://github.com/llvm/llvm-project/commit/2f66e5fcbad211e0d71b1a533071d31b36f088ec.diff LO

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-05-20 Thread Carlos Alberto Enciso via cfe-commits
CarlosAlbertoEnciso wrote: @dwblaikie I have used bloaty to get some debug info size changes. The VTable work is based on this specific revision c02019141. I built Clang using `DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang`: - at that specific revision c02019141 (original Clang) --> *

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

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

[clang] [C] Don't diagnose null pointer macros in -Wimplicit-void-ptr-cast (PR #140724)

2025-05-20 Thread Erich Keane via cfe-commits
@@ -9966,8 +9966,13 @@ AssignConvertType Sema::CheckSingleAssignmentConstraints(QualType LHSType, // If there is a conversion of some kind, check to see what kind of // pointer conversion happened so we can diagnose a C++ compatibility // diagnostic if the co

[clang] [C] Don't diagnose null pointer macros in -Wimplicit-void-ptr-cast (PR #140724)

2025-05-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/140724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Do not diagnose flexible array members with -Wdefault-const-init-field-unsafe (PR #140578)

2025-05-20 Thread Aaron Ballman via cfe-commits
@@ -85,3 +85,33 @@ void func() { static const int b; // zero-init-var-warning {{default initialization of an object of type 'const int' is incompatible with C++}} \ cxx-error {{default initialization of an object of const type 'const int'}} } + +//

[clang] [Clang][Sema] Reject array prvalue operands (PR #140702)

2025-05-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Is this going to break behavior in C? https://godbolt.org/z/PsPPs8ov1 https://github.com/llvm/llvm-project/pull/140702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang][bytecode] Optimize classify() further (PR #140735)

2025-05-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140735 Try to do as few checks as possible. Check for builtin types only once, then look at the BuiltinType Kind. For integers, we cache the int and long size, since those are used a lot and the ASTContext::getIntWid

[clang] [clang][bytecode] Optimize classify() further (PR #140735)

2025-05-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Try to do as few checks as possible. Check for builtin types only once, then look at the BuiltinType Kind. For integers, we cache the int and long size, since those are used a lot and the ASTContext::getIntW

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Erich Keane via cfe-commits
@@ -5406,6 +5408,101 @@ ExprResult Sema::ConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, RParenLoc, CurFPFeatureOverrides()); } +ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) { + auto Loc = TheCall->getBeginLoc(); + auto Args = Mutab

[clang] [llvm] [mlir] [NVPTX] Unify and extend barrier{.cta} intrinsic support (PR #140615)

2025-05-20 Thread Alex MacLean via cfe-commits
@@ -462,24 +462,28 @@ def NVVM_MBarrierTestWaitSharedOp : NVVM_Op<"mbarrier.test.wait.shared">, // NVVM synchronization op definitions //===--===// -def NVVM_Barrier0Op : NVVM_IntrOp<"barrier0"> { +def NVVM_

[clang] [llvm] [mlir] [NVPTX] Unify and extend barrier{.cta} intrinsic support (PR #140615)

2025-05-20 Thread Alex MacLean via cfe-commits
@@ -462,24 +462,28 @@ def NVVM_MBarrierTestWaitSharedOp : NVVM_Op<"mbarrier.test.wait.shared">, // NVVM synchronization op definitions //===--===// -def NVVM_Barrier0Op : NVVM_IntrOp<"barrier0"> { +def NVVM_

[clang] [llvm] [mlir] [NVPTX] Unify and extend barrier{.cta} intrinsic support (PR #140615)

2025-05-20 Thread Alex MacLean via cfe-commits
@@ -462,24 +462,28 @@ def NVVM_MBarrierTestWaitSharedOp : NVVM_Op<"mbarrier.test.wait.shared">, // NVVM synchronization op definitions //===--===// -def NVVM_Barrier0Op : NVVM_IntrOp<"barrier0"> { +def NVVM_

[clang] [llvm] [mlir] [NVPTX] Unify and extend barrier{.cta} intrinsic support (PR #140615)

2025-05-20 Thread Alex MacLean via cfe-commits
@@ -199,21 +199,58 @@ map in the following way to CUDA builtins: Barriers -'``llvm.nvvm.barrier0``' -^^^ +'``llvm.nvvm.barrier.cta.*``' +^ Syntax: """ .. code-block:: llvm - declare void @llvm.nvvm.barr

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-05-20 Thread Björn Schäpers via cfe-commits
@@ -1647,7 +1647,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.SeparateDefinitionBlocks = FormatStyle::SDS_Leave; LLVMStyle.ShortNamespaceLines = 1; LLVMStyle.SkipMacroDefinitionBody = false; - LLVMStyle.SortIncludes = {/*Enabled=*/true,

[clang] [llvm] [mlir] [NVPTX] Unify and extend barrier{.cta} intrinsic support (PR #140615)

2025-05-20 Thread Alex MacLean via cfe-commits
@@ -71,14 +71,6 @@ define float @nvvm_rcp(float %0) { ret float %2 } -; CHECK-LABEL: @llvm_nvvm_barrier0() -define void @llvm_nvvm_barrier0() { - ; CHECK: nvvm.barrier0 - call void @llvm.nvvm.barrier0() - ret void -} - AlexMaclean wrote: I've added this

[clang] [clang][bytecode][NFC] Remove Frame.cpp (PR #140750)

2025-05-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140750 The file was basically empty. The actual implementation for function frames of the two interpreter life in their own respective files. >From c6ca3e84103a6c80ea0ecd741a38ba3ce22005ae Mon Sep 17 00:00:00 2001 Fr

[clang] [clang][bytecode][NFC] Remove Frame.cpp (PR #140750)

2025-05-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes The file was basically empty. The actual implementation for function frames of the two interpreter life in their own respective files. --- Full diff: https://github.com/llvm/llvm-project/pull/140750.diff 3

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-05-20 Thread Daniel Paoliello via cfe-commits
dpaoliello wrote: @efriedma-quic @mstorsjo any objections to merging? https://github.com/llvm/llvm-project/pull/138972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-20 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao updated https://github.com/llvm/llvm-project/pull/140529 >From b83755d2aa0c5417ab8f359aa842449213437a7a Mon Sep 17 00:00:00 2001 From: Qinkun Bao Date: Mon, 19 May 2025 11:14:01 + Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang-tools-extra] [clang-tools-extra] Add include mappings for (PR #140755)

2025-05-20 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer created https://github.com/llvm/llvm-project/pull/140755 None >From 2f84d866f97d5bb378327e102105e214803cec56 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 20 May 2025 18:16:36 +0200 Subject: [PATCH] [clang-tools-extra] Add include mappings for --- ..

[clang] [Clang][Sema] Reject array prvalue operands (PR #140702)

2025-05-20 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > That probably should continue to work -- we accept it today and so does GCC > > GCC started accepting it from version 14, likely when fixing > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94264 (it is mentioned in > [#54016 > (comment)](https://github.com/llvm/llvm-pro

[clang] [llvm] [clang] Simplify device kernel attributes (PR #137882)

2025-05-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: In general, I think this is heading in the right direction. https://github.com/llvm/llvm-project/pull/137882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [llvm] [clang] Simplify device kernel attributes (PR #137882)

2025-05-20 Thread Aaron Ballman via cfe-commits
@@ -396,9 +396,12 @@ any option of a multiversioned function is undefined. }]; } -def SYCLKernelDocs : Documentation { +def DeviceKernelDocs : Documentation { let Category = DocCatFunction; + let Heading = "device_kernel"; AaronBallman wrote: We should

[clang] [llvm] [clang] Simplify device kernel attributes (PR #137882)

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

[clang-tools-extra] [clang-tidy][NFC] Refactor `modernize-pass-by-value` check code and tests (PR #140753)

2025-05-20 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp requested changes to this pull request. Why are the fixes being removed? CHECK-FIXES is not equivalent to CHECK-MESSAGES-NOT https://github.com/llvm/llvm-project/pull/140753 ___ cfe-commits mailing list cfe-commits@lis

[clang] [C] Do not diagnose unions with -Wdefault-const-init (PR #140725)

2025-05-20 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/140725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Warn about omitting deprecated enumerator in switch (PR #138562)

2025-05-20 Thread Hans Wennborg via cfe-commits
zmodem wrote: > Now we have a special Wdeprecated-declarations carveouts for switches, but if > you unpack the switch into if / else chain comparisons, you get deprecation > warnings. Agreed, that it is a bit inconsistent. There is prior art though: ba87c626f9b7c48a79673d3fd682c2a1e80a7200 ma

[clang] [clang-format] Handle raw string literals containing JSON code (PR #140666)

2025-05-20 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/140666 >From 7c1c0d2ca413503d81cd71e6a005a608cdec479d Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 19 May 2025 20:18:53 -0700 Subject: [PATCH 1/2] [clang-format] Handle raw string literals containing JSON code F

[clang-tools-extra] [clang-tidy][NFC] Refactor `modernize-pass-by-value` check code and tests (PR #140753)

2025-05-20 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Also, CHECK-MESSAGES-NOT is discouraged, since the testing framework already checked that no other output is produced by default. https://github.com/llvm/llvm-project/pull/140753 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang-tools-extra] [clang-tidy][NFC] Refactor `modernize-pass-by-value` check code and tests (PR #140753)

2025-05-20 Thread Baranov Victor via cfe-commits
vbvictor wrote: > Also, CHECK-MESSAGES-NOT is discouraged, since the testing framework already > checks that no other output is produced by default. So if CHECK-FIXES are the same as previous code, we can remove them completely (I changed them to CHECK-MESSAGES-NOT) https://github.com/llvm/

[clang] 6fb23af - [C] Do not diagnose unions with -Wdefault-const-init (#140725)

2025-05-20 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-05-20T13:04:24-04:00 New Revision: 6fb23afb8dfa1c9244aa1f30df947ad201a1c934 URL: https://github.com/llvm/llvm-project/commit/6fb23afb8dfa1c9244aa1f30df947ad201a1c934 DIFF: https://github.com/llvm/llvm-project/commit/6fb23afb8dfa1c9244aa1f30df947ad201a1c934.diff

[clang] [Clang] add typo correction for unknown attribute names (PR #140629)

2025-05-20 Thread Aaron Ballman via cfe-commits
@@ -203,10 +221,47 @@ unsigned AttributeCommonInfo::calculateAttributeSpellingListIndex() const { // attribute spell list index matching code. auto Syntax = static_cast(getSyntax()); StringRef ScopeName = normalizeAttrScopeName(getScopeName(), Syntax); - StringRef Name

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

2025-05-20 Thread via cfe-commits
https://github.com/PiJoules updated https://github.com/llvm/llvm-project/pull/135836 >From 010aede1b6f703ddd465de8cfe575697bd2a5e5b 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] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-20 Thread Qinkun Bao via cfe-commits
@@ -3,11 +3,11 @@ // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsanitize=signed-integer-overflow -fsanitize-ignorelist=%t/src.ignorelist -emit-llvm %t/test2.c -o - | FileCheck %s --check-prefixes=CHECK2 -// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsanitize=sig

[clang] [CIR][LLVMLowering] Upstream Bitcast lowering (PR #140774)

2025-05-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change adds support for lowering BitCastOp --- Full diff: https://github.com/llvm/llvm-project/pull/140774.diff 2 Files Affected: - (modified) clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.c

[clang] [CIR][LLVMLowering] Upstream Bitcast lowering (PR #140774)

2025-05-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/140774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] add typo correction for unknown attribute names (PR #140629)

2025-05-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/140629 >From 5b8f0635fdddc87ea326a3b1b47191ab9bf23c0f Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Tue, 20 May 2025 00:38:43 +0300 Subject: [PATCH 1/3] [Clang] add typo correction for unknown attribute na

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

2025-05-20 Thread via cfe-commits
@@ -3006,6 +3006,10 @@ static LValue EmitFunctionDeclLValue(CodeGenFunction &CGF, const Expr *E, GlobalDecl GD) { const FunctionDecl *FD = cast(GD.getDecl()); llvm::Constant *V = CGF.CGM.getFunctionPointer(GD); + if (E->getType()->isCF

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

2025-05-20 Thread via cfe-commits
@@ -693,6 +693,18 @@ CGCallee ItaniumCXXABI::EmitLoadOfMemberFunctionPointer( llvm::Constant *CheckTypeDesc; bool ShouldEmitCFICheck = CGF.SanOpts.has(SanitizerKind::CFIMFCall) && CGM.HasHiddenLTOVisibility(RD); + + if (ShouldEmitCFICheck) { +

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

2025-05-20 Thread via cfe-commits
@@ -1988,7 +1988,7 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { /// Extra information which affects how the function is called, like /// regparm and the calling convention. LLVM_PREFERRED_TYPE(CallingConv) -unsigned ExtInfo : 14; +

[clang] [CIR][NFC] Eliminate ArgInfo structure (PR #140612)

2025-05-20 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/140612 >From 2310c8af56330682ab15ca318971d530cd45e73b Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Mon, 19 May 2025 13:18:55 -0700 Subject: [PATCH 1/2] [CIR][NFC] Eliminate ArgInfo structure A previous refactor

[clang] [Clang] add typo correction for unknown attribute names (PR #140629)

2025-05-20 Thread Oleksandr T. via cfe-commits
@@ -203,10 +221,47 @@ unsigned AttributeCommonInfo::calculateAttributeSpellingListIndex() const { // attribute spell list index matching code. auto Syntax = static_cast(getSyntax()); StringRef ScopeName = normalizeAttrScopeName(getScopeName(), Syntax); - StringRef Name

[clang] [CIR][LLVMLowering] Upstream Bitcast (PR #140774)

2025-05-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/140774 This change adds support for lowering BitCastOp >From 5e5676c1e3efe38bceb09ca90a4e4b7500cbb6e8 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 20 May 2025 19:29:32 +0200 Subject: [PATCH] [CIR][LL

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

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

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman requested changes to this pull request. Precommit CI failures look related to this patch: ``` /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-g6cdk-1/llvm-project/github-pull-requests/build-runtimes/include/c++/v1/__type_traits/invoke.h:123:29: error: variable

[clang] [C] Do not diagnose flexible array members with -Wdefault-const-init-field-unsafe (PR #140578)

2025-05-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/140578 >From 625662da41256345c4609835754c3a61018b54ca Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 19 May 2025 13:09:03 -0400 Subject: [PATCH 1/2] [C] Do not diagnose flexible array members with -Wdefa

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-05-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: It looks like my previous comments about ConstantExpr never got resolved? Specifically, what happens if you have an instruction where an operand is a ConstantExpr GEP of a global, or something like that. https://github.com/llvm/llvm-project/pull/138

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

2025-05-20 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao updated https://github.com/llvm/llvm-project/pull/140529 >From b83755d2aa0c5417ab8f359aa842449213437a7a Mon Sep 17 00:00:00 2001 From: Qinkun Bao Date: Mon, 19 May 2025 11:14:01 + Subject: [PATCH 1/6] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [C] Do not diagnose unions with -Wdefault-const-init (PR #140725)

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

[clang] Fix crash with delayed typo correction (PR #140571)

2025-05-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/140571 >From e63781710d4f4307f4201670d96df9b511ad9551 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 19 May 2025 12:33:24 -0400 Subject: [PATCH] Fix crash with delayed typo correction Delayed typo correc

[clang] [llvm] [RISCV] Add MC layer support for XSfmm*. (PR #133031)

2025-05-20 Thread Craig Topper via cfe-commits
@@ -2331,6 +2337,65 @@ bool RISCVAsmParser::generateVTypeError(SMLoc ErrorLoc) { "e[8|16|32|64],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]"); } +ParseStatus RISCVAsmParser::parseXSfmmVType(OperandVector &Operands) { + SMLoc S = getLoc(); + + unsigned Widen = 0; + unsigned SE

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

2025-05-20 Thread Amr Hesham via cfe-commits
@@ -135,4 +135,38 @@ cir.func @vector_insert_element_test() { // CHECK:cir.return // CHECK: } +cir.func @vector_splat_test() { +%0 = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["a", init] +%1 = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["shl", init] +

[clang] [Clang][OpenMP][LoopTransformations] Fix incorrect number of generated loops for Tile and Reverse directives (PR #140532)

2025-05-20 Thread Walter J.T.V via cfe-commits
eZWALT wrote: It’s true that NumGeneratedLoops is used throughout the existing OpenMP loop transformation infrastructure. While in some cases its usage could potentially be replaced by NumGeneratedLoopNests (especially when only checking for values like 0 or 1), the two variables convey distin

[clang] [HIP] diagnose -mwavefrontsize64 for gfx10+ (PR #140185)

2025-05-20 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > > > I am not ok with this being an error by default. > > > > > > I think compilation must fail when an unsupported and untested option is > > specified. And that includes when the target is SPIR-V. > > I would call it a supported and used option. The unsupported and untested

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-05-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Also, the no-op ConstantExpr::getGetElementPtr call is still there. https://github.com/llvm/llvm-project/pull/138972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread via cfe-commits
@@ -5406,6 +5408,99 @@ ExprResult Sema::ConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, RParenLoc, CurFPFeatureOverrides()); } +ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) { + SourceLocation Loc = TheCall->getBeginLoc(); + auto Arg

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread via cfe-commits
@@ -6540,67 +6540,70 @@ ExprResult Sema::ActOnTypeTrait(TypeTrait Kind, SourceLocation KWLoc, return BuildTypeTrait(Kind, KWLoc, ConvertedArgs, RParenLoc); } -static bool EvaluateBinaryTypeTrait(Sema &Self, TypeTrait BTT, const TypeSourceInfo *Lhs, -

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread via cfe-commits
@@ -2594,6 +2594,8 @@ class Sema final : public SemaBase { SourceLocation BuiltinLoc, SourceLocation RParenLoc); + ExprResult BuiltinInvoke(CallExpr *TheCall); cor3ntin wrote: This doesn't need to

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread via cfe-commits
https://github.com/cor3ntin commented: Thanks for working on that. Do you have any benchmarks? - Please add an entry in LanguageExensions.rst - Can you add a minimum of tests for static / explicit object member functions, lambdas? - Something like https://compiler-explorer.com/z/s5s9sbzn7 I

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

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

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

2025-05-20 Thread via cfe-commits
https://github.com/jeremyd2019 updated https://github.com/llvm/llvm-project/pull/140169 >From 47f81a804a36a5b685f130f22d2ab5d330170861 Mon Sep 17 00:00:00 2001 From: kikairoya Date: Mon, 21 Apr 2025 23:30:13 +0900 Subject: [PATCH 1/4] [Cygwin][MinGW] Internal class in explicitly-instantiation-

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Aaron Ballman via cfe-commits
@@ -5406,6 +5408,99 @@ ExprResult Sema::ConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, RParenLoc, CurFPFeatureOverrides()); } +ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) { + SourceLocation Loc = TheCall->getBeginLoc(); + auto Arg

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Please also update `clang/docs/LanguageExtensions.rst` to document the new builtin, and update `clang/docs/ReleaseNotes.rst` so users know about the new functionality. https://github.com/llvm/llvm-project/pull/116709 __

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

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

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-05-20 Thread Aaron Ballman via cfe-commits
@@ -5406,6 +5408,99 @@ ExprResult Sema::ConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, RParenLoc, CurFPFeatureOverrides()); } +ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) { + SourceLocation Loc = TheCall->getBeginLoc(); + auto Arg

[clang] Fix crash with delayed typo correction (PR #140571)

2025-05-20 Thread via cfe-commits
https://github.com/cor3ntin commented: Did you check if that fixes any of the other delayed typo issues? https://github.com/llvm/llvm-project/pull/140571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [CIR] Upstream comparison ops for VectorType (PR #140597)

2025-05-20 Thread Amr Hesham via cfe-commits
@@ -587,3 +587,118 @@ void foo11() { // OGCG: %[[TMP_B:.*]] = load <4 x i32>, ptr %[[VEC_B]], align 16 // OGCG: %[[XOR:.*]] = xor <4 x i32> %[[TMP_A]], %[[TMP_B]] // OGCG: store <4 x i32> %[[XOR]], ptr {{.*}}, align 16 + +void foo12() { AmrDeveloper wrote: Uns

[clang] [CIR] Upstream support for iterator-based range for loops (PR #140636)

2025-05-20 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/140636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Eliminate ArgInfo structure (PR #140612)

2025-05-20 Thread Andy Kaylor via cfe-commits
@@ -72,16 +68,15 @@ class RequiredArgs { class CIRGenFunctionInfo final : public llvm::FoldingSetNode, - private llvm::TrailingObjects { - using ArgInfo = CIRGenFunctionInfoArgInfo; - + private llvm::TrailingObjects { andykaylor wrote: Strictly

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-05-20 Thread Galen Elias via cfe-commits
galenelias wrote: Ping https://github.com/llvm/llvm-project/pull/136167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cbcfe66 - [CIR] Upstream support for iterator-based range for loops (#140636)

2025-05-20 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-05-20T10:52:15-07:00 New Revision: cbcfe667bbda2ba2862d873350309e29b4368880 URL: https://github.com/llvm/llvm-project/commit/cbcfe667bbda2ba2862d873350309e29b4368880 DIFF: https://github.com/llvm/llvm-project/commit/cbcfe667bbda2ba2862d873350309e29b4368880.diff L

[clang] [llvm] Enable fexec-charset option (PR #138895)

2025-05-20 Thread Abhina Sree via cfe-commits
https://github.com/abhina-sree edited https://github.com/llvm/llvm-project/pull/138895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >