[clang] [Clang][NFC] Improve const correctess of constraint normalization (PR #133633)

2025-03-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/14647 Here is the relevant pie

[clang-tools-extra] [clang-tidy][NFC][doc] improve "options" sections of `bugprone-` and `modernize-` checks (PR #133525)

2025-03-30 Thread Baranov Victor via cfe-commits
@@ -163,7 +163,11 @@ Options Semicolon-separated list of containers without their template parameters and some ``emplace``-like method of the container. Example: ``vector::emplace_back``. Those methods will be checked for improper use and -the check will report

[clang] [Clang][NFC] Improve const correctess of constraint normalization (PR #133633)

2025-03-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vla` running on `linaro-g3-04` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/17/builds/6876 Here is the relevant piece of the buil

[clang] [llvm] [IRBuilder] Add new overload for CreateIntrinsic (PR #131942)

2025-03-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/131942 >From 248b40f44df94093db8b1c8cd4284894be5b348a Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Tue, 18 Mar 2025 13:19:24 -0700 Subject: [PATCH] [IRBuilder] Add new overload for CreateIntrinsic Add a new `Creat

[clang] e6a87da - [CodeGen] Don't explicitly set intrinsic attributes (NFCI)

2025-03-30 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2025-03-20T15:04:03+01:00 New Revision: e6a87da8fe314a009eed769f9737b4b281a06fba URL: https://github.com/llvm/llvm-project/commit/e6a87da8fe314a009eed769f9737b4b281a06fba DIFF: https://github.com/llvm/llvm-project/commit/e6a87da8fe314a009eed769f9737b4b281a06fba.diff

[clang] [clang-tools-extra] [clang] Concepts: support pack expansions for type constraints (PR #132626)

2025-03-30 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/132626 >From 471bef0599a56ee90c1f8e2f7505a7b0003433c2 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 22 Mar 2025 17:29:16 -0300 Subject: [PATCH 1/3] Revert "[Clang] Distinguish expanding-pack-in-place cases

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

2025-03-30 Thread Matheus Izvekov via cfe-commits
@@ -16327,79 +16531,181 @@ static CanQualType RemoveAddressSpaceFromPtr(Sema &SemaRef, PtrTy->getPointeeType().getUnqualifiedType(), PtrQuals))); } -static inline bool -CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, -C

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

2025-03-30 Thread Matheus Izvekov via cfe-commits
@@ -16327,79 +16531,181 @@ static CanQualType RemoveAddressSpaceFromPtr(Sema &SemaRef, PtrTy->getPointeeType().getUnqualifiedType(), PtrQuals))); } -static inline bool -CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, -C

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

2025-03-30 Thread Matheus Izvekov via cfe-commits
@@ -9817,27 +9817,54 @@ def err_operator_new_delete_invalid_result_type : Error< def err_operator_new_delete_dependent_result_type : Error< "%0 cannot have a dependent return type; use %1 instead">; def err_operator_new_delete_too_few_parameters : Error< - "%0 must have at l

[clang] [Clang][NFC] Improve const correctess of constraint normalization (PR #133633)

2025-03-30 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/133633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1cb6ba5 - [Clang][NFC] Improve const correctness of constraint normalization (#133633)

2025-03-30 Thread via cfe-commits
Author: cor3ntin Date: 2025-03-30T11:56:36+02:00 New Revision: 1cb6ba5c60c3ce19785948eb327036a455dd1457 URL: https://github.com/llvm/llvm-project/commit/1cb6ba5c60c3ce19785948eb327036a455dd1457 DIFF: https://github.com/llvm/llvm-project/commit/1cb6ba5c60c3ce19785948eb327036a455dd1457.diff LOG:

[clang] [clang-format] Add an option for editing enum trailing commas (PR #133576)

2025-03-30 Thread Owen Pan via cfe-commits
@@ -2214,6 +2214,21 @@ FormatStyle::GetLanguageStyle(FormatStyle::LanguageKind Language) const { namespace { +void replaceToken(const FormatToken &Token, FormatToken *Next, + const SourceManager &SourceMgr, tooling::Replacements &Result, +

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

2025-03-30 Thread Oliver Hunt via cfe-commits
@@ -1466,17 +1477,30 @@ namespace { void Emit(CodeGenFunction &CGF, Flags flags) override { const auto *FPT = OperatorDelete->getType()->castAs(); CallArgList DeleteArgs; - - // The first argument is always a void* (or C* for a destroying operator - //

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-03-30 Thread Alexander Kornienko via cfe-commits
alexfh wrote: > @alexfh should be fixed by #133613 Thank you! The crash is resolved. Do you still need a reduced test case? https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-03-30 Thread via cfe-commits
https://github.com/jadhbeika updated https://github.com/llvm/llvm-project/pull/128742 >From fa3dd1423e4bf2209feb9713f1833e653ec43a74 Mon Sep 17 00:00:00 2001 From: Jad Hbeika Date: Wed, 19 Feb 2025 12:53:11 -0800 Subject: [PATCH 1/5] [Clang] [OpenMP] Support NOWAIT with optional argument ---

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-03-30 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,124 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; RUN: opt < %s -passes='sroa' -S | FileCheck %s +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n8:16:3

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-03-30 Thread Matt Arsenault via cfe-commits
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) { return foldSelectInst(cast(I)); } +/// Returns a fixed vector type equivalent to the memory set by II or nullptr if +/// unable to do so. +static FixedVectorType *getVectorTypeFor(const MemSetIns

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-03-30 Thread Matt Arsenault via cfe-commits
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) { return foldSelectInst(cast(I)); } +/// Returns a fixed vector type equivalent to the memory set by II or nullptr if +/// unable to do so. +static FixedVectorType *getVectorTypeFor(const MemSetIns

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-03-30 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,124 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; RUN: opt < %s -passes='sroa' -S | FileCheck %s +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n8:16:3

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-03-30 Thread Matt Arsenault via cfe-commits
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) { return foldSelectInst(cast(I)); } +/// Returns a fixed vector type equivalent to the memory set by II or nullptr if +/// unable to do so. +static FixedVectorType *getVectorTypeFor(const MemSetIns

[clang] [Clang] Make enums trivially equality comparable (PR #133587)

2025-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikolas Klauser (philnik777) Changes Fixes #132672 --- Full diff: https://github.com/llvm/llvm-project/pull/133587.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaExprCXX.cpp (+48-35) - (modified) clang/test/SemaCXX/type-trait

[clang] [Clang] Make enums trivially equality comparable (PR #133587)

2025-03-30 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review https://github.com/llvm/llvm-project/pull/133587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-03-30 Thread via cfe-commits
https://github.com/jadhbeika updated https://github.com/llvm/llvm-project/pull/128742 >From fa3dd1423e4bf2209feb9713f1833e653ec43a74 Mon Sep 17 00:00:00 2001 From: Jad Hbeika Date: Wed, 19 Feb 2025 12:53:11 -0800 Subject: [PATCH 1/6] [Clang] [OpenMP] Support NOWAIT with optional argument ---

[clang] [cmake] Refactor clang unittest cmake (PR #133545)

2025-03-30 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/133545 >From e662d8d9483fdf82030ddec6969bc89ae2404060 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Mar 2025 16:49:09 -0700 Subject: [PATCH 1/2] [cmake] Refactor clang unittest cmake Pass all the dependencies

[clang-tools-extra] [clang-tidy] Detect string literals in macros in modernize-raw-string… (PR #133636)

2025-03-30 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/133636 …-literal Fixes #133618 >From 2baffdbd656723b15370d3dd3560f3bd62262664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Sun, 30 Mar 2025 12:24:32 + Subject: [PATCH] [clang-tidy]

[clang] [clang-format] Add an option for editing enum trailing commas (PR #133576)

2025-03-30 Thread Björn Schäpers via cfe-commits
@@ -2214,6 +2214,21 @@ FormatStyle::GetLanguageStyle(FormatStyle::LanguageKind Language) const { namespace { +void replaceToken(const FormatToken &Token, FormatToken *Next, + const SourceManager &SourceMgr, tooling::Replacements &Result, +

[clang-tools-extra] [clang-tidy][NFC][doc] improve "options" sections of `bugprone-` and `modernize-` checks (PR #133525)

2025-03-30 Thread Baranov Victor via cfe-commits
@@ -163,7 +163,11 @@ Options Semicolon-separated list of containers without their template parameters and some ``emplace``-like method of the container. Example: ``vector::emplace_back``. Those methods will be checked for improper use and -the check will report

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-03-30 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > > @alexfh should be fixed by #133613 > > > > Thank you! The crash is resolved. Do you still need a reduced test case? No worries, the tests included in PR already reproduce it. https://github.com/llvm/llvm-project/pull/132401 ___

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

2025-03-30 Thread Baranov Victor via cfe-commits
@@ -305,6 +320,36 @@ void UseEmplaceCheck::registerMatchers(MatchFinder *Finder) { this); } +static const CXXConstructExpr *unwrapToConstructorExpr(const Expr *E) { + + while (E) { + vbvictor wrote: ```suggestion ``` https://github.com/llvm/llvm-proj

[clang-tools-extra] [clang-tidy][bugprone-unintended-char-ostream-output] add `WarnOnExplicitCast` option (PR #133639)

2025-03-30 Thread Baranov Victor via cfe-commits
@@ -39,6 +39,17 @@ Or cast to char to explicitly indicate that output should be a character. std::cout << static_cast(v); +Options vbvictor wrote: Could you please rebase on fresh main, this must be added by https://github.com/llvm/llvm-project/commit/52

[clang-tools-extra] [clang-tidy][bugprone-unintended-char-ostream-output] add `WarnOnExplicitCast` option (PR #133639)

2025-03-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/133639 Fixes: #133425. Add `WarnOnExplicitCast` to accept explicit cast to unsigned char and signed char. >From c7f63c4d221055c375d363785277c2f8a6522284 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 30

[clang] Improved the ``-Wtautological-overlap-compare`` diagnostics to warn a… (PR #133653)

2025-03-30 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu created https://github.com/llvm/llvm-project/pull/133653 This PR attempts to improve the diagnostics flag ``-Wtautological-overlap-compare`` (#13473). I have added code to warn about float-point literals and character literals. I have also changed the warning mes

[clang-tools-extra] [clang-tidy] Fix broken HeaderFilterRegex when read from config file (PR #133582)

2025-03-30 Thread Carlos Galvez via cfe-commits
@@ -571,17 +560,30 @@ void ClangTidyDiagnosticConsumer::checkFilters(SourceLocation Location, } StringRef FileName(File->getName()); - LastErrorRelatesToUserCode = - LastErrorRelatesToUserCode || Sources.isInMainFile(Location) || - (HeaderFilter && - (Hea

[clang-tools-extra] [clang-tidy][bugprone-unintended-char-ostream-output] add `WarnOnExplicitCast` option (PR #133639)

2025-03-30 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: I believe it would be good to wait before the discussion settled in the issue ticket. Personally I think this should be solved with a `NOLINT` suppression instead of adding a new feature which just adds confusion. https://github.com/llvm/llvm-project/pull/133639 __

[clang-tools-extra] [clang-tidy] Detect string literals in macros in modernize-raw-string… (PR #133636)

2025-03-30 Thread Congcong Cai via cfe-commits
@@ -105,7 +105,8 @@ char const *const StringizedMacroArgument = HAT(foo\\bar); #define SUBST(lit_) lit_ HerrCai0907 wrote: what about concat string in macro? e.g. ``` #define SUBST(a,b) a#b char const *const MacroArgument = SUBST("foo\\bar","cd"); ``` https:/

[clang] [clang-format] Add an option for editing enum trailing commas (PR #133576)

2025-03-30 Thread Björn Schäpers via cfe-commits
@@ -2214,6 +2214,21 @@ FormatStyle::GetLanguageStyle(FormatStyle::LanguageKind Language) const { namespace { +void replaceToken(const FormatToken &Token, FormatToken *Next, + const SourceManager &SourceMgr, tooling::Replacements &Result, +

[clang] [Driver] Add linker options to support statical linking to shared flang-rt on AIX. (PR #131822)

2025-03-30 Thread Daniel Chen via cfe-commits
@@ -127,9 +127,19 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, } // Force static linking when "-static" is present. - if (Args.hasArg(options::OPT_static)) + if (Args.hasArg(options::OPT_static)) { CmdArgs.push_back("-bnso"); +if (D.

[clang-tools-extra] [clang-tidy] Fix broken HeaderFilterRegex when read from config file (PR #133582)

2025-03-30 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/133582 >From c2b1748bedf97f158a42ada308e22b1a4392ec9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Sat, 29 Mar 2025 11:55:02 + Subject: [PATCH] [clang-tidy] Fix broken HeaderFilterReg

[clang-tools-extra] [clang-tidy][NFC][doc] improve "options" sections of `bugprone-` and `modernize-` checks (PR #133525)

2025-03-30 Thread Carlos Galvez via cfe-commits
@@ -163,7 +163,11 @@ Options Semicolon-separated list of containers without their template parameters and some ``emplace``-like method of the container. Example: ``vector::emplace_back``. Those methods will be checked for improper use and -the check will report

[clang] clang/HIP: Use regex for final path separator in hip-partial-link, again (PR #130371)

2025-03-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-win-fast` running on `as-builder-3` while building `clang` at step 7 "test-build-unified-tree-check-llvm-unit". Full details are available at: https://lab.llvm.org/buildbot/#/builders/2/builds/18764 Here i

[clang-tools-extra] [clang-tidy][NFC][doc] improve "options" sections of `bugprone-` and `modernize-` checks (PR #133525)

2025-03-30 Thread Carlos Galvez via cfe-commits
@@ -163,7 +163,11 @@ Options Semicolon-separated list of containers without their template parameters and some ``emplace``-like method of the container. Example: ``vector::emplace_back``. Those methods will be checked for improper use and -the check will report

[clang-tools-extra] [clang-tidy][bugprone-unintended-char-ostream-output] add `WarnOnExplicitCast` option (PR #133639)

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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

2025-03-30 Thread Baranov Victor via cfe-commits
@@ -1285,11 +1289,9 @@ void testBracedInitTemporaries() { // These should not be noticed or fixed; after the correction, the code won't - // compile. + // compile in version previous to C++20. vbvictor wrote: This is not needed anymore since those cases

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

2025-03-30 Thread David Rivera via cfe-commits
@@ -1285,11 +1289,9 @@ void testBracedInitTemporaries() { // These should not be noticed or fixed; after the correction, the code won't - // compile. + // compile in version previous to C++20. RiverDave wrote: Indeed, forgot to delete that, thx https://

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to check_clang_tidy (PR #133140)

2025-03-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/133140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

2025-03-30 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/131969 ___ 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][doc] improve "options" sections of `bugprone-` and `modernize-` checks (PR #133525)

2025-03-30 Thread Baranov Victor via cfe-commits
vbvictor wrote: @carlosgalvezp, Can you please help land this PR? Thank you https://github.com/llvm/llvm-project/pull/133525 ___ 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][doc] improve "options" sections of `bugprone-` and `modernize-` checks (PR #133525)

2025-03-30 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/133525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Detect string literals in macros in modernize-raw-string… (PR #133636)

2025-03-30 Thread Carlos Galvez via cfe-commits
@@ -105,7 +105,8 @@ char const *const StringizedMacroArgument = HAT(foo\\bar); #define SUBST(lit_) lit_ carlosgalvezp wrote: Good point, this doesn't work. It wants to create a replacement `"R\"(foo\\bar\\baz\\bazz\\foo\"cd\")\""` which is non sense. Most li

[clang-tools-extra] [clang-tidy][NFC][doc] improve "options" sections of `bugprone-` and `modernize-` checks (PR #133525)

2025-03-30 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/133525 >From 9b88fc69e06d08fd06b60af24b5a9c12749185ef Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 29 Mar 2025 00:46:22 +0300 Subject: [PATCH 1/3] improve docs options of `bugprone-` and `modernize-` chec

[clang-tools-extra] [clang-tidy] Detect string literals in macros in modernize-raw-string… (PR #133636)

2025-03-30 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: This approach does not scale for macros, it should rather be implemented in a `PPCallback` instead. https://github.com/llvm/llvm-project/pull/133636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang-tools-extra] [clang-tidy] Detect string literals in macros in modernize-raw-string… (PR #133636)

2025-03-30 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/133636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Detect string literals in macros in modernize-raw-string… (PR #133636)

2025-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Carlos Galvez (carlosgalvezp) Changes …-literal Fixes #133618 --- Full diff: https://github.com/llvm/llvm-project/pull/133636.diff 3 Files Affected: - (modified) clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.

[clang-tools-extra] [clang-tidy] Detect string literals in macros in modernize-raw-string… (PR #133636)

2025-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Carlos Galvez (carlosgalvezp) Changes …-literal Fixes #133618 --- Full diff: https://github.com/llvm/llvm-project/pull/133636.diff 3 Files Affected: - (modified) clang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.cpp (+

[clang-tools-extra] [clang-tidy] Detect string literals in macros in modernize-raw-string… (PR #133636)

2025-03-30 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang-tools-extra/clang-tidy/modernize/RawStringLiter

[clang-tools-extra] [clang-tidy][bugprone-unintended-char-ostream-output] add `WarnOnExplicitCast` option (PR #133639)

2025-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes Fixes: #133425. Add `WarnOnExplicitCast` to accept explicit cast to unsigned char and signed char. --- Full diff: https://github.com/llvm/llvm-project/pull/133639.diff 4 Files Affected: - (modif

[clang-tools-extra] [clang-tidy] Fix broken HeaderFilterRegex when read from config file (PR #133582)

2025-03-30 Thread Congcong Cai via cfe-commits
@@ -571,17 +560,30 @@ void ClangTidyDiagnosticConsumer::checkFilters(SourceLocation Location, } StringRef FileName(File->getName()); - LastErrorRelatesToUserCode = - LastErrorRelatesToUserCode || Sources.isInMainFile(Location) || - (HeaderFilter && - (Hea

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

2025-03-30 Thread Matheus Izvekov via cfe-commits
@@ -7353,6 +7354,69 @@ void Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) { else if (Record->hasAttr()) checkCUDADeviceBuiltinTextureClassTemplate(*this, Record); } + + llvm::SmallVector TypeAwareNewDecls; + llvm::SmallVector TypeAwareDeleteDecls;

[clang-tools-extra] [clang-tidy][bugprone-unintended-char-ostream-output] add `WarnOnExplicitCast` option (PR #133639)

2025-03-30 Thread Baranov Victor via cfe-commits
@@ -39,6 +39,17 @@ Or cast to char to explicitly indicate that output should be a character. std::cout << static_cast(v); +Options +--- + +.. option:: WarnOnExplicitCast + + When `WarnOnExplicitCast` is set to `false`, the check will not warn when + output of ostream

[clang-tools-extra] [clang-tidy][bugprone-unintended-char-ostream-output] add `WarnOnExplicitCast` option (PR #133639)

2025-03-30 Thread Baranov Victor via cfe-commits
@@ -39,6 +39,17 @@ Or cast to char to explicitly indicate that output should be a character. std::cout << static_cast(v); +Options +--- + +.. option:: WarnOnExplicitCast + + When `WarnOnExplicitCast` is set to `false`, the check will not warn when + output of ostream

[clang-tools-extra] [clang-tidy][bugprone-unintended-char-ostream-output] add `WarnOnExplicitCast` option (PR #133639)

2025-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes Fixes: #133425. Add `WarnOnExplicitCast` to accept explicit cast to unsigned char and signed char. --- Full diff: https://github.com/llvm/llvm-project/pull/133639.diff 4 Files Affected: -

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

2025-03-30 Thread Matheus Izvekov via cfe-commits
@@ -16327,79 +16531,181 @@ static CanQualType RemoveAddressSpaceFromPtr(Sema &SemaRef, PtrTy->getPointeeType().getUnqualifiedType(), PtrQuals))); } -static inline bool -CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, -C

[clang] Improved the ``-Wtautological-overlap-compare`` diagnostics to warn a… (PR #133653)

2025-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yutong Zhu (YutongZhuu) Changes This PR attempts to improve the diagnostics flag ``-Wtautological-overlap-compare`` (#13473). I have added code to warn about float-point literals and character literals. I have also changed the warning me

[clang] Improved the ``-Wtautological-overlap-compare`` diagnostics to warn a… (PR #133653)

2025-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Yutong Zhu (YutongZhuu) Changes This PR attempts to improve the diagnostics flag ``-Wtautological-overlap-compare`` (#13473). I have added code to warn about float-point literals and character literals. I have also changed the w

[clang] [clang] Use DenseMap::insert_range (NFC) (PR #133655)

2025-03-30 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/133655 None >From 9fe28b2669aae7fec6353c7c1fe60aae434b98b8 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 30 Mar 2025 13:16:22 -0700 Subject: [PATCH] [clang] Use DenseMap::insert_range (NFC) --- clang/

[clang] [clang] Use DenseMap::insert_range (NFC) (PR #133655)

2025-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/133655.diff 3 Files Affected: - (modified) clang/lib/AST/VTableBuilder.cpp (+2-4) - (modified) clang/lib/CodeGen/CodeGenModule.cpp (+1-2) -

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-30 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/133462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add an option for editing enum trailing commas (PR #133576)

2025-03-30 Thread Owen Pan via cfe-commits
@@ -2214,6 +2214,21 @@ FormatStyle::GetLanguageStyle(FormatStyle::LanguageKind Language) const { namespace { +void replaceToken(const FormatToken &Token, FormatToken *Next, + const SourceManager &SourceMgr, tooling::Replacements &Result, +

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

2025-03-30 Thread Oliver Hunt via cfe-commits
@@ -7353,6 +7354,69 @@ void Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) { else if (Record->hasAttr()) checkCUDADeviceBuiltinTextureClassTemplate(*this, Record); } + + llvm::SmallVector TypeAwareNewDecls; + llvm::SmallVector TypeAwareDeleteDecls;

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

2025-03-30 Thread Oliver Hunt via cfe-commits
@@ -16327,79 +16531,181 @@ static CanQualType RemoveAddressSpaceFromPtr(Sema &SemaRef, PtrTy->getPointeeType().getUnqualifiedType(), PtrQuals))); } -static inline bool -CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, -C

[clang] [Driver] Add linker options to support statical linking to shared flang-rt on AIX. (PR #131822)

2025-03-30 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen edited https://github.com/llvm/llvm-project/pull/131822 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-30 Thread Matheus Izvekov via cfe-commits
@@ -7353,6 +7354,69 @@ void Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) { else if (Record->hasAttr()) checkCUDADeviceBuiltinTextureClassTemplate(*this, Record); } + + llvm::SmallVector TypeAwareNewDecls; + llvm::SmallVector TypeAwareDeleteDecls;

[clang] [Clang][Cmake] fix libtool duplicate member name warnings (PR #133619)

2025-03-30 Thread Farzon Lotfi via cfe-commits
farzonl wrote: @nikic what is considered a neglible difference in elapsesed time? Elapsed is consistently a little more after my change in the order of 5-20 seconds. Examples below: ## Specs ``` processor : 63 vendor_id : AuthenticAMD cpu family : 25 model : 8 model

[clang] [analyzer] Unknown array lvalue element in Store (PR #133381)

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

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-03-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/133681 Fixes https://github.com/clangd/clangd/issues/2344 >From 646963c0fdf3265e6149091786df7090d7b9dfb2 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 31 Mar 2025 02:25:45 -0400 Subject: [PATCH] [clang

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd @llvm/pr-subscribers-clang-tools-extra Author: Nathan Ridge (HighCommander4) Changes Fixes https://github.com/clangd/clangd/issues/2344 --- Full diff: https://github.com/llvm/llvm-project/pull/133681.diff 6 Files Affected: - (modified) clang-t

[clang] [analyzer] Unknown array lvalue element in Store (PR #133381)

2025-03-30 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/133381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Vectorize: Support fminimumnum and fmaximumnum (PR #131781)

2025-03-30 Thread YunQiang Su via cfe-commits
wzssyqa wrote: ping https://github.com/llvm/llvm-project/pull/131781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clang: Add elementwise minnum/maxnum builtin functions (PR #129207)

2025-03-30 Thread YunQiang Su via cfe-commits
wzssyqa wrote: ping https://github.com/llvm/llvm-project/pull/129207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][BPF] Add tests for btf_type_tag c2x-style attributes (PR #133666)

2025-03-30 Thread via cfe-commits
https://github.com/yonghong-song created https://github.com/llvm/llvm-project/pull/133666 For btf_type_tag implementation, in order to have the same results with clang (__attribute__((btf_type_tag("...", gcc intends to use c2x syntax '[[...]]'. Clang also supports similar c2x syntax. Curre

[clang] [Clang][BPF] Add tests for btf_type_tag c2x-style attributes (PR #133666)

2025-03-30 Thread via cfe-commits
yonghong-song wrote: cc @jemarch https://github.com/llvm/llvm-project/pull/133666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add linker options to support statical linking to shared flang-rt on AIX. (PR #131822)

2025-03-30 Thread Hubert Tong via cfe-commits
@@ -127,9 +127,19 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, } // Force static linking when "-static" is present. - if (Args.hasArg(options::OPT_static)) + if (Args.hasArg(options::OPT_static)) { CmdArgs.push_back("-bnso"); +if (D.

[clang] Fix some typos under clang (NFC) (PR #133558)

2025-03-30 Thread via cfe-commits
https://github.com/cor3ntin commented: Thanks for working on this (that's a lot of typos!) https://github.com/llvm/llvm-project/pull/133558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang-tools-extra] [clang-tidy] Fix broken HeaderFilterRegex when read from config file (PR #133582)

2025-03-30 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/133582 >From 7c94ad36ff8eefd1d09cf303f8983d88cc25370c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Sat, 29 Mar 2025 11:55:02 + Subject: [PATCH] [clang-tidy] Fix broken HeaderFilterReg

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-30 Thread via cfe-commits
irymarchyk wrote: @owenca, just to confirm - you are suggesting to add `Custom` string to `AllowShortFunctionsOnASingleLine` and new parameter (`AllowShortFunctionsOnASingleLineOptions` for example) which will control behavior if `AllowShortFunctionsOnASingleLine == Custom`? What options shoul

[clang] [X86][AVX10] Re-target mavx10.1 and emit warning for mavx10.x-256/512 and m[no-]evex512 (PR #132542)

2025-03-30 Thread Phoebe Wang via cfe-commits
phoebewang wrote: Ping? https://github.com/llvm/llvm-project/pull/132542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Remove Native Client support (PR #133661)

2025-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Brad Smith (brad0) Changes Working on preparing a patch to remove the Native Client support now that it is finally reaching end of life. --- Patch is 156.94 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/

[clang] [Clang][Cmake] fix libtool duplicate member name warnings (PR #133619)

2025-03-30 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray approved this pull request. Thanks for this fix. LGTM. https://github.com/llvm/llvm-project/pull/133619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-30 Thread via cfe-commits
https://github.com/irymarchyk updated https://github.com/llvm/llvm-project/pull/133598 >From cc9c8d79396b6be64910eda59c4f7bd1a1d0a839 Mon Sep 17 00:00:00 2001 From: Ivan Rymarchyk <> Date: Sat, 29 Mar 2025 13:54:32 -0700 Subject: [PATCH 1/3] [clang-format]: Add `StaticInlineOnly` and `StaticInli

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-30 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/133462 >From 74ace4fd3c71ff59f2d89680c0f1382d0f9933f4 Mon Sep 17 00:00:00 2001 From: naveen-seth Date: Fri, 28 Mar 2025 06:59:06 +0100 Subject: [PATCH] [clang][modules] Guard against bad -fmodule-file mappings (#1

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to check_clang_tidy (PR #133140)

2025-03-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-runtime-cuda-clang` running on `as-builder-7` while building `clang-tools-extra` at step 7 "build-flang-default". Full details are available at: https://lab.llvm.org/buildbot/#/builders/7/builds/12917 Here is the rele

[clang-tools-extra] [clang-tidy] Fix broken HeaderFilterRegex when read from config file (PR #133582)

2025-03-30 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Was there anything else I should fix @HerrCai0907 ? It would be good to get this in in soon and cherrypick to branch 20. https://github.com/llvm/llvm-project/pull/133582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [llvm] [PowerPC] Enable indiviual crbits tracking at -O2 (PR #133617)

2025-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henry Jiang (mustartt) Changes https://reviews.llvm.org/D124060 --- Full diff: https://github.com/llvm/llvm-project/pull/133617.diff 5 Files Affected: - (modified) clang/lib/Basic/Targets/PPC.cpp (-5) - (modified) llvm/lib/Target/Power

[clang] [cmake] Refactor clang unittest cmake (PR #133545)

2025-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Reid Kleckner (rnk) Changes Pass all the dependencies into add_clang_unittest. This is consistent with how it is done for LLDB. I borrowed the same named argument list structure from add_lldb_unittest. This is a necessary step tow

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-03-30 Thread Matt Arsenault via cfe-commits
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) { return foldSelectInst(cast(I)); } +/// Returns a fixed vector type equivalent to the memory set by II or nullptr if +/// unable to do so. +static FixedVectorType *getVectorTypeFor(const MemSetIns

[clang] [clang-tools-extra] [lldb] [llvm] Add test to clang-doc, it can test comments in macro. Original issue is #59819. (PR #132360)

2025-03-30 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --format=md --doxygen --output=%t --executor=standalone %s +// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.md --check-prefix=MD

[clang] [flang] [flang] Expose -m64 option (PR #132409)

2025-03-30 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > @JDPailleux @kiranchandramohan We are planning to add support for flang to > compile 32-bit application as well as building 32-bit flang-rt on AIX. The > first thing would be to enable `-m32` for flang in the driver. I saw Kiran's > comment. Would it be possible to m

[clang] [Clang][NFC] Improve const correctess of constraint normalization (PR #133633)

2025-03-30 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/133633 None >From ffd42830be4e9b4a92524797988d5f0c1deccf70 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 30 Mar 2025 11:26:30 +0200 Subject: [PATCH] [Clang][NFC] Improve const correctess of constraint nor

[clang] [Clang][NFC] Improve const correctess of constraint normalization (PR #133633)

2025-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/133633.diff 3 Files Affected: - (modified) clang/include/clang/Sema/Sema.h (+10-7) - (modified) clang/include/clang/Sema/SemaConcept.h (+7-7) - (mod

  1   2   >