[clang] [clang][ExprConst] Add diagnostics for invalid binary arithmetic (PR #118475)

2024-12-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118475 ... between unrelated declarations or literals. Leaving this small (I haven't run the whole test suite locally) to get some feedback on the wording and implementation first. The output of the sample in https:

[clang] [clang] Fix a use-after-free in expression evaluation (PR #118480)

2024-12-03 Thread kadir çetinkaya via cfe-commits
kadircet wrote: still trying to come up with a reproducer. i am also not sure if this is the best place to have the cleanup, but if i did that closer to [leaves](https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/ExprConstant.cpp#L16376-L16385) tests start failing. so open for sugge

[clang] [llvm] [AArch64] Add initial support for FUJITSU-MONAKA (PR #118432)

2024-12-03 Thread Kinoshita Kotaro via cfe-commits
https://github.com/kinoshita-fj updated https://github.com/llvm/llvm-project/pull/118432 >From bd4c80f2c16e1380be077b586cd13e4bf39f762b Mon Sep 17 00:00:00 2001 From: Kinoshita Kotaro Date: Tue, 3 Dec 2024 05:30:33 + Subject: [PATCH 1/2] [AArch64] Add initial support for FUJITSU-MONAKA Th

[clang] 61c2ac0 - Revert "[clang][bytecode] Handle __builtin_wcslen (#118446)"

2024-12-03 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-12-03T13:35:57+01:00 New Revision: 61c2ac03d85f731d75cda23d1918f03d0cb962dc URL: https://github.com/llvm/llvm-project/commit/61c2ac03d85f731d75cda23d1918f03d0cb962dc DIFF: https://github.com/llvm/llvm-project/commit/61c2ac03d85f731d75cda23d1918f03d0cb962dc.diff LO

[clang] [clang][bytecode] Fix `__extension__` handling for vector operators (PR #118482)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Don't reject them, but delegate to the subexpression. --- Full diff: https://github.com/llvm/llvm-project/pull/118482.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+3) - (modifi

[clang] [clang][bytecode] Fix `__extension__` handling for vector operators (PR #118482)

2024-12-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118482 Don't reject them, but delegate to the subexpression. >From 7576bf72f204904c65add97cdd867c41e5a3fa48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Dec 2024 13:44:14 +0100 Subject: [

[clang-tools-extra] [clangd] Support symbolTags for document symbol (PR #113669)

2024-12-03 Thread Dietrich Travkin via cfe-commits
travkin79 wrote: Hi @chouzz, I extended my prototype to create overlay icons for all Symbol Tags. I'm using another C++ code example for testing clangd's tags and my visualization. The results are promising, but I have a few questions. * Could you please check if you can also set `Final` tags?

[clang] [flang] [flang] Treat pre-processed input as fixed (PR #117563)

2024-12-03 Thread David Truby via cfe-commits
https://github.com/DavidTruby approved this pull request. LGTM, thanks for being patient with our requests for changes! https://github.com/llvm/llvm-project/pull/117563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [Clang] Enable -fpointer-tbaa by default. (PR #117244)

2024-12-03 Thread Florian Hahn via cfe-commits
fhahn wrote: ping :) @AaronBallman WDYT re making this clear in the release notes (also that there's an easy way to disable) + the ongoing work in parallel for the type sanitizer? https://github.com/llvm/llvm-project/pull/117244 ___ cfe-commits maili

[clang] [clang] Fix a use-after-free in expression evaluation (PR #118480)

2024-12-03 Thread Ilya Biryukov via cfe-commits
@@ -4515,6 +4515,8 @@ handleLValueToRValueConversion(EvalInfo &Info, const Expr *Conv, QualType Type, } APValue Lit; + // Make sure we clean up the temporary created below. + FullExpressionRAII CleanupTemps(Info); ilya-biryukov wrote: C

[clang] Pack relocations for Android API >= 28 (PR #117624)

2024-12-03 Thread via cfe-commits
https://github.com/enh-google approved this pull request. https://github.com/llvm/llvm-project/pull/117624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ff0babc - [clang][bytecode] Fix discarded pointer subtractions (#118477)

2024-12-03 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-03T14:34:32+01:00 New Revision: ff0babc9172b42a3e9f552d6959f9d98ae450633 URL: https://github.com/llvm/llvm-project/commit/ff0babc9172b42a3e9f552d6959f9d98ae450633 DIFF: https://github.com/llvm/llvm-project/commit/ff0babc9172b42a3e9f552d6959f9d98ae450633.diff L

[clang] [clang][ExprConst] Add diagnostics for invalid binary arithmetic (PR #118475)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes ... between unrelated declarations or literals. Leaving this small (I haven't run the whole test suite locally) to get some feedback on the wording and implementation first. The output of the sample in http

[clang] [llvm] [OpenMP]Initial parsing/sema support for target_device selector set (PR #118471)

2024-12-03 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj updated https://github.com/llvm/llvm-project/pull/118471 >From 9aa3ba3d602fd81a4064939c9bb176bb020c98e8 Mon Sep 17 00:00:00 2001 From: Ritanya B Bharadwaj Date: Tue, 3 Dec 2024 03:58:40 -0600 Subject: [PATCH] Initial parsing/sema support for target_device

[clang] [analyzer][Z3] Restore the original timeout of 15s (PR #118291)

2024-12-03 Thread Kristóf Umann via cfe-commits
Szelethus wrote: > I also have some just-in-case measurements cooking to confirm that we don't > observe any nondeterminism with these values. Previous measurements of mine > were made with _all_ configs set to 0. Our downstream release goes off with > the patch totally reverted. Sanity check

[clang] [clang][bytecode] Fix discarded pointer subtractions (PR #118477)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We need to pop the value. --- Full diff: https://github.com/llvm/llvm-project/pull/118477.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+4-1) - (modified) clang/test/AST/ByteCod

[clang] [clang][bytecode] Fix discarded pointer subtractions (PR #118477)

2024-12-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118477 We need to pop the value. >From 409fa110d7eeb4a91f62b64d59aecb30db700ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Dec 2024 13:00:29 +0100 Subject: [PATCH] [clang][bytecode] Fix

[clang] [clang] Fix a use-after-free in expression evaluation (PR #118480)

2024-12-03 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/118480 following ASAN failure is fixed with this patch. We store cleanups in EvalInfo, which are usually run with certain ScopeRAII objects. We can have temporaries in the cleanup stack, backed by CallStackFrame. If su

[clang] [clang] Fix a use-after-free in expression evaluation (PR #118480)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: kadir çetinkaya (kadircet) Changes following ASAN failure is fixed with this patch. We store cleanups in EvalInfo, which are usually run with certain ScopeRAII objects. We can have temporaries in the cleanup stack, backed by CallStackFrame.

[clang] [flang] [flang] Treat pre-processed input as fixed (PR #117563)

2024-12-03 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. LGTM, thank you for all the detective work! https://github.com/llvm/llvm-project/pull/117563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [flang] [flang] Treat pre-processed input as fixed (PR #117563)

2024-12-03 Thread via cfe-commits
https://github.com/macurtis-amd closed https://github.com/llvm/llvm-project/pull/117563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add support for `.cjs` as JavaScript file extension (PR #118188)

2024-12-03 Thread Jim B via cfe-commits
https://github.com/d3x0r updated https://github.com/llvm/llvm-project/pull/118188 >From 8ce527dc2cc7ac285f782648838664491abffc30 Mon Sep 17 00:00:00 2001 From: d3x0r Date: Sat, 30 Nov 2024 02:32:40 -0800 Subject: [PATCH 1/4] Add *.cjs handling for JavaScript Language. --- clang/lib/Format/For

[clang] 81d82ca - [flang] Treat pre-processed input as fixed (#117563)

2024-12-03 Thread via cfe-commits
Author: macurtis-amd Date: 2024-12-03T06:59:57-06:00 New Revision: 81d82cac8c4cbd006bf991fd7380de2d72858d1c URL: https://github.com/llvm/llvm-project/commit/81d82cac8c4cbd006bf991fd7380de2d72858d1c DIFF: https://github.com/llvm/llvm-project/commit/81d82cac8c4cbd006bf991fd7380de2d72858d1c.diff

[clang] [flang] [flang] Treat pre-processed input as fixed (PR #117563)

2024-12-03 Thread via cfe-commits
macurtis-amd wrote: > LGTM, thanks for being patient with our requests for changes! > LGTM, thank you for all the detective work! Happy to help! https://github.com/llvm/llvm-project/pull/117563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][bytecode] Fix discarded pointer subtractions (PR #118477)

2024-12-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/118477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, mostly LG! i think not leaving the default parameter values are important here to make sure we don't forget to pass the top-level config in any of the relevant places (both now, but also in the future). i know it probably comes wi

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -163,7 +163,7 @@ class Checker { unsigned ErrCount = 0; Checker(llvm::StringRef File, const ClangdLSPServer::Options &Opts) - : File(File), Opts(Opts) {} + : File(File), Opts(Opts), Index(/*SupportContainedRefs=*/false) {} kadircet wrote: why

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -108,7 +109,7 @@ class FileSymbols { /// FIXME: Expose an interface to remove files that are closed. class FileIndex : public MergedIndex { public: - FileIndex(); + FileIndex(bool SupportContainedRefs = true); kadircet wrote: same with the default param

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -69,7 +69,7 @@ enum class DuplicateHandling { /// locking when we swap or obtain references to snapshots. class FileSymbols { public: - FileSymbols(IndexContents IdxContents); + FileSymbols(IndexContents IdxContents, bool SupportContainedRefs = true); kadi

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -83,7 +83,8 @@ std::string toYAML(const Ref &); // Build an in-memory static index from an index file. // The size should be relatively small, so data can be managed in memory. std::unique_ptr loadIndex(llvm::StringRef Filename, - Symbol

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -64,16 +65,18 @@ class Dex : public SymbolIndex { typename FileRange, typename Payload> Dex(SymbolRange &&Symbols, RefsRange &&Refs, RelationsRange &&Relations, FileRange &&Files, IndexContents IdxContents, Payload &&BackingData, - size_t BackingData

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -36,7 +36,8 @@ class Dex : public SymbolIndex { public: // All data must outlive this index. template - Dex(SymbolRange &&Symbols, RefsRange &&Refs, RelationsRange &&Relations) + Dex(SymbolRange &&Symbols, RefsRange &&Refs, RelationsRange &&Relations, + bool Supp

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/117673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME] Fix bug on SMELd1St1 (PR #118109)

2024-12-03 Thread via cfe-commits
https://github.com/wwwatermiao updated https://github.com/llvm/llvm-project/pull/118109 >From 4ced088ff94ec203d24e87371fad044260f2f032 Mon Sep 17 00:00:00 2001 From: chenmiao Date: Fri, 29 Nov 2024 23:57:48 +0800 Subject: [PATCH] [AArch64][SME] Fix bug on SMELd1St1 Patch[1] has update intrinsi

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-12-03 Thread Chris B via cfe-commits
@@ -1206,6 +1202,21 @@ class SPIRVStructurizer : public FunctionPass { AU.addPreserved(); FunctionPass::getAnalysisUsage(AU); } + + void createOpSelectMerge(IRBuilder<> *Builder, BlockAddress *MergeAddress) { +Instruction *BBTerminatorInst = Builder->GetInsertBlo

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-12-03 Thread Chris B via cfe-commits
@@ -300,6 +301,36 @@ static MDTuple *emitTopLevelLibraryNode(Module &M, MDNode *RMD, return constructEntryMetadata(nullptr, nullptr, RMD, Properties, Ctx); } +// TODO: We might need to refactor this to be more generic, +// in case we need more metadata to be replaced. +stat

[clang] [flang] [flang][Driver] Support -nostdlib and -nodefaultlibs (PR #108868)

2024-12-03 Thread Mészáros Gergely via cfe-commits
@@ -5572,7 +5572,8 @@ def : Flag<["-"], "nocudalib">, Alias; def gpulibc : Flag<["-"], "gpulibc">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, HelpText<"Link the LLVM C Library for GPUs">; def nogpulibc : Flag<["-"], "nogpulibc">, Visibility<[ClangOption, C

[clang] (reland) [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118501)

2024-12-03 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google created https://github.com/llvm/llvm-project/pull/118501 The reland can go in after we fixed downstream codebases that had incorrectly placed attributes. Original commit description: Emit the "cannot be applied to types" warning instead of silently ignoring the

[clang] (reland) [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118501)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Maksim Ivanov (emaxx-google) Changes The reland can go in after we fixed downstream codebases that had incorrectly placed attributes. Original commit description: Emit the "cannot be applied to types" warning instead of silently ignoring

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-12-03 Thread Paul T Robinson via cfe-commits
@@ -1353,6 +1353,19 @@ void CodeGenFunction::EmitLifetimeEnd(llvm::Value *Size, llvm::Value *Addr) { C->setDoesNotThrow(); } +void CodeGenFunction::EmitFakeUse(Address Addr) { + // We do not emit a fake use if we want to apply optnone to this function, + // even if we mig

[clang] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-12-03 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/112035 >From a42effda1d0e8c8fc1e59ea060018225fe9ba914 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 04:30:32 -0700 Subject: [PATCH 1/3] [WebAssembly] Support the new "Lime1" CPU This adds WebAss

[clang] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-12-03 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/112035 >From a42effda1d0e8c8fc1e59ea060018225fe9ba914 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 04:30:32 -0700 Subject: [PATCH 1/2] [WebAssembly] Support the new "Lime1" CPU This adds WebAss

[clang-tools-extra] [NFC] Fix uninitialized scalar field in constructor. (PR #118324)

2024-12-03 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/118324 >From 4142b5bd36a4f7a554196687e191a09dba9e4dcf Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Mon, 2 Dec 2024 09:09:21 -0800 Subject: [PATCH 1/4] [NFC] Fix uninitialized data member in constructor. -

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-03 Thread via cfe-commits
@@ -10264,6 +10264,11 @@ def warn_depr_array_comparison : Warning< "to compare array addresses, use unary '+' to decay operands to pointers">, InGroup; +def warn_array_comparison : Warning< + "comparison between two arrays; " cor3ntin wrote: we could say

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-12-03 Thread via cfe-commits
https://github.com/SpencerAbson closed https://github.com/llvm/llvm-project/pull/117717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-03 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: char, unsigned char, signed char are very special case, please add some test case for them. https://github.com/llvm/llvm-project/pull/113144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [SPIR-V] Fixup storage class for global private (PR #116636)

2024-12-03 Thread Nathan Gauër via cfe-commits
@@ -58,6 +58,7 @@ enum class LangAS : unsigned { // HLSL specific address spaces. hlsl_groupshared, + hlsl_private, Keenuts wrote: We hoped to split the PRs between back-end and FE, shall I land both at the same time? https://github.com/llvm/llvm-proje

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-12-03 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/117732 >From 90929a23af50f7b209e68055abf4deb903a490cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 27 Nov 2024 08:

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/118428 >From aea2b4001aa8e9239909875153152083b56a6a59 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 2 Dec 2024 21:25:54 -0800 Subject: [PATCH] Add support for referencable labels for attribute documentation Th

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-03 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/118031 >From 9451a1e4f5db18d579b5f7eb206482708c9adc70 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 26 Nov 2024 22:28:16 +0100 Subject: [PATCH 1/7] Add support for '-Warray-compare' compiler flag --- cl

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-03 Thread kadir çetinkaya via cfe-commits
@@ -88,9 +90,12 @@ struct UpdateIndexCallbacks : public ParsingCallbacks { indexStdlib(CI, std::move(*Loc)); // FIndex outlives the UpdateIndexCallbacks. -auto Task = [FIndex(FIndex), Path(Path.str()), Version(Version.str()), +auto Task = [this, FIndex(FIndex

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-12-03 Thread Ties Stuij via cfe-commits
@@ -128,12 +128,14 @@ BareMetal::BareMetal(const Driver &D, const llvm::Triple &Triple, } } +namespace clang { +namespace driver { +namespace toolchains { /// Is the triple {arm,armeb,thumb,thumbeb}-none-none-{eabi,eabihf} ? -static bool isARMBareMetal(const llvm::Triple &

[clang] [flang] [flang] Treat pre-processed input as fixed (PR #117563)

2024-12-03 Thread Andrzej Warzyński via cfe-commits
@@ -777,6 +777,15 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA, addFortranDialectOptions(Args, CmdArgs); + // 'flang -E' always produces output that is suitable for use as fixed form + // Fortran. However it is only valid free form source if the origin

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/113144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes Fixed #117696 --- Full diff: https://github.com/llvm/llvm-project/pull/118315.diff 4 Files Affected: - (modified) clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp (+11-

[clang] [clang][Driver] Use shared_ptr in the Compilation class (PR #116406)

2024-12-03 Thread David Truby via cfe-commits
https://github.com/DavidTruby commented: I think you still don't need any of the shared_ptr usage here, there's no shared ownership semantics. If you change all these to unique_ptr then I think the patch would look good to me. https://github.com/llvm/llvm-project/pull/116406 __

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-12-03 Thread Ties Stuij via cfe-commits
https://github.com/stuij updated https://github.com/llvm/llvm-project/pull/117140 >From 4a85a0cd98bf328f31465d47c56640abdf7ec08c Mon Sep 17 00:00:00 2001 From: Ties Stuij Date: Fri, 15 Nov 2024 13:19:08 + Subject: [PATCH 1/7] [clang][ARM] disable frame pointers by default for bare metal AR

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-03 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/118466 `ASTImporterLookupTable` did use the `getPrimaryContext` function to get the declaration context of the inserted items. This is problematic because the primary context can change during import of AST items, mo

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes `ASTImporterLookupTable` did use the `getPrimaryContext` function to get the declaration context of the inserted items. This is problematic because the primary context can change during import of AST items,

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %check_clang_tidy -std=c++20 %s readability-use-span-first-last %t + +namespace std { +template +class span { + T* ptr; + __SIZE_TYPE__ len; + +public: + span(T* p, __SIZE_TYPE__ l) : ptr(p), len(l) {} + + span subspan(__SIZE_TYPE__ offset) const {

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,24 @@ +.. title:: clang-tidy - readability-use-span-first-last + +readability-use-span-first-last +=== + +Checks for uses of ``std::span::subspan()`` that can be replaced with clearer +``first()`` or ``last()`` member functions. These dedicat

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,125 @@ +//===--- UseSpanFirstLastCheck.cpp - clang-tidy -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,125 @@ +//===--- UseSpanFirstLastCheck.cpp - clang-tidy -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,125 @@ +//===--- UseSpanFirstLastCheck.cpp - clang-tidy -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-03 Thread Mariya Podchishchaeva via cfe-commits
@@ -540,6 +540,14 @@ namespace PR10504 { void f(A *x) { delete x; } // expected-warning {{delete called on 'PR10504::A' that is abstract but has non-virtual destructor}} } +#if __cplusplus >= 201103L +enum GH99278_1 { // expected-note {{definition of 'GH99278_1' is not comp

[clang-tools-extra] [clang-tidy] Sync ContainerSizeEmptyCheck with container-size-empty doc (PR #118459)

2024-12-03 Thread Niels Dekker via cfe-commits
https://github.com/N-Dekker created https://github.com/llvm/llvm-project/pull/118459 Brought the class documentation in sync with the user documentation at container-size-empty.rst: https://github.com/llvm/llvm-project/blob/bfb26202e05ee2932b4368b5fca607df01e8247f/clang-tools-extra/docs/clang-

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-03 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: Thanks for the reviews! Please merge the PR (I don't have write access). https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang-tools-extra] [clang-tidy] Sync ContainerSizeEmptyCheck with container-size-empty doc (PR #118459)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Niels Dekker (N-Dekker) Changes Brought the class documentation in sync with the user documentation at container-size-empty.rst: https://github.com/llvm/llvm-project/blob/bfb26202e05ee2932b4368b

[clang] 4849d59 - [clang] Warn [[clang::lifetimebound]] misusages on types (#118281)

2024-12-03 Thread via cfe-commits
Author: Maksim Ivanov Date: 2024-12-03T11:10:11+01:00 New Revision: 4849d593ab07c47f9f520bea636f62d159d57006 URL: https://github.com/llvm/llvm-project/commit/4849d593ab07c47f9f520bea636f62d159d57006 DIFF: https://github.com/llvm/llvm-project/commit/4849d593ab07c47f9f520bea636f62d159d57006.diff

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-03 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-03 Thread Haojian Wu via cfe-commits
hokein wrote: > Thanks for the reviews! Please merge the PR (I don't have write access). Done. https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-03 Thread via cfe-commits
github-actions[bot] wrote: @emaxx-google 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 b

[clang] [clang][bytecode] Handle __builtin_wcslen (PR #118446)

2024-12-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118446 ... just like strlen. >From 652b93f0487d18fc9703c4bba623149c853f9540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Dec 2024 09:39:54 +0100 Subject: [PATCH] [clang][bytecode] Handle

[clang-tools-extra] [NFC] Fix uninitialized scalar field in constructor. (PR #118324)

2024-12-03 Thread kadir çetinkaya via cfe-commits
kadircet wrote: idxcontents is only used when we have a set of file names available. hence this was only set via relevant constructors and rest of the runtime doesn't use the field. but we don't construct tons of new index instances every second. so it's totally fine to just initialize them t

[clang] [Clang] Allow LibBuiltins with placeholder return types to be called (PR #101702)

2024-12-03 Thread via cfe-commits
cor3ntin wrote: @MitalAshok ping https://github.com/llvm/llvm-project/pull/101702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

2024-12-03 Thread Julian Schmidt via cfe-commits
@@ -38,3 +29,21 @@ Example const S& s = fn(S{1}); s.v; // use after free + + +This issue can be resolved by declaring an overload of the problematic function +where the ``const &`` parameter is instead declared as ``&&``. The developer has +to ensure that the implementati

[clang] [clang][bytecode] Handle __builtin_wcslen (PR #118446)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes ... just like strlen. --- Full diff: https://github.com/llvm/llvm-project/pull/118446.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+3-1) - (modified) clang/test/AST/ByteCo

[clang] 46446bb - [clang][bytecode][NFC] Diagnose non-constexpr builtin strcmp calls (#118442)

2024-12-03 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-03T09:49:26+01:00 New Revision: 46446bb2d31a7e3b2f857613b190150d41734696 URL: https://github.com/llvm/llvm-project/commit/46446bb2d31a7e3b2f857613b190150d41734696 DIFF: https://github.com/llvm/llvm-project/commit/46446bb2d31a7e3b2f857613b190150d41734696.diff L

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

2024-12-03 Thread John McCall via cfe-commits
@@ -1085,8 +1085,10 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) { blockAddr.getPointer(), ConvertType(blockInfo.getBlockExpr()->getType())); if (IsOpenCL) { -CGM.getOpenCLRuntime().recordBlockInfo(blockInfo.BlockExpression, Inv

[clang] dd2b2b8 - [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (#111883)

2024-12-03 Thread via cfe-commits
Author: Adam Yang Date: 2024-12-03T01:16:49-08:00 New Revision: dd2b2b8bbbf4e917a84efe94cbeaaab2ed350fc9 URL: https://github.com/llvm/llvm-project/commit/dd2b2b8bbbf4e917a84efe94cbeaaab2ed350fc9 DIFF: https://github.com/llvm/llvm-project/commit/dd2b2b8bbbf4e917a84efe94cbeaaab2ed350fc9.diff LOG

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-12-03 Thread Adam Yang via cfe-commits
https://github.com/adam-yang closed https://github.com/llvm/llvm-project/pull/111883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 89a0ee8 - [clang][bytecode] Handle __builtin_wcslen (#118446)

2024-12-03 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-03T10:20:30+01:00 New Revision: 89a0ee89973c3d213c4bc11c26b41eab67e06da0 URL: https://github.com/llvm/llvm-project/commit/89a0ee89973c3d213c4bc11c26b41eab67e06da0 DIFF: https://github.com/llvm/llvm-project/commit/89a0ee89973c3d213c4bc11c26b41eab67e06da0.diff L

[clang] [clang][bytecode] Handle __builtin_wcslen (PR #118446)

2024-12-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/118446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Sync ContainerSizeEmptyCheck with container-size-empty doc (PR #118459)

2024-12-03 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 2526d5b1689389da9b194b5ec2878cfb2f4aca93 3871b186e4ea0fbcc71c54ac4053256f5afa2289 --e

[clang-tools-extra] [clang-tidy] Sync ContainerSizeEmptyCheck with container-size-empty doc (PR #118459)

2024-12-03 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. https://github.com/llvm/llvm-project/pull/118459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Reject memcpy dummy pointers after null check (PR #118460)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes To match the diagnostic output of the current interpreter. --- Full diff: https://github.com/llvm/llvm-project/pull/118460.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+4-3

[clang] [clang][bytecode] Reject memcpy dummy pointers after null check (PR #118460)

2024-12-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118460 To match the diagnostic output of the current interpreter. >From b98163a979e323e05791c866e53cfb9a977fda52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Dec 2024 11:14:37 +0100 Subje

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-12-03 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/113049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0f4dc42 - [clang][bytecode] Initialize elements in __builtin_elementwise_popcount (#118457)

2024-12-03 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-03T11:14:06+01:00 New Revision: 0f4dc4276f8dd5c5e33c22096612702ede3c81ed URL: https://github.com/llvm/llvm-project/commit/0f4dc4276f8dd5c5e33c22096612702ede3c81ed DIFF: https://github.com/llvm/llvm-project/commit/0f4dc4276f8dd5c5e33c22096612702ede3c81ed.diff L

[libclc] [libcxx] [llvm] [openmp] [polly] [llvm] Move sub-project lead maintainers into their own Maintainers.md files (PR #118309)

2024-12-03 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > For libclc maybe @tstellar -> @frasercrmck (or maybe both). I'm not opposed to this if people think it suitable. But having someone from Red Hat or AMD as co-maintainer(s) makes sense to me, as it's a project used (downstream) by several different groups. https://github.

[clang] [clang][bytecode] Initialize elements in __builtin_elementwise_popcount (PR #118457)

2024-12-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/118457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-12-03 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/113049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-12-03 Thread Haojian Wu via cfe-commits
@@ -750,6 +750,18 @@ void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, if (Field->hasInClassInitializer()) { if (VerifyOnly) return; + + // We do not want to aggressively set the hadError flag and cutoff + // parsing. Tr

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-12-03 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: Is the PR description still update-to-date? https://github.com/llvm/llvm-project/pull/113049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 356df2d - Revert "[clang] Warn [[clang::lifetimebound]] misusages on types (#118281)"

2024-12-03 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2024-12-03T12:13:13+01:00 New Revision: 356df2dd72e8299b5de58e9390283110c19f7c76 URL: https://github.com/llvm/llvm-project/commit/356df2dd72e8299b5de58e9390283110c19f7c76 DIFF: https://github.com/llvm/llvm-project/commit/356df2dd72e8299b5de58e9390283110c19f7c76.diff LO

[clang] [llvm] [OpenMP]Initial parsing/sema support for target_device selector set (PR #118471)

2024-12-03 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj created https://github.com/llvm/llvm-project/pull/118471 This patch adds initial support for target_device selector set - Section 9.2 (Spec 6.0) >From 7f64773f0d76b8fd7edf12b3a2dd791b5bd2a9bf Mon Sep 17 00:00:00 2001 From: Ritanya B Bharadwaj Date: Tue,

[clang] [llvm] [OpenMP]Initial parsing/sema support for target_device selector set (PR #118471)

2024-12-03 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] [llvm] [OpenMP]Initial parsing/sema support for target_device selector set (PR #118471)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Ritanya-B-Bharadwaj) Changes This patch adds initial support for target_device selector set - Section 9.2 (Spec 6.0) --- Patch is 81.10 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/118

[clang] [llvm] [OpenMP]Initial parsing/sema support for target_device selector set (PR #118471)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-openmp Author: None (Ritanya-B-Bharadwaj) Changes This patch adds initial support for target_device selector set - Section 9.2 (Spec 6.0) --- Patch is 81.10 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/p

[clang] [llvm] [OpenMP]Initial parsing/sema support for target_device selector set (PR #118471)

2024-12-03 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 6c7b988e64b60cff7e9f3777dfcc2b2511ee48c6 7f64773f0d76b8fd7edf12b3a2dd791b5bd2a9bf --e

  1   2   3   4   5   6   >