[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 Thread via cfe-commits
cor3ntin wrote: @Megan0704-1 Can you look into the test failures? thanks https://github.com/llvm/llvm-project/pull/130866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cd043e4 - [Docs] Add a link to Clang Area Team members

2025-03-12 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-03-12T09:16:37-04:00 New Revision: cd043e4fbe6125df4cb4993c625fa5e46194e478 URL: https://github.com/llvm/llvm-project/commit/cd043e4fbe6125df4cb4993c625fa5e46194e478 DIFF: https://github.com/llvm/llvm-project/commit/cd043e4fbe6125df4cb4993c625fa5e46194e478.diff

[clang] [libc][nfc] Include instantiations of gpuintrin.h in IR test case (PR #130956)

2025-03-12 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: Yep. I'm looking at changing their implementation and want a before&after shot in the git diff for the upcoming review. If that doesn't pan out, still good to get a heads up if codegen for these changes on us unexpectedly. https://github.com/llvm/llvm-project/pull/130956

[clang] Add `pragma clang scope [push|pop]` (PR #121025)

2025-03-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I wonder if we had an rfc for this. Maybe we should solicit some feedback > before moving forward with this extension. Agreed, I think this should have an RFC for wider discussion. https://github.com/llvm/llvm-project/pull/121025 __

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2025-03-12 Thread Johannes Doerfert via cfe-commits
@@ -259,10 +259,9 @@ static void getAArch64MultilibFlags(const Driver &D, processMultilibCustomFlags(Result, Args); } -static void getARMMultilibFlags(const Driver &D, - const llvm::Triple &Triple, - c

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2025-03-12 Thread Johannes Doerfert via cfe-commits
@@ -1765,6 +1771,11 @@ def fprofile_use_EQ : Joined<["-"], "fprofile-use=">, Visibility<[ClangOption, CLOption]>, MetaVarName<"">, HelpText<"Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from /default.profdata. Other

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-03-12 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 edited https://github.com/llvm/llvm-project/pull/130623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-03-12 Thread Aniket Lal via cfe-commits
@@ -1582,6 +1582,26 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, // Implicit copy-assignment gets the same special treatment as implicit // copy-constructors. emitImplicitAssignmentOperatorBody(Args); + } else if (FD->hasAttr() && +

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Andy Kaylor via cfe-commits
@@ -55,10 +55,154 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s, if (mlir::succeeded(emitSimpleStmt(s, useCurrentScope))) return mlir::success(); - // Only a subset of simple statements are supported at the moment. When more - // kinds of statements ar

[clang] [Clang][NFCI] Remove CallExpr::CreateTemporary() (PR #130921)

2025-03-12 Thread Younan Zhang via cfe-commits
zyn0217 wrote: (Duplicate of #130919.) https://github.com/llvm/llvm-project/pull/130921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 184f944 - Implement the `fmod` intrinsic (#130320)

2025-03-12 Thread via cfe-commits
Author: Kaitlin Peng Date: 2025-03-12T13:21:07-04:00 New Revision: 184f9449572b498a612246771d2feabda75f0800 URL: https://github.com/llvm/llvm-project/commit/184f9449572b498a612246771d2feabda75f0800 DIFF: https://github.com/llvm/llvm-project/commit/184f9449572b498a612246771d2feabda75f0800.diff

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -0,0 +1,53 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -55,10 +55,154 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s, if (mlir::succeeded(emitSimpleStmt(s, useCurrentScope))) return mlir::success(); - // Only a subset of simple statements are supported at the moment. When more - // kinds of statements ar

[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-12 Thread Helena Kotas via cfe-commits
@@ -174,21 +176,45 @@ createBufferHandleType(const HLSLBufferDecl *BufDecl) { return cast(QT.getTypePtr()); } +// Iterates over all declarations in the HLSL buffer and based on the +// packoffset or register(c#) annotations it fills outs the Layout +// vector with the user-s

[clang] Implement the `fmod` intrinsic (PR #130320)

2025-03-12 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/130320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement the `fmod` intrinsic (PR #130320)

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

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2025-03-12 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > Hello @andykaylor , > > I am working on this pragma operation, with a different scenario. For > example: https://godbolt.org/z/nTfYW64j4 > > Is it ok to merge this patch? As mentioned [here](https://discourse.llvm.org/t/rfc-honor-pragmas-with-ffp-contract-fast/80797/14),

[clang] 8b093e5 - [webkit.UncountedLambdaCapturesChecker] Recognize std::move(protectedThis) (#130925)

2025-03-12 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-03-12T10:23:46-07:00 New Revision: 8b093e5e1752b3899b4c66f084c33ad1a3d0e8d6 URL: https://github.com/llvm/llvm-project/commit/8b093e5e1752b3899b4c66f084c33ad1a3d0e8d6 DIFF: https://github.com/llvm/llvm-project/commit/8b093e5e1752b3899b4c66f084c33ad1a3d0e8d6.diff

[clang] [webkit.UncountedLambdaCapturesChecker] Recognize std::move(protectedThis) (PR #130925)

2025-03-12 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/130925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Recognize std::move(protectedThis) (PR #130925)

2025-03-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/130925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Would be neat if the IR test was: ->CIR ->CIR->LLVM AND ->LLVM it sets the precedent for our 'future' and makes it easier to have a test form of the "converted" tests later, and makes it easier to review for correctness, but I'm willing

[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-12 Thread Helena Kotas via cfe-commits
@@ -174,21 +176,45 @@ createBufferHandleType(const HLSLBufferDecl *BufDecl) { return cast(QT.getTypePtr()); } +// Iterates over all declarations in the HLSL buffer and based on the +// packoffset or register(c#) annotations it fills outs the Layout +// vector with the user-s

[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/128991 >From 9faff902639aece87b72ed5235d71b8b68533074 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 26 Feb 2025 17:39:16 -0800 Subject: [PATCH 1/8] Add resource binding attribute on $Globals numeric constants

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130494)

2025-03-12 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM, few nits Please remove limitation from `const-correctness.rst` that says check can not analyze pointers. It starts with "Pointees can not be analyzed for constness yet." https://github.com/llvm/llvm-project/pull/130494 _

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-12 Thread via cfe-commits
higher-performance wrote: Okay thanks, I'll give it a shot. It might take me a bit to get to it. If in the meantime anyone needs this PR urgently let me know and we can probably merge this and do that in a follow-up. https://github.com/llvm/llvm-project/pull/129934

[clang] [Clang][CodeGen] Do not set inbounds flag in `EmitMemberDataPointerAddress` when the base pointer is null (PR #130952)

2025-03-12 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw created https://github.com/llvm/llvm-project/pull/130952 See also https://github.com/llvm/llvm-project/pull/130734 for the original motivation. This pattern (`container_of`) is also widely used by real-world programs. Examples: https://github.com/llvm/llvm-project/bl

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-12 Thread Erich Keane via cfe-commits
erichkeane wrote: > I just realized there is another optimization we could do in `push_back` > (similar motivation as what @erichkeane mentioned > [here](#discussion_r1982274548), but different): > > We could avoid the duplication check in `push_back`, and defer it to the > `contains()`/`view

[clang] [libc] [llvm] Reapply "[AMDGPU] Use COV6 by default (#118515)" (PR #130963)

2025-03-12 Thread Shilei Tian via cfe-commits
shiltian wrote: > The OpenMP runtime doesn't know how to handle `generic` ISAs right? I think people are working on it? https://github.com/llvm/llvm-project/pull/130963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [NFC][analyzer] Framework for multipart checkers (PR #130985)

2025-03-12 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/130985 From 895b6947690ec51d8e8bccfa09420afae4449343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Mon, 3 Mar 2025 15:33:44 +0100 Subject: [PATCH 1/3] [NFC][analyzer] Framework for multipart chec

[clang] [OffloadBundler] Expose function to parse compressed bundle headers (PR #130284)

2025-03-12 Thread Yaxun Liu via cfe-commits
@@ -1121,13 +1122,116 @@ CompressedOffloadBundle::compress(llvm::compression::Params P, llvm::StringRef(FinalBuffer.data(), FinalBuffer.size())); } +// Use packed structs to avoid padding, such that the structs map the serialized +// format. +LLVM_PACKED_START +union R

[clang-tools-extra] [clang-tidy] Add new check bugprone-capture-this-by-field (PR #130297)

2025-03-12 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,144 @@ +// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-capturing-this-by-field %t -- -config="{CheckOptions: {bugprone-capturing-this-by-field.FunctionWrapperTypes: '::std::function;::Fn'}}" -- + +namespace std { + +template +class function; + +template +c

[clang] [flang] [llvm] [mlir] [TargetRegistry] Accept Triple in createTargetMachine() (NFC) (PR #130940)

2025-03-12 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/130940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Claim conformance to WG14 N3363 (PR #130980)

2025-03-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/130980 >From d03203db378196d3b32021c52c72d3993168faf4 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 12 Mar 2025 11:34:27 -0400 Subject: [PATCH 1/2] [C2y] Claim conformance to WG14 N3363 This paper clari

[clang] [CIR] Add transform test for cir-flatten-cfg (PR #130861)

2025-03-12 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: cir-opt %s -cir-flatten-cfg -o - | FileCheck %s + +module { + cir.func @foo() { +cir.scope { + %0 = cir.alloca !cir.int, !cir.ptr>, ["a", init] {alignment = 4 : i64} + %1 = cir.const #cir.int<4> : !cir.int + cir.store %1, %0 : !cir.in

[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

2025-03-12 Thread Alex Sepkowski via cfe-commits
@@ -89,14 +99,57 @@ llvm::TargetExtType *HLSLBufferLayoutBuilder::createLayoutType( RecordTypes.pop_back(); for (const auto *FD : RT->getDecl()->fields()) { - assert((!Packoffsets || Index < Packoffsets->size()) && - "number of elements in layout stru

[clang] [HLSL][NFC] Update HLSL AST tests to be more readable (PR #130910)

2025-03-12 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/130910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-12 Thread via cfe-commits
higher-performance wrote: I just realized there is another optimization we could do in `push_back` (similar motivation as what @erichkeane mentioned [here](#discussion_r1982274548), but different): We could avoid the duplication check in `push_back`, and defer it to the `contains()`/`view()`

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,53 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

2025-03-12 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd created https://github.com/llvm/llvm-project/pull/130993 Microsoft's compiler supports an extension for 128-bit literals. This is referenced in `intsafe.h` which is included transitievly. When building with modules, the literal parsing causes a failure due to the mi

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Saleem Abdulrasool (compnerd) Changes Microsoft's compiler supports an extension for 128-bit literals. This is referenced in `intsafe.h` which is included transitievly. When building with modules, the literal parsing causes a failure due

[clang] f137c3d - [TargetRegistry] Accept Triple in createTargetMachine() (NFC) (#130940)

2025-03-12 Thread via cfe-commits
Author: Nikita Popov Date: 2025-03-12T17:35:09+01:00 New Revision: f137c3d592e96330e450a8fd63ef7e8877fc1908 URL: https://github.com/llvm/llvm-project/commit/f137c3d592e96330e450a8fd63ef7e8877fc1908 DIFF: https://github.com/llvm/llvm-project/commit/f137c3d592e96330e450a8fd63ef7e8877fc1908.diff

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-03-12 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127568 >From 2c9e6e45944891af54cba9648297a996bb4d8cca Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 18 Feb 2025 14:03:35 +0800 Subject: [PATCH 1/4] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-co

[clang] [PowerPC] cleaned dead code of PPC.cpp and PPC.h (PR #130994)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-powerpc Author: zhijian lin (diggerlin) Changes There are some variables in the PPC.h which are defined and assigned a value to them, but never be used, remove the code related to the variables. --- Full diff: https://github.com/llvm/llvm-proje

[clang] [PowerPC] cleaned dead code of PPC.cpp and PPC.h (PR #130994)

2025-03-12 Thread zhijian lin via cfe-commits
https://github.com/diggerlin created https://github.com/llvm/llvm-project/pull/130994 There are some variables in the PPC.h which are defined and assigned a value to them, but never be used, remove the code related to the variables. >From 45a51fd46aeedd73fbfe5d9ae493eeb9084bc98c Mon Sep 17 00:

[clang] [PowerPC] cleaned dead code of PPC.cpp and PPC.h (PR #130994)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: zhijian lin (diggerlin) Changes There are some variables in the PPC.h which are defined and assigned a value to them, but never be used, remove the code related to the variables. --- Full diff: https://github.com/llvm/llvm-project/pull/13

[clang] [Fuchsia] Add llc to toolchain (PR #130999)

2025-03-12 Thread via cfe-commits
https://github.com/PiJoules created https://github.com/llvm/llvm-project/pull/130999 None >From 73b244874a7be5ccd02ced64e203bfdd31fea288 Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Wed, 12 Mar 2025 17:51:19 + Subject: [PATCH] [Fuchsia] Add llc to toolchain --- clang/cmake/caches/Fu

[clang] [alpha.webkit.UncountedCallArgsChecker] Treat an explicit construction of Ref from a Ref return value safe. (PR #130911)

2025-03-12 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/130911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e27fe2e - [OpenACC][NFC] Add the _Pragma spelling to a bunch of the tests

2025-03-12 Thread via cfe-commits
Author: erichkeane Date: 2025-03-12T11:01:38-07:00 New Revision: e27fe2e07c040719075da79d6880bf57b2dc5dbc URL: https://github.com/llvm/llvm-project/commit/e27fe2e07c040719075da79d6880bf57b2dc5dbc DIFF: https://github.com/llvm/llvm-project/commit/e27fe2e07c040719075da79d6880bf57b2dc5dbc.diff LO

[clang] [CIR] Don't generate ClangIR after an unrecoverable error occured (PR #130971)

2025-03-12 Thread Morris Hafner via cfe-commits
mmha wrote: @ekeane @dkolsen-pgi @andykaylor https://github.com/llvm/llvm-project/pull/130971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Fuchsia] Add llc to toolchain (PR #130999)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (PiJoules) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/130999.diff 1 Files Affected: - (modified) clang/cmake/caches/Fuchsia-stage2.cmake (+1) ``diff diff --git a/clang/cmake/caches/Fuchsia-stage2.c

[clang] [NFC][analyzer] Rename `CheckerBase::getCheckerName` to `getName` (PR #130953)

2025-03-12 Thread Donát Nagy via cfe-commits
@@ -41,19 +41,19 @@ class BugType { Checker(nullptr), SuppressOnSink(SuppressOnSink) {} BugType(const CheckerBase *Checker, StringRef Desc, StringRef Cat = categories::LogicError, bool SuppressOnSink = false) - : CheckerName(Checker->getCheckerName()),

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,53 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o

[clang] [clang][SYCL] Disable float128 device mode diagnostic (PR #128513)

2025-03-12 Thread Nicolas Miller via cfe-commits
@@ -4700,7 +4700,8 @@ void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo &CI, if (NewElemTy.isNull()) { // Only emit diagnostic on host for 128-bit mode attribute -if (!(DestWidth == 128 && getLangOpts().CUDAIsDevice)) +if (!(DestWidth == 128 && +

[clang] [NFC][analyzer] Framework for multipart checkers (PR #130985)

2025-03-12 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/130985 From 895b6947690ec51d8e8bccfa09420afae4449343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Mon, 3 Mar 2025 15:33:44 +0100 Subject: [PATCH 1/4] [NFC][analyzer] Framework for multipart chec

[clang] caf3018 - Add unretained call args checker (#130901)

2025-03-12 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-03-12T10:37:13-07:00 New Revision: caf301891a1034e604bceacc84ec244537c31ab6 URL: https://github.com/llvm/llvm-project/commit/caf301891a1034e604bceacc84ec244537c31ab6 DIFF: https://github.com/llvm/llvm-project/commit/caf301891a1034e604bceacc84ec244537c31ab6.diff

[clang] [alpha.webkit.ForwardDeclChecker] Add a new WebKit checker for forward declarations (PR #130554)

2025-03-12 Thread Rashmi Mudduluru via cfe-commits
@@ -0,0 +1,335 @@ +//===- ForwardDeclChecker.cpp *- 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: Ap

[clang] [clang][SYCL] Disable float128 device mode diagnostic (PR #128513)

2025-03-12 Thread Luke Drummond via cfe-commits
https://github.com/ldrumm closed https://github.com/llvm/llvm-project/pull/128513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7f415e4 - [clang][SYCL] Disable float128 device mode diagnostic (#128513)

2025-03-12 Thread via cfe-commits
Author: Nicolas Miller Date: 2025-03-12T18:13:26Z New Revision: 7f415e444197025180d786c5e212f13b738179cb URL: https://github.com/llvm/llvm-project/commit/7f415e444197025180d786c5e212f13b738179cb DIFF: https://github.com/llvm/llvm-project/commit/7f415e444197025180d786c5e212f13b738179cb.diff LOG

[clang] [CIR] Don't generate ClangIR after an unrecoverable error occured (PR #130971)

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

[clang] [CIR] Don't generate ClangIR after an unrecoverable error occured (PR #130971)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -43,6 +43,8 @@ void CIRGenerator::Initialize(ASTContext &astContext) { mlir::ModuleOp CIRGenerator::getModule() const { return cgm->getModule(); } bool CIRGenerator::HandleTopLevelDecl(DeclGroupRef group) { + if (diags.hasUnrecoverableErrorOccurred()) +return true; ---

[clang] [CIR] Don't generate ClangIR after an unrecoverable error occured (PR #130971)

2025-03-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. This looks good, I don't think we really need a test for it. We have to make sure we get this in EVERY one of the external interfaces unfortunately (as they are added), but LGTM. https://github.com/llvm/llvm-project/pull/130971 ___

[clang] [alpha.webkit.UncountedCallArgsChecker] Treat an explicit construction of Ref from a Ref return value safe. (PR #130911)

2025-03-12 Thread Ryosuke Niwa via cfe-commits
@@ -70,6 +70,8 @@ bool tryToFindPtrOrigin( if (isCtorOfSafePtr(ConversionFunc)) return callback(E, true); } +if (isa(E) && isSafePtrType(cast->getType())) + return callback(E, true); rniwa wrote: Added https://gi

[clang] [alpha.webkit.UncountedCallArgsChecker] Treat an explicit construction of Ref from a Ref return value safe. (PR #130911)

2025-03-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/130911 Fix a bug that an explicit construction of Ref out of a Ref return value would not be treated as safe. It is definitely safe albit redundant. >From 6eefb934996532201cc3f137931e3cb140bf25c1 Mon Sep 17 00:00:00 200

[clang] [clang-repl] Fix target creation in Wasm.cpp (PR #130909)

2025-03-12 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/130909 >From 18e1f9713b34bf1f9c0e946cd915c0ae04748607 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 12 Mar 2025 12:32:02 +0530 Subject: [PATCH 1/2] Fix target creation in Wasm.cpp --- clang/lib/Interpreter/

[clang] [clang-repl] Fix target creation in Wasm.cpp (PR #130909)

2025-03-12 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/130909 >From 18e1f9713b34bf1f9c0e946cd915c0ae04748607 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 12 Mar 2025 12:32:02 +0530 Subject: [PATCH 1/3] Fix target creation in Wasm.cpp --- clang/lib/Interpreter/

[clang] [alpha.webkit.UncountedCallArgsChecker] Treat an explicit construction of Ref from a Ref return value safe. (PR #130911)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes Fix a bug that an explicit construction of Ref out of a Ref return value would not be treated as safe. It is definitely safe albit redundant. --- Full diff: https://github.com/llvm/llvm-proje

[clang] [Clang][NFC] Remove CallExpr::CreateTemporary (PR #130919)

2025-03-12 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/130919 >From b74b40763cc838cb328860774afa82aa8ff99408 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 12 Mar 2025 08:34:46 +0100 Subject: [PATCH] [Clang][NFC] Remove CallExpr::CreateTemporary `CallExpr::Crea

[clang] [clang-repl] Fix target creation in Wasm.cpp (PR #130909)

2025-03-12 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/130909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Skip opt command if opt_flags is empty (PR #130882)

2025-03-12 Thread Wenju He via cfe-commits
wenju-he wrote: @frasercrmck could you please review? thanks https://github.com/llvm/llvm-project/pull/130882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] add --only-needed to llvm-link when INTERNALIZE flag is set (PR #130871)

2025-03-12 Thread Wenju He via cfe-commits
wenju-he wrote: @frasercrmck could you please review? thanks https://github.com/llvm/llvm-project/pull/130871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Remove CallExpr::CreateTemporary (PR #130919)

2025-03-12 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Oops, I just filed #130921 https://github.com/llvm/llvm-project/pull/130919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Remove CallExpr::CreateTemporary (PR #130919)

2025-03-12 Thread via cfe-commits
cor3ntin wrote: @zyn0217 yeah, we basically did the same thing at the same time. Sorry! I don't care which gets merged https://github.com/llvm/llvm-project/pull/130919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 Thread via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +template +struct A{ +A(); +A(A&); +A(A); // expected-error{{copy constructor must pass its first argument by reference}} +}; + +void f() { +A a = A(); // expected-note{{in instantiation of template

[clang] [Clang][NFC] Remove CallExpr::CreateTemporary (PR #130919)

2025-03-12 Thread Younan Zhang via cfe-commits
@@ -1655,14 +1645,8 @@ SourceLocation CallExpr::getBeginLoc() const { if (!isTypeDependent()) { if (const auto *Method = dyn_cast_if_present(getCalleeDecl()); -Method && Method->isExplicitObjectMemberFunction()) { - // Note: while we typically exp

[clang] [Clang][NFC] Remove CallExpr::CreateTemporary (PR #130919)

2025-03-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/130919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Remove CallExpr::CreateTemporary (PR #130919)

2025-03-12 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/130919 >From 0e055b6d67c17b337a1f341443e9be6daf9768ec Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 12 Mar 2025 08:34:46 +0100 Subject: [PATCH] [Clang][NFC] Remove CallExpr::CreateTemporary `CallExpr::Crea

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130494)

2025-03-12 Thread Baranov Victor via cfe-commits
@@ -125,6 +132,22 @@ Options // No warning const int *const pointer_variable = &value; +.. option:: WarnPointersAsPointers + + This option enables the suggestion for ``const`` of the value pointing. vbvictor wrote: ```suggestion This option enables

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130494)

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

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-12 Thread Balazs Benics via cfe-commits
@@ -35,19 +35,41 @@ AST_POLYMORPHIC_MATCHER_P( Builder) != Args.end(); } +bool isStdOrPosixImpl(const DeclContext *Ctx) { + if (!Ctx->isNamespace()) +return false; + + const auto *ND = cast(Ctx); + if (ND->isInline()) { +return isStdOrPo

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-12 Thread Carlos Galvez via cfe-commits
@@ -35,19 +35,41 @@ AST_POLYMORPHIC_MATCHER_P( Builder) != Args.end(); } +bool isStdOrPosixImpl(const DeclContext *Ctx) { + if (!Ctx->isNamespace()) +return false; + + const auto *ND = cast(Ctx); + if (ND->isInline()) { +return isStdOrPo

[clang] [alpha.webkit.ForwardDeclChecker] Add a new WebKit checker for forward declarations (PR #130554)

2025-03-12 Thread Ryosuke Niwa via cfe-commits
@@ -0,0 +1,335 @@ +//===- ForwardDeclChecker.cpp *- 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: Ap

[clang] [alpha.webkit.webkit.RetainPtrCtorAdoptChecker] Add a new WebKit checker for correct use of RetainPtr, adoptNS, and adoptCF (PR #128679)

2025-03-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/128679 >From b4001f95cf6d35f59ef8af6df8f2bdbe043da380 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Tue, 25 Feb 2025 00:47:45 -0800 Subject: [PATCH 1/8] [alpha.webkit.webkit.RetainPtrCtorAdoptChecker] Add a new WebK

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-12 Thread Sean Perry via cfe-commits
@@ -1273,6 +1273,168 @@ void Sema::AddImplicitMSFunctionNoBuiltinAttr(FunctionDecl *FD) { FD->addAttr(NoBuiltinAttr::CreateImplicit(Context, V.data(), V.size())); } +static bool typeListMatches(FunctionDecl *FD, +const clang::Sema::SymbolLabel

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Andy Kaylor via cfe-commits
@@ -165,6 +165,33 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr *e) { return LValue(); } +/// Emit code to compute the specified expression which +/// can have any type. The result is returned as an RValue struct. +RValue CIRGenFunction::emitAnyExpr(const E

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-03-12 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: Please wait a day or two for @jkorous-apple , @malavikasamak and @dtarditi to take another look. https://github.com/llvm/llvm-project/pull/125492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [CIR] Add transform test for cir-flatten-cfg (PR #130861)

2025-03-12 Thread Andy Kaylor via cfe-commits
andykaylor wrote: @bcardosolopes Do you have any comments on this before I merge it? https://github.com/llvm/llvm-project/pull/130861 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/130869 >From a4e8aa13f97a6c73389822f6fdcf6f5970792462 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 11 Mar 2025 17:01:44 -0700 Subject: [PATCH 1/5] [CIR] Upstream support for emitting ignored statements Thi

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-03-12 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: I don't have big concerns here. Thank you again @ivanaivanovska and @ilya-biryukov for this effort! It is also going to be easier to debug and will open more opportunities for optimization this way. (E.g., I'd like to optimize how "printf" functions are matched, but was ho

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-12 Thread Alan Zhao via cfe-commits
@@ -39,19 +39,20 @@ Timer *getPassTimer(Pass *); /// This class implements -time-passes functionality for new pass manager. /// It provides the pass-instrumentation callbacks that measure the pass /// execution time. They collect timing info into individual timers as -/// passe

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-12 Thread Sean Perry via cfe-commits
@@ -1906,6 +1906,36 @@ class Sema final : public SemaBase { ActOnPragmaMSFunction(SourceLocation Loc, const llvm::SmallVectorImpl &NoBuiltins); + /// A label from a C++ #pragma export, for a symbol that we + /// haven't seen the declaration for yet.

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-12 Thread Sean Perry via cfe-commits
@@ -1906,6 +1906,36 @@ class Sema final : public SemaBase { ActOnPragmaMSFunction(SourceLocation Loc, const llvm::SmallVectorImpl &NoBuiltins); + /// A label from a C++ #pragma export, for a symbol that we + /// haven't seen the declaration for yet.

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-12 Thread Sean Perry via cfe-commits
@@ -5722,6 +5723,7 @@ TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D) { TypeSourceInfo *ReturnTypeInfo = nullptr; QualType T = GetDeclSpecTypeForDeclarator(state, ReturnTypeInfo); + fprintf(stderr, "SDP: === GetTypeForDeclarator\n"); T->dump(); fprintf(stderr,

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-12 Thread Sean Perry via cfe-commits
https://github.com/perry-ca edited https://github.com/llvm/llvm-project/pull/111035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-12 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,54 @@ +//===--===// +// +// 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: Apac

[clang] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-12 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,54 @@ +//===--===// +// +// 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: Apac

[clang] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-12 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,54 @@ +//===--===// +// +// 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: Apac

[clang] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-12 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,54 @@ +//===--===// +// +// 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: Apac

[clang] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-12 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese commented: I have a few comments on naming, but overall this looks good. https://github.com/llvm/llvm-project/pull/130989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-12 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese edited https://github.com/llvm/llvm-project/pull/130989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > My concern is still not fixed, and Andy/Bruno still have comments here, so I > don't believe this to be ready yet. I already addressed all comments except the test for Size and it's need sizeof PR to merge, and the assert line which we need to agree on, other than that e

<    1   2   3   4   5   6   >