[clang] [analyzer] Reapply recent stack addr escape checker changes + buildbot fix (PR #126620)

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

[clang] [analyzer] Reapply recent stack addr escape checker changes + buildbot fix (PR #126620)

2025-02-11 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/126620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Document how to use perf and uftrace to debug performance issues (PR #126520)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/126520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Document how to use perf and uftrace to debug performance issues (PR #126520)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/126520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Document how to use perf and uftrace to debug performance issues (PR #126520)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/126520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Document how to use perf and uftrace to debug performance issues (PR #126520)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/126520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Document how to use perf and uftrace to debug performance issues (PR #126520)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/126520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Document how to use perf and uftrace to debug performance issues (PR #126520)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/126520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Document how to use perf and uftrace to debug performance issues (PR #126520)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/126520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Document how to use perf and uftrace to debug performance issues (PR #126520)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/126520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Document how to use perf and uftrace to debug performance issues (PR #126724)

2025-02-11 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/126724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Document how to use perf and uftrace to debug performance issues (PR #126520)

2025-02-11 Thread Balazs Benics via cfe-commits
@@ -45,3 +48,91 @@ Note: Both Chrome-tracing and speedscope tools might struggle with time traces a Luckily, in most cases the default max-steps boundary of 225 000 produces the traces of approximately that size for a single entry point. You can use ``-analyze-function=get_gl

[clang] [Offload] Treat an empty packager archicture as 'generic' (PR #126655)

2025-02-11 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/126655 >From dd5cd20fd57d1cb3c96f4e61155988ad724f25c7 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 10 Feb 2025 20:30:41 -0600 Subject: [PATCH] [Offload] Treat an empty packager archicture as 'generic' Summar

[clang] [analyzer] Remove some false negatives in StackAddrEscapeChecker (PR #125638)

2025-02-11 Thread Balazs Benics via cfe-commits
steakhal wrote: I wonder how did the "premerge" checks step succeed, if we had build errors. Does anyone know why was it green right before the merge but surfaced build errors after the merge? https://github.com/llvm/llvm-project/pull/125638 ___ cfe-c

[clang] [Offload] Treat an empty packager archicture as 'generic' (PR #126655)

2025-02-11 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/126655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen][ObjC] Invalidate cached ObjC class layout information after parsing ObjC class implementations if new ivars are added to the interface (PR #126591)

2025-02-11 Thread via cfe-commits
AZero13 wrote: > How often does this appear in practice? Normally, `NSObject` is implemented > in a shared library and it is completely valid in a non-fragile ABI for a > future version to have an extra ivar added (and, in the wild, we've seen > people do this for extra state in debug builds)

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-11 Thread Nick Sarnie via cfe-commits
@@ -1797,16 +1803,18 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { diag::err_feature_check_malformed); return II && HasExtension(*this, II->getName()); }); - } else if (II == Ident__has_builtin) { + } else if (

[clang] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking for OpenMP."… (PR #126671)

2025-02-11 Thread Joseph Huber via cfe-commits
@@ -1014,25 +1014,27 @@ RocmInstallationDetector::getCommonBitcodeLibs( bool isOpenMP = false) const { llvm::SmallVector BCLibs; - auto GPUSanEnabled = [GPUSan]() { return std::get(GPUSan); }; + // GPU Sanitizer currently only supports ASan and is enabled through host

[clang] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking for OpenMP."… (PR #126671)

2025-02-11 Thread Joseph Huber via cfe-commits
@@ -68,7 +68,7 @@ llvm::opt::DerivedArgList *AMDGPUOpenMPToolChain::TranslateArgs( Action::OffloadKind DeviceOffloadKind) const { DerivedArgList *DAL = HostTC.TranslateArgs(Args, BoundArch, DeviceOffloadKind); - if (!DAL) + if (!DAL || Args.hasArg(options::OPT_fs

[clang] [clang][bytecode] Fix diagnosing replaceable global allocator functions (PR #126717)

2025-02-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/126717 >From 111f3018ed7af1acf08fee96f7d474494b4ee9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 11 Feb 2025 12:46:27 +0100 Subject: [PATCH] [clang][bytecode] Fix diagnosing replaceable gl

[clang] [llvm] Reland "[HLSL] Implement the reflect HLSL function" (PR #125599)

2025-02-11 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,177 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -finclude-default-header -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -O1 -o - | FileChe

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-11 Thread via cfe-commits
@@ -969,6 +969,10 @@ def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>, Visibility<[ClangOption, CLOption, FlangOption]>, HelpText<"Pass to the linker">, MetaVarName<"">, Group; +def Xdist : Separate<["-"], "Xdist">, Flags<[LinkOption]>,

[clang] [Clang] Forward `-Xarch_ -Wl,foo` for GPU toolchains (PR #126248)

2025-02-11 Thread via cfe-commits
dyung wrote: > > And just now another failure: > > https://lab.llvm.org/buildbot/#/builders/190/builds/14342 > > Honestly, I don't know. I'd say that it's because we don't support offloading > on Darwin, but the triple is supposed to be x64. I could probably just set > the test to unsupported

[clang] [Clang][NFC] Introduce `--offloadlib` positive flag for `nogpulib` and alias to `--no-offloadlib` (PR #126567)

2025-02-11 Thread Yaxun Liu via cfe-commits
@@ -5618,10 +5618,18 @@ def nogpuinc : Flag<["-"], "nogpuinc">, Group, def nohipwrapperinc : Flag<["-"], "nohipwrapperinc">, Group, HelpText<"Do not include the default HIP wrapper headers and include paths">; def : Flag<["-"], "nocudainc">, Alias; -def nogpulib : Flag<["-"]

[clang] [Clang][NFC] Introduce `--offloadlib` positive flag for `nogpulib` and alias to `--no-offloadlib` (PR #126567)

2025-02-11 Thread Yaxun Liu via cfe-commits
@@ -7088,7 +7088,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } // Forward -nogpulib to -cc1. - if (Args.hasArg(options::OPT_nogpulib)) + if (!Args.hasFlag(options::OPT_offloadlib, options::OPT_no_offloadlib, true)) CmdArgs.push_back("-nogpuli

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

2025-02-11 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/125319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Change clang Driver Options to not set CXXOperatorNames (PR #126758)

2025-02-11 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/126758 >From 3b7e458bfeb2abab799789d30ebaa4b214e4168e Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Tue, 11 Feb 2025 11:07:23 -0500 Subject: [PATCH 1/3] [HLSL] Change clang Driver Options to not set CXXOperatorNam

[clang] [clang] Assert the enum FPOpts and LangOpts fit into the storage (PR #126166)

2025-02-11 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: The idea here makes sense to me and I don't mind if it lands without "NFC" in the title, but I think enforcing this at compile time would be more robust. Could we use `static_assert` with something like `llvm::BitWidth` and supporting infrastructure from `llvm/include/ADT/B

[clang] [CodeGen] Ensure relative vtables use llvm.type.checked.load.relative (PR #126785)

2025-02-11 Thread via cfe-commits
https://github.com/PiJoules created https://github.com/llvm/llvm-project/pull/126785 None >From faf20c7a0e65760e04809418869848af4a917ef5 Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Tue, 11 Feb 2025 11:31:17 -0800 Subject: [PATCH] [CodeGen] Ensure relative vtables use llvm.type.checked.l

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

2025-02-11 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: I'm seeing the same build error as the one present in the build log above: ``` clang/lib/CodeGen/CGStmt.cpp:99:11: error: enumeration value 'OMPStripeDirectiveClass' not handled in switch [-Werror,-Wswitch] 99 | switch (S->getStmtClass()) { | ^

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/120896 >From 295df258043ef5a87ae603eedd308b863bad7b59 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 22 Dec 2024 15:14:30 +0200 Subject: [PATCH 1/9] [Clang] allow restrict qualifier for array types with poin

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

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

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Oleksandr T. via cfe-commits
@@ -7409,6 +7409,11 @@ def warn_c23_compat_utf8_string : Warning< def note_cxx20_c23_compat_utf8_string_remove_u8 : Note< "remove 'u8' prefix to avoid a change of behavior; " "Clang encodes unprefixed narrow string literals as UTF-8">; +def warn_c23_compat_restrict_pointers

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -std=c23 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c17 -fsyntax-only -pedantic -verify=pedantic %s +// RUN: %clang_cc1 -std=c17 -fsyntax-only -Wpre-c2x-compat -verify=pre-c2x-compat %s + +typedef int (*T1)[2]; +restrict T1 t1;

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -std=c23 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c17 -fsyntax-only -pedantic -verify=pedantic %s +// RUN: %clang_cc1 -std=c17 -fsyntax-only -Wpre-c2x-compat -verify=pre-c2x-compat %s + +typedef int (*T1)[2]; +restrict T1 t1;

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

2025-02-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/126689 >From 32b94e342ce6eb0d3703eb66586b393c0b4fd20c Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 11 Feb 2025 01:56:50 -0500 Subject: [PATCH] [clang][HeuristicResolver] Track the expression whose type

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

2025-02-11 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (Rebased) https://github.com/llvm/llvm-project/pull/126689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

2025-02-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/126689 >From 9a11851a8057f1d0e6efcfe9ddb9038fc8ca0a98 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 11 Feb 2025 01:56:50 -0500 Subject: [PATCH] [clang][HeuristicResolver] Track the expression whose type

[clang] [clang] Assert the enum FPOpts and LangOpts fit into the storage (PR #126166)

2025-02-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. Ok, makes sense to fix the immediate problem now and follow up with the more robust fix later. Would be good if you could leave a FIXME on one of the `assert` calls in `LangOptions.h` outlining the potential improvement via `static_as

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/126796 None >From 9811b24583640d9d70e5a496d1e3444ee86fea77 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Tue, 11 Feb 2025 13:14:26 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [clang] Rename ReadPCHAndPreprocessAction (NFC) (PR #122390)

2025-02-11 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I agree that the name can be confusing. I think the original motivation for this name was to avoid spreading the concept of modular dependency scanning through the Clang codebase. Could we move this class into `Tooling/DependencyScanning` to keep that concept self-contained

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2025-02-11 Thread via cfe-commits
ruotongyu wrote: Hi, I really like this design and am trying to apply it to more architectures, such as x86. However, it seems that the jump table is not properly mapped to the instruction that references it. Do you have any suggestions on how to correctly associate the jump table with the cor

[clang] [ASTWriter] Do not allocate source location space for module maps used only for textual headers (PR #116374)

2025-02-11 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Hi @ilya-biryukov, I wanted to apologize for the late reply (I was on a leave) and thank you for going through the test case and taking time to understand why it works. Sounds good! https://github.com/llvm/llvm-project/pull/116374 ___

[clang] 5c7071e - [NFC] [clang] fix unused variable warning (#126796)

2025-02-11 Thread via cfe-commits
Author: Florian Mayer Date: 2025-02-11T13:22:22-08:00 New Revision: 5c7071e996b8b26080219038c2eb262567c18769 URL: https://github.com/llvm/llvm-project/commit/5c7071e996b8b26080219038c2eb262567c18769 DIFF: https://github.com/llvm/llvm-project/commit/5c7071e996b8b26080219038c2eb262567c18769.diff

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-11 Thread Craig Topper via cfe-commits
@@ -111,9 +115,51 @@ void RISCVABIInfo::appendAttributeMangling(StringRef AttrStr, } void RISCVABIInfo::computeInfo(CGFunctionInfo &FI) const { + unsigned ABIVLen; + switch (FI.getExtInfo().getCC()) { + default: +ABIVLen = 0; +break; + case CallingConv::CC_RISCVVL

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-11 Thread Craig Topper via cfe-commits
https://github.com/topperc requested changes to this pull request. https://github.com/llvm/llvm-project/pull/100346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-11 Thread Craig Topper via cfe-commits
@@ -359,9 +405,158 @@ ABIArgInfo RISCVABIInfo::coerceAndExpandFPCCEligibleStruct( return ABIArgInfo::getCoerceAndExpand(CoerceToType, UnpaddedCoerceToType); } +bool RISCVABIInfo::detectVLSCCEligibleStruct(QualType Ty, unsigned ABIVLen, +

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-11 Thread Craig Topper via cfe-commits
@@ -385,23 +580,50 @@ ABIArgInfo RISCVABIInfo::coerceVLSVector(QualType Ty) const { NumElts *= 8; break; default: -assert(VT->getVectorKind() == VectorKind::RVVFixedLengthData && +assert((VT->getVectorKind() == VectorKind::Generic || +VT->getVecto

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer ready_for_review https://github.com/llvm/llvm-project/pull/126796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-11 Thread Craig Topper via cfe-commits
@@ -385,23 +580,50 @@ ABIArgInfo RISCVABIInfo::coerceVLSVector(QualType Ty) const { NumElts *= 8; break; default: -assert(VT->getVectorKind() == VectorKind::RVVFixedLengthData && +assert((VT->getVectorKind() == VectorKind::Generic || +VT->getVecto

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Florian Mayer (fmayer) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/126796.diff 1 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp (+1-1) ``diff diff --git a/clang/lib/St

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-11 Thread Craig Topper via cfe-commits
@@ -359,9 +405,158 @@ ABIArgInfo RISCVABIInfo::coerceAndExpandFPCCEligibleStruct( return ABIArgInfo::getCoerceAndExpand(CoerceToType, UnpaddedCoerceToType); } +bool RISCVABIInfo::detectVLSCCEligibleStruct(QualType Ty, unsigned ABIVLen, +

[clang] [llvm] [mlir] [NVPTX] Convert scalar function nvvm.annotations to attributes (PR #125908)

2025-02-11 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/125908 >From cb6ac07e72cc1361343470842793cf9bc4995a19 Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Wed, 5 Feb 2025 18:46:03 + Subject: [PATCH 1/2] [NVPTX] Convert scalar function nvvm.annotations to attri

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: I think isa should be preferred if the result of dyncast is not used. Same applied to the surrounding ifs too. https://github.com/llvm/llvm-project/pull/126796 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [clang] Assert the enum FPOpts and LangOpts fit into the storage (PR #126166)

2025-02-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/126166 >From 85540ede2e0ba1b6f0b8a69ac6d5a6ddf56fdfc8 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 6 Feb 2025 17:41:59 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-11 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > > when -fno-math-errno is set > > What does -fno-math-errno have to do with anything? modf never sets errno > anyway. With the current `modf` builtin (not changed here) it skips the code path for emitting intrinsics when `math-errno` is enabled. I think setting `ConstIgnoring

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa commented: Oh oops, thank you for the fix. It's odd that the checks didn't catch this before the merge... https://github.com/llvm/llvm-project/pull/126796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [clang] Assert the enum FPOpts and LangOpts fit into the storage (PR #126166)

2025-02-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/126166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fix assert when constexpr size passed to snprintf() (#119786) (PR #124022)

2025-02-11 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: When possible we should always add tests, I think the right place would be: https://github.com/llvm/llvm-project/blob/main/clang/test/SemaCXX/warn-unsafe-buffer-usage-libc-functions.cpp CC @ziqingluo-90 Do we need a release note or is this feature clang-20

[clang] [llvm] [OpenMP][OpenMPIRBuilder] Support SPIR-V device variant matches (PR #126801)

2025-02-11 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/126801 running ci >From 2aca2724050b3b4d521c224bbe2f3197244ac2f3 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 11 Feb 2025 13:05:21 -0800 Subject: [PATCH] [OpenMP][OpenMPIRBuilder] Support SPIR-V device vari

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Eli Friedman via cfe-commits
@@ -1593,35 +1593,38 @@ QualType Sema::BuildQualifiedType(QualType T, SourceLocation Loc, // object or incomplete types shall not be restrict-qualified." if (Qs.hasRestrict()) { unsigned DiagID = 0; -QualType ProblemTy; - -if (T->isAnyPointerType() || T->isRefe

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2025-02-11 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert approved this pull request. LG, one minor comment https://github.com/llvm/llvm-project/pull/93365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-11 Thread Nuri Amari via cfe-commits
@@ -2142,3 +2190,327 @@ std::vector lto::generateModulesOrdering(ArrayRef R) { }); return ModulesOrdering; } + +namespace { +// For this out-of-process backend no codegen is done when invoked for each +// task. Instead we generate the required information (e.g. the summary

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2025-02-11 Thread Johannes Doerfert via cfe-commits
@@ -1359,4 +1362,107 @@ COMPILER_RT_VISIBILITY int __llvm_profile_set_file_object(FILE *File, return 0; } +int __llvm_write_custom_profile(const char *Target, +const __llvm_profile_data *DataBegin, +const __llv

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-11 Thread Galen Elias via cfe-commits
@@ -28430,6 +28430,36 @@ TEST_F(FormatTest, ShortNamespacesOption) { "}}} // namespace foo::bar::baz", "namespace foo { namespace bar { namespace baz { class qux; } } }", Style); + Style.FixNamespaceComments = false; + + Style.BreakBeforeBraces = FormatStyle

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-11 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The public libclang interface needs to be stable, yes... but in this context, that's just the interfaces declared in clang/include/clang-c/CXString.h. We can do whatever we want with the internal interface in clang/tools/libclang/CXString.h. https://github.com/llvm/llvm-p

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-11 Thread via cfe-commits
@@ -116,7 +117,18 @@ BitcodeCompiler::BitcodeCompiler(COFFLinkerContext &c) : ctx(c) { // Initialize ltoObj. lto::ThinBackend backend; - if (ctx.config.thinLTOIndexOnly) { + if (!ctx.config.DTLTODistributor.empty()) { +StringRef version = getenv("LLD_VERSION"); // F

[clang] [llvm] [NVPTX] Add intrinsics for redux.sync f32 instructions (PR #126664)

2025-02-11 Thread Durgadoss R via cfe-commits
@@ -328,6 +328,24 @@ defm REDUX_SYNC_AND : REDUX_SYNC<"and", "b32", int_nvvm_redux_sync_and>; defm REDUX_SYNC_XOR : REDUX_SYNC<"xor", "b32", int_nvvm_redux_sync_xor>; defm REDUX_SYNC_OR : REDUX_SYNC<"or", "b32", int_nvvm_redux_sync_or>; +multiclass REDUX_SYNC_F { + def : NVP

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2025-02-11 Thread Richard Li via cfe-commits
https://github.com/chomosuke updated https://github.com/llvm/llvm-project/pull/118568 >From b43a2602025bdacea06ced5171904fb5d765de9f Mon Sep 17 00:00:00 2001 From: chomosuke Date: Tue, 3 Dec 2024 07:10:33 + Subject: [PATCH 1/5] fixed removeFunctionArgs don't remove comma --- .../clang-tid

[clang] [clang][analyzer][NFC] Fix typos in comments (PR #126676)

2025-02-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. https://github.com/llvm/llvm-project/pull/126676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][solver] On SymSym RelOps, check EQClass members for contradictions (PR #71284)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/71284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][NFC] Prepare for clang-format (PR #82921)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/82921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DRAFT][analyzer][NFC] clang-format our folders (PR #82599)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/82599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add performance-redundant-lookup check (PR #125420)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/125420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[analyzer] Handle [[assume(cond)]] as __builtin_assume(cond)" (PR #125348)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/125348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Document how to use perf and uftrace to debug performance issues (PR #126520)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/126520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/69057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Sink execution if the assumption of [[assume]] is false (PR #120572)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/120572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

2025-02-11 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, lgtm! taking a closer look here, I feel more inclined towards having the step limit in the release branch. I think because we're resolving the initializer, we can still end up in situations where we have `equivalent (T,E)` pairs,

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

2025-02-11 Thread kadir çetinkaya via cfe-commits
@@ -210,52 +210,63 @@ QualType HeuristicResolverImpl::getPointeeType(QualType T) { QualType HeuristicResolverImpl::simplifyType(QualType Type, const Expr *E, bool UnwrapPointer) { bool DidUnwrapPointer = false; - auto SimplifyOne

[clang] d78b5ce - [clang][HeuristicResolver] Additional hardening against an infinite loop in simplifyType() (#126690)

2025-02-11 Thread Kadir Cetinkaya via cfe-commits
Author: Nathan Ridge Date: 2025-02-11T09:17:41+01:00 New Revision: d78b5ceb1661c5953563bf860f93b65f85fc4be0 URL: https://github.com/llvm/llvm-project/commit/d78b5ceb1661c5953563bf860f93b65f85fc4be0 DIFF: https://github.com/llvm/llvm-project/commit/d78b5ceb1661c5953563bf860f93b65f85fc4be0.diff

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

2025-02-11 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/126689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen][ObjC] Invalidate cached ObjC class layout information after parsing ObjC class implementations if new ivars are added to the interface (PR #126591)

2025-02-11 Thread David Chisnall via cfe-commits
davidchisnall wrote: How often does this appear in practice? Normally, `NSObject` is implemented in a shared library and it is completely valid in a non-fragile ABI for a future version to have an extra ivar added (and, in the wild, we've seen people do this for extra state in debug builds).

[clang] [clang][bytecode] Implement __builtin_constant_p differently (PR #122099)

2025-02-11 Thread Timm Baeder via cfe-commits
tbaederr wrote: > Yes, that's the interesting question. Currently we assume that if > __builtin_constant_p(__begin <= __ptr && __ptr < __end) is false, __ptr can't > be within the the range [__begin, __ptr). Thinking about this some more, I'm not sure if this is even true. `__builtin_constant

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2025-02-11 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/115699 >From 44adfb0225e0f96462bdf79371e9d16a37595c0c Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Thu, 7 Nov 2024 12:40:56 + Subject: [PATCH] [libclc] Move sign to the CLC builtins library This patch n

[clang] [Sema] -Wformat: warn about C23 %b %B when not in C23 language mode (PR #126694)

2025-02-11 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,41 @@ +// RUN: %clang_cc1 -std=c17 -DPRE_C23 -fsyntax-only -verify -isystem %S/Inputs %s +// RUN: %clang_cc1 -std=c23 -DPOST_C23 -fsyntax-only -verify -isystem %S/Inputs %s + +#include +#include + +int printf(const char *restrict, ...); + +#if PRE_C23 --

[clang] [clang-installapi] Avoid repeated hash lookups (NFC) (PR #126677)

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

[clang] [CodeGen] Avoid repeated hash lookups (NFC) (PR #126672)

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

[clang] [llvm] [ARM] Adding diagnostics for mcmodel=tiny when used in invalid targets (PR #125643)

2025-02-11 Thread via cfe-commits
https://github.com/ShashwathiNavada updated https://github.com/llvm/llvm-project/pull/125643 >From 0aebcd7119fbcd51154c5d9706752e8ff3f041bc Mon Sep 17 00:00:00 2001 From: ShashwathiNavada Date: Tue, 4 Feb 2025 00:16:09 -0600 Subject: [PATCH 1/6] Adding diagnostics for unsupported option --- c

[clang] [Offload] Treat an empty packager archicture as 'generic' (PR #126655)

2025-02-11 Thread Michael Kruse via cfe-commits
@@ -474,7 +474,7 @@ Expected clang(ArrayRef InputFiles, const ArgList &Args) { const llvm::Triple Triple(Args.getLastArgValue(OPT_triple_EQ)); StringRef Arch = Args.getLastArgValue(OPT_arch_EQ); - if (Arch.empty()) + if (Arch.empty() || Arch == "generic") --

[clang] [Sema] -Wformat: warn about C23 %b %B when not in C23 language mode (PR #126694)

2025-02-11 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,41 @@ +// RUN: %clang_cc1 -std=c17 -DPRE_C23 -fsyntax-only -verify -isystem %S/Inputs %s +// RUN: %clang_cc1 -std=c23 -DPOST_C23 -fsyntax-only -verify -isystem %S/Inputs %s + +#include +#include + +int printf(const char *restrict, ...); + +#if PRE_C23 --

[clang] [Sema] -Wformat: warn about C23 %b %B when not in C23 language mode (PR #126694)

2025-02-11 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Perhaps also a release note makes sense so the users know about the change. https://github.com/llvm/llvm-project/pull/126694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [Sema] -Wformat: warn about C23 %b %B when not in C23 language mode (PR #126694)

2025-02-11 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/126694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking for OpenMP."… (PR #126671)

2025-02-11 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 edited https://github.com/llvm/llvm-project/pull/126671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking for OpenMP."… (PR #126671)

2025-02-11 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 edited https://github.com/llvm/llvm-project/pull/126671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Refine pointer-tbaa for void pointers by pointer depth (PR #126047)

2025-02-11 Thread Bruno De Fraine via cfe-commits
https://github.com/brunodf-snps updated https://github.com/llvm/llvm-project/pull/126047 >From f516639a2bfe5cad76ac82684877f46ac6260077 Mon Sep 17 00:00:00 2001 From: Bruno De Fraine Date: Thu, 6 Feb 2025 11:50:44 +0100 Subject: [PATCH 1/4] [TBAA] Refine pointer-tbaa for void pointers by pointe

[clang] [NFC] [clang] simplify isDesignatorAtObjectEnd (PR #126658)

2025-02-11 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Makes sense, thank you! https://github.com/llvm/llvm-project/pull/126658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AVX10.2] Fix wrong mask casting in some convert intrinsics (PR #126627)

2025-02-11 Thread Mikołaj Piróg via cfe-commits
mikolaj-pirog wrote: The buildbot failure is unrelated to this change https://github.com/llvm/llvm-project/pull/126627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Update the undefined assignment checker diagnostics to not use the term 'garbage' (PR #126596)

2025-02-11 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > > I completely agree that the message sounds a bit too much like "your code > > is garbage" and that's not very nice. > > Ohh, now I see how this could be interpreted in a negative way. I never > thought of this. > > I like where the discussion is heading with emphasizing t

[clang] [llvm] [ARM] Adding diagnostics for mcmodel=tiny when used in invalid targets (PR #125643)

2025-02-11 Thread via cfe-commits
https://github.com/ShashwathiNavada updated https://github.com/llvm/llvm-project/pull/125643 >From 0aebcd7119fbcd51154c5d9706752e8ff3f041bc Mon Sep 17 00:00:00 2001 From: ShashwathiNavada Date: Tue, 4 Feb 2025 00:16:09 -0600 Subject: [PATCH 1/6] Adding diagnostics for unsupported option --- c

<    1   2   3   4   5   >