[clang] a5af874 - [clang-format][NFC] Use `empty()` instead of comparing size() to 0 or 1

2025-07-06 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2025-07-06T23:54:00-07:00 New Revision: a5af8745039f906c4fc4184a1fe0d35d42355f52 URL: https://github.com/llvm/llvm-project/commit/a5af8745039f906c4fc4184a1fe0d35d42355f52 DIFF: https://github.com/llvm/llvm-project/commit/a5af8745039f906c4fc4184a1fe0d35d42355f52.diff LOG:

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-06 Thread Matt Arsenault via cfe-commits
@@ -2942,6 +2942,65 @@ void tools::addHIPRuntimeLibArgs(const ToolChain &TC, Compilation &C, } } +void tools::addOpenCLBuiltinsLib(const Driver &D, + const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgString

[clang] [libclc] [clang] Add the ability to link libclc OpenCL libraries (PR #146503)

2025-07-06 Thread Matt Arsenault via cfe-commits
@@ -2942,6 +2942,65 @@ void tools::addHIPRuntimeLibArgs(const ToolChain &TC, Compilation &C, } } +void tools::addOpenCLBuiltinsLib(const Driver &D, + const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgString

[clang] [clang][dataflow] Handle when `this` refers to a different location (PR #146900)

2025-07-06 Thread via cfe-commits
martinboehme wrote: As an initial comment, wanted to confirm that we've clarified what the semantics of the AST are here. In https://github.com/llvm/llvm-project/issues/128068, I asked: > What I'm not clear on is what the rule is that disambiguates this. Is it > simply that if a `CXXThisExpr`

[clang] [clang-tools-extra] [ASTMatchers][NFC] Replace `makeMatcher` function with CTAD (PR #147197)

2025-07-06 Thread Baranov Victor via cfe-commits
vbvictor wrote: I'd suggest marking it `[[deprecated]]` for now and removing it completely after 2 releases of LLVM (AFAIK that's usual procedure). I've [searched](https://sourcegraph.com/search?q=context:global+::clang::ast_matchers::internal::makeMatcher+-file:.*Matchers%5C.h%24+-file:.*ASTM

[clang] Sema: filter out invalid base-specifiers before attaching (PR #147213)

2025-07-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] Sema: filter out invalid base-specifiers before attaching (PR #147213)

2025-07-06 Thread Shashi Shankar via cfe-commits
https://github.com/shashi1687 updated https://github.com/llvm/llvm-project/pull/147213 >From 6184a8edfbe7173f0b23ccebd4da80d8fb5e1485 Mon Sep 17 00:00:00 2001 From: Shashi Shankar Date: Sun, 6 Jul 2025 22:25:48 +0200 Subject: [PATCH] Sema: filter out invalid base-specifiers before attaching Ac

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-07-06 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA edited https://github.com/llvm/llvm-project/pull/144313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Sema: filter out invalid base-specifiers before attaching (PR #147213)

2025-07-06 Thread Shashi Shankar via cfe-commits
https://github.com/shashi1687 updated https://github.com/llvm/llvm-project/pull/147213 >From 2b109b30c7db2fe48b562a38ac2543c56cb1beca Mon Sep 17 00:00:00 2001 From: Shashi Shankar Date: Sun, 6 Jul 2025 22:25:48 +0200 Subject: [PATCH] Sema: filter out invalid base-specifiers before attaching Ac

[clang] Sema: filter out invalid base-specifiers before attaching (PR #147213)

2025-07-06 Thread Shashi Shankar via cfe-commits
https://github.com/shashi1687 created https://github.com/llvm/llvm-project/pull/147213 ### Summary Briefly what this PR does, in one or two sentences. > Filters out invalid (null) base-specifiers in `ActOnBaseSpecifiers()`, > preventing ICEs on incomplete or non-class bases. ### Motivation Why

[clang] Sema: filter out invalid base-specifiers before attaching (PR #147213)

2025-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shashi Shankar (shashi1687) Changes ### Summary Briefly what this PR does, in one or two sentences. > Filters out invalid (null) base-specifiers in `ActOnBaseSpecifiers()`, preventing ICEs on incomplete or non-class bases. ### Motivation

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-07-06 Thread Valentyn Yukhymenko via cfe-commits
@@ -985,6 +985,20 @@ auto buildTransferMatchSwitch() { isOptionalMemberCallWithNameMatcher(hasName("isNull")), transferOptionalIsNullCall) + // NullableValue::makeValue, NullableValue::makeValueInplace + // Only NullableValue has these methods, bu

[clang] Sema: filter out invalid base-specifiers before attaching (PR #147213)

2025-07-06 Thread Shashi Shankar via cfe-commits
https://github.com/shashi1687 updated https://github.com/llvm/llvm-project/pull/147213 >From 8e0ec03d5d587df2d68775bc7bb7f3d8331db7b8 Mon Sep 17 00:00:00 2001 From: Shashi Shankar Date: Sun, 6 Jul 2025 22:25:48 +0200 Subject: [PATCH] Sema: filter out invalid base-specifiers before attaching Ac

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread JJ Marr via cfe-commits
@@ -0,0 +1,100 @@ +// RUN: %check_clang_tidy %s portability-avoid-platform-specific-fundamental-types %t -- -config="{CheckOptions: [{key: portability-avoid-platform-specific-fundamental-types.WarnOnFloats, value: true}]}" -header-filter=.* -- -std=c++23 + +// Mock fixed-width

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,508 @@ +#include "clang/Analysis/Analyses/LifetimeSafety.h" +#include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" +#include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Analysis/CFG.h" +#inc

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,13 @@ +#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIME_SAFETY_H vbvictor wrote: I think this file has a "Header" with `Part of the LLVM Project ...` and a little in-place description like any other file in `Analyses/` dir. Same to .cpp file. https://g

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,508 @@ +#include "clang/Analysis/Analyses/LifetimeSafety.h" +#include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" +#include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Analysis/CFG.h" +#inc

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,508 @@ +#include "clang/Analysis/Analyses/LifetimeSafety.h" +#include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" +#include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Analysis/CFG.h" +#inc

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,508 @@ +#include "clang/Analysis/Analyses/LifetimeSafety.h" +#include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" +#include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Analysis/CFG.h" +#inc

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

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

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,13 @@ +#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIME_SAFETY_H vbvictor wrote: ```suggestion #ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H ``` Underscore should be path separators, https://llvm.org/docs/CodingStandards.html#header-guard. https

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: Thank you for your work! Interested to see this feature in clang. Left a couple of nit comments on code style. https://github.com/llvm/llvm-project/pull/142313 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

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

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

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

[clang] [libclang][Cygwin] Use __declspec(dllexport) for libclang on Cygwin (PR #147122)

2025-07-06 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > > > Before merge this, requires #147108 > > > > > > Can you elaborate on why this is needed - what happens without it - > > wouldn't that issue be happening already now in regular win32 builds so far? > > The linker reports undefined reference to > clang_install_aborting_ll

[clang-tools-extra] [clangd] Add tweak to override pure virtuals (PR #139348)

2025-07-06 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. Sorry for the extreme delay in review. I think everyone trying to keep up with clangd reviews has been swamped and pretty over subscribed. The implementation here looks clean and follows existing conventions in clangd. It is also quite

[clang] [libclang] Add missing dllexport annotation (PR #147108)

2025-07-06 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > > > Still it may be good to figure out why this hasn't been an issue so far, > > > for whoever otherwise were using these dllexport annotations. > > > > > > I suspect it relates to module definition file (*.def). On MinGW, the > > symbol is properly exported without annotati

[clang] [libclang][Cygwin] Use __declspec(dllexport) for libclang on Cygwin (PR #147122)

2025-07-06 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo approved this pull request. LGTM, thanks. But we should wait for https://github.com/llvm/llvm-project/pull/147108 to land first before merging this. https://github.com/llvm/llvm-project/pull/147122 ___ cfe-commits mailing

[clang] [libclang] Add missing dllexport annotation (PR #147108)

2025-07-06 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo approved this pull request. LGTM, but can you amend the PR description with the extra info you gathered, about why this hasn't been an issue in other existing configurations? https://github.com/llvm/llvm-project/pull/147108 ___

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-07-06 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA edited https://github.com/llvm/llvm-project/pull/144313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-07-06 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA edited https://github.com/llvm/llvm-project/pull/144313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Add missing dllexport annotation (PR #147108)

2025-07-06 Thread Tomohiro Kashiwada via cfe-commits
https://github.com/kikairoya edited https://github.com/llvm/llvm-project/pull/147108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5ccbea9 - [clang-format][NFC] Replace size() with empty() (#147164)

2025-07-06 Thread via cfe-commits
Author: Owen Pan Date: 2025-07-06T14:19:30-07:00 New Revision: 5ccbea9f480d5c387c7f21aa101e72774c91f1d3 URL: https://github.com/llvm/llvm-project/commit/5ccbea9f480d5c387c7f21aa101e72774c91f1d3 DIFF: https://github.com/llvm/llvm-project/commit/5ccbea9f480d5c387c7f21aa101e72774c91f1d3.diff LOG:

[clang] [clang-format][NFC] Replace size() with empty() (PR #147164)

2025-07-06 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/147164 ___ 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 portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread JJ Marr via cfe-commits
@@ -0,0 +1,190 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Finds fundamental types (e.g. `int`, `float`) and recommends using ty

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread JJ Marr via cfe-commits
@@ -0,0 +1,190 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Finds fundamental types (e.g. `int`, `float`) and recommends using ty

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread JJ Marr via cfe-commits
@@ -0,0 +1,190 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Finds fundamental types (e.g. `int`, `float`) and recommends using ty

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread JJ Marr via cfe-commits
@@ -0,0 +1,63 @@ +// RUN: %check_clang_tidy %s portability-avoid-platform-specific-fundamental-types %t -- -config="{CheckOptions: [{key: portability-avoid-platform-specific-fundamental-types.WarnOnChars, value: true}]}" -header-filter=.* -- -std=c++11 jj-marr

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread JJ Marr via cfe-commits
@@ -0,0 +1,100 @@ +// RUN: %check_clang_tidy %s portability-avoid-platform-specific-fundamental-types %t -- -config="{CheckOptions: [{key: portability-avoid-platform-specific-fundamental-types.WarnOnFloats, value: true}]}" -header-filter=.* -- -std=c++23 + +// Mock fixed-width

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-07-06 Thread Marco Vitale via cfe-commits
https://github.com/mrcvtl updated https://github.com/llvm/llvm-project/pull/145164 >From 37c57131c397d4aeaef7fe5b860d1983f1e4bdc2 Mon Sep 17 00:00:00 2001 From: Marco Vitale Date: Sat, 21 Jun 2025 14:01:53 +0200 Subject: [PATCH 1/4] [Sema] Fix lifetime extension for temporaries in range-based

[clang] 1828381 - [clang][bytecode] Fix APValue generation for RValueReferenceType (#147207)

2025-07-06 Thread via cfe-commits
Author: Timm Baeder Date: 2025-07-06T21:12:18+02:00 New Revision: 1828381ed2591fe9cdc080c70f44ed7309be4df6 URL: https://github.com/llvm/llvm-project/commit/1828381ed2591fe9cdc080c70f44ed7309be4df6 DIFF: https://github.com/llvm/llvm-project/commit/1828381ed2591fe9cdc080c70f44ed7309be4df6.diff L

[clang] [clang][bytecode] Fix APValue generation for RValueReferenceType (PR #147207)

2025-07-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-arm64-windows-msvc` running on `linaro-armv8-windows-msvc-01` while building `clang` at step 7 "test-build-unified-tree-check-flang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/207/builds/34

[clang] [clang-format] Stop crashing when the input contains `??/\n` (PR #147156)

2025-07-06 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > > I added code to count the number of characters in the escape sequence > > probably just because the block of code used to have a comment saying > > someone should add the feature. > > > I am not sure we should support the trigraph. I don't know anyone who uses >

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #147203)

2025-07-06 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/147203 StorageClass is already of spirv::StorageClass. >From 22b9a1ae6d4874a50586c369a47136f97a60b66c Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 5 Jul 2025 10:47:10 -0700 Subject: [PATCH] [Sema] Rem

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #147203)

2025-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-spir-v Author: Kazu Hirata (kazutakahirata) Changes StorageClass is already of spirv::StorageClass. --- Full diff: https://github.com/llvm/llvm-project/pull/147203.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaSPIRV.cpp (+1-1) ``

[clang] [Serialization] Remove an unnecessarycast (NFC) (PR #147204)

2025-07-06 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/147204 IndexFromEnd is already of int. >From bf416ae0d374a15107b8e742660bd985a7d9b2d8 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 5 Jul 2025 17:57:13 -0700 Subject: [PATCH] [Serialization] Remove an

[clang] [Serialization] Remove an unnecessarycast (NFC) (PR #147204)

2025-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Kazu Hirata (kazutakahirata) Changes IndexFromEnd is already of int. --- Full diff: https://github.com/llvm/llvm-project/pull/147204.diff 1 Files Affected: - (modified) clang/lib/Serialization/ASTReader.cpp (+1-1) ``

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #147203)

2025-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes StorageClass is already of spirv::StorageClass. --- Full diff: https://github.com/llvm/llvm-project/pull/147203.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaSPIRV.cpp (+1-1) ``d

[clang] [clang][bytecode] Fix APValue generation for RValueReferenceType (PR #147207)

2025-07-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/147207 We need to ignore the lvalue path, just like we do for lvalue reference types. >From aaa42f44c12a10070c1ad94965e2f63574600b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 6 Jul 2025

[clang] [clang][bytecode] Fix APValue generation for RValueReferenceType (PR #147207)

2025-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We need to ignore the lvalue path, just like we do for lvalue reference types. --- Full diff: https://github.com/llvm/llvm-project/pull/147207.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Poi

[clang] [clang-format][NFC] Replace size() with empty() (PR #147164)

2025-07-06 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/147164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce intra-procedural lifetime analysis in Clang (PR #142313)

2025-07-06 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,728 @@ +#include "clang/Analysis/Analyses/LifetimeSafety.h" +#include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" +#include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/AnalysisDeclContext.h" +#include "clang/Analysis/CFG.h" +#inc

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread JJ Marr via cfe-commits
@@ -0,0 +1,190 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Finds fundamental types (e.g. `int`, `float`) and recommends using ty

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread JJ Marr via cfe-commits
@@ -0,0 +1,260 @@ +//===--- AvoidPlatformSpecificFundamentalTypesCheck.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 portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread JJ Marr via cfe-commits
@@ -0,0 +1,54 @@ +// clang-format off +//===--- AvoidPlatformSpecificFundamentalTypesCheck.h - clang-tidy -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread JJ Marr via cfe-commits
@@ -0,0 +1,54 @@ +// clang-format off +//===--- AvoidPlatformSpecificFundamentalTypesCheck.h - clang-tidy -*- C++ -*-===// jj-marr wrote: Done. https://github.com/llvm/llvm-project/pull/146970 ___ cfe-commits mailing

[clang] [OpenACC][CIR] 'cache' construct lowering (PR #146915)

2025-07-06 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/146915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] accept @tparam on variable template partial specializations (PR #147219)

2025-07-06 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/147219 Fixes #144775 --- This patch addresses a false-positive `-Wdocumentation` warning on `@tparam` comments attached to _variable template partial specializations_ >From 2c44c8bd3c2a49ba0a2cecdcadf5d08c0e9e31

[clang] [Clang] accept @tparam on variable template partial specializations (PR #147219)

2025-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #144775 --- This patch addresses a false-positive `-Wdocumentation` warning on `@tparam` comments attached to _variable template partial specializations_ --- Full diff: https://github.com/llvm/llv

[clang] [Clang] accept @tparam on variable template partial specializations (PR #147219)

2025-07-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 HEAD~1 HEAD --extensions cpp -- clang/lib/AST/Comment.cpp clang/test/Sema/warn-docume

[clang-tools-extra] [clang-tidy] Add misc-bool-bitwise-operation check (PR #142324)

2025-07-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,62 @@ +.. title:: clang-tidy - misc-bool-bitwise-operation + +misc-bool-bitwise-operation +=== + +Finds potentially inefficient use of bitwise operators such as ``&``, ``|`` +and their compound analogues on Boolean values where logical operator

[clang] [RISCV] Add missing intrinsicis vrgatherei16/vslideup/vslidedown support for Zvfbfmin (PR #146309)

2025-07-06 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/146309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Make `bugprone-unhandled-self-assignment` check more general (PR #147066)

2025-07-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 HEAD~1 HEAD --extensions cpp -- clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAs

[clang] [analyzer] Add support for consteval in ConditionBRVisitor::VisitTerminator (PR #146859)

2025-07-06 Thread Imad Aldij via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: %clang_analyze_cc1 -std=c++23 -analyzer-checker=core -verify %s imdj wrote: > Please check every standard from C++23 and up What is the best approach to do this? I noticed in some files they duplicate the line for each subsequent standa

[clang] 3f33e7b - [RISCV] Add Andes XAndesVSIntLoad (Andes Vector INT4 Load) extension (#147005)

2025-07-06 Thread via cfe-commits
Author: Jim Lin Date: 2025-07-07T13:01:22+08:00 New Revision: 3f33e7ba5b08a97939280e539ad20a34d54b2719 URL: https://github.com/llvm/llvm-project/commit/3f33e7ba5b08a97939280e539ad20a34d54b2719 DIFF: https://github.com/llvm/llvm-project/commit/3f33e7ba5b08a97939280e539ad20a34d54b2719.diff LOG:

[clang] [llvm] [RISCV] Add Andes XAndesVSIntLoad (Andes Vector INT4 Load) extension (PR #147005)

2025-07-06 Thread Jim Lin via cfe-commits
https://github.com/tclin914 closed https://github.com/llvm/llvm-project/pull/147005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Replace a function with StringRef::contains (PR #146245)

2025-07-06 Thread Owen Pan via cfe-commits
owenca wrote: Had we used `StringRef::contains` initially, would you still insist that it be replaced with a "more performant" local function? Please note that the code is not on a performance critical path, and the difference in time it takes to run the relevant unit tests for 100 times is wi

[clang-tools-extra] [clang-tidy] filter check options by enabled checks in '--dump-config' (PR #147142)

2025-07-06 Thread Baranov Victor via cfe-commits
@@ -503,6 +503,21 @@ getCheckNames(const ClangTidyOptions &Options, return Factory.getCheckNames(); } +void filterCheckOptions(ClangTidyOptions &Options, +const std::vector &EnabledChecks) { + StringSet<> EnabledChecksSet(llvm::from_range, EnabledChe

[clang-tools-extra] [clang-tidy] Add new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,108 @@ +//===--- UseConcisePreprocessorDirectivesCheck.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 new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/146830 ___ 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 query based custom check (PR #131804)

2025-07-06 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ping @PiotrZSL @carlosgalvezp https://github.com/llvm/llvm-project/pull/131804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix false positives with template in `misc-unconventional-assign-operator` check (PR #143292)

2025-07-06 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/143292 >From 311bc80c0e5ab787aef8476dae51bc16805d728b Mon Sep 17 00:00:00 2001 From: flovent <144676429+flov...@users.noreply.github.com> Date: Sun, 8 Jun 2025 10:46:48 +0800 Subject: [PATCH 1/5] [clang-tidy] Fix false

[clang-tools-extra] [clang-tidy] Add new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-06 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/146830 >From 9eb58438d2b4061ad7a6bdbd1db82a5fd4043948 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Thu, 3 Jul 2025 00:19:52 -0700 Subject: [PATCH 01/10] [clang-tidy] Add new check: `modernize-use-concise-

[clang-tools-extra] [clang-tidy] Add new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-06 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,138 @@ +// RUN: %check_clang_tidy -std=c++98 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t +// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX %s readability-use-concise-preprocessor-directives %t +// RUN: %check_clang_tidy -std=c++

[clang-tools-extra] [clang-tidy] Add new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-06 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/146830 >From 9eb58438d2b4061ad7a6bdbd1db82a5fd4043948 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Thu, 3 Jul 2025 00:19:52 -0700 Subject: [PATCH 01/11] [clang-tidy] Add new check: `modernize-use-concise-

[clang] [PowerPC] Remove SPE from triple in VSX test (PR #147184)

2025-07-06 Thread Guy David via cfe-commits
https://github.com/guy-david created https://github.com/llvm/llvm-project/pull/147184 This test does not fail because the PPCSubtarget was not initialized, and otherwise a fatal error occurs: "SPE and traditional floating point cannot both be enabled.". Tested by adding `-mllvm -enable-matrix`

[clang] [PowerPC] Remove SPE from triple in VSX test (PR #147184)

2025-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Guy David (guy-david) Changes This test does not fail because the PPCSubtarget was not initialized, and otherwise a fatal error occurs: "SPE and traditional floating point cannot both be enabled.". Tested by adding `-mllvm -enable-matrix`

[clang-tools-extra] [clang-tidy] Add new check: `readability-use-concise-preprocessor-directives` (PR #146830)

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

[clang-tools-extra] 6c153e5 - [clang-tidy] Fix false positives with template in `misc-unconventional-assign-operator` check (#143292)

2025-07-06 Thread via cfe-commits
Author: flovent Date: 2025-07-06T15:06:18+03:00 New Revision: 6c153e50f8b23dbd422c3f9eedf653448391 URL: https://github.com/llvm/llvm-project/commit/6c153e50f8b23dbd422c3f9eedf653448391 DIFF: https://github.com/llvm/llvm-project/commit/6c153e50f8b23dbd422c3f9eedf653448391.diff LOG:

[clang-tools-extra] [clang-tidy] Add new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-06 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,40 @@ +//===--- UseConcisePreprocessorDirectivesCheck.h - clang-tidy ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clang-tidy] Fix false positives with template in `misc-unconventional-assign-operator` check (PR #143292)

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

[clang] [RISCV] Add missing intrinsicis vrgatherei16/vslideup/vslidedown support for Zvfbfmin (PR #146309)

2025-07-06 Thread Jim Lin via cfe-commits
tclin914 wrote: Kindly ping. https://github.com/llvm/llvm-project/pull/146309 ___ 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 portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread via cfe-commits
@@ -0,0 +1,260 @@ +//===--- AvoidPlatformSpecificFundamentalTypesCheck.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 portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread via cfe-commits
@@ -0,0 +1,54 @@ +// clang-format off +//===--- AvoidPlatformSpecificFundamentalTypesCheck.h - clang-tidy -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread via cfe-commits
@@ -0,0 +1,190 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Finds fundamental types (e.g. `int`, `float`) and recommends using ty

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-06 Thread via cfe-commits
@@ -0,0 +1,54 @@ +// clang-format off +//===--- AvoidPlatformSpecificFundamentalTypesCheck.h - clang-tidy -*- C++ -*-===// EugeneZelenko wrote: ```suggestion //==-- AvoidPlatformSpecificFundamentalTypesCheck.h - clang-tidy -*- C++ -*-==// ``` https://github.com

[clang] [CIR] Implement functional cast to ComplexType (PR #147147)

2025-07-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147147 >From bb6602546c35f6a25a4a64141ec9d1edff65dd95 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 5 Jul 2025 15:56:31 +0200 Subject: [PATCH 1/2] [CIR] Implement functional cast to ComplexType --- clan

[clang] db4e927 - [clang][bytecode] Misc union fixes (#146824)

2025-07-06 Thread via cfe-commits
Author: Timm Baeder Date: 2025-07-06T14:55:29+02:00 New Revision: db4e927f9f02b40a0bc332205b88bc40edc29afc URL: https://github.com/llvm/llvm-project/commit/db4e927f9f02b40a0bc332205b88bc40edc29afc DIFF: https://github.com/llvm/llvm-project/commit/db4e927f9f02b40a0bc332205b88bc40edc29afc.diff L

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-07-06 Thread via cfe-commits
yronglin wrote: friendly ping~ https://github.com/llvm/llvm-project/pull/107168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-07-06 Thread via cfe-commits
yronglin wrote: > Forgot that the revert wouldn't include the `lifetimebound` attribute. I > restructured the switch case like that, in order to catch both: > > ``` > case LK_Extended: { > if (!MTE) { > // The initialized entity has lifetime beyond the full-expression, >

[clang] ec9eefc - [clang][bytecode] Fix a crash in overflow builtins (#147189)

2025-07-06 Thread via cfe-commits
Author: Timm Baeder Date: 2025-07-06T16:42:06+02:00 New Revision: ec9eefcef560e4ea5b5d8ee6ed9cc6ef8c1f274c URL: https://github.com/llvm/llvm-project/commit/ec9eefcef560e4ea5b5d8ee6ed9cc6ef8c1f274c DIFF: https://github.com/llvm/llvm-project/commit/ec9eefcef560e4ea5b5d8ee6ed9cc6ef8c1f274c.diff L

[clang] [clang][bytecode] Fix a crash in overflow builtins (PR #147189)

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

[clang] [clang][bytecode] Fix visiting for-range loop variable (PR #147188)

2025-07-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/147188 >From 62b8ba3e78eaeb1b3d68778443a8ae21a0f6769b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 6 Jul 2025 15:07:47 +0200 Subject: [PATCH] [clang][bytecode] Fix visiting for-range loop va

[clang] [clang][bytecode] Misc union fixes (PR #146824)

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

[clang] [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (PR #146212)

2025-07-06 Thread via cfe-commits
flovent wrote: @NagyDonat, I add a note in the end of PR description and I don't have a merge access, if that looks good please help me merge it, thank you! https://github.com/llvm/llvm-project/pull/146212 ___ cfe-commits mailing list cfe-commits@list

[clang] [clang][bytecode] Fix visiting for-range loop variable (PR #147188)

2025-07-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/147188 Make sure we're properly registering DecompositionDecls. >From 30dc7c787428bb601c6740d969e16ff8ea345d43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 6 Jul 2025 15:07:47 +0200 Subject

[clang] [clang][bytecode] Fix a crash in overflow builtins (PR #147189)

2025-07-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/147189 Only initialize pointers that can be initialized. >From 3a2009eb23c0ffab62103c0097a9cb273d315efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 6 Jul 2025 15:19:09 +0200 Subject: [PATC

[clang] [clang][bytecode] Fix visiting for-range loop variable (PR #147188)

2025-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Make sure we're properly registering DecompositionDecls. --- Full diff: https://github.com/llvm/llvm-project/pull/147188.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+1-2) - (a

[clang] [clang][bytecode] Fix a crash in overflow builtins (PR #147189)

2025-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Only initialize pointers that can be initialized. --- Full diff: https://github.com/llvm/llvm-project/pull/147189.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+3-1) - (mod

[clang] [clang-tools-extra] [ASTMatchers][NFC] Replace `makeMatcher` function with CTAD (PR #147197)

2025-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Victor Chernyakin (localspook) Changes C++17's CTAD obsoletes `makeMatcher` (and many `make*` functions like it). The deduction guide is written out explicitly to avoid `-Wctad-maybe-unsupported` warnings. --- Full diff: https://git

  1   2   3   >