[clang] [FatLTO] Detect LLD linker more reliably (PR #128285)

2025-02-21 Thread Fangrui Song via cfe-commits
@@ -862,13 +862,12 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, const llvm::Triple &Triple = ToolChain.getTriple(); MaskRay wrote: This change would be desired as -fuse-ld= is better than --ld-path=. However, some users custo

[clang] [clang-offload-packager] Avoid repeated hash lookups (NFC) (PR #128297)

2025-02-21 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/128297 None >From ef4aa1dfadb97132b77a9022abc3e5095c24763c Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 21 Feb 2025 11:22:07 -0800 Subject: [PATCH] [clang-offload-packager] Avoid repeated hash lookups

[clang] [clang][bytecode] Always reject ctors of invalid parent decls (PR #128295)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes The copy constructor of an invalid declaration might still be perfectly valid, but we still need to reject it. --- Full diff: https://github.com/llvm/llvm-project/pull/128295.diff 2 Files Affected: - (mod

[clang] [clang][bytecode] Always reject ctors of invalid parent decls (PR #128295)

2025-02-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/128295 The copy constructor of an invalid declaration might still be perfectly valid, but we still need to reject it. >From 0dbe55f8a54048ea381ce39e641921c2a923475f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C

[clang] [llvm] [CMake] Fix some breakages when using ninja multi config (PR #65451)

2025-02-21 Thread via cfe-commits
https://github.com/ur4t updated https://github.com/llvm/llvm-project/pull/65451 >From 77d8ba05ccf4f8d6953373d1e4f118ddbe865be9 Mon Sep 17 00:00:00 2001 From: ur4t <46435411+u...@users.noreply.github.com> Date: Thu, 17 Aug 2023 23:21:39 +0800 Subject: [PATCH 1/2] [llvm][CMake] Fix llvm shared libr

[clang] 2c00b3b - [clang][bytecode] Silently reject ctors of invalid decls (#128290)

2025-02-21 Thread via cfe-commits
Author: Timm Baeder Date: 2025-02-22T08:01:56+01:00 New Revision: 2c00b3b859d9fca6d5565af7b3f4574013c7330e URL: https://github.com/llvm/llvm-project/commit/2c00b3b859d9fca6d5565af7b3f4574013c7330e DIFF: https://github.com/llvm/llvm-project/commit/2c00b3b859d9fca6d5565af7b3f4574013c7330e.diff L

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-21 Thread Henrich Lauko via cfe-commits
@@ -331,9 +335,38 @@ FuncType FuncType::clone(TypeRange inputs, TypeRange results) const { return get(llvm::to_vector(inputs), results[0], isVarArg()); } -mlir::ParseResult parseFuncTypeArgs(mlir::AsmParser &p, -llvm::SmallVector ¶ms, -

[clang-tools-extra] [clang-tidy] Add an option to treat warnings as errors (PR #128221)

2025-02-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM. Please note this in release note https://github.com/llvm/llvm-project/pull/128221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [clang][bytecode] Silently reject ctors of invalid decls (PR #128290)

2025-02-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/128290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-21 Thread via cfe-commits
@@ -277,16 +277,31 @@ def : GCNPat <(vt (int_amdgcn_set_inactive vt:$src, vt:$inactive)), def : GCNPat<(i32 (int_amdgcn_set_inactive_chain_arg i32:$src, i32:$inactive)), (V_SET_INACTIVE_B32 0, VGPR_32:$src, 0, VGPR_32:$inactive, (IMPLICIT_DEF))>; -let usesCustomInserter

[clang] [clang][bytecode] Silently reject ctors of invalid decls (PR #128290)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes The follow-up diagnostic would otherwise be: array.cpp:111:33: note: undefined constructor '(unnamed struct at array.cpp:111:11)' cannot be used in a constant expression array.cpp:111:11: note: declared her

[clang] [clang][bytecode] Silently reject ctors of invalid decls (PR #128290)

2025-02-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/128290 The follow-up diagnostic would otherwise be: array.cpp:111:33: note: undefined constructor '(unnamed struct at array.cpp:111:11)' cannot be used in a constant expression array.cpp:111:11: note: declared here

[clang] [clang-format] Add space after a word token (PR #92741)

2025-02-21 Thread Owen Pan via cfe-commits
owenca wrote: > Because if this code was in a .h and not a .c you wouldn't know what language > you were in This would be addressed by #128287 and #128122. https://github.com/llvm/llvm-project/pull/92741 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang-format] Add the C language instead of treating it like C++ (PR #128287)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Owen Pan (owenca) Changes Closes #128120 --- Full diff: https://github.com/llvm/llvm-project/pull/128287.diff 9 Files Affected: - (modified) clang/docs/ClangFormatStyleOptions.rst (+6-3) - (modified) clang/docs/ReleaseNotes.rst (+4-3)

[clang] [clang-format] Add the C language instead of treating it like C++ (PR #128287)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Closes #128120 --- Full diff: https://github.com/llvm/llvm-project/pull/128287.diff 9 Files Affected: - (modified) clang/docs/ClangFormatStyleOptions.rst (+6-3) - (modified) clang/docs/ReleaseNotes.rst

[clang] [clang-format] Add the C language instead of treating it like C++ (PR #128287)

2025-02-21 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/128287 Closes #128120 >From 84cfaec1f830463d2332f14eca9cfbb86919d3d5 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 21 Feb 2025 21:41:36 -0800 Subject: [PATCH] [clang-format] Add the C language instead of treating

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/6751 Here is the releva

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-02-21 Thread Trevor Laughlin via cfe-commits
https://github.com/trelau updated https://github.com/llvm/llvm-project/pull/123539 >From bb0542e8f2ad50892ee9d2c1f76ec1def85c3e56 Mon Sep 17 00:00:00 2001 From: Trevor Laughlin Date: Sun, 19 Jan 2025 19:21:10 -0500 Subject: [PATCH 1/4] [cindex] Add API to query the class methods of a type ---

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-02-21 Thread Trevor Laughlin via cfe-commits
https://github.com/trelau updated https://github.com/llvm/llvm-project/pull/123539 >From bb0542e8f2ad50892ee9d2c1f76ec1def85c3e56 Mon Sep 17 00:00:00 2001 From: Trevor Laughlin Date: Sun, 19 Jan 2025 19:21:10 -0500 Subject: [PATCH 1/4] [cindex] Add API to query the class methods of a type ---

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-02-21 Thread Trevor Laughlin via cfe-commits
https://github.com/trelau updated https://github.com/llvm/llvm-project/pull/123539 >From bb0542e8f2ad50892ee9d2c1f76ec1def85c3e56 Mon Sep 17 00:00:00 2001 From: Trevor Laughlin Date: Sun, 19 Jan 2025 19:21:10 -0500 Subject: [PATCH 1/3] [cindex] Add API to query the class methods of a type ---

[clang] [FatLTO] Detect LLD linker more reliably (PR #128285)

2025-02-21 Thread Vincent Lee via cfe-commits
https://github.com/thevinster updated https://github.com/llvm/llvm-project/pull/128285 >From b8d961acfa2bf17486d63de9481ff46445d6b38f Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Fri, 21 Feb 2025 20:33:25 -0800 Subject: [PATCH 1/2] [FatLTO] Detect LLD linker more reliably --- clang/lib/Dr

[clang] ffc61dc - [clang-format] Allow specifying the language for `.h` files (#128122)

2025-02-21 Thread via cfe-commits
Author: Owen Pan Date: 2025-02-21T20:46:43-08:00 New Revision: ffc61dc393e4224899c2496871f3ec3b3a1babf1 URL: https://github.com/llvm/llvm-project/commit/ffc61dc393e4224899c2496871f3ec3b3a1babf1 DIFF: https://github.com/llvm/llvm-project/commit/ffc61dc393e4224899c2496871f3ec3b3a1babf1.diff LOG:

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/128122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FatLTO] Detect LLD linker more reliably (PR #128285)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Vincent Lee (thevinster) Changes It's possible to have an `ld-path` point to a linker that doesn't have the `ld.lld` filename (e.g. linker wrapper that may emit telemetry before invoking the linker). This

[clang] [X86] Allow using the lzcnt intrinsics for non-LZCNT targets (PR #128284)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Phoebe Wang (phoebewang) Changes Similar to D14748, we can relax lzcnt intrinsics too, especially with improved BSR lowering by #123623 --- Full diff: https://github.com/llvm/llvm-project/pull/128284.diff

[clang] [X86] Allow using the lzcnt intrinsics for non-LZCNT targets (PR #128284)

2025-02-21 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang created https://github.com/llvm/llvm-project/pull/128284 Similar to D14748, we can relax lzcnt intrinsics too, especially with improved BSR lowering by #123623 >From eef9ec3ca38a2ba1dd12c8a8f8bfcacf38ab7926 Mon Sep 17 00:00:00 2001 From: "Wang, Phoebe" Date: Sat,

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread Owen Pan via cfe-commits
@@ -3353,7 +3353,12 @@ struct FormatStyle { } bool isTableGen() const { return Language == LK_TableGen; } - /// Language, this format style is targeted at. + /// The language that this format style targets. + /// \note + /// You can also specify the language (``Cpp``

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/128122 >From 507c54acac3e73826f63691c901ceba9c569869f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 20 Feb 2025 20:02:44 -0800 Subject: [PATCH 1/2] [clang-format] Allow specifying the language for `.h` files Clos

[clang] [clang-format] Allow specifying the language for `.h` files (PR #128122)

2025-02-21 Thread Owen Pan via cfe-commits
owenca wrote: > I think > > ``` > // clang-format Language: ObjC > ``` > > is fine, I just wondered if we wanted to support the Emacs mode as well.. > (maybe a later commit if someone specifically asks) Got it, but nah. https://github.com/llvm/llvm-project/pull/128122 ___

[clang] Add unsigned integer overloads for abs (PR #128257)

2025-02-21 Thread Farzon Lotfi via cfe-commits
@@ -94,3 +122,60 @@ double3 test_abs_double3(double3 p0) { return abs(p0); } // CHECK-LABEL: define noundef nofpclass(nan inf) <4 x double> @_Z16test_abs_double4 // CHECK: call reassoc nnan ninf nsz arcp afn <4 x double> @llvm.fabs.v4f64( double4 test_abs_double4(double4 p0) {

[clang] Add unsigned integer overloads for abs (PR #128257)

2025-02-21 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/128257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] workflows/release-binaries: Enable Windows x86 builds (PR #128274)

2025-02-21 Thread Tom Stellard via cfe-commits
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/128274 None >From 29b82de7c0ac1cd008a5ddc79c42f5cd492694a7 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 22 Feb 2025 03:08:24 + Subject: [PATCH] workflows/release-binaries: Enable Windows x86 builds ---

[clang] Add clang atomic control options and attribute (PR #114841)

2025-02-21 Thread Yaxun Liu via cfe-commits
@@ -1101,6 +1107,187 @@ inline void FPOptions::applyChanges(FPOptionsOverride FPO) { *this = FPO.applyOverrides(*this); } +// The three atomic code-generation options. +// The canonical (positive) names are: +// "remote_memory", "fine_grained_memory", and "ignore_denormal

[clang] [CIR] Initial implementation of lowering CIR to MLIR (PR #127835)

2025-02-21 Thread Ronan Keryell via cfe-commits
keryell wrote: I appreciate the parallelism for sure! :smile: It would be nice if your team can book more time to work on the fundamental issues related to CIR→MLIR in the incubator. https://github.com/llvm/llvm-project/pull/127835 ___ cfe-commits mai

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread via cfe-commits
@@ -867,18 +868,18 @@ ProgramStateRef createContainerBegin(ProgramStateRef State, return setContainerData(State, Cont, CData); } -ProgramStateRef createContainerEnd(ProgramStateRef State, const MemRegion *Cont, - const Expr *E, QualType T,

[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-02-21 Thread via cfe-commits
https://github.com/isuckatcs updated https://github.com/llvm/llvm-project/pull/128265 >From c13cf10fe9f63c4fa361985388ab1ab6c7e55514 Mon Sep 17 00:00:00 2001 From: isuckatcs <65320245+isucka...@users.noreply.github.com> Date: Mon, 17 Feb 2025 22:50:49 +0100 Subject: [PATCH 1/3] add new check --

[clang] Add unsigned integer overloads for abs (PR #128257)

2025-02-21 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/128257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-21 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,19 @@ +#ifndef CLANG_CIR_PASSES_H +#define CLANG_CIR_PASSES_H + +#include "mlir/Pass/Pass.h" + +#include + +namespace cir { +namespace direct { andykaylor wrote: There will eventually be things in this file that are in the cir namespace, but not in t

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-21 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/128254 >From eaa4ca8f45d1a50d5a84ba4f701e6ad1957b549b Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 21 Feb 2025 15:47:32 -0800 Subject: [PATCH 1/2] [CIR] Add cir-opt tool to exercise CIR dialect parsing Par

[clang] Exclude RedirectingFileSystem with null OverlayFileDir in VFSUsage (PR #128267)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Hiroshi Yamauchi (hjyamauchi) Changes This is to avoid assertion failures like the following when RedirectingFileSystem's are created and used outside createVFSFromOverlayFiles. ``` Assertion failed: VFSUsage.size() == getHeaderSearchOpt

[clang] Exclude RedirectingFileSystem with null OverlayFileDir in VFSUsage (PR #128267)

2025-02-21 Thread Hiroshi Yamauchi via cfe-commits
https://github.com/hjyamauchi ready_for_review https://github.com/llvm/llvm-project/pull/128267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Exclude RedirectingFileSystem with null OverlayFileDir in VFSUsage (PR #128267)

2025-02-21 Thread Hiroshi Yamauchi via cfe-commits
https://github.com/hjyamauchi edited https://github.com/llvm/llvm-project/pull/128267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Exclude RedirectingFileSystem with null OverlayFileDir in VFSUsage (PR #128267)

2025-02-21 Thread Hiroshi Yamauchi via cfe-commits
@@ -149,11 +149,16 @@ std::vector HeaderSearch::collectVFSUsageAndClear() const { llvm::vfs::FileSystem &RootFS = FileMgr.getVirtualFileSystem(); // TODO: This only works if the `RedirectingFileSystem`s were all created by hjyamauchi wrote: This PR parti

[clang] Exclude RedirectingFileSystem with null OverlayFileDir in VFSUsage (PR #128267)

2025-02-21 Thread Hiroshi Yamauchi via cfe-commits
hjyamauchi wrote: An assertion failure like the above was encountered in the swift toolchain in the context of this PR https://github.com/swiftlang/swift/pull/78184 which uses a module map VFS overlay on top of the read-only Windows MSVC/ucrt include paths. https://github.com/llvm/llvm-projec

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-21 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,46 @@ +//===- cir-opt.cpp - CIR optimization and analysis driver -*- C++ -*-===// andykaylor wrote: Thanks, I wasn't aware of that. I'll update this. I see that I also missed the file header on one of the other files I'm adding. https://github.co

[clang] Exclude RedirectingFileSystem with null OverlayFileDir in VFSUsage (PR #128267)

2025-02-21 Thread Hiroshi Yamauchi via cfe-commits
https://github.com/hjyamauchi created https://github.com/llvm/llvm-project/pull/128267 This is to avoid assertion failures like the following when RedirectingFileSystem's are created and used outside createVFSFromOverlayFiles. ``` Assertion failed: VFSUsage.size() == getHeaderSearchOpts().VFS

[clang] [llvm] [MTE] generalize overalignment / size of MTE globals (PR #121957)

2025-02-21 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/121957 >From 2feb85c15f64546cb6874e1ca0a1310bd1e1bedd Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Tue, 7 Jan 2025 07:57:09 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-21 Thread Ronan Keryell via cfe-commits
https://github.com/keryell approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/128254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MTE] generalize overalignment / size of MTE globals (PR #121957)

2025-02-21 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/121957 >From 2feb85c15f64546cb6874e1ca0a1310bd1e1bedd Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Tue, 7 Jan 2025 07:57:09 -0800 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Fangyi Zhou (fangyi-zhou) Changes Closes #57270. This PR changes the `Stmt *` field in `SymbolConjured` with `CFGBlock::ConstCFGElementRef`. The motivation is that, when conjuring a symbol, there might not always be a s

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-21 Thread Ronan Keryell via cfe-commits
@@ -331,9 +335,38 @@ FuncType FuncType::clone(TypeRange inputs, TypeRange results) const { return get(llvm::to_vector(inputs), results[0], isVarArg()); } -mlir::ParseResult parseFuncTypeArgs(mlir::AsmParser &p, -llvm::SmallVector ¶ms, -

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-21 Thread Andy Kaylor via cfe-commits
@@ -2,12 +2,12 @@ // RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - | FileCheck %s andykaylor wrote: https://github.com/llvm/llvm-project/pull/128254 https://github.com/llvm/llvm-project/pull/128089 ___

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread via cfe-commits
https://github.com/isuckatcs edited https://github.com/llvm/llvm-project/pull/128251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread via cfe-commits
https://github.com/isuckatcs edited https://github.com/llvm/llvm-project/pull/128251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread via cfe-commits
@@ -1515,7 +1515,8 @@ void CStringChecker::evalCopyCommon(CheckerContext &C, const CallEvent &Call, // conjure a return value for later. if (lastElement.isUnknown()) lastElement = C.getSValBuilder().conjureSymbolVal( -nullptr, Call.getOriginExpr

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread via cfe-commits
@@ -1376,8 +1379,8 @@ StoreRef RegionStoreManager::invalidateRegions( } RegionBindingsRef B = getRegionBindings(store); - InvalidateRegionsWorker W(*this, StateMgr, B, S, Count, LCtx, IS, ITraits, -Invalidated, GlobalsFilter); + InvalidateRegi

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread via cfe-commits
@@ -82,7 +82,7 @@ void UnarySymExpr::dumpToStream(raw_ostream &os) const { void SymbolConjured::dumpToStream(raw_ostream &os) const { os << getKindStr() << getSymbolID() << '{' << T << ", LC" << LCtx->getID(); - if (S) + if (const auto *S = getStmt()) isuc

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread via cfe-commits
https://github.com/isuckatcs requested changes to this pull request. So far we have some progress, so keep it up. Keep in mind that we'll also need to update `SValExplainer`, but you'll see it once you run the tests and start seeing the warning messages. https://github.com/llvm/llvm-project/pu

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread via cfe-commits
@@ -844,7 +845,7 @@ SymbolRef getContainerEnd(ProgramStateRef State, const MemRegion *Cont) { return CDataPtr->getEnd(); } -ProgramStateRef createContainerBegin(ProgramStateRef State, +ProgramStateRef createContainerBegin(CheckerContext &C, ProgramStateRef State,

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread via cfe-commits
@@ -102,7 +104,12 @@ class SymbolConjured : public SymbolData { public: /// It might return null. - const Stmt *getStmt() const { return S; } + const Stmt *getStmt() const { +if (auto Stmt = ElemRef->getAs()) { + return Stmt->getStmt(); +} +return nullptr;

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread via cfe-commits
https://github.com/isuckatcs edited https://github.com/llvm/llvm-project/pull/128251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [test] assert padding in memtag-globals test (PR #128259)

2025-02-21 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/128259 >From 19e50c78a6922dd64dce764bb9d27d6e3bb5cbad Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Fri, 21 Feb 2025 17:05:04 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-02-21 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/96417 >From 014fc73adfccac9f0fc3c29b22c6b7105098182b Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sun, 23 Jun 2024 00:07:19 -0400 Subject: [PATCH 1/4] Support --sysroot= for ${arch}-windows-msvc targets I think it

[clang] [llvm] [MTE] generalize overalignment / size of MTE globals (PR #121957)

2025-02-21 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/121957 >From 2feb85c15f64546cb6874e1ca0a1310bd1e1bedd Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Tue, 7 Jan 2025 07:57:09 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] [NFC] [test] assert padding in memtag-globals test (PR #128259)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Florian Mayer (fmayer) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/128259.diff 1 Files Affected: - (modified) clang/test/CodeGen/memtag-globals-asm.cpp (+10) ``diff diff --git a/clang/test/CodeGen/memtag

[clang] [NFC] [test] assert padding in memtag-globals test (PR #128259)

2025-02-21 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/128259 None >From 19e50c78a6922dd64dce764bb9d27d6e3bb5cbad Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Fri, 21 Feb 2025 17:05:04 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [CIR] Initial implementation of lowering CIR to MLIR (PR #127835)

2025-02-21 Thread Bruno Cardoso Lopes via cfe-commits
@@ -2958,8 +2958,13 @@ defm clangir : BoolFOption<"clangir", BothFlags<[], [ClangOption, CC1Option], "">>; def emit_cir : Flag<["-"], "emit-cir">, Visibility<[ClangOption, CC1Option]>, Group, HelpText<"Build ASTs and then lower to ClangIR">; -def emit_core_mlir : Flag<["-"]

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-02-21 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/96417 >From 690011a8a37fbfa14af2b14b99a574dc5e3877ed Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sun, 23 Jun 2024 00:07:19 -0400 Subject: [PATCH] Support --sysroot= for ${arch}-windows-msvc targets I think it is

[clang] Add unsigned integer overloads for abs (PR #128257)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes This seems silly, but DXC supports unsigned integer versions of abs that are just no-ops. This adds the overloads for source compatability because apparently users actually use them... Fixes #128249 --- Full

[clang] Add unsigned integer overloads for abs (PR #128257)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Chris B (llvm-beanz) Changes This seems silly, but DXC supports unsigned integer versions of abs that are just no-ops. This adds the overloads for source compatability because apparently users actually use them... Fixes #128249 --

[clang] Add unsigned integer overloads for abs (PR #128257)

2025-02-21 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/128257 This seems silly, but DXC supports unsigned integer versions of abs that are just no-ops. This adds the overloads for source compatability because apparently users actually use them... Fixes #128249 >From

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-02-21 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/96417 >From 014fc73adfccac9f0fc3c29b22c6b7105098182b Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sun, 23 Jun 2024 00:07:19 -0400 Subject: [PATCH 1/4] Support --sysroot= for ${arch}-windows-msvc targets I think it

[clang] [HLSL] Allow EmptyDecl in cbuffer/tbuffer (PR #128250)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes We do handle EmptyDecls in codegen already as of #124886, but we were blocking them in Sema. EmptyDecls tend to be caused by extra semicolons which are not illegal. Fixes #128238 --- Full diff: https://githu

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-21 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/128254 We need to be able to read in and parse files using the ClangIR dialect in order to test this part of the functionality. This change adds the minimum cir-opt tool needed to read and parse cir files and writ

[clang] [HLSL] Allow EmptyDecl in cbuffer/tbuffer (PR #128250)

2025-02-21 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/128250 We do handle EmptyDecls in codegen already as of #124886, but we were blocking them in Sema. EmptyDecls tend to be caused by extra semicolons which are not illegal. Fixes #128238 >From 98d8a84c508d743cb366

[clang] [llvm] [WIP][RISC-V] prototyping support for Zvbc32e and Zvkgs (PR #128243)

2025-02-21 Thread Nicolas Brunie via cfe-commits
nibrunieAtSi5 wrote: Actually, it looks like most of the support may have already been added as part of https://github.com/llvm/llvm-project/commit/a80a90e34b1f26422ebf56e922abe2c193607c81 https://github.com/llvm/llvm-project/pull/128243 ___ cfe-comm

[clang] [HLSL] add parentheses in assertion to eliminate -Wparentheses warning (PR #128246)

2025-02-21 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk closed https://github.com/llvm/llvm-project/pull/128246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7cfab6c - [HLSL] add parentheses in assertion to eliminate -Wparentheses warning (#128246)

2025-02-21 Thread via cfe-commits
Author: Oleksandr T. Date: 2025-02-22T01:56:38+02:00 New Revision: 7cfab6c4eb93f479e024f73647d86f9fc7f4b73f URL: https://github.com/llvm/llvm-project/commit/7cfab6c4eb93f479e024f73647d86f9fc7f4b73f DIFF: https://github.com/llvm/llvm-project/commit/7cfab6c4eb93f479e024f73647d86f9fc7f4b73f.diff

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread Fangyi Zhou via cfe-commits
@@ -1376,8 +1379,8 @@ StoreRef RegionStoreManager::invalidateRegions( } RegionBindingsRef B = getRegionBindings(store); - InvalidateRegionsWorker W(*this, StateMgr, B, S, Count, LCtx, IS, ITraits, -Invalidated, GlobalsFilter); + InvalidateRegi

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread Fangyi Zhou via cfe-commits
@@ -171,20 +172,27 @@ class SValBuilder { // Forwarding methods to SymbolManager. - const SymbolConjured* conjureSymbol(const Stmt *stmt, - const LocationContext *LCtx, - QualType type, -

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread Fangyi Zhou via cfe-commits
@@ -113,19 +120,21 @@ class SymbolConjured : public SymbolData { void dumpToStream(raw_ostream &os) const override; - static void Profile(llvm::FoldingSetNodeID &profile, const Stmt *S, + static void Profile(llvm::FoldingSetNodeID &profile, + const CF

[clang] [HLSL] Allow EmptyDecl in cbuffer/tbuffer (PR #128250)

2025-02-21 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/128250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Allow EmptyDecl in cbuffer/tbuffer (PR #128250)

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

[clang] [HLSL][Sema] Fix Struct Size Calculation containing 16/32 bit scalars (PR #128086)

2025-02-21 Thread Ashley Coleman via cfe-commits
@@ -0,0 +1,60 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefix=CHECK-HALF + +// RUN: %clang_cc1 -std=hlsl

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-21 Thread Fangyi Zhou via cfe-commits
https://github.com/fangyi-zhou created https://github.com/llvm/llvm-project/pull/128251 Closes #57270. This PR changes the `Stmt *` field in `SymbolConjured` with `CFGBlock::ConstCFGElementRef`. The motivation is that, when conjuring a symbol, there might not always be a statement available,

[clang] [HLSL][Sema] Fix Struct Size Calculation containing 16/32 bit scalars (PR #128086)

2025-02-21 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt updated https://github.com/llvm/llvm-project/pull/128086 >From bebfc20fac6b27d02bca9af328d0568018672c71 Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Thu, 20 Feb 2025 16:16:16 -0700 Subject: [PATCH 1/3] [hlsl][Sema] Fix Struct Size Calculation containing 16 and

[clang] [HLSL] add parentheses in assertion to eliminate -Wparentheses warning (PR #128246)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #128210 --- Full diff: https://github.com/llvm/llvm-project/pull/128246.diff 1 Files Affected: - (modified) clang/lib/CodeGen/HLSLBufferLayoutBuilder.cpp (+3-3) ``diff diff --git a/cla

[clang] [HLSL] Allow EmptyDecl in cbuffer/tbuffer (PR #128250)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Chris B (llvm-beanz) Changes We do handle EmptyDecls in codegen already as of #124886, but we were blocking them in Sema. EmptyDecls tend to be caused by extra semicolons which are not illegal. Fixes #128238 --- Full diff: https://github

[clang] [clang] Add `__builtin_sincospi` that lowers to `llvm.sincospi.*` (PR #127065)

2025-02-21 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue closed https://github.com/llvm/llvm-project/pull/127065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][X86-64] Handle Linux sigreturn trampoline when DWARF info is missing (PR #103473)

2025-02-21 Thread Michael Kolupaev via cfe-commits
https://github.com/al13n321 updated https://github.com/llvm/llvm-project/pull/103473 >From 3beb6fc40ccc0b5726b360156063ef35e2b1db3f Mon Sep 17 00:00:00 2001 From: Michael Kolupaev Date: Tue, 13 Aug 2024 21:16:08 + Subject: [PATCH] [libunwind][X86-64] Handle Linux sigreturn trampoline when

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-21 Thread Philip Reames via cfe-commits
https://github.com/preames closed https://github.com/llvm/llvm-project/pull/127694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] aef63c5 - [RISCV] Assembler support for XRivosVizip (#127694)

2025-02-21 Thread via cfe-commits
Author: Philip Reames Date: 2025-02-21T15:44:33-08:00 New Revision: aef63c506be7ba791d0e0befc48f7837638a233a URL: https://github.com/llvm/llvm-project/commit/aef63c506be7ba791d0e0befc48f7837638a233a DIFF: https://github.com/llvm/llvm-project/commit/aef63c506be7ba791d0e0befc48f7837638a233a.diff

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-21 Thread Justin Bogner via cfe-commits
bogner wrote: We can simplify the op lowering part a bit if we do #128247 first. https://github.com/llvm/llvm-project/pull/127137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] add parentheses in assertion to eliminate -Wparentheses warning (PR #128246)

2025-02-21 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/128246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][Sema] Fix Struct Size Calculation containing 16/32 bit scalars (PR #128086)

2025-02-21 Thread Ashley Coleman via cfe-commits
@@ -172,6 +172,27 @@ Decl *SemaHLSL::ActOnStartBuffer(Scope *BufferScope, bool CBuffer, return Result; } +static unsigned calculateLegacyCbufferFieldAlign(const ASTContext &Context, + QualType T) { + // Aggregate types are al

[clang] [HLSL] add parentheses in assertion to eliminate -Wparentheses warning (PR #128246)

2025-02-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Oleksandr T. (a-tarasyuk) Changes Fixes #128210 --- Full diff: https://github.com/llvm/llvm-project/pull/128246.diff 1 Files Affected: - (modified) clang/lib/CodeGen/HLSLBufferLayoutBuilder.cpp (+3-3) ``diff diff --git a/clan

[clang] [CLANG-CL] Remove the 'static' specifier for _FUNCTION_ in MSVC mode. (PR #128184)

2025-02-21 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam ready_for_review https://github.com/llvm/llvm-project/pull/128184 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2025-02-21 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/96417 >From 014fc73adfccac9f0fc3c29b22c6b7105098182b Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sun, 23 Jun 2024 00:07:19 -0400 Subject: [PATCH 1/3] Support --sysroot= for ${arch}-windows-msvc targets I think it

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-21 Thread Andy Kaylor via cfe-commits
@@ -331,9 +335,38 @@ FuncType FuncType::clone(TypeRange inputs, TypeRange results) const { return get(llvm::to_vector(inputs), results[0], isVarArg()); } -mlir::ParseResult parseFuncTypeArgs(mlir::AsmParser &p, -llvm::SmallVector ¶ms, -

  1   2   3   4   5   >