[clang] [clang][analyzer] Support strlen with offset to string literal in CStringChecker (PR #159795)

2025-09-22 Thread Donát Nagy via cfe-commits
@@ -235,6 +242,19 @@ void testStrlenCallee(void) { clang_analyzer_eval(lenBefore == lenAfter); // expected-warning{{UNKNOWN}} } +void strlen_symbolic_offset(unsigned x) { + const char *str = "abcd"; + if (x > 3) +return; + // FIXME: these should be known -

[clang] [clang][analyzer] Support strlen with offset to string literal in CStringChecker (PR #159795)

2025-09-22 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Great commit, LGTM overall! I found only one very minor issue in the tests. https://github.com/llvm/llvm-project/pull/159795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread JJ Marr via cfe-commits
https://github.com/jjmarr-amd updated https://github.com/llvm/llvm-project/pull/160150 >From 35df1c6ea3af8dbaea2d7049ae79b14ce39f0774 Mon Sep 17 00:00:00 2001 From: JJ Marr Date: Fri, 11 Jul 2025 14:40:57 -0400 Subject: [PATCH 01/11] Bugprone-default-lambda-capture on-behalf-of: @AMD --- ...

[clang] [clang][bytecode] Fix unknown size arrays crash in clang bytecode (PR #160015)

2025-09-22 Thread Timm Baeder via cfe-commits
tbaederr wrote: The description of this issue should say "Fixes #153948" at the end so it gets properly closed. https://github.com/llvm/llvm-project/pull/160015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/143230 ___ 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 bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread JJ Marr via cfe-commits
https://github.com/jjmarr-amd edited https://github.com/llvm/llvm-project/pull/160150 ___ 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 bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/160150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang]: prevent assertion on empty filename arg in __has_embed (PR #159928)

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

[clang] [llvm] [llvm][clang] Propagate VFS through LTO to `PGOOptions` (PR #159671)

2025-09-22 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Yes, this only kicks in when Clang gets invoked with the `-fthinlto-index=` argument, but it doesn't affect how that particular file gets loaded. It only affects the files passed via `PGOOptions`, like `-fprofile-instrument-use-path=` and `-fprofile-sample-use=`. So I think

[clang] [clang] Load `-fms-secure-hotpatch-functions-file=` through the VFS (PR #160146)

2025-09-22 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/160146 This PR uses the correctly-configured VFS to load the file specified via `-fms-secure-hotpatch-functions-file=`, matching other input files of the compiler. >From 46cb594a30ec768a230109da4656259ffe4d85c6

[clang-tools-extra] [clang-tidy][NFC] http -> https (PR #160128)

2025-09-22 Thread Victor Chernyakin via cfe-commits
@@ -43,7 +43,7 @@ static bool isValidDatePattern(StringRef Pattern) { // Checks if the string pattern used as a date format specifier contains // any incorrect pattern and reports it as a warning. -// See: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patter

[clang] [clang][test] Add test for comma operator rejection in preprocessor conditionals (PR #155570)

2025-09-22 Thread NohHyeon Kwon via cfe-commits
https://github.com/swote-git updated https://github.com/llvm/llvm-project/pull/155570 >From 36f751e7b92d8907bfe60f3c28748519578097c3 Mon Sep 17 00:00:00 2001 From: swote Date: Wed, 27 Aug 2025 16:34:13 +0900 Subject: [PATCH 1/5] [clang][test] Add tests for comma operator rejection in preproces

[clang] [clang] Move `-fprofile-instrument-use-path=` check to driver (PR #159667)

2025-09-22 Thread Ben Langmuir via cfe-commits
@@ -485,20 +486,48 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, } if (ProfileUseArg) { +SmallString<128> Path; benlangmuir wrote: Nit: I suggest something like `PathBuf` or `PathStorage` so we don't mix this up with the

[clang] [llvm] [HLSL] Mark `GroupMemoryBarrierWithGroupSync` as `convergent` (PR #160175)

2025-09-22 Thread Deric C. via cfe-commits
https://github.com/Icohedron approved this pull request. https://github.com/llvm/llvm-project/pull/160175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Mark `GroupMemoryBarrierWithGroupSync` as `convergent` (PR #160175)

2025-09-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Finn Plummer (inbelic) Changes `GroupMemoryBarrierWithGroupSync` is required to be marked as convergent so that it can't generate duplicate calls or be moved to identical control flow. Without it, we generate undefined behaviour during opt

[clang] [llvm] [HLSL] Mark `GroupMemoryBarrierWithGroupSync` as `convergent` (PR #160175)

2025-09-22 Thread Finn Plummer via cfe-commits
https://github.com/inbelic ready_for_review https://github.com/llvm/llvm-project/pull/160175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move `-fprofile-instrument-use-path=` check to driver (PR #159667)

2025-09-22 Thread Ben Langmuir via cfe-commits
@@ -485,20 +486,48 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, } if (ProfileUseArg) { +SmallString<128> Path; +StringRef UsePath; if (ProfileUseArg->getOption().matches(options::OPT_fprofile_instr_use_EQ)) - CmdArgs.push_ba

[clang] [llvm] [HLSL] Mark `GroupMemoryBarrierWithGroupSync` as `convergent` (PR #160175)

2025-09-22 Thread Finn Plummer via cfe-commits
https://github.com/inbelic created https://github.com/llvm/llvm-project/pull/160175 `GroupMemoryBarrierWithGroupSync` is required to be marked as convergent so that it can't generate duplicate calls or be moved to identical control flow. Without it, we generate undefined behaviour during optim

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Krzysztof Drewniak via cfe-commits
@@ -11602,29 +11602,56 @@ SDValue SITargetLowering::lowerPointerAsRsrcIntrin(SDNode *Op, SDValue NumRecords = Op->getOperand(3); SDValue Flags = Op->getOperand(4); - auto [LowHalf, HighHalf] = DAG.SplitScalar(Pointer, Loc, MVT::i32, MVT::i32); - SDValue Mask = DAG.getCo

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 commented: Minor questions about the final IR, otherwise lgtm here https://github.com/llvm/llvm-project/pull/159702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Krzysztof Drewniak via cfe-commits
@@ -5905,33 +5905,46 @@ bool AMDGPULegalizerInfo::legalizePointerAsRsrcIntrin( Register Flags = MI.getOperand(5).getReg(); LLT S32 = LLT::scalar(32); + LLT S64 = LLT::scalar(64); B.setInsertPt(B.getMBB(), ++B.getInsertPt()); - auto Unmerge = B.buildUnmerge(S32, Poin

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Krzysztof Drewniak via cfe-commits
@@ -5905,33 +5905,46 @@ bool AMDGPULegalizerInfo::legalizePointerAsRsrcIntrin( Register Flags = MI.getOperand(5).getReg(); LLT S32 = LLT::scalar(32); + LLT S64 = LLT::scalar(64); B.setInsertPt(B.getMBB(), ++B.getInsertPt()); - auto Unmerge = B.buildUnmerge(S32, Poin

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 edited https://github.com/llvm/llvm-project/pull/159702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] http -> https (PR #160128)

2025-09-22 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook closed https://github.com/llvm/llvm-project/pull/160128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Remove 'clang-analyzer-*' checks from default checks. (PR #157306)

2025-09-22 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157306 >From 4ab549990f3dc3f59a6346b32687e5ecbd495586 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 22:54:31 +0300 Subject: [PATCH] [clang-tidy] Remove 'clang-analyzer-*' checks from default che

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -30,6 +30,45 @@ EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT, _Unwind_Personality_Fn); #endif +#if __has_feature(ptrauth_qualifier) +#include +#if __has_feature(ptrauth_restricted_intptr_qualif

[clang] [llvm] [llvm][clang] Propagate VFS through LTO to `PGOOptions` (PR #159671)

2025-09-22 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: It is important that gets mentioned because this doesn't affect LTO builds that triggered by linker. The `-fthinlto-index` is only used by distributed builds like Bazel for distributed thinLTO so it is important to mention what changed. You can totally construct a test c

[clang-tools-extra] [clang-tidy][NFC] http -> https (PR #160128)

2025-09-22 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/160128 ___ 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 readability-redundant-parentheses (PR #159911)

2025-09-22 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: %check_clang_tidy %s readability-redundant-parentheses %t carlosgalvezp wrote: I think this check should not specify any default since it just requires "CplusPlus", and instead we should downgrade check_clang_tidy to c++98-or-later. ht

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread via cfe-commits
@@ -203,6 +203,15 @@ New checks Finds virtual function overrides with different visibility than the function in the base class. +- New :doc:`bugprone-default-lambda-capture EugeneZelenko wrote: Please keep alphabetical order (by check name) in this sectio

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -30,6 +30,51 @@ EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT, _Unwind_Personality_Fn); #endif +#if __has_feature(ptrauth_calls) kovdan01 wrote: As discussed previously, let's u

[clang] [clang][test] Add test for comma operator rejection in preprocessor conditionals (PR #155570)

2025-09-22 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > @shafik was https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#3017 > resolved ? No, it is still active. It looks like [CWG1436](https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1436) is where the action will be moving forward. https://github.com/llvm/ll

[clang] [Clang] Support includes translated to module imports in -header-include-filtering=direct-per-file (PR #156756)

2025-09-22 Thread Sina Mahdavi via cfe-commits
https://github.com/sina-mahdavi updated https://github.com/llvm/llvm-project/pull/156756 >From 8ab5647fc5c51b42bb67ca46a063fa9815ea46f4 Mon Sep 17 00:00:00 2001 From: Sina Mahdavi Date: Wed, 3 Sep 2025 14:17:27 -0700 Subject: [PATCH 1/6] [Clang] Support includes translated to module imports in

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -377,13 +391,31 @@ const char *CFI_Parser::parseCIE(A &addressSpace, pint_t cie, case 'z': cieInfo->fdesHaveAugmentationData = true; break; - case 'P': + case 'P': { cieInfo->personalityEncoding = addressSpace.get8(p); ++p;

[clang] [Headers][X86] Allow basic AVX512 predicate ops to be used in constexpr (PR #159998)

2025-09-22 Thread via cfe-commits
https://github.com/fennecJ updated https://github.com/llvm/llvm-project/pull/159998 >From 7b91ea75b304a0b0fb3f14945b5c2f21f035bffe Mon Sep 17 00:00:00 2001 From: fennecJ Date: Mon, 22 Sep 2025 02:40:44 +0800 Subject: [PATCH 1/8] Allow kand* to be used in constexpr --- clang/include/clang/Basi

[clang] [Headers][X86] Allow SSE2/AVX2/AVX512F/AVX512BW/AVX512DQ integer arithmetic intrinsics to be used in constexpr (PR #157582)

2025-09-22 Thread via cfe-commits
donneypr wrote: @RKSimon This made my week! Thank you for your support and guidance. https://github.com/llvm/llvm-project/pull/157582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -47,10 +47,10 @@ struct _LIBCXXABI_HIDDEN __cxa_exception { // In Wasm, a destructor returns its argument void *(_LIBCXXABI_DTOR_FUNC *exceptionDestructor)(void *); #else -void (_LIBCXXABI_DTOR_FUNC *exceptionDestructor)(void *); +void(_LIBCXXABI_DTOR_FUNC* _

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -1047,18 +1051,26 @@ class UnwindCursor : public AbstractUnwindCursor{ bool getInfoFromFdeCie(const typename CFI_Parser::FDE_Info &fdeInfo, const typename CFI_Parser::CIE_Info &cieInfo, pint_t pc, uintptr_t dso_base); - bo

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -47,10 +47,11 @@ struct _LIBCXXABI_HIDDEN __cxa_exception { // In Wasm, a destructor returns its argument void *(_LIBCXXABI_DTOR_FUNC *exceptionDestructor)(void *); #else -void (_LIBCXXABI_DTOR_FUNC *exceptionDestructor)(void *); +void(_LIBCXXABI_DTOR_FUNC*

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -79,16 +79,18 @@ struct _LIBCXXABI_HIDDEN __cxa_exception { // http://sourcery.mentor.com/archives/cxx-abi-dev/msg01924.html // The layout of this structure MUST match the layout of __cxa_exception, with // primaryException instead of referenceCount. +// The tags used in the

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/143230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Enable -fextend-variable-liveness at -Og (PR #118026)

2025-09-22 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: There's a corresponding intrinsic llvm.fake.use (FAKE_USE in MIR), which isn't used by anything else. Possibly there's a bug in the implementation of that intrinsic. https://github.com/llvm/llvm-project/pull/118026 ___ cfe-commi

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -681,7 +681,18 @@ DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto) // context struct, because it is allocated on the stack, and an exception // could clobber the de-allocated portion of the stack after sp has been // restored. - ldrx16, [x0, #0x0

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -61,10 +62,10 @@ struct _LIBCXXABI_HIDDEN __cxa_exception { int propagationCount; #else int handlerSwitchValue; -const unsigned char *actionRecord; -const unsigned char *languageSpecificData; -void *catchTemp; -void *adjustedPtr; +const unsigned c

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -1845,10 +1871,53 @@ class _LIBUNWIND_HIDDEN Registers_arm64 { uint64_t getSP() const { return _registers.__sp; } void setSP(uint64_t value) { _registers.__sp = value; } - uint64_t getIP() const { return _registers.__pc; } - void setIP(uint

[clang] [clang][test] Add test for comma operator rejection in preprocessor conditionals (PR #155570)

2025-09-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/155570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RVV][SVE] Cache getScalableVectorType lookups (PR #160108)

2025-09-22 Thread Shaoce SUN via cfe-commits
https://github.com/sunshaoce edited https://github.com/llvm/llvm-project/pull/160108 ___ 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 bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,40 @@ +//===--===// +// +// 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: Apac

[clang] [Clang] Enable -fextend-variable-liveness at -Og (PR #118026)

2025-09-22 Thread Sam Clegg via cfe-commits
sbc100 wrote: This change seems to have broken some emscripten users downstream: https://github.com/emscripten-core/emscripten/issues/25301 Seems likely a bug in WebAssembly backend, but posting here in case anything looks obvious/strange. https://github.com/llvm/llvm-project/pull/118026

[clang] [llvm] [llvm][clang] Propagate VFS through LTO to `PGOOptions` (PR #159671)

2025-09-22 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: Ah, I think it only applies to `clang -fthinlto-index=` invocation, not LTO/PGOOptions. Can you adjust the commit message and also add a test for it? https://github.com/llvm/llvm-project/pull/159671 ___ cfe-commits mailing list

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Oliver Hunt via cfe-commits
@@ -118,22 +119,51 @@ _LIBUNWIND_HIDDEN int __unw_set_reg(unw_cursor_t *cursor, unw_regnum_t regNum, typedef LocalAddressSpace::pint_t pint_t; AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor; if (co->validReg(regNum)) { -co->setReg(regNum, (pint_t)value);

[clang] [clang] Accept empty enum in MSVC compatible C (PR #159981)

2025-09-22 Thread via cfe-commits
@@ -5360,7 +5360,8 @@ void Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl, T.consumeOpen(); // C does not allow an empty enumerator-list, C++ does [dcl.enum]. - if (Tok.is(tok::r_brace) && !getLangOpts().CPlusPlus) + if (Tok.is(tok::r_brace) && !getLangOp

[clang] 9fa23e4 - [NFC][Clang] Fix typo memody->memory (#160141)

2025-09-22 Thread via cfe-commits
Author: Juan Manuel Martinez Caamaño Date: 2025-09-22T19:23:20+02:00 New Revision: 9fa23e43fe22a816ed8572173e20a499f2d1f329 URL: https://github.com/llvm/llvm-project/commit/9fa23e43fe22a816ed8572173e20a499f2d1f329 DIFF: https://github.com/llvm/llvm-project/commit/9fa23e43fe22a816ed8572173e20a49

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/143230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV] support BITINT with mixed-type (PR #156592)

2025-09-22 Thread Craig Topper via cfe-commits
@@ -680,22 +680,22 @@ ABIArgInfo RISCVABIInfo::classifyArgumentType(QualType Ty, bool IsFixed, if (const auto *ED = Ty->getAsEnumDecl()) Ty = ED->getIntegerType(); -// All integral types are promoted to XLen width -if (Size < XLen && Ty->isIntegralOrEnumerat

[clang] [llvm] [llvm][clang] Propagate VFS through LTO to `PGOOptions` (PR #159671)

2025-09-22 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Yes, `clang/lib/CodeGen/BackendUtil.cpp` does pass the `CompilerInstance`'s VFS into `thinBackend()`, so that `runNewPMPasses()` in `llvm/lib/LTO/LTOBackend.cpp` doesn't need to call `vfs::getRealFileSystem()` https://github.com/llvm/llvm-project/pull/159671 ___

[clang] ec5460b - [docs][OpenMP] Claim compound directive handling (#160077)

2025-09-22 Thread via cfe-commits
Author: Krzysztof Parzyszek Date: 2025-09-22T06:47:51-05:00 New Revision: ec5460bc7034b351b928d00432273bff9261fc11 URL: https://github.com/llvm/llvm-project/commit/ec5460bc7034b351b928d00432273bff9261fc11 DIFF: https://github.com/llvm/llvm-project/commit/ec5460bc7034b351b928d00432273bff9261fc11

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread via cfe-commits
@@ -0,0 +1,40 @@ +//===--===// +// +// 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: Apac

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread JJ Marr via cfe-commits
https://github.com/jjmarr-amd edited https://github.com/llvm/llvm-project/pull/160150 ___ 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 bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread JJ Marr via cfe-commits
https://github.com/jjmarr-amd updated https://github.com/llvm/llvm-project/pull/160150 >From 35df1c6ea3af8dbaea2d7049ae79b14ce39f0774 Mon Sep 17 00:00:00 2001 From: JJ Marr Date: Fri, 11 Jul 2025 14:40:57 -0400 Subject: [PATCH 01/10] Bugprone-default-lambda-capture on-behalf-of: @AMD --- ...

[clang] [llvm] [llvm][clang] Propagate VFS through LTO to `PGOOptions` (PR #159671)

2025-09-22 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: Is there any way for user to pass in a different VFS to ThinLTO backend? I think this PR just lift the VFS creation one lever higher but I don't see any benefits of doing that? https://github.com/llvm/llvm-project/pull/159671 __

[clang] [clang][NFC] Create CodeGenShared component for shared code with ClangIR (PR #157936)

2025-09-22 Thread John McCall via cfe-commits
rjmccall wrote: So, part of the problem here is that it's not tenable long-term for Clang to support completely separate lowering libraries for lowering to LLVM IR and LLVM-dialect MLIR. I continue to believe that the Clang IR work should be focused on lowering to LLVM IR because that will be

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread JJ Marr via cfe-commits
@@ -203,6 +203,15 @@ New checks Finds virtual function overrides with different visibility than the function in the base class. +- New :doc:`bugprone-default-lambda-capture jjmarr-amd wrote: Sorry. Thought it was chronological. https://github.com/llvm/ll

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-22 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,410 @@ +//===--===// +// +// 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-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread JJ Marr via cfe-commits
@@ -0,0 +1,40 @@ +//===--===// +// +// 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: Apac

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread via cfe-commits
@@ -0,0 +1,40 @@ +//===--===// +// +// 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: Apac

[clang] [clang] Load `-fms-secure-hotpatch-functions-file=` through the VFS (PR #160146)

2025-09-22 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/160146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bf9b3a5 - [clang] Load `-fms-secure-hotpatch-functions-file=` through the VFS (#160146)

2025-09-22 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-09-22T10:06:52-07:00 New Revision: bf9b3a51e4e8a393308bb0e4229e9eee92dc5811 URL: https://github.com/llvm/llvm-project/commit/bf9b3a51e4e8a393308bb0e4229e9eee92dc5811 DIFF: https://github.com/llvm/llvm-project/commit/bf9b3a51e4e8a393308bb0e4229e9eee92dc5811.diff L

[clang-tools-extra] Add clang tidy check performance constexpr non static in scope (PR #147809)

2025-09-22 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,37 @@ +//===--- ConstexprNonStaticInScopeCheck.h - 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: Apa

[clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-09-22 Thread Justin Stitt via cfe-commits
@@ -339,6 +389,8 @@ ConvertTypeToDiagnosticString(ASTContext &Context, QualType Ty, << "' " << Values << ")"; return DecoratedString; } + +TryConvertOverflowBehaviorTypeToDiagnosticString(Context, Ty, S); JustinStitt wrote: OK, I'll add

[clang-tools-extra] [clang-tidy] Add check 'bugprone-cast-to-struct' (PR #153428)

2025-09-22 Thread Victor Chernyakin via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -0,0 +1,39 @@ +//===--- CastToStructCheck.h - clang-tidy ---*- C++ -*-===//

[clang-tools-extra] [clang-tidy] Add check 'bugprone-cast-to-struct' (PR #153428)

2025-09-22 Thread Victor Chernyakin via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -0,0 +1,39 @@ +//===--- CastToStructCheck.h - clang-tidy ---*- C++ -*-===//

[clang-tools-extra] [clang-tidy] Add check 'bugprone-cast-to-struct' (PR #153428)

2025-09-22 Thread Victor Chernyakin via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -0,0 +1,97 @@ +//===--- CastToStructCheck.cpp - clang-tidy ---===//

[clang] [clang] Load `-fms-secure-hotpatch-functions-file=` through the VFS (PR #160146)

2025-09-22 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. https://github.com/llvm/llvm-project/pull/160146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/143230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/143230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] http -> https (PR #160128)

2025-09-22 Thread via cfe-commits
https://github.com/EugeneZelenko approved this pull request. https://github.com/llvm/llvm-project/pull/160128 ___ 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 bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread JJ Marr via cfe-commits
@@ -0,0 +1,40 @@ +//===--===// +// +// 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: Apac

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread JJ Marr via cfe-commits
https://github.com/jjmarr-amd updated https://github.com/llvm/llvm-project/pull/160150 >From 35df1c6ea3af8dbaea2d7049ae79b14ce39f0774 Mon Sep 17 00:00:00 2001 From: JJ Marr Date: Fri, 11 Jul 2025 14:40:57 -0400 Subject: [PATCH 1/8] Bugprone-default-lambda-capture on-behalf-of: @AMD --- .../b

[clang] [clang][test] Add test for comma operator rejection in preprocessor conditionals (PR #155570)

2025-09-22 Thread NohHyeon Kwon via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++98 +// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++11 +// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++14 +// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++17 +// RUN: %clang_

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -694,7 +705,12 @@ DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto) gcspushm x30 Lnogcs: #endif + +#if __has_feature(ptrauth_calls) + retab +#else kovdan01 wrote: Closing the thread in favor of: 1. (To be fixed in scope of this PR) Comment

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -30,6 +30,51 @@ EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT, _Unwind_Personality_Fn); #endif +#if __has_feature(ptrauth_calls) +#include + +#if __has_feature(ptrauth_restricted_intptr_qualifie

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -680,11 +682,19 @@ int CompactUnwinder_arm64::stepWithCompactEncodingFrame( savedRegisterLoc -= 8; } - uint64_t fp = registers.getFP(); + Registers_arm64::reg_t fp = registers.getFP(); // fp points to old fp registers.setFP(addressSpace.get64(fp)); - // old

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -30,6 +30,45 @@ EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT, _Unwind_Personality_Fn); #endif +#if __has_feature(ptrauth_qualifier) +#include +#if __has_feature(ptrauth_restricted_intptr_qualif

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -807,7 +812,12 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) strd31, [x0, #0x208] #endif movx0, #0 // return UNW_ESUCCESS + +#if __has_feature(ptrauth_calls) + retab +#else kovdan01 wrote: Closing the thread in favor of:

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -126,6 +130,36 @@ _LIBUNWIND_HIDDEN int __unw_set_reg(unw_cursor_t *cursor, unw_regnum_t regNum, // First, get the FDE for the old location and then update it. co->getInfo(&info); co->setInfoBasedOnIPRegister(false); + +#if __has_feature(ptrauth_calls) +

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -103,10 +104,68 @@ #define _LIBCXXABI_DTOR_FUNC #endif -#if __cplusplus < 201103L -# define _LIBCXXABI_NOEXCEPT throw() -#else -# define _LIBCXXABI_NOEXCEPT noexcept +#if __has_include() +# include #endif +#if __has_extension(ptrauth_qualifier) + +// The actual value

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -541,7 +588,33 @@ struct scan_results }; } // unnamed namespace +} // extern "C" + +namespace { +// The logical model for casting authenticated function pointers makes +// it impossible to directly cast them without breaking the authentication, +// as a result we need this

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -118,22 +119,51 @@ _LIBUNWIND_HIDDEN int __unw_set_reg(unw_cursor_t *cursor, unw_regnum_t regNum, typedef LocalAddressSpace::pint_t pint_t; AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor; if (co->validReg(regNum)) { -co->setReg(regNum, (pint_t)value);

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -63,10 +63,11 @@ class DwarfInstructions { pint_t cfa, const RegisterLocation &savedReg); static pint_t getCFA(A &addressSpace, const PrologInfo &prolog, - const R ®isters) { -if (prolog.cfaRegister != 0) -

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -43,6 +43,102 @@ #define LIBUNWIND_AVAIL #endif +#if __has_feature(ptrauth_calls) + + #include + + #if __has_extension(ptrauth_restricted_intptr_qualifier) kovdan01 wrote: We do not have `__ptrauth_restricted_intptr`, so let's avoid including these c

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread via cfe-commits
@@ -203,6 +203,15 @@ New checks Finds virtual function overrides with different visibility than the function in the base class. +- New :doc:`bugprone-default-lambda-capture + ` check. + + Finds lambda expressions that use default capture modes (``[=]`` or ``[&]``) + and

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread via cfe-commits
@@ -0,0 +1,40 @@ +//===--===// +// +// 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: Apac

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread via cfe-commits
@@ -0,0 +1,34 @@ +//===--===// +// +// 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: Apac

[clang-tools-extra] [clang-tidy][NFC] http -> https (PR #160128)

2025-09-22 Thread via cfe-commits
EugeneZelenko wrote: > > Please also fix clang-tools-extra/clang-tidy/add_new_check.py. > > It's included in the changes, yep Sorry, I missed in in the sea of other changes :-) https://github.com/llvm/llvm-project/pull/160128 ___ cfe-commits mailing

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread JJ Marr via cfe-commits
https://github.com/jjmarr-amd edited https://github.com/llvm/llvm-project/pull/160150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix unknown size arrays crash in clang bytecode (PR #160015)

2025-09-22 Thread Osama Abdelkader via cfe-commits
osamakader wrote: The test is added, thanks for the review. https://github.com/llvm/llvm-project/pull/160015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test] Add test for comma operator rejection in preprocessor conditionals (PR #155570)

2025-09-22 Thread NohHyeon Kwon via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++98 +// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++11 +// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++14 +// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++17 +// RUN: %clang_

[clang] [clang][test] Add test for comma operator rejection in preprocessor conditionals (PR #155570)

2025-09-22 Thread NohHyeon Kwon via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++98 +// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++11 +// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++14 +// RUN: %clang_cc1 -E -pedantic-errors %s -verify -std=c++17 +// RUN: %clang_

[clang] [clang] Load `-fms-secure-hotpatch-functions-file=` through the VFS (PR #160146)

2025-09-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Jan Svoboda (jansvoboda11) Changes This PR uses the correctly-configured VFS to load the file specified via `-fms-secure-hotpatch-functions-file=`, matching other input files of the compiler. --- Full diff: https://github.com/llv

  1   2   3   4   >