[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-30 Thread via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2025-01-30 Thread Hans Wennborg via cfe-commits
zmodem wrote: Sounds good. This basically seems fine to me overall. I've just added two more comments. https://github.com/llvm/llvm-project/pull/117622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: I do th

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Michael Buch via cfe-commits
@@ -0,0 +1,37 @@ +""" +Test LLDB type promotion of unscoped enums. +""" + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestCPPEnumPromotion(TestBase): +@skipIf(debug_info=no_match([

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Michael Buch via cfe-commits
@@ -0,0 +1,37 @@ +""" +Test LLDB type promotion of unscoped enums. +""" + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestCPPEnumPromotion(TestBase): +@skipIf(debug_info=no_match([

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-30 Thread Wael Yehia via cfe-commits
@@ -785,6 +786,34 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val; } + if (const auto *A = Args.getLastArg(options::OPT_fprofile_continuous)) { +if (!

[clang] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2025-01-30 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/117622 >From 798b3f21593499194487c9877b8f4a3d9e44bb6e Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Thu, 21 Nov 2024 19:29:00 + Subject: [PATCH 1/4] Warn when unique objects might be duplicated in shared librar

[clang] 44c0719 - Silence MSVC warnings; NFC

2025-01-30 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-01-30T12:10:48-05:00 New Revision: 44c0719e77b37374c89b7fc1320664ebb404323d URL: https://github.com/llvm/llvm-project/commit/44c0719e77b37374c89b7fc1320664ebb404323d DIFF: https://github.com/llvm/llvm-project/commit/44c0719e77b37374c89b7fc1320664ebb404323d.diff

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-30 Thread Aidan Goldfarb via cfe-commits
@@ -11714,13 +11714,38 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } - case TemplateDeductionResult::InvalidExplicitArguments: + case TemplateDeductionResult::InvalidExplicitArguments: { assert(ParamD && "no parameter f

[clang] 2f48ca3 - Revert "Silence MSVC warnings; NFC"

2025-01-30 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-01-30T12:23:18-05:00 New Revision: 2f48ca3aec4aa81b81d8591773bf29b4c72c623f URL: https://github.com/llvm/llvm-project/commit/2f48ca3aec4aa81b81d8591773bf29b4c72c623f DIFF: https://github.com/llvm/llvm-project/commit/2f48ca3aec4aa81b81d8591773bf29b4c72c623f.diff

[clang] Reapply "[ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass" (#125032) (PR #125037)

2025-01-30 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/125037 >From a5491f8a078f912c6a2de9b33f1915ca88e679d2 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Thu, 30 Jan 2025 07:04:13 + Subject: [PATCH 1/3] Reapply "[ubsan] Connect -fsanitize-skip-hot-cutoff to Lo

[clang] 9c0606a - Reapply "[ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass" (#125032) (#125037)

2025-01-30 Thread via cfe-commits
Author: Thurston Dang Date: 2025-01-30T09:37:16-08:00 New Revision: 9c0606a08b7e81df59afa3894830cb5c374f99ac URL: https://github.com/llvm/llvm-project/commit/9c0606a08b7e81df59afa3894830cb5c374f99ac DIFF: https://github.com/llvm/llvm-project/commit/9c0606a08b7e81df59afa3894830cb5c374f99ac.diff

[clang] Reapply "[ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass" (#125032) (PR #125037)

2025-01-30 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/125037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass" (#125032) (PR #125037)

2025-01-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-dylib` running on `linaro-flang-aarch64-dylib` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/9643 Here is the relevant

[clang] [Clang][NFC] Add special handling of mfloat8 in initializer lists (PR #125097)

2025-01-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Lukacma) Changes This patch fixes assertion failures in clang, caused by unique properties of _mfp8 type, namely it not being either scalar or vector type and it not being either integer or float type. --- Full diff: https://githu

[clang] [Clang][NFC] Add special handling of mfloat8 in initializer lists (PR #125097)

2025-01-30 Thread via cfe-commits
https://github.com/Lukacma created https://github.com/llvm/llvm-project/pull/125097 This patch fixes assertion failures in clang, caused by unique properties of _mfp8 type, namely it not being either scalar or vector type and it not being either integer or float type. >From 021481832a31f7d6c

[clang] [Clang][NFC] Add special handling of mfloat8 in initializer lists (PR #125097)

2025-01-30 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Please don't mark this "NFC"; I'd consider this a functional change, even if it doesn't have any obvious effect on non-asserts builds. https://github.com/llvm/llvm-project/pull/125097 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang] Return larger CXX records in memory (PR #120670)

2025-01-30 Thread Eli Friedman via cfe-commits
@@ -1334,6 +1334,16 @@ class X86_64ABIInfo : public ABIInfo { return T.isOSLinux() || T.isOSNetBSD(); } + bool returnCXXRecordGreaterThan128InMem() const { +// Clang <= 20.0 did not do this. +if (getContext().getLangOpts().getClangABICompat() <= +LangOpt

[clang] [compiler-rt] [llvm] Revert "Reapply "[ORC] Enable JIT support for the compact-unwind frame..." with fixes." (PR #125098)

2025-01-30 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir created https://github.com/llvm/llvm-project/pull/125098 This reverts commit d6524c8dfa37634257050ca71d16e117b802181c. This reverts commit b1bd73700a1fb6f450e0f6f9c405a9c8bde2cae7. This was causing bot failures on Darwin https://green.lab.llvm.org/job/llvm.org/j

[clang] 845cc96 - [clang][llvm][aarch64][win] Add a clang flag and module attribute for import call optimization, and remove LLVM flag (#122831)

2025-01-30 Thread via cfe-commits
Author: Daniel Paoliello Date: 2025-01-30T09:51:43-08:00 New Revision: 845cc968e987492bda6a62c9a87cd96cfc631d5b URL: https://github.com/llvm/llvm-project/commit/845cc968e987492bda6a62c9a87cd96cfc631d5b DIFF: https://github.com/llvm/llvm-project/commit/845cc968e987492bda6a62c9a87cd96cfc631d5b.di

[clang] [llvm] [clang][llvm][aarch64][win] Add a clang flag and module attribute for import call optimization, and remove LLVM flag (PR #122831)

2025-01-30 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello closed https://github.com/llvm/llvm-project/pull/122831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] Revert "Reapply "[ORC] Enable JIT support for the compact-unwind frame..." with fixes." (PR #125098)

2025-01-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ben Langmuir (benlangmuir) Changes This reverts commit d6524c8dfa37634257050ca71d16e117b802181c. This reverts commit b1bd73700a1fb6f450e0f6f9c405a9c8bde2cae7. This was causing bot failures on Darwin https://green.lab.llvm.org/job/llvm.or

[clang] [Clang][NFC] Add special handling of mfloat8 in initializer lists (PR #125097)

2025-01-30 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 7441e87fe05376782d0ddb90a13e1756eb1b1976 021481832a31f7d6c01f6faec5140498641eb37b --e

[clang] WIP: [clang] MicrosoftCXXABI: Fix exception copy constructor LUT after loading AST (PR #114075)

2025-01-30 Thread Andrey Glebov via cfe-commits
https://github.com/glebov-andrey updated https://github.com/llvm/llvm-project/pull/114075 >From 5f1516f3d010afbb6217b542816f0c32c9903d67 Mon Sep 17 00:00:00 2001 From: Andrey Glebov Date: Mon, 28 Oct 2024 00:02:51 +0300 Subject: [PATCH 1/5] [clang] MicrosoftCXXABI: restore the RecordToCopyCtor

[clang] [llvm] [Clang] [OpenMP] Add support for '#pragma omp stripe'. (PR #119891)

2025-01-30 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: @Meinersbur Would love to check this off. Can you please take another look? Thanks. https://github.com/llvm/llvm-project/pull/119891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][True16][MC][CodeGen] true16 for v_alignbyte_b32 (PR #119750)

2025-01-30 Thread Brox Chen via cfe-commits
https://github.com/broxigarchen updated https://github.com/llvm/llvm-project/pull/119750 >From 68ba9f46992b683dcff947e929e5050691acf0f1 Mon Sep 17 00:00:00 2001 From: guochen2 Date: Thu, 12 Dec 2024 13:33:14 -0500 Subject: [PATCH 1/4] True16 for v_alignbyte_b32 in MC --- clang/lib/CodeGen/CGB

[clang] [llvm] [AMDGPU][True16][MC][CodeGen] true16 for v_alignbyte_b32 (PR #119750)

2025-01-30 Thread Brox Chen via cfe-commits
@@ -3802,6 +3802,26 @@ def : FPMinCanonMaxPat, fmaximum_oneuse>; } +let True16Predicate = UseFakeTrue16Insts in +def : GCNPat < +(i32 (int_amdgcn_alignbyte (i32 (VOP3OpSelMods i32:$src0, i32:$src0_modifiers)), + (i32 (VOP3OpSelMods i32:$src1, i32:$sr

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-01-30 Thread André Brand via cfe-commits
https://github.com/thebrandre updated https://github.com/llvm/llvm-project/pull/124409 From bc59af3d2f6cd8c4e27628f662e39fdc28e88679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Brand?= Date: Wed, 22 Jan 2025 19:23:06 +0100 Subject: [PATCH 1/4] [clang] Add 'instantiated_from' for enums

[clang] Reapply 44c0719e77b37374c89b7fc1320664ebb404323d with fix; NFC (PR #125100)

2025-01-30 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks https://github.com/llvm/llvm-project/pull/125100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

2025-01-30 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,41 @@ +//- LowerToLLVM.cpp - Lowering from CIR to LLVMIR -===// +// +// 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: Apa

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

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

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

2025-01-30 Thread Aaron Ballman via cfe-commits
@@ -7,42 +7,56 @@ //===--===// #include "clang/CIR/FrontendAction/CIRGenAction.h" -#include "clang/CIR/CIRGenerator.h" -#include "clang/Frontend/CompilerInstance.h" - #include "mlir/IR/MLIRContext.h" #inclu

[clang] [flang] [llvm] [Clang] Remove ARCMigrate (PR #119269)

2025-01-30 Thread via cfe-commits
@@ -22,7 +22,7 @@ config.host_cxx = "@CMAKE_CXX_COMPILER@" config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@" config.have_zlib = @LLVM_ENABLE_ZLIB@ config.have_zstd = @LLVM_ENABLE_ZSTD@ -config.clang_arcmt = @CLANG_ENABLE_ARCMT@ +config.clang_objc_rewriter = "@CLANG_ENABLE_OBJC

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

2025-01-30 Thread Yaxun Liu via cfe-commits
@@ -2355,6 +2355,14 @@ def fsymbol_partition_EQ : Joined<["-"], "fsymbol-partition=">, Group, Visibility<[ClangOption, CC1Option]>, MarshallingInfoString>; +def fatomic_EQ : CommaJoined<["-"], "fatomic=">, Group, + Visibility<[ClangOption, CC1Option]>, + HelpText<"Speci

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-01-30 Thread Eli Friedman via cfe-commits
@@ -82,7 +82,7 @@ define void @test_store(ptr %p) { @G = external global ptr define i8 @test_store_capture(ptr %p) { -; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: read, inaccessiblemem: none) +; FNATTRS: Functio

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-30 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: > I wanted to push to your branch but for some reason I could not. Here is what > I would have proposed to unblock this change: > > ```diff > commit ab9670b613be2bdd802342f031bd5e3d20680925 > Author: Balazs Benics > Date: 2025.01.29 13:02:16 > > Add a unittest demons

[clang] [Clang] Add GCC's __builtin_stack_address() to Clang. (PR #121332)

2025-01-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: Other builtins like __builtin_frame_address and __builtin_return_address map onto an llvm intrinsic like llvm.frameaddress or llvm.returnaddress. What's the reason for not following this design for __builtin_stack_address? https://github.com/llvm/llvm-projec

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-30 Thread Ziqing Luo via cfe-commits
@@ -124,24 +124,26 @@ void ExprEngine::VisitObjCForCollectionStmt(const ObjCForCollectionStmt *S, bool isContainerNull = state->isNull(collectionV).isConstrainedTrue(); - ExplodedNodeSet dstLocation; - evalLocation(dstLocation, S, elem, Pred, state, elementV, false); ---

[clang] [Clang] [Tests] Canonicalise CLANG_ENABLE_OBJC_REWRITER properly (PR #125117)

2025-01-30 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/125117 Canonicalise this CMake variable properly as suggested in https://github.com/llvm/llvm-project/pull/119269#discussion_r1935034073 >From 381054f5efae6c5c56317e08aeb718b2b5ad02d5 Mon Sep 17 00:00:00 2001 From: S

[clang] [Clang] [Tests] Canonicalise CLANG_ENABLE_OBJC_REWRITER properly (PR #125117)

2025-01-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes Canonicalise this CMake variable properly as suggested in https://github.com/llvm/llvm-project/pull/119269#discussion_r1935034073 --- Full diff: https://github.com/llvm/llvm-project/pull/125117.diff 2 Files Affec

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-30 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/124477 >From b932fb61338ed6ec47db351240dc65b9454ba28c Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Thu, 30 Jan 2025 12:24:45 -0800 Subject: [PATCH 1/2] [StaticAnalyzer] Add reproducers for a bug in VisitObjCFo

[clang] [llvm] [mlir] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)

2025-01-30 Thread Eli Friedman via cfe-commits
@@ -672,13 +703,15 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F, Changed |= setDoesNotThrow(F); Changed |= setDoesNotCapture(F, 0); Changed |= setOnlyReadsMemory(F, 0); +Changed |= setOnlyAccessesErrnoMemory(F); break; case LibFunc_ctermid:

[clang] [llvm] [mlir] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)

2025-01-30 Thread Eli Friedman via cfe-commits
@@ -672,13 +703,15 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F, Changed |= setDoesNotThrow(F); Changed |= setDoesNotCapture(F, 0); Changed |= setOnlyReadsMemory(F, 0); +Changed |= setOnlyAccessesErrnoMemory(F); efriedma-quic wrote:

[clang] [llvm] [mlir] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)

2025-01-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/124742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)

2025-01-30 Thread Eli Friedman via cfe-commits
@@ -703,13 +737,15 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F, Changed |= setDoesNotCapture(F, 1); Changed |= setOnlyReadsMemory(F, 0); Changed |= setOnlyReadsMemory(F, 1); +Changed |= setOnlyAccessesErrnoMemory(F); break; case LibFunc_fdope

[clang] [llvm] [mlir] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)

2025-01-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Please take a second look at your markings: in particular, syscalls with side-effects should be treated as modifying inaccessible memory. https://github.com/llvm/llvm-project/pull/124742 ___ cfe-commits mail

[clang] [llvm] [mlir] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)

2025-01-30 Thread Eli Friedman via cfe-commits
@@ -703,13 +737,15 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F, Changed |= setDoesNotCapture(F, 1); Changed |= setOnlyReadsMemory(F, 0); Changed |= setOnlyReadsMemory(F, 1); +Changed |= setOnlyAccessesErrnoMemory(F); efriedma-quic wr

[clang] 38ddcb7 - [CIR] Add framework for CIR to LLVM IR lowering (#124650)

2025-01-30 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-01-30T13:11:25-08:00 New Revision: 38ddcb7e3639438dd925229bbbfb20fbcfb23f7f URL: https://github.com/llvm/llvm-project/commit/38ddcb7e3639438dd925229bbbfb20fbcfb23f7f DIFF: https://github.com/llvm/llvm-project/commit/38ddcb7e3639438dd925229bbbfb20fbcfb23f7f.diff L

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

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

[clang] [AArch64] Enable vscale_range with +sme (PR #124466)

2025-01-30 Thread Amara Emerson via cfe-commits
https://github.com/aemerson approved this pull request. https://github.com/llvm/llvm-project/pull/124466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix false negative when value initializing a field annotated with [[clang::require_field_initialization]] (PR #124329)

2025-01-30 Thread via cfe-commits
llvmbot wrote: >> this would need to be backported >> (https://releases.llvm.org/19.1.0/docs/GitHub.html#backporting-fixes-to-the-release-branches). > >Oh, @AaronBallman - would you mind adding this as a milestone so I can >`/cherry-pick` here? Error: Command failed due to missing milestone.

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-30 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: @steakhal I have added your test on behalf of you here: https://github.com/llvm/llvm-project/pull/124477/commits/b932fb61338ed6ec47db351240dc65b9454ba28c https://github.com/llvm/llvm-project/pull/124477 ___ cfe-commits mailing list

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-01-30 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/115099 >From e5f485ad8000c296229794346fdd627b90e504d2 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 5 Nov 2024 16:05:53 -0800 Subject: [PATCH 1/4] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts

[clang] [libcxx] [libc++] Rename `__` prefix to `__libcpp_` for locale related functions (PR #119241)

2025-01-30 Thread Louis Dionne via cfe-commits
ldionne wrote: Closing in the meantime, please reopen this PR or create a new one with the new approach whenever you're ready! https://github.com/llvm/llvm-project/pull/119241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [llvm] [NVPTX] Add tcgen05 alloc/dealloc intrinsics (PR #124961)

2025-01-30 Thread Artem Belevich via cfe-commits
@@ -962,6 +962,109 @@ The ``griddepcontrol`` intrinsics allows the dependent grids and prerequisite gr For more information, refer `PTX ISA `__. +

[clang] WIP: [clang] MicrosoftCXXABI: Serialize the exception copy constructor table in the AST (PR #114075)

2025-01-30 Thread Andrey Glebov via cfe-commits
@@ -2316,6 +2316,20 @@ void ASTDeclReader::VisitCXXConstructorDecl(CXXConstructorDecl *D) { } VisitCXXMethodDecl(D); + + // Microsoft CXX ABI specific: + // Restore the RecordToCopyCtor sidecar LUT entry so that `throw` expressions + // find the correct copy constructo

[clang] [Clang] Fix __{add, remove}_pointer in Objective-C++ (PR #123678)

2025-01-30 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 74d7f43b98910a110bc194752fca829eb19c265a https://github.com/llvm/llvm-project/actions/runs/13060196391 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-proje

[clang] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2025-01-30 Thread Devon Loehr via cfe-commits
@@ -6153,6 +6153,15 @@ def warn_static_local_in_extern_inline : Warning< def note_convert_inline_to_static : Note< "use 'static' to give inline function %0 internal linkage">; +def warn_possible_object_duplication_mutable : Warning< + "%0 is mutable, has hidden visibility,

[clang] [compiler-rt] [llvm] Revert "Reapply "[ORC] Enable JIT support for the compact-unwind frame..." with fixes." (PR #125098)

2025-01-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-dylib` running on `linaro-flang-aarch64-dylib` while building `clang,compiler-rt,llvm` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/9648 Her

[clang] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2025-01-30 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/117622 >From 798b3f21593499194487c9877b8f4a3d9e44bb6e Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Thu, 21 Nov 2024 19:29:00 + Subject: [PATCH 1/5] Warn when unique objects might be duplicated in shared librar

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

2025-01-30 Thread Yaxun Liu via cfe-commits
@@ -305,6 +305,13 @@ def err_drv_invalid_int_value : Error<"invalid integral value '%1' in '%0'">; def err_drv_invalid_value_with_suggestion : Error< "invalid value '%1' in '%0', expected one of: %2">; def err_drv_alignment_not_power_of_two : Error<"alignment is not a powe

[clang] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2025-01-30 Thread Devon Loehr via cfe-commits
@@ -13374,6 +13374,62 @@ void Sema::checkNonTrivialCUnion(QualType QT, SourceLocation Loc, .visit(QT, nullptr, false); } +bool Sema::GloballyUniqueObjectMightBeAccidentallyDuplicated( +const VarDecl *Dcl) { + if (!Dcl || !getLangOpts().CPlusPlus)

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-01-30 Thread Artem Belevich via cfe-commits
@@ -1,64 +1,40 @@ -// RUN: %clang_cc1 -triple aarch64 -verify=expected,aarch64 -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64 -verify=expected,unsupported -fsyntax-only %s // RUN: %clang_cc1 -triple loongarch64 -verify=expected,loongarch64 -fsyntax-only %s -// RUN: %clang

[clang] [PCH, CUDA] Take CUDA attributes into account (PR #125127)

2025-01-30 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B updated https://github.com/llvm/llvm-project/pull/125127 >From d6ff7dc3dcc5ca677a811888f5e67cc5aaad9d8f Mon Sep 17 00:00:00 2001 From: Artem Belevich Date: Thu, 30 Jan 2025 14:30:22 -0800 Subject: [PATCH 1/2] [PCH, CUDA] Take CUDA attributes into account During deser

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-01-30 Thread Reid Kleckner via cfe-commits
@@ -146,8 +146,13 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<256>], Features = "avx" in // current formulation is based on what was easiest to recognize from the // pre-TableGen version. -let Features = "mmx", Attributes = [NoThrow, Const] in { - def _mm_prefet

[clang] [TableGen] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125158)

2025-01-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

[clang] [TableGen] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125158)

2025-01-30 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/125158 Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Literal migration

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125157)

2025-01-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-30 Thread Balazs Benics via cfe-commits
steakhal wrote: @ziqingluo-90 I noticed you do a lot of force pushes. In general, you should strive for avoiding those and prefer merges instead, as per the usualy GitHub workflow. Remember, at llvm, a PR can only be merged using squash-merge anyways, so your history would vanish regardless.

[clang] [ARM] Empty structs are 1-byte for C++ ABI (PR #124762)

2025-01-30 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard updated https://github.com/llvm/llvm-project/pull/124762 >From 4d883f068c5061e60e90e51d149a361920b431d2 Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Thu, 12 Dec 2024 15:29:31 + Subject: [PATCH 1/7] [ARM] Empty structs are 1-byte for C++ ABI For C++ (but

[clang] 2b7509e - [clang][SME] Account for C++ lambdas in SME builtin diagnostics (#124750)

2025-01-30 Thread via cfe-commits
Author: Benjamin Maxwell Date: 2025-01-30T08:55:34Z New Revision: 2b7509e9885c9a5656bb3c201421e146a21fb88e URL: https://github.com/llvm/llvm-project/commit/2b7509e9885c9a5656bb3c201421e146a21fb88e DIFF: https://github.com/llvm/llvm-project/commit/2b7509e9885c9a5656bb3c201421e146a21fb88e.diff L

[clang] [clang][SME] Account for C++ lambdas in SME builtin diagnostics (PR #124750)

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

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve CXXDependentScopeMemberExpr (PR #124888)

2025-01-30 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. nice cleanup! https://github.com/llvm/llvm-project/pull/124888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass" (#125032) (PR #125037)

2025-01-30 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/125037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SME] Account for C++ lambdas in SME builtin diagnostics (PR #124750)

2025-01-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-dylib` running on `linaro-flang-aarch64-dylib` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/9620 Here is the relevant

[clang] [llvm] [ARM] Ensure FPU Selection can select mode correctly (PR #124935)

2025-01-30 Thread Oliver Stannard via cfe-commits
@@ -1013,3 +1013,19 @@ // CHECK-MVE1_2: #define __ARM_FEATURE_MVE 1 // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main+mve.fp -x c -E -dM %s -o - | FileCheck -check-prefix=CHECK-MVE3 %s // CHECK-MVE3: #define __ARM_FEATURE_MVE 3 + +// Cortex-R52 and Cortex-R52Plus

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

2025-01-30 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/124554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-30 Thread Ilya Biryukov via cfe-commits
@@ -68,32 +70,60 @@ static std::string getDREAncestorString(const DeclRefExpr *DRE, if (StParents.size() > 1) return "unavailable due to multiple parents"; -if (StParents.size() == 0) +if (StParents.empty()) break; St = StParents.begin()->get();

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

2025-01-30 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: I only have a few suggestions left, overall this LG. Could you also add a description for the PR that explains the motivation and approach taken for the rewrite? Benchmark numbers would also be needed there. Thanks! https://github.com/llvm/llvm-pro

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

2025-01-30 Thread Ilya Biryukov via cfe-commits
@@ -68,32 +70,60 @@ static std::string getDREAncestorString(const DeclRefExpr *DRE, if (StParents.size() > 1) return "unavailable due to multiple parents"; -if (StParents.size() == 0) +if (StParents.empty()) break; St = StParents.begin()->get();

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125023)

2025-01-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/125023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Migrate away from PointerUnion::dyn_cast (NFC) (#124884) (PR #125024)

2025-01-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/125024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125022)

2025-01-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/125022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Add MSVC mangling for the __mfp8 type (PR #124968)

2025-01-30 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/124968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Add MSVC mangling for the __mfp8 type (PR #124968)

2025-01-30 Thread Benjamin Maxwell via cfe-commits
@@ -2808,6 +2812,7 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T, Qualifiers, #define SVE_TYPE(Name, Id, SingletonId) \ case BuiltinType::Id: +#define SVE_SCALAR_TYPE(Name, MangledName, Id, SingletonId, Bits) MacDue wrote: Is there a rea

[clang] [clang:frontend] Move helper functions to common location for SemaSPIRV (PR #125045)

2025-01-30 Thread Muhammad Bassiouni via cfe-commits
https://github.com/bassiounix created https://github.com/llvm/llvm-project/pull/125045 Move helper functions out of `clang/lib/Sema/SemaHLSL.cpp` into a common location for `clang/lib/Sema/SemaSPIRV.cpp` to use. Moved functions are `CheckArgTypeIsCorrect` and `CheckAllArgTypesAreCorrect`. Thi

[clang] [clang:frontend] Move helper functions to common location for SemaSPIRV (PR #125045)

2025-01-30 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] [analyzer] Relax assertion in BugReporterVisitors.cpp isInitializationOfVar (PR #125044)

2025-01-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes If we see a variable declaration (aka. DeclStmt), and the VarRegion it declared doesn't have Stack memspace, we assumed that it must be a local static variable. However, the declared varia

[clang] [clang] Track function template instantiation from definition (PR #112241)

2025-01-30 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: This change breaks compiling Qt. To reproduce on e.g. Linux, clone https://github.com/qt/qtbase, check out the tag `v6.8.1`, configure and build it like this: ``` $ cmake .. \ -G Ninja \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -D

[clang] [clang:frontend] Move helper functions to common location for SemaSPIRV (PR #125045)

2025-01-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang Author: Muhammad Bassiouni (bassiounix) Changes Move helper functions out of `clang/lib/Sema/SemaHLSL.cpp` into a common location for `clang/lib/Sema/SemaSPIRV.cpp` to use. Moved functions are `CheckArgTypeIsCorrect` and

[clang] [AArch64] Add MSVC mangling for the __mfp8 type (PR #124968)

2025-01-30 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. https://github.com/llvm/llvm-project/pull/124968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5c24847 - Revert "[clang] Track function template instantiation from definition (#112241)"

2025-01-30 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2025-01-30T12:05:56+02:00 New Revision: 5c24847e7dba01dde230e18b39a3074022279c89 URL: https://github.com/llvm/llvm-project/commit/5c24847e7dba01dde230e18b39a3074022279c89 DIFF: https://github.com/llvm/llvm-project/commit/5c24847e7dba01dde230e18b39a3074022279c89.diff

[clang] [analyzer] Relax assertion in BugReporterVisitors.cpp isInitializationOfVar (PR #125044)

2025-01-30 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/125044 If we see a variable declaration (aka. DeclStmt), and the VarRegion it declared doesn't have Stack memspace, we assumed that it must be a local static variable. However, the declared variable may be an extern d

[clang] [AArch64] Add MSVC mangling for the __mfp8 type (PR #124968)

2025-01-30 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/124968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Track function template instantiation from definition (PR #112241)

2025-01-30 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: I pushed a revert for this myself now after running tests, to see that it didn't tie in to any other recent change. https://github.com/llvm/llvm-project/pull/112241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

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

2025-01-30 Thread via cfe-commits
@@ -16147,6 +16169,108 @@ bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor, return Invalid; } +bool Sema::isTypeAwareOperatorNewOrDelete(const NamedDecl *ND) const { + const FunctionDecl *FnDecl = nullptr; + if (auto *FTD = dyn_cast(ND)) +FnDecl = FT

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

2025-01-30 Thread via cfe-commits
@@ -3384,7 +3386,7 @@ bool FunctionDecl::isReservedGlobalPlacementOperator() const { return (proto->getParamType(1).getCanonicalType() == Context.VoidPtrTy); } -bool FunctionDecl::isReplaceableGlobalAllocationFunction( +bool FunctionDecl::isConstEvalSafeOrReplaceableGlobalA

<    1   2   3   4   5   >