[clang] [clang][bytecode][NFC] Remove unused parameter from pushData() (PR #114801)

2024-11-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114801 None >From 503dd989be6406fafb3ebcf4ed99e8c5d81c11d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 4 Nov 2024 15:16:20 +0100 Subject: [PATCH] [clang][bytecode][NFC] Remove unused param

[clang] [Clang] Correctly initialize placeholder fields from their initializers (PR #114196)

2024-11-04 Thread Erich Keane via cfe-commits
@@ -5560,6 +5560,27 @@ ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc, Init, InitializationContext->Context); } +static FieldDecl *FindFieldDeclInstantiationPattern(const ASTContext &Ctx, +

[clang] [clang][bytecode][NFC] Fix a possible build warning (PR #114800)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes InterpBuiltinBitCast.cpp:95:3: warning: non-void function does not return a value in all control paths [-Wreturn-type] 95 | } | ^ 1 warning generated. --- Full diff: https://github.com/llvm/llvm

[clang] [clang][bytecode][NFC] Fix a possible build warning (PR #114800)

2024-11-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114800 InterpBuiltinBitCast.cpp:95:3: warning: non-void function does not return a value in all control paths [-Wreturn-type] 95 | } | ^ 1 warning generated. >From 6dd415de97a46f77bb7999d4df9e3cb4bc942a8

[clang] [clang][bytecode][NFC] Remove unused parameter from pushData() (PR #114801)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/114801.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltinBitCast.cpp (+3-4) ``diff diff --git a/clang/lib/AST/Byte

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
@@ -946,6 +955,27 @@ class DiagnosticsEngine : public RefCountedBase { return (Level)Diags->getDiagnosticLevel(DiagID, Loc, *this); } + /// Diagnostic suppression mappings can be used to suppress specific + /// diagnostics in specific files. + /// Mapping file is exp

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
@@ -477,6 +486,118 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { +public: + static std::unique_ptr + create(const llvm::MemoryBuffer &MB, st

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
@@ -477,6 +486,118 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { +public: + static std::unique_ptr + create(const llvm::MemoryBuffer &MB, st

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
@@ -70,6 +76,16 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, else Diags.setExtensionHandlingBehavior(diag::Severity::Ignored); + if (!Opts.DiagnosticSuppressionMappingsFile.empty()) { +if (auto Buf = bricknerb wrote: [Buf](https:/

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
@@ -167,4 +176,159 @@ TEST(DiagnosticTest, storedDiagEmptyWarning) { // Make sure an empty warning can round-trip with \c StoredDiagnostic. Diags.Report(CaptureConsumer.StoredDiags.front()); } + +class SuppressionMappingTest : public testing::Test { brickne

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
bricknerb wrote: Consider also testing the same warning belonging to multiple groups. https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
bricknerb wrote: Given that Test documentation build check failed, it's worth clarifying how the documentation was tested and perhaps add a few screenshots. https://github.com/llvm/llvm-project/pull/112517 ___ cfe-co

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-04 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > (@ tidy developers: what would you prefer?) I agree! https://github.com/llvm/llvm-project/pull/114715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
bricknerb wrote: Consider referring to pragmas. https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2f1a0df - [clang][sema] Fixed a crash when mixture of designated and non-designated initializers in union (#114424)

2024-11-04 Thread via cfe-commits
Author: Congcong Cai Date: 2024-11-04T22:28:07+08:00 New Revision: 2f1a0df72a3cf5b0f927a8c519cf327c4d0d008e URL: https://github.com/llvm/llvm-project/commit/2f1a0df72a3cf5b0f927a8c519cf327c4d0d008e DIFF: https://github.com/llvm/llvm-project/commit/2f1a0df72a3cf5b0f927a8c519cf327c4d0d008e.diff

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-11-04 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman you said this has happened before, but I don't see this in > history. Can you link to the commit to which you're referring? > > I only see one other commit > ([9783f28](https://github.com/llvm/llvm-project/commit/9783f28cbb155e4a8d49c12e1c60ce14dcfaf0c7)) >

[clang] [clang][sema] Fixed a crash when mixture of designated and non-designated initializers in union (PR #114424)

2024-11-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/114424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Add explicit symbol visibility macros to code generated (PR #109362)

2024-11-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/109362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Boaz Brickner via cfe-commits
@@ -0,0 +1,90 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enable users to suppress Clang's diagnostics in a +per-file granular manner. Enabli

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -122,7 +122,6 @@ class SpecialCaseList { // Returns zero if no match is found. unsigned match(StringRef Query) const; - private: StringMap> Globs; AaronBallman wrote: Oh, I missed the inner class context, that makes sense, thanks! It unfortun

[clang] 227afac - [Clang] Consider outer instantiation scopes for constraint normalization (#114749)

2024-11-04 Thread via cfe-commits
Author: Younan Zhang Date: 2024-11-04T22:35:32+08:00 New Revision: 227afac307fac0d4c8ac2a3709df415e34629883 URL: https://github.com/llvm/llvm-project/commit/227afac307fac0d4c8ac2a3709df415e34629883 DIFF: https://github.com/llvm/llvm-project/commit/227afac307fac0d4c8ac2a3709df415e34629883.diff

[clang] Add Shafik and hstk30 as maintainers for issue triage (PR #114781)

2024-11-04 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/114781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v4 (PR #108636)

2024-11-04 Thread via cfe-commits
@@ -67,6 +67,8 @@ void BPFTargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__BPF_FEATURE_SDIV_SMOD"); Builder.defineMacro("__BPF_FEATURE_GOTOL"); Builder.defineMacro("__BPF_FEATURE_ST"); +Builder.defineMacro("__BPF_FEATURE_LOAD_ACQUIRE"

[clang] [llvm] [DXIL][SPIRV] Lower WaveActiveCountBits intrinsic (PR #113382)

2024-11-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/113382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Tooling/Inclusion] Optimize cppreference parser (PR #114832)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vadim D. (vvd170501) Changes These are reverted changes from #113612. They don't affect clang itself, but speed up std symbol mapping generator by ~1.5x. On a machine with 2 cores, it previously took 3 minutes to generate the mapping, no

[clang] [Tooling/Inclusion] Optimize cppreference parser (parse each page only once) (PR #114832)

2024-11-04 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 edited https://github.com/llvm/llvm-project/pull/114832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add Shafik and hstk30 as maintainers for issue triage (PR #114781)

2024-11-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/114781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Support bitcasting into float fields (PR #114825)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/114825.diff 4 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+1-1) - (modified) clang/lib/AST/ByteCode/InterpBuiltinBitCast.cpp

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v4 (PR #108636)

2024-11-04 Thread via cfe-commits
4ast wrote: What is the status of corresponding kernel changes? Encoding discussion needs to happen on the mailing list. https://github.com/llvm/llvm-project/pull/108636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [llvm] [DXIL][SPIRV] Lower WaveActiveCountBits intrinsic (PR #113382)

2024-11-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic deleted https://github.com/llvm/llvm-project/pull/113382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Tooling/Inclusion] Optimize cppreference parser (PR #114832)

2024-11-04 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 created https://github.com/llvm/llvm-project/pull/114832 These are reverted changes from #113612. They don't affect clang itself, but speed up std symbol mapping generator by ~1.5x. On a machine with 2 cores, it previously took 3 minutes to generate the mapping, n

[clang] [flang] [flang][Driver] When linking with the Fortran runtime, the `addArchSpecificRPath()` should be called too (PR #114837)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Paul Osmialowski (pawosm-arm) Changes When linking with other runtimes (OpenMP, sanitizers), the addArchSpecificRPath() is being called. The same thing should happen when linking with the Fortran runtime,

[clang] 3f3953a - Add Shafik and hstk30 as maintainers for issue triage (#114781)

2024-11-04 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-11-04T12:19:41-05:00 New Revision: 3f3953a6e29ce52c0af767150cff3d5acde497e8 URL: https://github.com/llvm/llvm-project/commit/3f3953a6e29ce52c0af767150cff3d5acde497e8 DIFF: https://github.com/llvm/llvm-project/commit/3f3953a6e29ce52c0af767150cff3d5acde497e8.diff

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics, start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-11-04 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114481 >From 3ba88ce598aaab269169f0a5db5981c9a9ac8603 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 31 Oct 2024 22:38:36 + Subject: [PATCH 1/5] Add pass to handle AMDGCN pseudo-intrinsics (abstract placehol

[clang] [Clang] update reasoned delete diagnostic kind to use Extension, making it pedantic only (PR #114713)

2024-11-04 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/114713 >From c07fa270194eadde3ccecab368b2225702fc2e63 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 3 Nov 2024 19:22:56 +0200 Subject: [PATCH 1/2] [Clang] update reasoned delete diagnostic kind to use Exten

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/114481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-04 Thread David Olsen via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [clang] Warn on mismatched RequiresCapability attributes (PR #67520)

2024-11-04 Thread Timm Baeder via cfe-commits
@@ -2249,7 +2249,7 @@ void fooF1(Foo *f) EXCLUSIVE_LOCKS_REQUIRED(f->mu_) { f->a = 1; } -void fooF2(Foo *f); +void fooF2(Foo *f); // expected-warning {{attribute mismatch between function declarations of 'fooF2'}} void fooF2(Foo *f) EXCLUSIVE_LOCKS_REQUIRED(f->mu_) { -

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-11-04 Thread Nikita Popov via cfe-commits
nikic wrote: > Is it even possible for `isSafeToSpeculativelyExecute` to return `true` now > with the default (nullptr) CtxI for loads? Can > `isDereferenceableAndAlignedPointer` just short-circuit to `false` with null > CtxI? Yes, it's possible for anything where the derefability is not cont

[clang] [Clang] [NFC] Introduce `DynamicRecursiveASTVisitor` (PR #110040)

2024-11-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/110040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Introduce `DynamicRecursiveASTVisitor` (PR #110040)

2024-11-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this! Do you have some performance numbers you can share which sells us on the changes? https://github.com/llvm/llvm-project/pull/110040 ___ cfe-commits mailing list cfe-commits@lists

[clang] [Clang] [NFC] Introduce `DynamicRecursiveASTVisitor` (PR #110040)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,268 @@ +//===--- DynamicRecursiveASTVisitor.h - Virtual AST Visitor -*- 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] Add preliminary lifetimebound support to APINotes (PR #114830)

2024-11-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun created https://github.com/llvm/llvm-project/pull/114830 This patch adds the ability to mark function and method parameters as lifetimebound. Unfortunately, this does not support lifetimebound annotating 'this' (putting the annotation on the method type instead of

[clang] [Clang] [NFC] Introduce `DynamicRecursiveASTVisitor` (PR #110040)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,268 @@ +//===--- DynamicRecursiveASTVisitor.h - Virtual AST Visitor -*- 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] [PS5][Driver] Supply default linker scripts (PR #114546)

2024-11-04 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/114546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Also, please add a release note to `clang/docs/ReleaseNotes.rst` so users know about the new functionality. Thank you for working on this! https://github.com/llvm/llvm-project/pull/110523 ___ cfe-commits mail

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -645,6 +670,10 @@ static void handleLockReturnedAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } static void handleLocksExcludedAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + if (const auto *ParmDecl = dyn_cast(D)) +if (!checkFunParamsAreScopedLockable(S, ParmDecl,

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -1915,6 +1936,101 @@ void BuildLockset::handleCall(const Expr *Exp, const NamedDecl *D, } } + std::optional Args; + if (Exp) { +if (const auto *CE = dyn_cast(Exp)) + Args = CE->arguments(); +else if (const auto *CE = dyn_cast(Exp)) + Args = CE->ar

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -418,6 +431,18 @@ static void checkAttrArgsAreCapabilityObjs(Sema &S, Decl *D, } } +static bool checkFunParamsAreScopedLockable(Sema &S, +const ParmVarDecl *ParamDecl, +const ParsedAt

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -3984,6 +3984,10 @@ def warn_thread_attribute_decl_not_lockable : Warning< def warn_thread_attribute_decl_not_pointer : Warning< "%0 only applies to pointer types; type here is %1">, InGroup, DefaultIgnore; +def warn_thread_attribute_not_on_scoped_lockable_param : Warnin

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -1915,6 +1936,101 @@ void BuildLockset::handleCall(const Expr *Exp, const NamedDecl *D, } } + std::optional Args; + if (Exp) { +if (const auto *CE = dyn_cast(Exp)) + Args = CE->arguments(); +else if (const auto *CE = dyn_cast(Exp)) + Args = CE->ar

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -4039,6 +4043,17 @@ def warn_acquired_before : Warning< def warn_acquired_before_after_cycle : Warning< "cycle in acquired_before/after dependencies, starting with '%0'">, InGroup, DefaultIgnore; +def warn_unmatched_underlying_mutexes : Warning< + "%0 managed by '%1' is

[clang] [NFC][Clang][AArch64]Refactor implementation of Neon vectors MFloat8… (PR #114804)

2024-11-04 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/114804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Joseph Huber via cfe-commits
@@ -7,9 +7,9 @@ ; RUN: opt -O3 -S < %s | FileCheck -check-prefix=OPT %s ; RUN: opt -mtriple=amdgcn-- -O3 -S < %s | FileCheck -check-prefix=OPT %s -; RUN: opt -mtriple=amdgcn-- -O3 -mattr=+wavefrontsize32 -S < %s | FileCheck -check-prefix=OPT %s -; RUN: opt -mtriple=amdgcn-- -

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Joseph Huber via cfe-commits
@@ -7,9 +7,9 @@ ; RUN: opt -O3 -S < %s | FileCheck -check-prefix=OPT %s ; RUN: opt -mtriple=amdgcn-- -O3 -S < %s | FileCheck -check-prefix=OPT %s -; RUN: opt -mtriple=amdgcn-- -O3 -mattr=+wavefrontsize32 -S < %s | FileCheck -check-prefix=OPT %s -; RUN: opt -mtriple=amdgcn-- -

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Joseph Huber via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread via cfe-commits
https://github.com/joaosaffran edited https://github.com/llvm/llvm-project/pull/114588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-04 Thread via cfe-commits
vabridgers wrote: @NagyDonat , sounds good. Thank you! https://github.com/llvm/llvm-project/pull/114715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread via cfe-commits
https://github.com/joaosaffran edited https://github.com/llvm/llvm-project/pull/114588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move clcmacro.h to CLC library. NFC (PR #114845)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Fraser Cormack (frasercrmck) Changes --- Patch is 50.86 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/114845.diff 95 Files Affected: - (modified) libclc/amdgcn/lib/integer/popcoun

[clang] [llvm] Intrinsics/clip (PR #114588)

2024-11-04 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/114588 >From a92e64d9a769d3d7b58d5f028fc157e56b879282 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 29 Oct 2024 19:39:31 + Subject: [PATCH 1/4] adding llvm intrinsic --- clang/include/clang/Basic/Bui

[clang] Add preliminary lifetimebound support to APINotes (PR #114830)

2024-11-04 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/114830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread via cfe-commits
https://github.com/joaosaffran edited https://github.com/llvm/llvm-project/pull/114588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver][HIP] Add support for mixing AMDGCNSPIRV & concrete `offload-arch`s. (PR #113509)

2024-11-04 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/113509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/114588 >From a92e64d9a769d3d7b58d5f028fc157e56b879282 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 29 Oct 2024 19:39:31 + Subject: [PATCH 1/4] adding llvm intrinsic --- clang/include/clang/Basic/Bui

[libclc] [libclc] Move clcmacro.h to CLC library. NFC (PR #114845)

2024-11-04 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/114845 None >From e2ac0ddbd762774282e878e043bac0edbbe75407 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 4 Nov 2024 14:35:59 + Subject: [PATCH] [libclc] Move clcmacro.h to CLC library. NFC --- lib

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/114588 >From a92e64d9a769d3d7b58d5f028fc157e56b879282 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 29 Oct 2024 19:39:31 + Subject: [PATCH 1/4] adding llvm intrinsic --- clang/include/clang/Basic/Bui

[libclc] [libclc] Move clcmacro.h to CLC library. NFC (PR #114845)

2024-11-04 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: Sorry for the noise, but this felt too big to just push. It should hopefully minimize diffs in upcoming patches. https://github.com/llvm/llvm-project/pull/114845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/114588 >From a92e64d9a769d3d7b58d5f028fc157e56b879282 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 29 Oct 2024 19:39:31 + Subject: [PATCH 1/4] adding llvm intrinsic --- clang/include/clang/Basic/Bui

[libclc] [libclc] Move clcmacro.h to CLC library. NFC (PR #114845)

2024-11-04 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/114845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec edited https://github.com/llvm/llvm-project/pull/114481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Stanislav Mekhanoshin via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec commented: In general LTGM. https://github.com/llvm/llvm-project/pull/114481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Stanislav Mekhanoshin via cfe-commits
@@ -1024,6 +1024,16 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [llvm] Inbelic/as double (PR #114847)

2024-11-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic created https://github.com/llvm/llvm-project/pull/114847 None >From f340a6f0421693bd3489adc1c68983dfae9646dd Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Mon, 4 Nov 2024 17:38:36 + Subject: [PATCH 1/4] [NFC][Scalarizer][TargetTransformInfo] Add `isVectorInt

[clang] 4894c67 - [HLSL] add IsTypedResourceElementCompatible type trait (#113730)

2024-11-04 Thread via cfe-commits
Author: Joshua Batista Date: 2024-11-04T10:31:58-08:00 New Revision: 4894c67230135c8cb177c0bff45a99c8bf09cefe URL: https://github.com/llvm/llvm-project/commit/4894c67230135c8cb177c0bff45a99c8bf09cefe DIFF: https://github.com/llvm/llvm-project/commit/4894c67230135c8cb177c0bff45a99c8bf09cefe.diff

[clang] [clang] Add preliminary lifetimebound support to APINotes (PR #114830)

2024-11-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/114830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] add IsTypedResourceElementCompatible type trait (PR #113730)

2024-11-04 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 closed https://github.com/llvm/llvm-project/pull/113730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

2024-11-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/113623 >From 81dfa26a941f7a0926a3126fe3ebbb4d2a67cec1 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 23 Oct 2024 22:59:15 + Subject: [PATCH 01/13] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

2024-11-04 Thread Finn Plummer via cfe-commits
inbelic wrote: Regarding the comments about differentiating between `OpSDot/DotProduct` and `OpSDotKHR/DotProductKHR`: I agree that these are different ops/capabilities in the SPIR-V spec. However from a quick attempt to implement this, I found that since the Capabilities share the same bit v

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/114806 >From dfd42c06d94f859ec78ec1e5c3386c0e4016386f Mon Sep 17 00:00:00 2001 From: dingfei Date: Mon, 4 Nov 2024 22:37:51 +0800 Subject: [PATCH 1/5] [clang-query] add basic profiling on matching each ASTs Sample ou

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
@@ -2234,6 +2234,17 @@ enum class CXXNewInitializationStyle { Braces }; +struct ImplicitAllocationParameters { + bool PassTypeIdentity; ojhunt wrote: What is the rationale for bitfields? I'm generally opposed to flag enums as the language support is so po

[clang] [clang][bytecode] Fix bitcasting packed bool vectors (PR #114937)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This is a special case we need to handle. We don't do bitcasting _into_ such vectors yet though. --- Full diff: https://github.com/llvm/llvm-project/pull/114937.diff 2 Files Affected: - (modified) clang/l

[clang] [clang][bytecode] Fix bitcasting packed bool vectors (PR #114937)

2024-11-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114937 This is a special case we need to handle. We don't do bitcasting _into_ such vectors yet though. >From 762974afcfe2ba3e667f5362eddef0902ca23e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Dat

[compiler-rt] [libunwind] [llvm] [cmake] Remove obsolete files, docs and CMake variables related to the standalone build (PR #112741)

2024-11-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-win` running on `as-worker-93` while building `cmake,compiler-rt,libunwind,llvm,runtimes` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/b

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
@@ -4749,6 +4753,15 @@ class Sema final : public SemaBase { CXXRecordDecl *getStdBadAlloc() const; EnumDecl *getStdAlignValT() const; + ClassTemplateDecl *getStdTypeIdentity() const; + std::optional InstantiateSpecializedTypeIdentity(QualType Subject); o

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
@@ -8126,7 +8143,7 @@ class Sema final : public SemaBase { /// The scope in which to find allocation functions. enum AllocationFunctionScope { -/// Only look for allocation functions in the global scope. +/// Only look for allocation functions in the global scope -

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
@@ -3358,6 +3358,12 @@ bool FunctionDecl::isReservedGlobalPlacementOperator() const { return false; const auto *proto = getType()->castAs(); + if (proto->getNumParams() < 2) +return false; + bool IsTypeAwareAllocator = ojhunt wrote: Yeah, I think

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt converted_to_draft https://github.com/llvm/llvm-project/pull/113510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
@@ -307,6 +307,10 @@ EXTENSION(datasizeof, LangOpts.CPlusPlus) FEATURE(cxx_abi_relative_vtable, LangOpts.CPlusPlus && LangOpts.RelativeCXXABIVTables) +// Type aware allocators +FEATURE(cxx_type_aware_allocators, LangOpts.TypeAwareAllocators) ojhunt wrote: O

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread Farzon Lotfi via cfe-commits
@@ -99,6 +99,42 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslClip(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); + + Const

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Bill Wendling via cfe-commits
@@ -13,7 +13,10 @@ void init(void * __attribute__((pass_dynamic_object_size(0; // CHECK-LABEL: define dso_local void @_ZN3foo3barC1Ev( // CHECK-SAME: ptr noundef nonnull align 4 dereferenceable(1) [[THIS:%.*]]) unnamed_addr #[[ATTR0:[0-9]+]] align 2 { // CHECK-NEXT: entr

[clang] 2f13fbf - [clang][bytecode] Support bitcasting into float fields (#114825)

2024-11-04 Thread via cfe-commits
Author: Timm Baeder Date: 2024-11-05T05:52:03+01:00 New Revision: 2f13fbfcd1b874019191ab68b661d9b9d82d8556 URL: https://github.com/llvm/llvm-project/commit/2f13fbfcd1b874019191ab68b661d9b9d82d8556 DIFF: https://github.com/llvm/llvm-project/commit/2f13fbfcd1b874019191ab68b661d9b9d82d8556.diff L

<    1   2   3   4   5   6   >