[clang] 38fa753 - Fix diagnostic documentation build errors

2025-06-16 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-06-16T11:13:28-04:00 New Revision: 38fa7533fbac525198206200cf2caf04071fcdb1 URL: https://github.com/llvm/llvm-project/commit/38fa7533fbac525198206200cf2caf04071fcdb1 DIFF: https://github.com/llvm/llvm-project/commit/38fa7533fbac525198206200cf2caf04071fcdb1.diff

[clang] [clang][Parser] Fix crash on malformed using declaration in constexpr function (PR #144286)

2025-06-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/144286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Add directive spellings introduced in spec v6.0 (PR #141772)

2025-06-16 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: Hi @alexey-bataev, could you check if you're ok with this? I had to modify a few clang tests to accommodate this change. https://github.com/llvm/llvm-project/pull/141772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-06-16 Thread Nikita Popov via cfe-commits
nikic wrote: I think you need to add this to either UserGuides.rst or Reference.rst for it to actually appear in the docs? https://github.com/llvm/llvm-project/pull/137991 ___ cfe-commits mailing list cfe-commits@lis

[clang] [analyzer] Fix a false memory leak reports involving placement new (PR #144341)

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Arseniy Zaostrovnykh (necto) Changes Placement new does not allocate memory, so it should not be reported as a memory leak. A recent MallocChecker refactor changed inlining of placement-new calls with manual evaluation b

[clang] [analyzer] Fix a false memory leak reports involving placement new (PR #144341)

2025-06-16 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto created https://github.com/llvm/llvm-project/pull/144341 Placement new does not allocate memory, so it should not be reported as a memory leak. A recent MallocChecker refactor changed inlining of placement-new calls with manual evaluation by MallocChecker. https://git

[clang] [analyzer] Fix a false memory leak reports involving placement new (PR #144341)

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Arseniy Zaostrovnykh (necto) Changes Placement new does not allocate memory, so it should not be reported as a memory leak. A recent MallocChecker refactor changed inlining of placement-new calls with manual evaluation by MallocChecker.

[clang] [analyzer] Fix a false memory leak reports involving placement new (PR #144341)

2025-06-16 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/144341 >From 44fe99cfc6ab394ba94301b94323be87f98c06dd Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Fri, 13 Jun 2025 17:43:57 +0200 Subject: [PATCH 1/4] [analyzer] Fix a false memory leak report involving pl

[clang-tools-extra] [clang-reorder-fields] Prevent rewriting unsupported cases (PR #142149)

2025-06-16 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/test/clang-reorder-fields/MacroExpa

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

2025-06-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,48 @@ +.. title:: clang-tidy - performance-bool-bitwise-operation + +performance-bool-bitwise-operation +== + +Finds potentially inefficient use of bitwise operators such as ``&``, ``|`` +and their compound analogues on Boolean values w

[clang] [llvm] [InstCombine] remove dead loads, such as memcpy from undef (PR #143958)

2025-06-16 Thread Nikita Popov via cfe-commits
nikic wrote: https://github.com/dtcxzyw/llvm-opt-benchmark/pull/2433 has a few cases that regress for a reason that is not immediately obvious to me, if you want to take a look. (But this is overwhelmingly an improvement, so I don't particularly care.) There are a number of test failures for

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

2025-06-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,39 @@ +//===--- BoolBitwiseOperationCheck.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] Add performance-bool-bitwise-operation check (PR #142324)

2025-06-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. As version 1.0 is fine. Few nits, most important one is with check name and StrictMode option. Try also handle that stuff with tryPrintVariable. Once above two will be corrected, could be merged. https://github.com/llvm/llvm-project/pull/1

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

2025-06-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/142324 ___ 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-bool-bitwise-operation check (PR #142324)

2025-06-16 Thread Piotr Zegar via cfe-commits
@@ -36,6 +37,8 @@ class PerformanceModule : public ClangTidyModule { public: void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { CheckFactories.registerCheck("performance-avoid-endl"); +CheckFactories.registerCheck( +"performance-bool-bi

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

2025-06-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,239 @@ +//===--- BoolBitwiseOperationCheck.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] HIPSPV: Unbundle SDL (PR #136412)

2025-06-16 Thread Paulius Velesko via cfe-commits
https://github.com/pvelesko edited https://github.com/llvm/llvm-project/pull/136412 ___ 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-bool-bitwise-operation check (PR #142324)

2025-06-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/142324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-reorder-fields] Prevent rewriting unsupported cases (PR #142149)

2025-06-16 Thread Vladimir Vuksanovic via cfe-commits
https://github.com/vvuksanovic updated https://github.com/llvm/llvm-project/pull/142149 >From b8481a36b33e71248170c8cc195b45fa9de4f777 Mon Sep 17 00:00:00 2001 From: Vladimir Vuksanovic Date: Fri, 30 May 2025 05:42:55 -0700 Subject: [PATCH 1/3] [clang-reorder-fields] Prevent rewriting unsupport

[clang] [analyzer] Conversion to CheckerFamily: NullabilityChecker (PR #143735)

2025-06-16 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/143735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [llvm] [openmp] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-06-16 Thread via cfe-commits
Ritanya-B-Bharadwaj wrote: > 1. Need to rebase. > 2. I'd suggest to split the patch and land the runtime part separately Done! https://github.com/llvm/llvm-project/pull/135807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

2025-06-16 Thread Andy Kaylor via cfe-commits
@@ -2385,4 +2385,33 @@ def ComplexCreateOp : CIR_Op<"complex.create", [Pure, SameTypeOperands]> { let hasFolder = 1; } +//===--===// +// ComplexRealPtrOp +//===--

[clang] [CIR] Upstream ComplexType builtin_complex (PR #144225)

2025-06-16 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/144225 >From d3e1d50ead7822771eb265293f9d0c42e5a74529 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 14 Jun 2025 16:21:20 +0200 Subject: [PATCH 1/2] [CIR] Upstream ComplexType builtin_complex --- clang/l

[clang] [llvm] Non constant size and offset in DWARF (PR #141106)

2025-06-16 Thread David Blaikie via cfe-commits
@@ -834,8 +834,8 @@ llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) { auto *ISATy = DBuilder.createPointerType(ClassTy, Size); ObjTy = DBuilder.createStructType(TheCU, "objc_object", TheCU->getFile(), 0, - 0, 0, llvm:

[clang] [llvm] Non constant size and offset in DWARF (PR #141106)

2025-06-16 Thread Tom Tromey via cfe-commits
@@ -834,8 +834,8 @@ llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) { auto *ISATy = DBuilder.createPointerType(ClassTy, Size); ObjTy = DBuilder.createStructType(TheCU, "objc_object", TheCU->getFile(), 0, - 0, 0, llvm:

[clang] [Analysis] Avoid some warnings about exit from noreturn function (PR #144408)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,107 @@ +// RUN: %clang_cc1 -fsyntax-only %s -verify + +[[noreturn]] extern void noret(); +[[noreturn]] extern void noret2(); +extern void ordinary(); + +typedef void (*func_type)(void); + AaronBallman wrote: Another test case that would be good to add:

[clang] [Analysis] Avoid some warnings about exit from noreturn function (PR #144408)

2025-06-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/144408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analysis] Avoid some warnings about exit from noreturn function (PR #144408)

2025-06-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: This is an interesting proposed change, thank you for working on it! Please be sure to add a release note to `clang/docs/ReleaseNotes.rst` about the functionality. https://github.com/llvm/llvm-project/pull/144408 __

[clang] [Analysis] Avoid some warnings about exit from noreturn function (PR #144408)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,107 @@ +// RUN: %clang_cc1 -fsyntax-only %s -verify + +[[noreturn]] extern void noret(); +[[noreturn]] extern void noret2(); +extern void ordinary(); + +typedef void (*func_type)(void); + +// Constant initialization. + +void (* const const_fptr)() = noret; +[[noreturn]]

[clang] [Analysis] Avoid some warnings about exit from noreturn function (PR #144408)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,107 @@ +// RUN: %clang_cc1 -fsyntax-only %s -verify + +[[noreturn]] extern void noret(); +[[noreturn]] extern void noret2(); +extern void ordinary(); + +typedef void (*func_type)(void); + +// Constant initialization. + +void (* const const_fptr)() = noret; +[[noreturn]]

[clang] [clang] Add release note for int->enum conversion change. (PR #144407)

2025-06-16 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/144407 This seems to be having some practical impact, so we should let people know. >From 72b5793a6b0df71ec78e691aaa1b0729273263e0 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 16 Jun 2025 11:04:04 -070

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

2025-06-16 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > I have concerns about the CIR representation here. I think we should be > aligning our representation of complex operations with the MLIR complex > dialect. As such, we want `__real__` to be lowerable to `complex.re` but the > explicit representation of intermediate point

[clang] [llvm] [HLSL] Use hidden visibility for external linkage. (PR #140292)

2025-06-16 Thread Steven Perron via cfe-commits
@@ -1661,6 +1661,11 @@ void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV, return; } + if (Context.getLangOpts().HLSL && !D->isInExportDeclContext()) { +GV->setVisibility(llvm::GlobalValue::HiddenVisibility); s-perron wrote: I'll look i

[clang] [llvm] Reland "[HLSL][RootSignature] Implement serialization of RootConstants and RootFlags" (PR #143019)

2025-06-16 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/143019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunterminated-string-initialization] Handle C string literals ending with explicit '\0' (PR #143487)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,53 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wunterminated-string-initialization %s -x c +// RUN: %clang_cc1 -fsyntax-only -verify=cxx,expected -Wunterminated-string-initialization %s -x c++ + + +#ifdef __cplusplus +// C++ is stricter so the following cases should

[clang] [clang-c] introduce queries on GCC-style inline assembly statements (PR #143424)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -8648,6 +8646,119 @@ void clang_annotateTokens(CXTranslationUnit TU, CXToken *Tokens, } } +//===--===// +// Operations for querying information of a GCC inline assembly block under a +// cursor. +//===--

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

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

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I haven't spotted anything particularly concerning, but did have a few nits and questions. https://github.com/llvm/llvm-project/pull/144246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -4674,10 +4677,7 @@ VarCreationState Compiler::visitVarDecl(const VarDecl *VD, if (!visitInitializer(Init)) return false; - if (!this->emitFinishInit(Init)) -return false; - - return this->emitPopPtr(Init); + return this->emitFinishInit

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -17,63 +17,80 @@ #include "clang/AST/APValue.h" #include "llvm/ADT/APFloat.h" +// XXX This is just a debugging help. Setting this to 1 will heap-allocate ALL +// floating values. +#define ALLOCATE_ALL 0 + namespace clang { namespace interp { using APFloat = llvm::APFlo

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -17,63 +17,80 @@ #include "clang/AST/APValue.h" #include "llvm/ADT/APFloat.h" +// XXX This is just a debugging help. Setting this to 1 will heap-allocate ALL +// floating values. +#define ALLOCATE_ALL 0 + AaronBallman wrote: Do you intend to retain this lo

[clang] [Clang] Fix '-Wformat-overflow' FP when floats had field-width and plus prefix (PR #144274)

2025-06-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/144274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix '-Wformat-overflow' FP when floats had field-width and plus prefix (PR #144274)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -629,6 +629,9 @@ Improvements to Clang's diagnostics #GH69470, #GH59391, #GH58172, #GH46215, #GH45915, #GH45891, #GH44490, #GH36703, #GH32903, #GH23312, #GH69874. +- Fixed false positives in ``-Wformat-truncation`` and ``-Wformat-overflow`` + diagnostics when floating-

[clang] [Clang] Fix '-Wformat-overflow' FP when floats had field-width and plus prefix (PR #144274)

2025-06-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from a nit with the release note. Thank you for the fix! https://github.com/llvm/llvm-project/pull/144274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [HLSL][SPIRV] Add vk::constant_id attribute. (PR #143544)

2025-06-16 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts approved this pull request. https://github.com/llvm/llvm-project/pull/143544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-06-16 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s + +// expected-warning@+1{{'sycl_external' attribute only applies to functions}} +[[clang::sycl_external]] int a; + + +// expected-warning@+2{{'sycl_external' attribute only applies to functions}} +stru

[clang] [clang-format][NFC] Upgrade IndentBraces option to a struct (PR #143663)

2025-06-16 Thread via cfe-commits
rmarker wrote: Probably not a big deal, the one ambiguity with the current `IndentBraces` is that it only indents the wrapped braces associated with `GNU`. It doesn't indent all braces that have the option of being wrapped, such as namespace, class or functions. https://github.com/llvm/llvm-p

[clang] [analyzer] Fix a false memory leak reports involving placement new (PR #144341)

2025-06-16 Thread Timm Baeder via cfe-commits
@@ -1371,6 +1371,19 @@ void MallocChecker::checkIfFreeNameIndex(ProgramStateRef State, C.addTransition(State); } +bool isVoidStar(QualType T) { + return !T.isNull() && T->isPointerType() && T->getPointeeType()->isVoidType(); tbaederr wrote: There's `isVo

[clang] [clang-c] introduce queries on GCC-style inline assembly statements (PR #143424)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -8648,6 +8646,119 @@ void clang_annotateTokens(CXTranslationUnit TU, CXToken *Tokens, } } +//===--===// +// Operations for querying information of a GCC inline assembly block under a +// cursor. +//===--

[clang] [clang-c] introduce queries on GCC-style inline assembly statements (PR #143424)

2025-06-16 Thread Aaron Ballman via cfe-commits
@@ -4495,6 +4495,98 @@ CINDEX_LINKAGE CXStringSet *clang_Cursor_getCXXManglings(CXCursor); */ CINDEX_LINKAGE CXStringSet *clang_Cursor_getObjCManglings(CXCursor); +/** + * @} + */ + +/** + * \defgroup CINDEX_MODULE Inline Assembly introspection + * + * The functions in this

[clang] [Clang][Sema] Reject invalid member using-declaration whose nested-name-specifier doesn't refer to a base class of the current class in C++98 mode (PR #143492)

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

[clang] [Clang][OpenMP][LoopTransformations] Fix incorrect number of generated loops for Tile and Reverse directives (PR #140532)

2025-06-16 Thread Roger Ferrer Ibáñez via cfe-commits
rofirrim wrote: > I'm guessing that is a yes, could you @alexey-bataev please approve the > workflows and we proceed to merge? Then we can go straight into the > https://github.com/llvm/llvm-project/pull/139293 PR :) I did that already. https://github.com/llvm/llvm-project/pull/140532 ___

[clang] [llvm] [llvm] minor fixes for clang-cl Windows DLL build (PR #144386)

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo Author: Andrew Rogers (andrurogerz) Changes ## Purpose This patch makes a minor changes to LLVM and Clang so that LLVM can be built as a Windows DLL with `clang-cl`. These changes were not required for building a Windows DLL with MSVC. ## B

[clang] [CIR] Implement folder for VecSplatOp (PR #143771)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
@@ -142,7 +142,8 @@ void CIRCanonicalizePass::runOnOperation() { // Many operations are here to perform a manual `fold` in // applyOpPatternsGreedily. if (isa(op)) +VecExtractOp, VecShuffleOp, VecShuffleDynamicOp, VecSplatOp, +VecTernaryOp>(o

[clang] fccab5d - [CIR] Upstream ComplexType ImaginaryLiteral (#144223)

2025-06-16 Thread via cfe-commits
Author: Amr Hesham Date: 2025-06-16T20:10:40+02:00 New Revision: fccab5d757778204666d70e2f1592952fc8b336d URL: https://github.com/llvm/llvm-project/commit/fccab5d757778204666d70e2f1592952fc8b336d DIFF: https://github.com/llvm/llvm-project/commit/fccab5d757778204666d70e2f1592952fc8b336d.diff LO

[clang] [CIR] Upstream ComplexType ImaginaryLiteral (PR #144223)

2025-06-16 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. https://github.com/llvm/llvm-project/pull/144223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-16 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. @erichkeane, thanks for looking into it, no worries if nobody gets back. I think we should go ahead and land this in the mean time. https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mai

[clang] [CIR] Upstream support for IncompleteArrayType (PR #144138)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/144138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/143984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,63 @@ +// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR +// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fcla

[clang] [clang] Check constexpr int->enum conversions consistently. (PR #143034)

2025-06-16 Thread via cfe-commits
eaeltsin wrote: I'm not questioning the correctness of the change, just sharing the now-breaking pattern that is quite wide-spread. We also hope to handle this internally by patching boost. https://github.com/llvm/llvm-project/pull/143034 ___ cfe-co

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM, one nit https://github.com/llvm/llvm-project/pull/143984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-16 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir edited https://github.com/llvm/llvm-project/pull/143739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-16 Thread Ben Langmuir via cfe-commits
@@ -2434,6 +2434,22 @@ VarDecl *VarDecl::getInitializingDeclaration() { return Def; } +bool VarDecl::hasInitWithSideEffects() const { + if (!hasInit()) +return false; + + if (auto *S = dyn_cast(Init)) { benlangmuir wrote: The original code in `getInit

[clang] [clang-format] Allow array alignment on non-rectangular arrays (PR #143781)

2025-06-16 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > > You can't change existing tests, you need an option if you want to pad with > > spaces > > It is unclear to me if this should be considered a bug fix, or a new feature. > Surely requiring new options are not required for every bug fix. > It boils down to the que

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-16 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -4674,10 +4677,7 @@ VarCreationState Compiler::visitVarDecl(const VarDecl *VD, if (!visitInitializer(Init)) return false; - if (!this->emitFinishInit(Init)) -return false; - - return this->e

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-16 Thread Ben Langmuir via cfe-commits
@@ -8310,8 +8310,6 @@ Stmt *ASTReader::GetExternalDeclStmt(uint64_t Offset) { Error(std::move(Err)); return nullptr; } - assert(NumCurrentElementsDeserializing == 0 && benlangmuir wrote: Can this assert come back now? https://github.com/llvm/llvm-p

[clang] [CIR][NFC] Refactor constant pointer l-value handling (PR #144165)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/144165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-16 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -17,63 +17,80 @@ #include "clang/AST/APValue.h" #include "llvm/ADT/APFloat.h" +// XXX This is just a debugging help. Setting this to 1 will heap-allocate ALL +// floating values. +#define ALLOCATE_ALL 0 + namespace clang {

[clang] b5c6245 - [CIR][NFC] Refactor constant pointer l-value handling (#144165)

2025-06-16 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-06-16T11:26:23-07:00 New Revision: b5c6245cb46354923940b95a89213fa0924e5c5f URL: https://github.com/llvm/llvm-project/commit/b5c6245cb46354923940b95a89213fa0924e5c5f DIFF: https://github.com/llvm/llvm-project/commit/b5c6245cb46354923940b95a89213fa0924e5c5f.diff L

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-16 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 01/18] [clang-tidy] Add bugprone-move-shared-pointer-contents chec

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-16 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 01/17] [clang-tidy] Add bugprone-move-shared-pointer-contents chec

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-16 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir commented: I think this new function should be called from `ASTContext::DeclMustBeEmitted`, no? https://github.com/llvm/llvm-project/pull/143739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-16 Thread Ben Langmuir via cfe-commits
@@ -1632,6 +1632,10 @@ RedeclarableResult ASTDeclReader::VisitVarDeclImpl(VarDecl *VD) { VD->NonParmVarDeclBits.PreviousDeclInSameBlockScope = VarDeclBits.getNextBit(); +bool hasInitWithSideEffect = VarDeclBits.getNextBit(); benlangmuir wrote:

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-16 Thread via cfe-commits
@@ -148,6 +148,12 @@ New checks Finds potentially erroneous calls to ``reset`` method on smart pointers when the pointee type also has a ``reset`` method. +- New :doc:`bugprone-move-shared-pointer-contents pizzud wrote: Done. https://github.com/llvm/llvm

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-16 Thread via cfe-commits
@@ -0,0 +1,137 @@ +//===--- MoveSharedPointerContentsCheck.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] [llvm] [openmp] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-06-16 Thread via cfe-commits
Ritanya-B-Bharadwaj wrote: Runtime PR - https://github.com/llvm/llvm-project/pull/144409 https://github.com/llvm/llvm-project/pull/135807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [llvm] [InstCombine] remove dead loads, such as memcpy from undef (PR #143958)

2025-06-16 Thread Nikita Popov via cfe-commits
@@ -3283,10 +3285,15 @@ static bool isAllocSiteRemovable(Instruction *AI, case Intrinsic::memcpy: case Intrinsic::memset: { MemIntrinsic *MI = cast(II); -if (MI->isVolatile() || MI->getRawDest() != PI) +if (MI->isVolatile(

[clang] [llvm] [InstCombine] remove dead loads, such as memcpy from undef (PR #143958)

2025-06-16 Thread Nikita Popov via cfe-commits
@@ -3362,10 +3385,23 @@ Instruction *InstCombinerImpl::visitAllocSite(Instruction &MI) { DIB.reset(new DIBuilder(*MI.getModule(), /*AllowUnresolved=*/false)); } - if (isAllocSiteRemovable(&MI, Users, TLI)) { + // Determine what getInitialValueOfAllocation would return

[clang] [ASTReader] Remove assert in GetExternalDeclStmt (PR #143739)

2025-06-16 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn updated https://github.com/llvm/llvm-project/pull/143739 >From d239fee7d5fd002edb08a24b4de1db84433413fe Mon Sep 17 00:00:00 2001 From: "Henrik G. Olsson" Date: Wed, 11 Jun 2025 17:36:29 +0200 Subject: [PATCH] [Modules] Record whether VarDecl initializers contain side

[clang] [clang][Sema] Fixed Compound Literal is not Constant Expression (PR #143852)

2025-06-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/143852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Use hidden visibility for external linkage. (PR #140292)

2025-06-16 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/140292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-16 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn edited https://github.com/llvm/llvm-project/pull/143739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Use hidden visibility for external linkage. (PR #140292)

2025-06-16 Thread Nathan Gauër via cfe-commits
@@ -1661,6 +1661,11 @@ void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV, return; } + if (Context.getLangOpts().HLSL && !D->isInExportDeclContext()) { +GV->setVisibility(llvm::GlobalValue::HiddenVisibility); Keenuts wrote: GV at line 3

[clang] [CIR] Add support for __builtin_assume (PR #144376)

2025-06-16 Thread Sirui Mu via cfe-commits
https://github.com/Lancern created https://github.com/llvm/llvm-project/pull/144376 This patch adds support for the `__builtin_assume` builtin function. >From 886097329c486b48ceb32ea7ea807e561ad8abdd Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Mon, 16 Jun 2025 23:38:47 +0800 Subject: [PATCH]

[clang] [CIR] Add support for __builtin_assume (PR #144376)

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Sirui Mu (Lancern) Changes This patch adds support for the `__builtin_assume` builtin function. --- Full diff: https://github.com/llvm/llvm-project/pull/144376.diff 7 Files Affected: - (modified) clang/include/clang/CIR/Dialect/IR/CIR

[clang] [C++20][Modules] Disable preferred_name when writing a C++20 header unit (PR #144377)

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Dmitry Polukhin (dmpolukhin) Changes https://reviews.llvm.org/D130331 added workaround for named modules only. But the same issue happens for headees units. Link issue #56490 --- Full diff: https://github.com/llvm/llvm-project/pul

[clang] [C++20][Modules] Disable preferred_name when writing a C++20 header unit (PR #144377)

2025-06-16 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin created https://github.com/llvm/llvm-project/pull/144377 https://reviews.llvm.org/D130331 added workaround for named modules only. But the same issue happens for headees units. Link issue #56490 >From 107a61c1c7a2caf3a3801c36637f4393ba613255 Mon Sep 17 00:00:00 20

[clang] [llvm] [RISCV] Update Xqci to v0.13.0 (PR #144398)

2025-06-16 Thread Sam Elliott via cfe-commits
https://github.com/lenary created https://github.com/llvm/llvm-project/pull/144398 None >From b9e6e8f0570bad9b9d19179bd263dc3df40f8bdf Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Mon, 16 Jun 2025 10:18:10 -0700 Subject: [PATCH] [RISCV] Update Xqci to v0.13.0 --- clang/include/clang/Basi

[clang] [llvm] [RISCV] Update Xqci to v0.13.0 (PR #144398)

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang Author: Sam Elliott (lenary) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/144398.diff 6 Files Affected: - (modified) clang/include/clang/Basic/AttrDocs.td (+1-1) - (modified) clang/test/

[clang] [llvm] [HLSL] Use hidden visibility for external linkage. (PR #140292)

2025-06-16 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts approved this pull request. https://github.com/llvm/llvm-project/pull/140292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Check constexpr int->enum conversions consistently. (PR #143034)

2025-06-16 Thread Reid Kleckner via cfe-commits
rnk wrote: If we've had fixes available for years, I think backporting them would be the right call, but this seems like it might be a release-note-worthy change. https://github.com/llvm/llvm-project/pull/143034 ___ cfe-commits mailing list cfe-commit

[clang] [CIR] Implement folder for VecCmpOp (PR #143322)

2025-06-16 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/143322 >From d6e55636b352794f4dbc880cd617b864134a9cc8 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 8 Jun 2025 21:08:14 +0200 Subject: [PATCH 1/4] [CIR] Implement folder for VecCmpOp --- clang/include/c

[clang] 267b859 - [CIR] Implement folder for VecCmpOp (#143322)

2025-06-16 Thread via cfe-commits
Author: Amr Hesham Date: 2025-06-16T19:35:34+02:00 New Revision: 267b859fc60acda510027bd6139c54d660c6fb21 URL: https://github.com/llvm/llvm-project/commit/267b859fc60acda510027bd6139c54d660c6fb21 DIFF: https://github.com/llvm/llvm-project/commit/267b859fc60acda510027bd6139c54d660c6fb21.diff LO

[clang] [CIR] Implement folder for VecCmpOp (PR #143322)

2025-06-16 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/143322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Allow array alignment on non-rectangular arrays (PR #143781)

2025-06-16 Thread Ben Dunkin via cfe-commits
bdunkin wrote: > You can't change existing tests, you need an option if you want to pad with > spaces It is unclear to me if this should be considered a bug fix, or a new feature. Surely requiring new options are not required for every bug fix. https://github.com/llvm/llvm-project/pull/143781

[clang] [Driver] Add options to control workaround for Cortex-A53 Erratum 843419 (PR #143915)

2025-06-16 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/143915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[RISCV] Remove B and Zbc extension from Andes series cpus." (PR #144402)

2025-06-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/144402 Reverts llvm/llvm-project#144022 This has been failing postcommit CI for two days: https://lab.llvm.org/buildbot/#/builders/63 >From d644265d459731aaf4ed38855167262d957a95eb Mon Sep 17 00:00:00 2001 From:

[clang] [llvm] Revert "[RISCV] Remove B and Zbc extension from Andes series cpus." (PR #144402)

2025-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes Reverts llvm/llvm-project#144022 This has been failing postcommit CI for two days: https://lab.llvm.org/buildbot/#/builders/63 --- Full diff: https://github.com/llv

[clang] [llvm] [RISCV] Remove B and Zbc extension from Andes series cpus. (PR #144022)

2025-06-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: This has been failing post-commit CI for two days, so I've put up a patch to revert the changes: https://github.com/llvm/llvm-project/pull/144402 https://github.com/llvm/llvm-project/pull/144022 ___ cfe-commits mailing list cfe-com

<    1   2   3   4   5   >