[clang] Fix incorrect array initialization with string literal (fixes #112189) (PR #156846)

2025-09-06 Thread via cfe-commits
@@ -168,16 +168,95 @@ bool Sema::IsStringInit(Expr *Init, const ArrayType *AT) { return ::IsStringInit(Init, AT, Context) == SIF_None; } +static StringLiteral *CloneStringLiteral(const StringLiteral *SL, + ASTContext &C) { + SourceLoc

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-06 Thread Baranov Victor 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] Support find for string-like classes in readability-container-contains (PR #157243)

2025-09-06 Thread via cfe-commits
@@ -114,29 +112,39 @@ void ContainerContainsCheck::check(const MatchFinder::MatchResult &Result) { "only one of PositiveComparison or NegativeComparison should be set"); bool Negated = NegativeComparison != nullptr; const auto *Comparison = Negated ? NegativeCompa

[clang-tools-extra] [clang-tidy] Support find for string-like classes in readability-container-contains (PR #157243)

2025-09-06 Thread via cfe-commits
@@ -230,6 +230,10 @@ Changes in existing checks ` check to avoid false positives on pure virtual member functions. +- Fixed false negatives on string and string-like types in EugeneZelenko wrote: Please follow format of other similar statements. https://

[clang] [clang-tools-extra] [compiler-rt] [flang] [libcxx] [libcxxabi] [lld] [lldb] [llvm] [Inclusive Language] migrate "sanity" checks to "soundness" checks (PR #156995)

2025-09-06 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: As @philnik777 said, regardless of outcome on the RFC, please split in multiple PR (one per subproject), once consensus is reached on the RFC. https://github.com/llvm/llvm-project/pull/156995 ___ cfe-commits mailing list cfe-commits@li

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-06 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/157213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-06 Thread via cfe-commits
@@ -0,0 +1,100 @@ + +//===--===// +// +// 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: A

[clang] [C++20][Modules] Fix merging of anonymous members of class templates. (PR #155948)

2025-09-06 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/155948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Enable out-of-line atomics by default (PR #157241)

2025-09-06 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/157241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Remove unused reportOverflow() (PR #157225)

2025-09-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/157225 None >From 7010319b83f42a9d54ebfef6798dd1a19cddc5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 6 Sep 2025 06:55:58 +0200 Subject: [PATCH] [clang][bytecode] Remove unused reportOver

[clang] Fix incorrect array initialization with string literal (fixes #112189) (PR #156846)

2025-09-06 Thread via cfe-commits
https://github.com/awson updated https://github.com/llvm/llvm-project/pull/156846 >From 5585fdea6e545aebc3ee9919c5da74e2e7397a35 Mon Sep 17 00:00:00 2001 From: awson Date: Fri, 5 Sep 2025 06:45:53 +0300 Subject: [PATCH] `updateStringLiteralType` recursively clones subexpressions which types it

[clang] [clang] Move two flags from EvalInfo to State (PR #157046)

2025-09-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/157046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add checker 'core.NullPointerArithm' (PR #157129)

2025-09-06 Thread Balazs Benics via cfe-commits
@@ -379,6 +386,111 @@ void DereferenceChecker::checkBind(SVal L, SVal V, const Stmt *S, C.addTransition(State, this); } +void DereferenceChecker::checkPreStmt(const BinaryOperator *Op, + CheckerContext &C) const { + if (!Op->isAdditiveO

[clang] [clang][analyzer] Add checker 'core.NullPointerArithm' (PR #157129)

2025-09-06 Thread Balazs Benics via cfe-commits
@@ -379,6 +386,111 @@ void DereferenceChecker::checkBind(SVal L, SVal V, const Stmt *S, C.addTransition(State, this); } +void DereferenceChecker::checkPreStmt(const BinaryOperator *Op, + CheckerContext &C) const { + if (!Op->isAdditiveO

[clang] [clang] Detect int-to-float narrowing when the back-conversion is unspecified (PR #157174)

2025-09-06 Thread via cfe-commits
https://github.com/camc updated https://github.com/llvm/llvm-project/pull/157174 >From 73696f81166f958e212c5ea314528791c5201565 Mon Sep 17 00:00:00 2001 From: camc <69519329+c...@users.noreply.github.com> Date: Fri, 5 Sep 2025 20:47:06 + Subject: [PATCH] [clang] Detect int-to-float narrowing

[clang] [clang][analyzer] Add checker 'core.NullPointerArithm' (PR #157129)

2025-09-06 Thread Balazs Benics via cfe-commits
@@ -379,6 +386,111 @@ void DereferenceChecker::checkBind(SVal L, SVal V, const Stmt *S, C.addTransition(State, this); } +void DereferenceChecker::checkPreStmt(const BinaryOperator *Op, + CheckerContext &C) const { + if (!Op->isAdditiveO

[clang] [Headers][X86] Add constexpr support for some AVX[512] intrinsics. (PR #157260)

2025-09-06 Thread via cfe-commits
https://github.com/moorabbit created https://github.com/llvm/llvm-project/pull/157260 The following AVX[512] intrinsics are now constexpr: - `_mm_cvtepi64_pd` - `_mm_mask_cvtepi64_pd` - `_mm_maskz_cvtepi64_pd` - `_mm_cvtepu64_pd` - `_mm_mask_cvtepu64_pd` - `_mm_maskz_cvtepu64_pd` - `_mm256_cvtep

[clang] [Headers][X86] Add constexpr support for some AVX[512] intrinsics. (PR #157260)

2025-09-06 Thread via cfe-commits
https://github.com/moorabbit updated https://github.com/llvm/llvm-project/pull/157260 >From 6a3ea1634162fa90e3b2deacb1b0ff7a1a907359 Mon Sep 17 00:00:00 2001 From: moorabbit Date: Thu, 4 Sep 2025 16:03:54 -0400 Subject: [PATCH 01/30] _mm_cvtepi64_pd --- clang/lib/Headers/avx512vldqintrin.h

[clang] 6e52283 - [clang] VectorExprEvaluator::VisitCallExpr - use APSInt callback instead of repeated switch statement (#157137)

2025-09-06 Thread via cfe-commits
Author: Simon Pilgrim Date: 2025-09-06T12:24:22Z New Revision: 6e52283e819c57abde861491858a154d6ab26d3d URL: https://github.com/llvm/llvm-project/commit/6e52283e819c57abde861491858a154d6ab26d3d DIFF: https://github.com/llvm/llvm-project/commit/6e52283e819c57abde861491858a154d6ab26d3d.diff LOG:

[clang] [Headers][X86] Add constexpr support for some AVX[512] intrinsics. (PR #157260)

2025-09-06 Thread via cfe-commits
moorabbit wrote: @RKSimon PTAL when you can. Thx! https://github.com/llvm/llvm-project/pull/157260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Support find for string-like classes in readability-container-contains (PR #157243)

2025-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nicolas van Kempen (nicovank) Changes Fix #109327. Small parts taken from #110351. Removed the type checking between `contains` and `count`/`find` arguments for simplicity. Because of overloads, this type-checking is tricky.

[clang] 54ed459 - [HLSL] Add copy assignment and construtor to resource types (#156075)

2025-09-06 Thread via cfe-commits
Author: Steven Perron Date: 2025-09-06T11:50:03Z New Revision: 54ed459e3ed83bcc6570b885e9c9e65ab65dae75 URL: https://github.com/llvm/llvm-project/commit/54ed459e3ed83bcc6570b885e9c9e65ab65dae75 DIFF: https://github.com/llvm/llvm-project/commit/54ed459e3ed83bcc6570b885e9c9e65ab65dae75.diff LOG:

[clang-tools-extra] d27fae7 - [clang-tidy] Add new check 'llvm-use-ranges' (#152047)

2025-09-06 Thread via cfe-commits
Author: Baranov Victor Date: 2025-09-06T16:50:02+03:00 New Revision: d27fae73b17c34cbbd55e6f0ab4fea3f960be6f0 URL: https://github.com/llvm/llvm-project/commit/d27fae73b17c34cbbd55e6f0ab4fea3f960be6f0 DIFF: https://github.com/llvm/llvm-project/commit/d27fae73b17c34cbbd55e6f0ab4fea3f960be6f0.diff

[clang] Fix incorrect array initialization with string literal (fixes #112189) (PR #156846)

2025-09-06 Thread Corentin Jabot via cfe-commits
@@ -168,16 +168,95 @@ bool Sema::IsStringInit(Expr *Init, const ArrayType *AT) { return ::IsStringInit(Init, AT, Context) == SIF_None; } +static StringLiteral *CloneStringLiteral(const StringLiteral *SL, + ASTContext &C) { + SourceLoc

[clang] [clang] Detect int-to-float narrowing when the back-conversion is unspecified (PR #157174)

2025-09-06 Thread Yanzuo Liu via cfe-commits
@@ -412,10 +412,12 @@ NarrowingKind StandardConversionSequence::getNarrowingKind( // And back. llvm::APSInt ConvertedValue = *IntConstantValue; bool ignored; -Result.convertToInteger(ConvertedValue, -llvm::APFloat

[clang-tools-extra] bbbba4e - [clang-tidy] Remove global options IgnoreMacros and StrictMode (#157049)

2025-09-06 Thread via cfe-commits
Author: Carlos Galvez Date: 2025-09-06T12:41:34+02:00 New Revision: a4e82699a70f0473786eeb93e88af109eec7 URL: https://github.com/llvm/llvm-project/commit/a4e82699a70f0473786eeb93e88af109eec7 DIFF: https://github.com/llvm/llvm-project/commit/a4e82699a70f0473786eeb93e88af109eec7.diff

[clang] [clang][bytecode] Remove unused reportOverflow() (PR #157225)

2025-09-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-fast` running on `sanitizer-buildbot4` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/14739 Here is the relevant piece

[clang-tools-extra] [clang-tidy] Add new '-hide-progress' option to tidy-scripts for suppressing progress information (PR #154416)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/154416 >From 0f0db33a875736a5a0527695316c6820a65ad529 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 29 Aug 2025 17:32:50 +0300 Subject: [PATCH 1/2] [clang-tidy] Add new -hide-progress option to tidy-script

[clang-tools-extra] Reland "[clangd] Add feature modules registry" (PR #154836)

2025-09-06 Thread Aleksandr Platonov via cfe-commits
https://github.com/ArcsinX updated https://github.com/llvm/llvm-project/pull/154836 >From 27b44cefdc1ea4b373f8e990bc1fea05fc278701 Mon Sep 17 00:00:00 2001 From: Aleksandr Platonov Date: Thu, 21 Aug 2025 22:51:41 +0300 Subject: [PATCH 1/3] [clangd] Introduce feature modules registry This patch

[clang] fd7f464 - [clang] Polymorphic Cleanup type is moved despite not being POD types (#156607)

2025-09-06 Thread via cfe-commits
Author: Oliver Hunt Date: 2025-09-06T01:26:28-07:00 New Revision: fd7f464333b9d0c46c716520aa5332881f4a9608 URL: https://github.com/llvm/llvm-project/commit/fd7f464333b9d0c46c716520aa5332881f4a9608 DIFF: https://github.com/llvm/llvm-project/commit/fd7f464333b9d0c46c716520aa5332881f4a9608.diff L

[clang] [clang] Look through parens around reinterpret_cast to emit a warning (PR #157033)

2025-09-06 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Please add a release note. https://github.com/llvm/llvm-project/pull/157033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Fix deprecation warnings in HLSL (PR #153310)

2025-09-06 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/153310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Support find for string-like classes in readability-container-contains (PR #157243)

2025-09-06 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank created https://github.com/llvm/llvm-project/pull/157243 Fix #109327. Small parts taken from #110351. Removed the type checking between `contains` and `count`/`find` arguments for simplicity. Because of overloads, this type-checking is tricky. The same strategy is

[clang] Fix incorrect array initialization with string literal (fixes #112189) (PR #156846)

2025-09-06 Thread Corentin Jabot via cfe-commits
@@ -168,16 +168,95 @@ bool Sema::IsStringInit(Expr *Init, const ArrayType *AT) { return ::IsStringInit(Init, AT, Context) == SIF_None; } +static StringLiteral *CloneStringLiteral(const StringLiteral *SL, + ASTContext &C) { + SourceLoc

[clang] [C++20][Modules] Fix merging of anonymous members of class templates. (PR #155948)

2025-09-06 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/155948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add copy assignment and construtor to resource types (PR #156075)

2025-09-06 Thread Steven Perron via cfe-commits
https://github.com/s-perron auto_merge_enabled https://github.com/llvm/llvm-project/pull/156075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Support find for string-like classes in readability-container-contains (PR #157243)

2025-09-06 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/157243 >From 95171f2b3163e13db197f98cdd977d977219b0a4 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Sat, 6 Sep 2025 10:42:12 -0400 Subject: [PATCH] [clang-tidy] Support find for string-like classes in reada

[clang-tools-extra] [clang-tidy] Remove global options IgnoreMacros and StrictMode (PR #157049)

2025-09-06 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/157049 >From dc9f561223c1f1031196b34adaf30080130c6bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Fri, 5 Sep 2025 08:09:21 + Subject: [PATCH] [clang-tidy] Remove global options Ignor

[clang] [AArch64] Enable out-of-line atomics by default (PR #157241)

2025-09-06 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/157241 >From 09aad599911545813df9ed898546660eaf008f82 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sat, 6 Sep 2025 03:43:30 -0400 Subject: [PATCH] [AArch64] Enable out-of-line atomics by default --- clang/include/cl

[clang] [AArch64] Enable out-of-line atomics by default (PR #157241)

2025-09-06 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 origin/main HEAD --extensions cpp,h -- clang/include/clang/Driver/ToolChain.h clang/

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-06 Thread Baranov Victor via cfe-commits
@@ -11,6 +11,7 @@ add_clang_library(clangTidyGoogleModule STATIC DefaultArgumentsCheck.cpp ExplicitConstructorCheck.cpp ExplicitMakePairCheck.cpp + FloatTypesCheck.cpp vbvictor wrote: Sure, but I don't see any benefits in keeping them consistent. https

[clang] [Driver] Enable outline atomics for NetBSD/aarch64 (PR #156143)

2025-09-06 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/156143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5c8c59d - [clang][bytecode] Remove unused reportOverflow() (#157225)

2025-09-06 Thread via cfe-commits
Author: Timm Baeder Date: 2025-09-06T07:25:53+02:00 New Revision: 5c8c59d7926289c5a98e127d5a1dc8c3951845e4 URL: https://github.com/llvm/llvm-project/commit/5c8c59d7926289c5a98e127d5a1dc8c3951845e4 DIFF: https://github.com/llvm/llvm-project/commit/5c8c59d7926289c5a98e127d5a1dc8c3951845e4.diff L

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,39 @@ +// RUN: %check_clang_tidy %s google-runtime-float %t + +long double foo; +// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: 'long double' type is not portable and should not be used [google-runtime-float] + +typedef long double MyLongDouble; +// CHECK-MESSAGES: :[[@LI

[clang-tools-extra] [clang-tidy] Support find for string-like classes in readability-container-contains (PR #157243)

2025-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Nicolas van Kempen (nicovank) Changes Fix #109327. Small parts taken from #110351. Removed the type checking between `contains` and `count`/`find` arguments for simplicity. Because of overloads, this type-checking is tricky. The sam

[clang] [Clang-Repl] Sinking RemoteJITUtils into Interpreter class(Refactoring) (PR #155140)

2025-09-06 Thread Abhinav Kumar via cfe-commits
@@ -275,10 +331,10 @@ int main(int argc, const char **argv) { if (!CudaPath.empty()) CB.SetCudaSDK(CudaPath); -if (OffloadArch.empty()) { - OffloadArch = "sm_35"; +if (::OffloadArch.empty()) { + ::OffloadArch = "sm_35"; } -CB.SetOffloadArch

[clang] [clang] VectorExprEvaluator::VisitCallExpr - use APSInt callback instead of repeated switch statement (PR #157137)

2025-09-06 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon auto_merge_enabled https://github.com/llvm/llvm-project/pull/157137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix incorrect array initialization with string literal (fixes #112189) (PR #156846)

2025-09-06 Thread Corentin Jabot via cfe-commits
@@ -168,16 +168,95 @@ bool Sema::IsStringInit(Expr *Init, const ArrayType *AT) { return ::IsStringInit(Init, AT, Context) == SIF_None; } +static StringLiteral *CloneStringLiteral(const StringLiteral *SL, + ASTContext &C) { + SourceLoc

[clang] [clang][analyzer] Add checker 'core.NullPointerArithm' (PR #157129)

2025-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/157129.diff 6 Files Affected: - (modified) clang/docs/analyzer/checkers.rst (+41) - (modified) clang/include/clang/StaticAnalyzer/Checkers/Checker

[clang] [clang][bytecode] Remove unused reportOverflow() (PR #157225)

2025-09-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/12186 Here is the relev

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-06 Thread Baranov Victor 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] [compiler-rt] [clang-repl] Reimplement value printing using MemoryAccess to support in-process and out-of-process (PR #156649)

2025-09-06 Thread Vassil Vassilev via cfe-commits
@@ -267,92 +267,156 @@ std::string Interpreter::ValueDataToString(const Value &V) const { return "{ error: unknown builtin type '" + std::to_string(BT->getKind()) + " '}"; case clang::BuiltinType::Bool: - SS << ((V.getBool()) ? "true" : "false"); -

[clang] Fix incorrect array initialization with string literal (fixes #112189) (PR #156846)

2025-09-06 Thread Corentin Jabot via cfe-commits
@@ -168,16 +168,95 @@ bool Sema::IsStringInit(Expr *Init, const ArrayType *AT) { return ::IsStringInit(Init, AT, Context) == SIF_None; } +static StringLiteral *CloneStringLiteral(const StringLiteral *SL, + ASTContext &C) { + SourceLoc

[clang-tools-extra] [clang-tidy] Add new alias 'bugprone-unchecked-string-to-number-conversion' for 'cert-err34-c' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/157285 My goal is to place all implementation of `cert` checks into `bugprone` or other modules. It's hard for the user to understand what `cert-err34-c` means, so we should always have human-readable alias for `cert

[clang-tools-extra] [clang-tidy] Add new alias 'bugprone-unchecked-string-to-number-conversion' for 'cert-err34-c' (PR #157285)

2025-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Baranov Victor (vbvictor) Changes My goal is to place all implementation of `cert` checks into `bugprone` or other modules. It's hard for the user to understand what `cert-err34-c` means, so we should always have human-readable alias

[clang-tools-extra] dc81dcf - [clang-tidy] Add new '-hide-progress' option to tidy-scripts for suppressing progress information (#154416)

2025-09-06 Thread via cfe-commits
Author: Baranov Victor Date: 2025-09-06T19:36:22+03:00 New Revision: dc81dcf8b40870e8917c01d58b7eb1f82caa795e URL: https://github.com/llvm/llvm-project/commit/dc81dcf8b40870e8917c01d58b7eb1f82caa795e DIFF: https://github.com/llvm/llvm-project/commit/dc81dcf8b40870e8917c01d58b7eb1f82caa795e.diff

[clang] Revert "[clang][Modules] Reporting Errors for Duplicating Link Declar… (PR #157154)

2025-09-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-hwasan` running on `sanitizer-buildbot12` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/16787 Here is the re

[clang-tools-extra] [clang-tidy] Add new alias 'bugprone-unchecked-string-to-number-conversion' for 'cert-err34-c' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,35 @@ +//===--===// vbvictor wrote: This file is mostly copypaste from `StrToNumCheck.h` https://github.com/llvm/llvm-project/pull/157285 _

[clang] [NFC] Change const char* to StringRef (PR #154179)

2025-09-06 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/154179 >From c7387c59564afc43e5371f604f3d31bd27783c78 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Mon, 18 Aug 2025 13:08:01 -0500 Subject: [PATCH 1/2] [NFC] Change const char* to StringRef This API takes a

[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)

2025-09-06 Thread James Y Knight via cfe-commits
@@ -231,6 +233,10 @@ bool GlobPattern::SubGlobPattern::match(StringRef Str) const { ++S; continue; } +} else if (IsSlashAgnostic && *P == '/' && (*S == '/' || *S == '\\')) { jyknight wrote: `*S == '/'` is redundant here and can be re

[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)

2025-09-06 Thread James Y Knight via cfe-commits
@@ -57,9 +59,12 @@ Error SpecialCaseList::Matcher::insert(StringRef Pattern, unsigned LineNumber, auto Glob = std::make_unique(); Glob->Name = Pattern.str(); Glob->LineNo = LineNumber; + // Backslashes are valid in posix-style filenames. + bool IsSlashAgnostic = Triple

[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)

2025-09-06 Thread James Y Knight via cfe-commits
@@ -57,9 +59,12 @@ Error SpecialCaseList::Matcher::insert(StringRef Pattern, unsigned LineNumber, auto Glob = std::make_unique(); Glob->Name = Pattern.str(); Glob->LineNo = LineNumber; + // Backslashes are valid in posix-style filenames. + bool IsSlashAgnostic = Triple

[clang] [Headers][X86] Allow AVX512 integer min/max mask/maskz variants intrinsics to be used in constexpr (PR #156901)

2025-09-06 Thread Bhasawut Singhaphan via cfe-commits
markbhasawut wrote: Thank you for reviewing! @RKSimon https://github.com/llvm/llvm-project/pull/156901 ___ 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 new alias 'bugprone-unchecked-string-to-number-conversion' for 'cert-err34-c' (PR #157285)

2025-09-06 Thread via cfe-commits
@@ -166,6 +166,10 @@ New checks New check aliases ^ +- New alias :doc:`bugprone-unchecked-string-to-number-conversion EugeneZelenko wrote: Opposite is true according to implementation. May be entry in renamed checks? https://github.com/llvm/l

[clang-tools-extra] [clang-tidy] Add new alias 'bugprone-unchecked-string-to-number-conversion' for 'cert-err34-c' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/157285 ___ 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 new alias 'bugprone-unchecked-string-to-number-conversion' for 'cert-err34-c' (PR #157285)

2025-09-06 Thread via cfe-commits
@@ -0,0 +1,31 @@ +.. title:: clang-tidy - bugprone-unchecked-string-to-number-conversion + +bugprone-unchecked-string-to-number-conversion += EugeneZelenko wrote: ```suggestion bugprone-unchecked-string-to-number-conversion

[clang] [llvm] [clang] Polymorphic Cleanup type is moved despite not being POD types (PR #156607)

2025-09-06 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt closed https://github.com/llvm/llvm-project/pull/156607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-06 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,80 @@ + +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-06 Thread via cfe-commits
@@ -0,0 +1,47 @@ +.. title:: clang-tidy - bugprone-loop-variable-copied-then-modified + +bugprone-loop-variable-copied-then-modified +=== + +Warns when a loop variable is copied and subsequently modified. + +This pattern is considered bugpro

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-06 Thread via cfe-commits
@@ -0,0 +1,47 @@ +.. title:: clang-tidy - bugprone-loop-variable-copied-then-modified + +bugprone-loop-variable-copied-then-modified +=== + +Warns when a loop variable is copied and subsequently modified. + +This pattern is considered bugpro

[clang] f58844b - [clang] Move two flags from EvalInfo to State (#157046)

2025-09-06 Thread via cfe-commits
Author: Timm Baeder Date: 2025-09-06T06:16:15+02:00 New Revision: f58844b6b6a3b596e116ef669efc8c8aa72cc737 URL: https://github.com/llvm/llvm-project/commit/f58844b6b6a3b596e116ef669efc8c8aa72cc737 DIFF: https://github.com/llvm/llvm-project/commit/f58844b6b6a3b596e116ef669efc8c8aa72cc737.diff L

[clang] 9da02e7 - Revert "[clang][Modules] Reporting Errors for Duplicating Link Declar… (#157154)

2025-09-06 Thread via cfe-commits
Author: Qiongsi Wu Date: 2025-09-06T08:50:21-07:00 New Revision: 9da02e7521da1d2024fbac62b5d9995a1edefc7a URL: https://github.com/llvm/llvm-project/commit/9da02e7521da1d2024fbac62b5d9995a1edefc7a DIFF: https://github.com/llvm/llvm-project/commit/9da02e7521da1d2024fbac62b5d9995a1edefc7a.diff LO

[clang] Revert "[clang][Modules] Reporting Errors for Duplicating Link Declar… (PR #157154)

2025-09-06 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/157154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable fexec-charset option (PR #138895)

2025-09-06 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast edited https://github.com/llvm/llvm-project/pull/138895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add constexpr support for some AVX[512] intrinsics. (PR #157260)

2025-09-06 Thread via cfe-commits
https://github.com/moorabbit edited https://github.com/llvm/llvm-project/pull/157260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Detect int-to-float narrowing when the back-conversion is unspecified (PR #157174)

2025-09-06 Thread Yanzuo Liu via cfe-commits
@@ -308,6 +308,8 @@ Bug Fixes in This Version - Builtin elementwise operators now accept vector arguments that have different qualifiers on their elements. For example, vector of 4 ``const float`` values and vector of 4 ``float`` values. (#GH155405) +- Fix the check for nar

[clang] [clang] Detect int-to-float narrowing when the back-conversion is unspecified (PR #157174)

2025-09-06 Thread via cfe-commits
https://github.com/camc updated https://github.com/llvm/llvm-project/pull/157174 >From 73696f81166f958e212c5ea314528791c5201565 Mon Sep 17 00:00:00 2001 From: camc <69519329+c...@users.noreply.github.com> Date: Fri, 5 Sep 2025 20:47:06 + Subject: [PATCH 1/2] [clang] Detect int-to-float narrow

[clang] [llvm] Enable fexec-charset option (PR #138895)

2025-09-06 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,35 @@ +// RUN: %clang_cc1 %s -emit-llvm -triple s390x-none-zos -fexec-charset IBM-1047 -o - | FileCheck %s +// RUN: %clang %s -emit-llvm -S -target s390x-ibm-zos -o - | FileCheck %s + +const char *UpperCaseLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +// CHECK: c"\C1\C2\C3

[clang-tools-extra] [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157285 >From d94e0b12914e64a851f5a41cd5bbfb982ed285de Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 19:16:53 +0300 Subject: [PATCH 1/2] [clang-tidy] Add new alias 'bugprone-unchecked-string-to-n

[clang-tools-extra] [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
vbvictor wrote: > The commit message title can be a bit misleading, I read it as "create a new > alias in bugprone, which points to the cert check", but in reality the > intention is the other way around, alias from bugprone to cert. Yeah, it was tricky to write. I hope "rename" would be more

[clang-tools-extra] [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
vbvictor wrote: FYI, I created a tracking-progress issue https://github.com/llvm/llvm-project/issues/157287. https://github.com/llvm/llvm-project/pull/157285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang-tools-extra] [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/157285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow attributes in constructor argument list in pre-C++11 (PR #157300)

2025-09-06 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] [clang] Allow attributes in constructor argument list in pre-C++11 (PR #157300)

2025-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (camc) Changes Resolves GH-156809 --- Full diff: https://github.com/llvm/llvm-project/pull/157300.diff 1 Files Affected: - (modified) clang/lib/Parse/ParseDecl.cpp (+1-1) ``diff diff --git a/clang/lib/Parse/ParseDecl.cpp

[clang-tools-extra] [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/157285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157285 >From d94e0b12914e64a851f5a41cd5bbfb982ed285de Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 19:16:53 +0300 Subject: [PATCH 1/2] [clang-tidy] Add new alias 'bugprone-unchecked-string-to-n

[clang] [llvm] [RISCV] Implement MC support for Zvfofp8min extension (PR #157014)

2025-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Jim Lin (tclin914) Changes This patch adds MC support for Zvfofp8min https://github.com/aswaterman/riscv-misc/blob/main/isa/zvfofp8min.adoc. --- Full diff: https://github.com/llvm/llvm-project/pull/157014.diff 15 Files Affected:

[clang] [Headers][X86] Allow AVX512 integer min/max mask/maskz variants intrinsics to be used in constexpr (PR #156901)

2025-09-06 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/156901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-06 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/157213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix GH112189 (PR #156846)

2025-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (awson) Changes Following [the suggestion of @zygoloid](https://github.com/llvm/llvm-project/issues/112189#issuecomment-3172788105) `updateStringLiteralType` now recursively clones subexpressions which types it modifies. Done as a s

[clang] [Clang][bytecode] Add interp__builtin_elementwise_triop_fp to handle general 3-operand floating point intrinsics (PR #157106)

2025-09-06 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon updated https://github.com/llvm/llvm-project/pull/157106 >From 4d6078f92740efa3f109b85492f43b8fadd39b03 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 5 Sep 2025 14:32:07 +0100 Subject: [PATCH 1/2] [Clang][bytecode] Add interp__builtin_elementwise_triop_fp t

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-06 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,100 @@ + +//===--===// +// +// 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: A

[clang] [HLSL] Add copy assignment and construtor to resource types (PR #156075)

2025-09-06 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/156075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support ZVqdot Codegen and C intrinsics (PR #154915)

2025-09-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/12152 Here is the

[clang] [lldb] [clang][Expr] Teach IgnoreUnlessSpelledInSource about implicit calls to std::get free function (PR #122265)

2025-09-06 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/122265 >From a9e13ad8d2a7a95d431dddcced611bea1e83b99a Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 9 Jan 2025 10:01:31 + Subject: [PATCH 01/10] [clang][DebugInfo] Expand detection of structured bindin

[clang] [CIR] Add support for delegating constructors with VTT args (PR #156970)

2025-09-06 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/156970 >From 6a4aa7928818708adfb0fa1edeaa7db87825e4ad Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 3 Sep 2025 15:47:38 -0700 Subject: [PATCH 1/2] [CIR] Add support for delegating constructors with VTT args

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-06 Thread via cfe-commits
@@ -0,0 +1,39 @@ + EugeneZelenko wrote: ```suggestion ``` https://github.com/llvm/llvm-project/pull/157213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [analyzer] Improve handling of placement new in `PointerArith` (PR #155855)

2025-09-06 Thread Arseniy Zaostrovnykh via cfe-commits
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?=, Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?= Message-ID: In-Reply-To: https://github.com/necto approved this pull request. https://github.com/llvm/llvm-project/pull/155855

[clang] [Clang][bytecode] Add interp__builtin_elementwise_triop_fp to handle general 3-operand floating point intrinsics (PR #157106)

2025-09-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/157106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow attributes in constructor argument list in pre-C++11 (PR #157300)

2025-09-06 Thread via cfe-commits
https://github.com/camc edited https://github.com/llvm/llvm-project/pull/157300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >