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

2025-02-02 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,159 @@ +//===--- RedundantLookupCheck.cpp - clang-tidy ===// +// +// 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] [CodeGen] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125456)

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

[clang] [CodeGen] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125456)

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

[clang] [clang] print correct context for diagnostics suppressed by deduction (PR #125453)

2025-02-02 Thread via cfe-commits
@@ -1654,11 +1654,20 @@ void Sema::EmitDiagnostic(unsigned DiagID, const DiagnosticBuilder &DB) { } case DiagnosticIDs::SFINAE_Suppress: + if (DiagnosticsEngine::Level Level = getDiagnostics().getDiagnosticLevel( + DiagInfo.getID(), DiagInfo.getLocat

[clang] [clang] print correct context for diagnostics suppressed by deduction (PR #125453)

2025-02-02 Thread via cfe-commits
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase { /// '\#pragma clang attribute push' directives to the given declaration. void AddPragmaAttributes(Scope *S, Decl *D); - void PrintPragmaAttributeInstantiationPoint(); + using DiagFuncRef = cor3n

[clang] [clang] print correct context for diagnostics suppressed by deduction (PR #125453)

2025-02-02 Thread via cfe-commits
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase { /// '\#pragma clang attribute push' directives to the given declaration. void AddPragmaAttributes(Scope *S, Decl *D); - void PrintPragmaAttributeInstantiationPoint(); + using DiagFuncRef = + llvm::function_

[clang] [clang][bytecode] Refactor Program::createGlobalString (PR #125467)

2025-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125467 Remove unnecesary narrow() calls, rename a variable and initialize the array as a whole instead of each element individually. >From 20c472b39e94f51ed383a265f6c836f2b3276c50 Mon Sep 17 00:00:00 2001 From: =?UTF

[clang] [libclang] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125381)

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

[clang] [Lex] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125380)

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

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

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

[clang] [clang][bytecode] Ignore Namespace{Using, Alias}Decls (PR #125387)

2025-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125387 These were missing here and are used in a few libc++ tests. >From 7d77e6cdb6bf651b1b19c48e41c7e182e990e5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 2 Feb 2025 10:07:13 +0100 Subj

[clang] [clang][bytecode] Ignore Namespace{Using, Alias}Decls (PR #125387)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes These were missing here and are used in a few libc++ tests. --- Full diff: https://github.com/llvm/llvm-project/pull/125387.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+2-2) -

[clang] [compiler-rt] Issue 17812: [Atomic] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-02 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] [compiler-rt] Issue 17812: [Atomic] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (honeygoyal) Changes ## Description [Atomic] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit. - Suppress -Watomic-alignment warnings by not treating them as errors - Added -latomic when sanitizer flag is

[clang] [compiler-rt] Issue 17812: [Atomic] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-powerpc Author: None (honeygoyal) Changes ## Description [Atomic] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit. - Suppress -Watomic-alignment warnings by not treating them as errors - Added -latomic when sanitize

[clang] [compiler-rt] Issue 17812: [Atomic] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-02 Thread via cfe-commits
https://github.com/honeygoyal created https://github.com/llvm/llvm-project/pull/125388 ## Description [Atomic] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit. - Suppress -Watomic-alignment warnings by not treating them as errors - Added -latomic when sanitizer fla

[clang] [clang-format] Hanlde qualified type name for `QualifierAlignment` (PR #125327)

2025-02-02 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/125327 >From af3d964d74634f0dd9f7216572c1d852b7a549dc Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 31 Jan 2025 18:32:33 -0800 Subject: [PATCH 1/2] [clang-format] Hanlde qualified type names Fixes #125178. --- cl

[clang] [llvm] [MC/DC] Nested decision (PR #125403)

2025-02-02 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/125403 None >From a6d4be0e4b05b411c7160385485cfed0f173965c Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 2 Feb 2025 21:55:43 +0900 Subject: [PATCH 1/9] [MC/DC] Update CoverageMapping tests To resolve the

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread via cfe-commits
@@ -3492,10 +3492,13 @@ VarDecl *BindingDecl::getHoldingVar() const { return VD; } -llvm::ArrayRef BindingDecl::getBindingPackExprs() const { +llvm::ArrayRef BindingDecl::getBindingPackDecls() const { assert(Binding && "expecting a pack expr"); - auto *RP = cast(Binding)

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread via cfe-commits
https://github.com/cor3ntin commented: Thanks for doing that, this is neat https://github.com/llvm/llvm-project/pull/125394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MC/DC] Update CoverageMapping tests (PR #125404)

2025-02-02 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/125404 To resolve the error, rename mcdc-error-nests.cpp -> mcdc-nested-expr.cpp at first. - `func_condop` A corner case that contains close decisions. - `func_expect` Uses `__builtin_expect`. (#124565) - `func_lnot`

[clang] [MC/DC] Update CoverageMapping tests (PR #125404)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: NAKAMURA Takumi (chapuni) Changes To resolve the error, rename mcdc-error-nests.cpp -> mcdc-nested-expr.cpp at first. - `func_condop` A corner case that contains close decisions. - `func_expect` Uses `__builtin_expect`. (#124565) - `func_

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/125394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MC/DC] Make covmap tolerant of nested Decisions (PR #125407)

2025-02-02 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/125407 CoverageMappingWriter reorders `Region`s by `endLoc DESC` to prioritize wider `Decision` with the same `startLoc`. In `llvm-cov`, tweak seeking Decisions by reversal order to find smaller Decision first. >Fro

[clang] [llvm] [MC/DC] Make covmap tolerant of nested Decisions (PR #125407)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: NAKAMURA Takumi (chapuni) Changes CoverageMappingWriter reorders `Region`s by `endLoc DESC` to prioritize wider `Decision` with the same `startLoc`. In `llvm-cov`, tweak seeking Decisions by reversal order to find smaller Decision first.

[clang] [MC/DC] Refactor MCDC::State::Decision. NFC. (PR #125408)

2025-02-02 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/125408 Introduce `ID` and `InvalidID`. Then `DecisionByStmt` can have three states. * Not assigned if the Stmt(Expr) doesn't exist. * When `DecisionByStmt[Expr]` exists: * Invalid and should be ignored if `ID == Inva

[clang] [MC/DC] Refactor MCDC::State::Decision. NFC. (PR #125408)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: NAKAMURA Takumi (chapuni) Changes Introduce `ID` and `InvalidID`. Then `DecisionByStmt` can have three states. * Not assigned if the Stmt(Expr) doesn't exist. * When `DecisionByStmt[Expr]` exists: * Invalid and should be ignored

[clang] [llvm] [MC/DC] Nested decision (PR #125403)

2025-02-02 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/125403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MC/DC] Nested decision (PR #125403)

2025-02-02 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/125403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

2025-02-02 Thread Matheus Izvekov via cfe-commits
@@ -2525,8 +2525,11 @@ void TextNodeDumper::VisitCXXRecordDecl(const CXXRecordDecl *D) { OS << " instantiated_from"; dumpPointer(Instance); } - if (const auto *CTSD = dyn_cast(D)) + if (const auto *CTSD = dyn_cast(D)) { dumpTemplateSpecializationKind(CTSD->get

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-02-02 Thread via cfe-commits
@@ -0,0 +1,162 @@ +//===--- UseCppStyleCommentsCheck.cpp - clang-tidy-===// +// +// 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] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-02-02 Thread via cfe-commits
https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/124319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

2025-02-02 Thread Matheus Izvekov via cfe-commits
@@ -1841,15 +1841,21 @@ class ClassTemplateSpecializationDecl : public CXXRecordDecl, LLVM_PREFERRED_TYPE(TemplateSpecializationKind) unsigned SpecializationKind : 3; + /// When matching the primary template, have we matched any packs on the + /// parameter side, versus

[clang] [Clang][TableGen] Use PointerType::get(Context) in MVE TableGen emitter (NFC) (PR #124782)

2025-02-02 Thread Mats Jun Larsen via cfe-commits
https://github.com/junlarsen updated https://github.com/llvm/llvm-project/pull/124782 >From bc77542fe58bdc94566a9a589039856de50617b0 Mon Sep 17 00:00:00 2001 From: Mats Jun Larsen Date: Wed, 29 Jan 2025 01:29:01 +0900 Subject: [PATCH] [Clang][TableGen] Use PointerType::get(Context) in MVE Tabl

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

2025-02-02 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,147 @@ +.. title:: clang-tidy - performance-redundant-lookup + +performance-redundant-lookup + + +This check warns about potential redundant container lookup operations within +a function. + +Examples + + +.. code-block:: c++ + +i

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

2025-02-02 Thread via cfe-commits
@@ -0,0 +1,159 @@ +//===--- RedundantLookupCheck.cpp - clang-tidy ===// +// +// 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] [clang-tidy] Add performance-redundant-lookup check (PR #125420)

2025-02-02 Thread Oliver Stöneberg via cfe-commits
@@ -0,0 +1,147 @@ +.. title:: clang-tidy - performance-redundant-lookup + +performance-redundant-lookup + + +This check warns about potential redundant container lookup operations within +a function. + +Examples + + +.. code-block:: c++ + +i

[clang] [Lex] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125380)

2025-02-02 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/125380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-02 Thread via cfe-commits
@@ -0,0 +1,147 @@ +.. title:: clang-tidy - performance-redundant-lookup + +performance-redundant-lookup + + +This check warns about potential redundant container lookup operations within +a function. + +Examples + + +.. code-block:: c++ + +i

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

2025-02-02 Thread Oliver Stöneberg via cfe-commits
firewave wrote: Could you please run this with `--enable-check-profile` to see how heavy it is? https://github.com/llvm/llvm-project/pull/125420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

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

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

2025-02-02 Thread via cfe-commits
@@ -0,0 +1,147 @@ +.. title:: clang-tidy - performance-redundant-lookup + +performance-redundant-lookup + + +This check warns about potential redundant container lookup operations within +a function. + +Examples + + +.. code-block:: c++ + +i

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

2025-02-02 Thread via cfe-commits
@@ -0,0 +1,147 @@ +.. title:: clang-tidy - performance-redundant-lookup + +performance-redundant-lookup + + +This check warns about potential redundant container lookup operations within +a function. + +Examples + + +.. code-block:: c++ + +i

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

2025-02-02 Thread via cfe-commits
@@ -0,0 +1,147 @@ +.. title:: clang-tidy - performance-redundant-lookup + +performance-redundant-lookup + + +This check warns about potential redundant container lookup operations within +a function. + +Examples + + +.. code-block:: c++ + +i

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

2025-02-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/125420 >From 78390b2af01fcd5acfbd2a313852962c873e5611 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sun, 2 Feb 2025 17:35:39 +0100 Subject: [PATCH 1/5] [clang-tidy] Add performance-redundant-lookup check Finds r

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

2025-02-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/125420 >From 78390b2af01fcd5acfbd2a313852962c873e5611 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sun, 2 Feb 2025 17:35:39 +0100 Subject: [PATCH 1/6] [clang-tidy] Add performance-redundant-lookup check Finds r

[clang] [libclang] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125381)

2025-02-02 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/125381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 09e7b40 - [libclang] Migrate away from PointerUnion::dyn_cast (NFC) (#125381)

2025-02-02 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-02-02T09:31:39-08:00 New Revision: 09e7b40bd3d7a1a2d9153912224bcf612954ead5 URL: https://github.com/llvm/llvm-project/commit/09e7b40bd3d7a1a2d9153912224bcf612954ead5 DIFF: https://github.com/llvm/llvm-project/commit/09e7b40bd3d7a1a2d9153912224bcf612954ead5.diff L

[clang] 43b7124 - [AST] Migrate away from PointerUnion::dyn_cast (NFC) (#125379)

2025-02-02 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-02-02T09:31:06-08:00 New Revision: 43b7124c5749b3f3276adf1b869e623e163e230e URL: https://github.com/llvm/llvm-project/commit/43b7124c5749b3f3276adf1b869e623e163e230e DIFF: https://github.com/llvm/llvm-project/commit/43b7124c5749b3f3276adf1b869e623e163e230e.diff L

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

2025-02-02 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/125379 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2767f4b - [Lex] Migrate away from PointerUnion::dyn_cast (NFC) (#125380)

2025-02-02 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-02-02T09:31:23-08:00 New Revision: 2767f4bf0d5a70aa990dbfb3341a1bc03effcdbd URL: https://github.com/llvm/llvm-project/commit/2767f4bf0d5a70aa990dbfb3341a1bc03effcdbd DIFF: https://github.com/llvm/llvm-project/commit/2767f4bf0d5a70aa990dbfb3341a1bc03effcdbd.diff L

[clang] [experimental] Detect return-stack-addr using CFG (PR #124133)

2025-02-02 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/124133 >From 22990789b61e9f9d22e88a6b008eb3166fd1cb56 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 23 Jan 2025 15:47:39 + Subject: [PATCH 1/3] [experimental] Detect return-stack-addr using CFG --- .../A

[clang] [clang][bytecode][NFC] Only get expr when checking for UB (PR #125397)

2025-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125397 The Expr and its Type were unused otherwise. >From 928c97292c3528204b56d6d6d2e1524bedf9ca69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 2 Feb 2025 11:59:19 +0100 Subject: [PATCH] [c

[clang] [clang][bytecode][NFC] Only get expr when checking for UB (PR #125397)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes The Expr and its Type were unused otherwise. --- Full diff: https://github.com/llvm/llvm-project/pull/125397.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.h (+9-13) ``diff di

[clang] cf893ba - [clang][bytecode][NFC] Add a FunctionKind enum (#125391)

2025-02-02 Thread via cfe-commits
Author: Timm Baeder Date: 2025-02-02T12:09:30+01:00 New Revision: cf893baf02ffe2dc1a65a6bb9334332a83a453ea URL: https://github.com/llvm/llvm-project/commit/cf893baf02ffe2dc1a65a6bb9334332a83a453ea DIFF: https://github.com/llvm/llvm-project/commit/cf893baf02ffe2dc1a65a6bb9334332a83a453ea.diff L

[clang] [clang][bytecode][NFC] Only get expr when checking for UB (PR #125397)

2025-02-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/12884 Here is the r

[clang] [clang][bytecode][NFC] Only get expr when checking for UB (PR #125397)

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

[clang] 642e84f - [clang][bytecode][NFC] Only get expr when checking for UB (#125397)

2025-02-02 Thread via cfe-commits
Author: Timm Baeder Date: 2025-02-02T12:25:08+01:00 New Revision: 642e84f0012b6e3a0e4f187bad5ee1775c3d623a URL: https://github.com/llvm/llvm-project/commit/642e84f0012b6e3a0e4f187bad5ee1775c3d623a DIFF: https://github.com/llvm/llvm-project/commit/642e84f0012b6e3a0e4f187bad5ee1775c3d623a.diff L

[libunwind] Silence -Wunused-parameter warnings in Unwind-wasm.c (PR #125412)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Yuriy Chernyshov (georgthegreat) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125412.diff 1 Files Affected: - (modified) libunwind/src/Unwind-wasm.c (+3-3) ``diff diff --git a/libunwind/src/Unwind-was

[libunwind] Silence -Wunused-parameter warnings in Unwind-wasm.c (PR #125412)

2025-02-02 Thread Yuriy Chernyshov via cfe-commits
https://github.com/georgthegreat created https://github.com/llvm/llvm-project/pull/125412 None >From f3f30cca500f839a2e6647ea9acf0cea45a4e178 Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Sun, 2 Feb 2025 14:35:53 +0100 Subject: [PATCH] Silence -Wunused-parameter warnings in Unwind-wasm

[libunwind] Silence -Wunused-parameter warnings in Unwind-wasm.c (PR #125412)

2025-02-02 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 642e84f0012b6e3a0e4f187bad5ee1775c3d623a f3f30cca500f839a2e6647ea9acf0cea45a4e178 --e

[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

2025-02-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/125372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-02-02 Thread via cfe-commits
https://github.com/EugeneZelenko commented: Please rebase from `main`. Release Notes were changed significantly after 20 branch. https://github.com/llvm/llvm-project/pull/124319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

2025-02-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/125372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

2025-02-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/125372 >From a624adeb9a0b0af5c9370c6a97b2e2c874cdc066 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 31 Jan 2025 20:41:39 -0300 Subject: [PATCH] [clang] fix P3310 overload resolution flag propagation Class

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-02-02 Thread via cfe-commits
@@ -0,0 +1,162 @@ +//===--- UseCppStyleCommentsCheck.cpp - clang-tidy-===// +// +// 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] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-02-02 Thread via cfe-commits
4m4n-x-B4w4ne wrote: > As @PiotrZSL mentioned in the issue, adding an option called something like > `ExcludeDoxygenStyleComments` would be very helpful (or even necessary) > before releasing this check. Otherwise, it could create a lot of trouble for > projects that use doxygen for their docu

[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

2025-02-02 Thread Matheus Izvekov via cfe-commits
@@ -1841,15 +1841,21 @@ class ClassTemplateSpecializationDecl : public CXXRecordDecl, LLVM_PREFERRED_TYPE(TemplateSpecializationKind) unsigned SpecializationKind : 3; + /// When matching the primary template, have we matched any packs on the + /// parameter side, versus

[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

2025-02-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/125372 >From 36cab9c0ae9bd24b86dcfa0c260f1b0701d7468e Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 31 Jan 2025 20:41:39 -0300 Subject: [PATCH] [clang] fix P3310 overload resolution flag propagation Class

[libunwind] Silence -Wunused-parameter warnings in Unwind-wasm.c (PR #125412)

2025-02-02 Thread Yuriy Chernyshov via cfe-commits
https://github.com/georgthegreat updated https://github.com/llvm/llvm-project/pull/125412 >From 69307d52fc749c847da74e98624ce1c39f2fe2d9 Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Sun, 2 Feb 2025 14:35:53 +0100 Subject: [PATCH] Silence -Wunused-parameter warnings in Unwind-wasm.c --

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-02 Thread Owen Pan via cfe-commits
@@ -11220,6 +11220,333 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + // Begin with tests covering the case where there is no constr

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-02 Thread via cfe-commits
@@ -11220,6 +11220,333 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + // Begin with tests covering the case where there is no constr

[clang] [clang-format] Hanlde qualified type name for `QualifierAlignment` (PR #125327)

2025-02-02 Thread Owen Pan via cfe-commits
owenca wrote: > Seems to also work for top-level types (`::int_64_t constexpr x{123};` works > correctly) It didn't work either. https://github.com/llvm/llvm-project/pull/125327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [clang-format] Hanlde qualified type name for `QualifierAlignment` (PR #125327)

2025-02-02 Thread Owen Pan via cfe-commits
owenca wrote: > > Seems to also work for top-level types (`::int_64_t constexpr x{123};` > > works correctly) but breaks for fully qualified types (`::std::int64_t > > constexpr x{123};` becomes `::constexpr std::int64_t x{123};`) > > Yeah, I intentionally didn't want to use a loop for names l

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-02 Thread David CARLIER via cfe-commits
https://github.com/devnexen created https://github.com/llvm/llvm-project/pull/125389 None >From 19d4d1b3501d8524a6d88d62317dd0ea0022ebfb Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 2 Feb 2025 09:36:50 + Subject: [PATCH 1/2] [compiler-rt][rtsan] porting the sanitizer to FreeBSD.

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-02 Thread David CARLIER via cfe-commits
https://github.com/devnexen ready_for_review https://github.com/llvm/llvm-project/pull/125389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Ignore Namespace{Using, Alias}Decls (PR #125387)

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

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-compiler-rt-sanitizer Author: David CARLIER (devnexen) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125389.diff 4 Files Affected: - (modified) clang/lib/Driver/ToolChains/FreeBSD.cpp (+1) - (modified) compiler-rt/lib/rtsan/rtsan

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David CARLIER (devnexen) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125389.diff 4 Files Affected: - (modified) clang/lib/Driver/ToolChains/FreeBSD.cpp (+1) - (modified) compiler-rt/lib/rtsan/rtsan_context.cpp (+1

[clang] 00bdce1 - [clang][bytecode] Ignore Namespace{Using,Alias}Decls (#125387)

2025-02-02 Thread via cfe-commits
Author: Timm Baeder Date: 2025-02-02T10:43:15+01:00 New Revision: 00bdce1c373a1c5b756f4cf694a952ef702d0294 URL: https://github.com/llvm/llvm-project/commit/00bdce1c373a1c5b756f4cf694a952ef702d0294 DIFF: https://github.com/llvm/llvm-project/commit/00bdce1c373a1c5b756f4cf694a952ef702d0294.diff L

[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

2025-02-02 Thread Balazs Benics via cfe-commits
steakhal wrote: I've pushed a couple of commits to sync this PR with what I had in mind. I hope you don't mind @Flandini. Please anyone do a thorough review. --- I've considered uplifiting a couple of the `VarRegion::getStackFrame()`, and similar `getStackFrame()` functions, because internall

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-02-02 Thread Owen Pan via cfe-commits
owenca wrote: > > From #123921, it seems that you only want the new option to work with > > `--staged`, but should it also work with other options that may print a > > list of filenames? > > I don't know; I only use `git clang-format` as in #123921 and I am not > familiar with all its uses. I

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

2025-02-02 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,147 @@ +.. title:: clang-tidy - performance-redundant-lookup + +performance-redundant-lookup + + +This check warns about potential redundant container lookup operations within +a function. + +Examples + + +.. code-block:: c++ + +i

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread Jason Rice via cfe-commits
https://github.com/ricejasonf updated https://github.com/llvm/llvm-project/pull/125394 >From a323e058b2c8adf97f7f9a55a9187f74de9b8d17 Mon Sep 17 00:00:00 2001 From: Jason Rice Date: Sun, 2 Feb 2025 00:52:47 -0800 Subject: [PATCH 1/3] [Clang][P1061] Consolidate ResolvedUnexpandedPackExpr into F

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 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 d5a7a483a65f830a0c7a931781bc90046dc67ff4 b2b85fdbe11dce02c6ba842b5a4949b70c47207b --e

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-02 Thread Owen Pan via cfe-commits
@@ -11220,6 +11220,333 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + // Begin with tests covering the case where there is no constr

[clang] [clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (PR #125448)

2025-02-02 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -emit-llvm -std=c++20 -triple x86_64-unknown-linux-gnu %s -o - | FileCheck %s + +// COMDAT groups in ELF objects are not permitted to contain local symbols. While template parameter +// objects are normally emitted in COMDATs, we shouldn't do

[clang] [clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (PR #125448)

2025-02-02 Thread Fangrui Song via cfe-commits
@@ -3765,7 +3765,7 @@ ConstantAddress CodeGenModule::GetAddrOfTemplateParamObject( auto *GV = new llvm::GlobalVariable(getModule(), Init->getType(), /*isConstant=*/true, Linkage, Init, Name); setGVProperties(GV, TPO); - if (supportsC

[clang] [clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (PR #125448)

2025-02-02 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -emit-llvm -std=c++20 -triple x86_64-unknown-linux-gnu %s -o - | FileCheck %s MaskRay wrote: Probably best to figure out where the primary test of the neighbor lines is and adds the extra test there. https://github.com/llvm

[clang] [clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (PR #125448)

2025-02-02 Thread Owen Anderson via cfe-commits
@@ -3765,7 +3765,7 @@ ConstantAddress CodeGenModule::GetAddrOfTemplateParamObject( auto *GV = new llvm::GlobalVariable(getModule(), Init->getType(), /*isConstant=*/true, Linkage, Init, Name); setGVProperties(GV, TPO); - if (supportsC

[clang] [clang] print correct context for diagnostics suppressed by deduction (PR #125453)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This patch makes it so the correct instantiation context is printed for diagnostics suppessed by template argument deduction. The context is saved along with the suppressed diagnostic, and when the decl

[clang] [clang] print correct context for diagnostics suppressed by deduction (PR #125453)

2025-02-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/125453 This patch makes it so the correct instantiation context is printed for diagnostics suppessed by template argument deduction. The context is saved along with the suppressed diagnostic, and when the declaratio

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

2025-02-02 Thread Balazs Benics via cfe-commits
steakhal wrote: > Could you please run this with `--enable-check-profile` to see how heavy it > is? I plan to re-run it on clang soon, and share the results. https://github.com/llvm/llvm-project/pull/125420 ___ cfe-commits mailing list cfe-commits@li

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-02-02 Thread Nikolaos Chatzikonstantinou via cfe-commits
@@ -260,15 +265,13 @@ def main(): "Ignoring the following files (wrong extension, symlink, or " "ignored by clang-format):" ) -for filename in ignored_files: -print("%s" % filename) +print_f

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-02-02 Thread Nikolaos Chatzikonstantinou via cfe-commits
https://github.com/createyourpersonalaccount edited https://github.com/llvm/llvm-project/pull/123926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-02-02 Thread Nikolaos Chatzikonstantinou via cfe-commits
createyourpersonalaccount wrote: > > > From #123921, it seems that you only want the new option to work with > > > `--staged`, but should it also work with other options that may print a > > > list of filenames? > > > > > > I don't know; I only use `git clang-format` as in #123921 and I am no

[clang] da2b415 - [clang] Add tracking source deduction guide for the explicitly-written

2025-02-02 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2025-02-02T23:06:25+01:00 New Revision: da2b415b19d178d6b250bb6468ed4a207860adf7 URL: https://github.com/llvm/llvm-project/commit/da2b415b19d178d6b250bb6468ed4a207860adf7 DIFF: https://github.com/llvm/llvm-project/commit/da2b415b19d178d6b250bb6468ed4a207860adf7.diff LO

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread via cfe-commits
Sirraide wrote: Can you test if that also fixes #125165? https://github.com/llvm/llvm-project/pull/125394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix the indent of the ternary operator when AlignOperands and BreakBeforeTernaryOperators is specified. (PR #100860)

2025-02-02 Thread John Ericson via cfe-commits
Ericson2314 wrote: In Nix (github.com/nixos/nix) I am getting formatting like ```c++ auto variant = scheme == "auto" ? (StoreReference::Variant{Specified::Auto{}}) : (StoreReference::Variant{Specified::Specified{

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread Jason Rice via cfe-commits
ricejasonf wrote: @Sirraide I did try it and the bug persists. The `LHS` is a RecoveryExpr, so I am not sure how to approach that. https://github.com/llvm/llvm-project/pull/125394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

  1   2   >