[clang] 487e757 - [clang][NFC] Remove dead PassTypeToPlacementDelete field (#143448)

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

[clang] [clang][NFC] Remove dead PassTypeToPlacementDelete field (PR #143448)

2025-06-09 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > Thank you for the fix! sorry for the delay, just completely forgot about it https://github.com/llvm/llvm-project/pull/143448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang][NFC] Remove dead PassTypeToPlacementDelete field (PR #143448)

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

[clang] [Cygwin] va_list must be treated like normal Windows (PR #143115)

2025-06-09 Thread Martin Storsjö via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm < %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -emit-llvm < %s | FileCheck %s + +// copy ms_abi block only from ../ms_abi.c mstorsjo wrote: Yes, exactly https://github.c

[clang] 5f648c3 - [AArch64] Change the coercion type of structs with pointer members. (#135064)

2025-06-09 Thread via cfe-commits
Author: David Green Date: 2025-06-10T07:04:54+01:00 New Revision: 5f648c370edf5d71c471ffbabdaaa821ad05fb4b URL: https://github.com/llvm/llvm-project/commit/5f648c370edf5d71c471ffbabdaaa821ad05fb4b DIFF: https://github.com/llvm/llvm-project/commit/5f648c370edf5d71c471ffbabdaaa821ad05fb4b.diff L

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-06-09 Thread David Green via cfe-commits
https://github.com/davemgreen closed https://github.com/llvm/llvm-project/pull/135064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add options to control wrapped lambda brace indent. (PR #143249)

2025-06-09 Thread Owen Pan via cfe-commits
@@ -1547,6 +1547,38 @@ struct FormatStyle { bool BeforeWhile; /// Indent the wrapped braces themselves. bool IndentBraces; +/// Indent nested wrapped lambda braces. owenca wrote: If we allow this new option, I want a separate NFC patch that upg

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

2025-06-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Utkarsh Saxena (usx95) Changes This patch introduces the initial implementation of the intra-procedural, flow-sensitive lifetime analysis for Clang, as proposed in the recent RFC: https://discourse.llvm.org/t/rfc-intra-procedural-lifetime

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

2025-06-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Utkarsh Saxena (usx95) Changes This patch introduces the initial implementation of the intra-procedural, flow-sensitive lifetime analysis for Clang, as proposed in the recent RFC: https://discourse.llvm.org/t/rfc-intra-procedural

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

2025-06-09 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review 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] Reapply "[clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp" (PR #143477)

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

[clang] Cleanup (PR #143477)

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

[clang] [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (PR #143111)

2025-06-09 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/143111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Cleanup (PR #143477)

2025-06-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/143477.diff 1 Files Affected: - (modified) clang/tools/clang-format/ClangFormat.cpp (+23-28) ``diff diff --git a/clang/tools/clang-for

[clang] Cleanup (PR #143477)

2025-06-09 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/143477 None >From 7f745330975e0e360e9a42b9d57c3e3afa3680f8 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 7 Jun 2025 20:59:53 -0700 Subject: [PATCH 1/2] [clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp

[clang] d56ce31 - [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (#143111)

2025-06-09 Thread via cfe-commits
Author: Corentin Jabot Date: 2025-06-10T07:30:06+02:00 New Revision: d56ce312d0c2e5ae74476977a8952dbb3ba4c513 URL: https://github.com/llvm/llvm-project/commit/d56ce312d0c2e5ae74476977a8952dbb3ba4c513 DIFF: https://github.com/llvm/llvm-project/commit/d56ce312d0c2e5ae74476977a8952dbb3ba4c513.diff

[clang] [clang] Use llvm::count (NFC) (PR #143228)

2025-06-09 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: > You should always have a summary, for this one it could have simply been > "replace std::count with llvm::count in Sema::CheckBaseSpecifier" @shafik Ack. https://github.com/llvm/llvm-project/pull/143228 ___ cfe-commits mailing

[clang] [llvm][RISCV] Handle required features of intrinsic correctly (PR #143062)

2025-06-09 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. https://github.com/llvm/llvm-project/pull/143062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Remove dead PassTypeToPlacementDelete field (PR #143448)

2025-06-09 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. Thank you for the fix! https://github.com/llvm/llvm-project/pull/143448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm][RISCV] Handle required features of intrinsic correctly (PR #143062)

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

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-09 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,193 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --output=%t --format=json --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.json + +struct Foo; + +// This is a nice class. +// It has some nice methods and fields. +// @brief This is

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-06-09 Thread via cfe-commits
rmarker wrote: Ping @owenca, @mydeveloperday. https://github.com/llvm/llvm-project/pull/141576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.NoUnretainedMemberChecker] Recognize NS_REQUIRES_PROPERTY_DEFINITIONS (PR #143408)

2025-06-09 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/143408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0123ee5 - [alpha.webkit.NoUnretainedMemberChecker] Recognize NS_REQUIRES_PROPERTY_DEFINITIONS (#143408)

2025-06-09 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-06-09T20:55:50-07:00 New Revision: 0123ee51ef3290466c6d743aac2932b23655aa04 URL: https://github.com/llvm/llvm-project/commit/0123ee51ef3290466c6d743aac2932b23655aa04 DIFF: https://github.com/llvm/llvm-project/commit/0123ee51ef3290466c6d743aac2932b23655aa04.diff

[clang] [alpha.webkit.NoUnretainedMemberChecker] Recognize NS_REQUIRES_PROPERTY_DEFINITIONS (PR #143408)

2025-06-09 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thank for you all the reviews! https://github.com/llvm/llvm-project/pull/143408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (PR #142897)

2025-06-09 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 closed https://github.com/llvm/llvm-project/pull/142897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b9d4132 - [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (#142897)

2025-06-09 Thread via cfe-commits
Author: Ziqing Luo Date: 2025-06-10T11:54:01+08:00 New Revision: b9d41328c6c60c622fe5737f449e568f1ee4ec8f URL: https://github.com/llvm/llvm-project/commit/b9d41328c6c60c622fe5737f449e568f1ee4ec8f DIFF: https://github.com/llvm/llvm-project/commit/b9d41328c6c60c622fe5737f449e568f1ee4ec8f.diff LO

[clang] [clang] Use llvm::count (NFC) (PR #143228)

2025-06-09 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: You should always have a summary, for this one it could have simply been "replace std::count with llvm::count in Sema::CheckBaseSpecifier" https://github.com/llvm/llvm-project/pull/143228 ___ cfe-commits mailing li

[clang] [alpha.webkit.NoUnretainedMemberChecker] Recognize NS_REQUIRES_PROPERTY_DEFINITIONS (PR #143408)

2025-06-09 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 approved this pull request. LGTM now! https://github.com/llvm/llvm-project/pull/143408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Explain why a type is not replaceable. (PR #143265)

2025-06-09 Thread Shafik Yaghmour via cfe-commits
@@ -1763,27 +1763,39 @@ def err_user_defined_msg_constexpr : Error< "constant expression">; // Type traits explanations -def note_unsatisfied_trait : Note<"%0 is not %enum_select{" - "%TriviallyRelocatable{trivially relocatable}|" -

[clang] [Sema] Implement fix as suggested by FIXME (PR #143142)

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

[clang] [Clang][NFC][ByteCode] Initialize Function HasBody in constructor (PR #143443)

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

[clang] [clang-format] Parse JSON outermost l_brace as braced list brace (PR #143327)

2025-06-09 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/143327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove delayed typo expressions (PR #143423)

2025-06-09 Thread Shafik Yaghmour via cfe-commits
@@ -14055,8 +14055,10 @@ FunctionDecl *Sema::ResolveSingleFunctionTemplateSpecialization( // specified and it, along with any default template arguments, // identifies a single function template specialization, then the // template-id is an lvalue for the fun

[clang] Remove delayed typo expressions (PR #143423)

2025-06-09 Thread Shafik Yaghmour via cfe-commits
@@ -4920,6 +4914,11 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, ModifierFound = true; } else { StepFound = parseStepSize(*this, Data, Kind, Tok.getLocation()); +if (!StepFound) { shafik wrote: I

[clang] 9a894ae - [clang-format] Parse JSON outermost l_brace as braced list brace (#143327)

2025-06-09 Thread via cfe-commits
Author: Owen Pan Date: 2025-06-09T20:34:12-07:00 New Revision: 9a894ae794f26cdd0822c4cea99e2486e3523189 URL: https://github.com/llvm/llvm-project/commit/9a894ae794f26cdd0822c4cea99e2486e3523189 DIFF: https://github.com/llvm/llvm-project/commit/9a894ae794f26cdd0822c4cea99e2486e3523189.diff LOG:

[clang] [Sema] Implement fix as suggested by FIXME (PR #143142)

2025-06-09 Thread via cfe-commits
lux-QAQ wrote: It seems that using manual `delete` may not be the most reasonable approach. Is there any other feedback or improvements I should make? Or, should we simply close this PR now? https://github.com/llvm/llvm-project/pull/143142 ___ cfe-com

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-06-09 Thread via cfe-commits
@@ -0,0 +1,599 @@ +//===-- WindowsHotPatch.cpp - Support for Windows hotpatching -===// +// +// 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-doc] add a JSON generator (PR #142483)

2025-06-09 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/142483 >From 741dce551684ee5818262ba3f4618ffcfa70a0d6 Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Mon, 2 Jun 2025 12:53:36 -0700 Subject: [PATCH 1/7] [clang-doc] add a JSON generator --- clang-tools-extra/clang-

[clang] [clang][NFC] Refactor replaceExternalDecls to use llvm::any_of (PR #143275)

2025-06-09 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/143275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ab954b1 - [clang][NFC] Refactor replaceExternalDecls to use llvm::any_of (#143275)

2025-06-09 Thread via cfe-commits
Author: Samarth Narang Date: 2025-06-10T10:22:23+08:00 New Revision: ab954b11dbf7c5f0256b5a93b6c221b6e82a4f28 URL: https://github.com/llvm/llvm-project/commit/ab954b11dbf7c5f0256b5a93b6c221b6e82a4f28 DIFF: https://github.com/llvm/llvm-project/commit/ab954b11dbf7c5f0256b5a93b6c221b6e82a4f28.diff

[clang] [clang][NFC] Refactor replaceExternalDecls to use llvm::any_of (PR #143275)

2025-06-09 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/143275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [Modules] Fix to correctly handle module dependencies (PR #142828)

2025-06-09 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,96 @@ +# A smoke test to check that a simple dependency chain for modules can work. +# +# FIXME: This fails on the Windows ARM64 build server. Not entirely sure why as it has been tested on +#an ARM64 Windows VM and appears to work there. +# UNSUPPORTED: host=a

[clang] [llvm][RISCV] Handle required features of intrinsic correctly (PR #143062)

2025-06-09 Thread Jim Lin via cfe-commits
https://github.com/tclin914 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/143062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm][RISCV] Handle required features of intrinsic correctly (PR #143062)

2025-06-09 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/143062 >From fed5d31d4c398c85addf91d1a2f3d15aa3e6d64e Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Thu, 5 Jun 2025 20:36:58 -0700 Subject: [PATCH 1/2] [llvm][RISCV] Handle required features of intrinsic correctly

[clang] [llvm][RISCV] Handle required features of intrinsic correctly (PR #143062)

2025-06-09 Thread Brandon Wu via cfe-commits
@@ -540,7 +494,7 @@ struct RVVIntrinsicRecord { const char *OverloadedName; // Required target features for this intrinsic. - RequiredExtensionBits RequiredExtensions; + std::string RequiredExtensions; 4vtomat wrote: Yeah sure~ https://github.com/llvm/

[clang] [Clang][NFC] Add test for CWG2289 "Uniqueness of structured binding names" (PR #131054)

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

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

2025-06-09 Thread Michael Spencer via cfe-commits
Bigcheese wrote: > @Bigcheese I have a question about `A module directive may only appear as the > first preprocessing tokens in a file (excluding the global module > fragment.)`. IIUC, as you said in [#90574 > (comment)](https://github.com/llvm/llvm-project/pull/90574#discussion_r1591569547),

[clang] [llvm][RISCV] Handle required features of intrinsic correctly (PR #143062)

2025-06-09 Thread Brandon Wu via cfe-commits
@@ -768,35 +768,13 @@ void RVVEmitter::createRVVIntrinsics( Log2LMULMask |= 1 << (Log2LMUL + 3); SR.Log2LMULMask = Log2LMULMask; - -for (auto RequiredFeature : RequiredFeatures) { - unsigned RequireExt = - StringSwitch(RequiredFeature) -

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

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

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-09 Thread Erick Velez via cfe-commits
@@ -0,0 +1,193 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --output=%t --format=json --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.json + +struct Foo; + +// This is a nice class. +// It has some nice methods and fields. +// @brief This is

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

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

[clang] [Cygwin] va_list must be treated like normal Windows (PR #143115)

2025-06-09 Thread via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm < %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-pc-cygwin -emit-llvm < %s | FileCheck %s + +// copy ms_abi block only from ../ms_abi.c jeremyd2019 wrote: I think the idea was ```su

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

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

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-09 Thread Erick Velez via cfe-commits
@@ -0,0 +1,193 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --output=%t --format=json --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.json + +struct Foo; + +// This is a nice class. +// It has some nice methods and fields. +// @brief This is

[clang] [flang] [mlir] [flang] Add support for -mrecip[=] (PR #143418)

2025-06-09 Thread Cameron McInally via cfe-commits
mcinally wrote: > Thanks for the changes, Cameron. LGTM. Thanks! Would you mind merging yet again? I still don't have access yet. https://github.com/llvm/llvm-project/pull/143418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang] fix missing source location for ':' error in macro-expanded case statements (PR #143460)

2025-06-09 Thread Eli Friedman via cfe-commits
@@ -833,9 +833,23 @@ StmtResult Parser::ParseCaseStatement(ParsedStmtContext StmtCtx, << FixItHint::CreateReplacement(ColonLoc, ":"); } else { SourceLocation ExpectedLoc = PP.getLocForEndOfToken(PrevTokLocation); + SourceLocation ExprLoc = + L

[clang] [Clang] fix missing source location for ':' error in macro-expanded case statements (PR #143460)

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

[clang] [Clang] fix missing source location for ':' error in macro-expanded case statements (PR #143460)

2025-06-09 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: This seems like a more general issue... some examples: ``` #define D foo bar enum { D }; ``` ``` #define D foo bar void f() { int a[2]; auto [D] = a; } ``` ``` #define D class X; X D; ``` ``` #define D C::{ class C { D }}; ``` Can we come up with

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

2025-06-09 Thread Eli Friedman via cfe-commits
@@ -2513,6 +2513,9 @@ void testValueInRangeOfEnumerationValues() { // expected-error@-1 {{constexpr variable 'x2' must be initialized by a constant expression}} // expected-note@-2 {{integer value 8 is outside the valid range of values [-8, 7] for the enumeration type 'E1'

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-09 Thread Tarun Prabhu via cfe-commits
@@ -58,10 +58,24 @@ void setTargetCPU(mlir::ModuleOp mod, llvm::StringRef cpu); /// Get the target CPU string from the Module or return a null reference. llvm::StringRef getTargetCPU(mlir::ModuleOp mod); +// Setters and Getters for atomic control options +void setAmdgpuIgnoreD

[clang] [Clang] fix missing source location for ':' error in macro-expanded case statements (PR #143460)

2025-06-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #143216 --- This patch addresses the issue where diagnostics for `case` statements originating from macro expansions lacked source location information when the colon `:` was missing. --- Full

[clang] [Clang] fix missing source location for ':' error in macro-expanded case statements (PR #143460)

2025-06-09 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/143460 Fixes #143216 --- This patch addresses the issue where diagnostics for `case` statements originating from macro expansions lacked source location information when the colon `:` was missing. >From dd4953

[clang] [compiler-rt] [llvm] [DRAFT][memprof][darwin] Support memprof on Darwin platform and add binary access profile (PR #142884)

2025-06-09 Thread via cfe-commits
SharonXSharon wrote: > Great. For my understanding, the baseline app includes some form of PGO e.g. > temporal profiling? These numbers are _purely_ from static data layout on top > of the baseline? yes the baseline already includes the temporal profiling thus function ordering; the win above

[clang-tools-extra] [WIP] Warn about misuse of sizeof operator in loops. (PR #143205)

2025-06-09 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak updated https://github.com/llvm/llvm-project/pull/143205 >From 52e4413ea1e701dfe0b24cf957a26bb72732f066 Mon Sep 17 00:00:00 2001 From: MalavikaSamak Date: Wed, 21 May 2025 16:06:44 -0700 Subject: [PATCH 1/3] Place holder message for sizeof operator in loops. --

[clang] [compiler-rt] [llvm] [DRAFT][memprof][darwin] Support memprof on Darwin platform and add binary access profile (PR #142884)

2025-06-09 Thread Snehasish Kumar via cfe-commits
snehasish wrote: > > Can you share the improvement in startup time observed on MachO? I can > > reach out to the Android toolchain team to gauge interest. > > @snehasish thanks! > > The improvement in startup performance we observed for iOS apps (MachO) are, > > * socialApp1: for cold starts,

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-09 Thread Tarun Prabhu via cfe-commits
@@ -2911,8 +2911,13 @@ static void genAtomicUpdateStatement( if (rightHandClauseList) genOmpAtomicHintAndMemoryOrderClauses(converter, *rightHandClauseList, hint, memoryOrder); + auto module = firOpBuilder.getModule(); -

[clang] [compiler-rt] [llvm] [DRAFT][memprof][darwin] Support memprof on Darwin platform and add binary access profile (PR #142884)

2025-06-09 Thread via cfe-commits
SharonXSharon wrote: > Can you share the improvement in startup time observed on MachO? I can reach > out to the Android toolchain team to gauge interest. @snehasish thanks! The improvement in startup performance we observed for iOS apps (MachO) are, - socialApp1: for cold starts, we reduced

[clang] [compiler-rt] [llvm] [DRAFT][memprof][darwin] Support memprof on Darwin platform and add binary access profile (PR #142884)

2025-06-09 Thread Snehasish Kumar via cfe-commits
snehasish wrote: > @snehasish thanks for the detailed reply! I will take a closer week through > the week and get back to you. > > Btw a quick question, our sister team is actually also interested in > supporting memprof for Android platform, i.e. getting the access profile of > the Android n

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-09 Thread Tarun Prabhu via cfe-commits
@@ -53,6 +53,11 @@ class TargetOptions { /// Print verbose assembly bool asmVerbose = false; + + /// Atomic Control Options for AMD GPU tarunprabhu wrote: Nit ```suggestion /// Atomic control options for AMD GPU ``` https://github.com/llvm/llvm-projec

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-09 Thread Tarun Prabhu via cfe-commits
@@ -58,10 +58,24 @@ void setTargetCPU(mlir::ModuleOp mod, llvm::StringRef cpu); /// Get the target CPU string from the Module or return a null reference. llvm::StringRef getTargetCPU(mlir::ModuleOp mod); +// Setters and Getters for atomic control options tarun

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-09 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu commented: Thanks for this. Since you have added both `FlangOption` and `FC1Option` in `Options.td`, could you add a test that checks that the option is handled by the main driver as well as `fc1`. One that simply checks that the option gets passed down to `fc1`

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-09 Thread Tarun Prabhu via cfe-commits
@@ -54,6 +54,20 @@ def FlagsAttr : OpenMP_Attr<"Flags", "flags"> { let assemblyFormat = "`<` struct(params) `>`"; } +//===--===// +// AtomicControlAttr +//===-

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-09 Thread Tarun Prabhu via cfe-commits
@@ -88,6 +88,46 @@ void fir::setTuneCPU(mlir::ModuleOp mod, llvm::StringRef cpu) { mod->setAttr(tuneCpuName, mlir::StringAttr::get(ctx, cpu)); } +static constexpr const char *amdgpuIgnoreDenormalModeName = +"fir.amdgpu.ignore.denormal.mode"; +void fir::setAmdgpuIgnoreDe

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

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

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi deleted https://github.com/llvm/llvm-project/pull/142483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f5e499a - Revert "[HIP] use offload wrapper for non-device-only non-rdc (#132869)" (#143432)

2025-06-09 Thread via cfe-commits
Author: Joseph Huber Date: 2025-06-09T17:18:49-05:00 New Revision: f5e499a3383c1e3b9f60e60151075e8d9c1c3166 URL: https://github.com/llvm/llvm-project/commit/f5e499a3383c1e3b9f60e60151075e8d9c1c3166 DIFF: https://github.com/llvm/llvm-project/commit/f5e499a3383c1e3b9f60e60151075e8d9c1c3166.diff

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-09 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,193 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --output=%t --format=json --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.json + +struct Foo; + +// This is a nice class. +// It has some nice methods and fields. +// @brief This is

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-09 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,175 @@ +#include "ClangDocTest.h" +#include "Generators.h" +#include "Representation.h" +#include "gtest/gtest.h" + +namespace clang { +namespace doc { + +static std::unique_ptr getJSONGenerator() { + auto G = doc::findGeneratorByName("json"); + if (!G) +return nu

[clang] Revert "[HIP] use offload wrapper for non-device-only non-rdc (#132869)" (PR #143432)

2025-06-09 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/143432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] add6acc - NFC: stray whitespace cleanup from clang/test/SemaCXX/destructor.cpp

2025-06-09 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2025-06-09T19:08:15-03:00 New Revision: add6acc333740542705eedd185f45f69e3d25f30 URL: https://github.com/llvm/llvm-project/commit/add6acc333740542705eedd185f45f69e3d25f30 DIFF: https://github.com/llvm/llvm-project/commit/add6acc333740542705eedd185f45f69e3d25f30.dif

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

2025-06-09 Thread Shafik Yaghmour via cfe-commits
@@ -2513,6 +2513,9 @@ void testValueInRangeOfEnumerationValues() { // expected-error@-1 {{constexpr variable 'x2' must be initialized by a constant expression}} // expected-note@-2 {{integer value 8 is outside the valid range of values [-8, 7] for the enumeration type 'E1'

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

2025-06-09 Thread Oliver Hunt via cfe-commits
@@ -1434,10 +1446,13 @@ namespace { QualType ArgType; }; -unsigned NumPlacementArgs : 31; -LLVM_PREFERRED_TYPE(bool) +unsigned NumPlacementArgs : 30; +LLVM_PREFERRED_TYPE(AlignedAllocationMode) unsigned PassAlignmentToPlacementDelete : 1; +LL

[clang] [clang][NFC] Remove dead PassTypeToPlacementDelete field (PR #143448)

2025-06-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Oliver Hunt (ojhunt) Changes The CallDeleteDuringNew::PassTypeToPlacementDelete field became unneeded during the many refactorings of P2719 but I didn't actually remove it. --- Full diff: https://github.

[clang] [clang][NFC] Remove dead PassTypeToPlacementDelete field (PR #143448)

2025-06-09 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/143448 The CallDeleteDuringNew::PassTypeToPlacementDelete field became unneeded during the many refactorings of P2719 but I didn't actually remove it. >From c1fa0ea448210ab10e71bd7b2f4dc4d575056b39 Mon Sep 17 00:00:00

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

2025-06-09 Thread Oliver Hunt via cfe-commits
@@ -1434,10 +1446,13 @@ namespace { QualType ArgType; }; -unsigned NumPlacementArgs : 31; -LLVM_PREFERRED_TYPE(bool) +unsigned NumPlacementArgs : 30; +LLVM_PREFERRED_TYPE(AlignedAllocationMode) unsigned PassAlignmentToPlacementDelete : 1; +LL

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-06-09 Thread Daniel Paoliello via cfe-commits
@@ -0,0 +1,599 @@ +//===-- WindowsHotPatch.cpp - Support for Windows hotpatching -===// +// +// 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] Add support for Windows Secure Hot-Patching (PR #138972)

2025-06-09 Thread Daniel Paoliello via cfe-commits
@@ -0,0 +1,599 @@ +//===-- WindowsHotPatch.cpp - Support for Windows hotpatching -===// +// +// 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] Add support for Windows Secure Hot-Patching (PR #138972)

2025-06-09 Thread Daniel Paoliello via cfe-commits
@@ -389,6 +389,17 @@ def CoroDestroyOnlyWhenComplete : EnumAttr<"coro_only_destroy_when_complete", In /// pipeline to perform elide on the call or invoke instruction. def CoroElideSafe : EnumAttr<"coro_elide_safe", IntersectPreserve, [FnAttr]>; +/// Function is marked for Win

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-06-09 Thread Daniel Paoliello via cfe-commits
@@ -0,0 +1,599 @@ +//===-- WindowsHotPatch.cpp - Support for Windows hotpatching -===// +// +// 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] Add support for Windows Secure Hot-Patching (PR #138972)

2025-06-09 Thread Daniel Paoliello via cfe-commits
@@ -798,6 +798,8 @@ enum AttributeKindCodes { ATTR_KIND_NO_DIVERGENCE_SOURCE = 100, ATTR_KIND_SANITIZE_TYPE = 101, ATTR_KIND_CAPTURES = 102, + ATTR_KIND_ALLOW_DIRECT_ACCESS_IN_HOT_PATCH_FUNCTION = 103, + ATTR_KIND_MARKED_FOR_WINDOWS_HOT_PATCHING = 104,

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-06-09 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello commented: Can you please add tests for the constant expression rewriting stuff, and not redirecting constant GVs without pointers? https://github.com/llvm/llvm-project/pull/138972 ___ cfe-commits mailing list cfe-commits

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

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

[clang] Revert "[HIP] use offload wrapper for non-device-only non-rdc (#132869)" (PR #143432)

2025-06-09 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. thanks. I will take a look https://github.com/llvm/llvm-project/pull/143432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp (PR #143236)

2025-06-09 Thread Jorge Gorbe Moya via cfe-commits
slackito wrote: It seems this change has introduced a bug when formatting multiple files in one go. Passing a shorter file after a longer one results in a stale length being used. It can be reproduced with trivially short files: ``` $ cat ~/a.cc $ cat ~/b.cc // a $ bin/clang-format ~/b.cc ~/a

[clang] [Clang][NFC][ByteCode] Initialize Function HasBody in constructor (PR #143443)

2025-06-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes Static analysis flagged HasBody as not being initialized during construction. It looks like an oversight in: https://github.com/llvm/llvm-project/pull/139671 This would be a lot simpler with C++20 which al

[clang] [Clang][NFC][ByteCode] Initialize Function HasBody in constructor (PR #143443)

2025-06-09 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/143443 Static analysis flagged HasBody as not being initialized during construction. It looks like an oversight in: https://github.com/llvm/llvm-project/pull/139671 This would be a lot simpler with C++20 which allows i

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

2025-06-09 Thread via cfe-commits
https://github.com/dingxiangfei2009 updated https://github.com/llvm/llvm-project/pull/143424 >From 4f9e599067c954a3ed3028efdc2abd72aa2b775f Mon Sep 17 00:00:00 2001 From: Xiangfei Ding Date: Mon, 9 Jun 2025 13:57:18 + Subject: [PATCH] [clang-c] introduce queries on GCC-style inline assembly

[clang] [OpenMP 60] Initial parsing/sema for `need_device_addr` modifier on `adjust_args` clause (PR #143442)

2025-06-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fazlay Rabbi (mdfazlay) Changes Adds initial parsing and semantic analysis for `need_device_addr` modifier on `adjust_args` clause. --- Full diff: https://github.com/llvm/llvm-project/pull/143442.diff 10 Files Affected: - (modified) c

[clang] [OpenMP 60] Initial parsing/sema for `need_device_addr` modifier on `adjust_args` clause (PR #143442)

2025-06-09 Thread Fazlay Rabbi via cfe-commits
https://github.com/mdfazlay created https://github.com/llvm/llvm-project/pull/143442 Adds initial parsing and semantic analysis for `need_device_addr` modifier on `adjust_args` clause. >From a117e1a3f089b7d92a5df082a2ba584bee57f7d3 Mon Sep 17 00:00:00 2001 From: Fazlay Rabbi Date: Mon, 9 Jun

  1   2   3   4   5   >