[clang] [docs][coroutines] Revamp "Debugging C++ coroutines" (PR #142651)

2025-06-28 Thread Yanzuo Liu via cfe-commits
@@ -301,177 +735,284 @@ optimized to the equivalent of: std::cout << a+5 << "\n"; } -It should now be obvious why the value of `__int_32_0` remains unchanged -throughout the function. It is important to recognize that `__int_32_0` -does not directly correspond to `a`, bu

[clang] [docs][coroutines] Revamp "Debugging C++ coroutines" (PR #142651)

2025-06-28 Thread Yanzuo Liu via cfe-commits
@@ -301,177 +735,284 @@ optimized to the equivalent of: std::cout << a+5 << "\n"; } -It should now be obvious why the value of `__int_32_0` remains unchanged -throughout the function. It is important to recognize that `__int_32_0` -does not directly correspond to `a`, bu

[clang] [docs][coroutines] Revamp "Debugging C++ coroutines" (PR #142651)

2025-06-28 Thread Yanzuo Liu via cfe-commits
zwuis wrote: reStructuredText (`.rst`) doesn't support Markdown style link (`[text](link)`). Can you fix it? https://github.com/llvm/llvm-project/pull/142651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang] Remove unused includes (NFC) (PR #146254)

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

[clang] c9cdc33 - [clang] Remove unused includes (NFC) (#146254)

2025-06-28 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-06-28T20:41:46-07:00 New Revision: c9cdc33dd697c5cf02d3934d7458041e7f5fa5c3 URL: https://github.com/llvm/llvm-project/commit/c9cdc33dd697c5cf02d3934d7458041e7f5fa5c3 DIFF: https://github.com/llvm/llvm-project/commit/c9cdc33dd697c5cf02d3934d7458041e7f5fa5c3.diff L

[clang] [clang][Sema] Suggest/Hint Standard Library Include File (PR #146227)

2025-06-28 Thread via cfe-commits
https://github.com/Mr-Anyone ready_for_review https://github.com/llvm/llvm-project/pull/146227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-28 Thread via cfe-commits
Mr-Anyone wrote: You should add a test case and a release note for this patch to be accepted. https://github.com/llvm/llvm-project/pull/146247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

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

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

[clang] [clang-tools-extra] [libcxx] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-28 Thread via cfe-commits
@@ -2767,6 +2767,10 @@ class DependentBitIntTypeLoc final : public InheritingConcreteTypeLoc {}; +class PredefinedSugarTypeLoc final +: public InheritingConcreteTypeLoc {}; YexuanXiao wrote: https://github.com/llvm/llvm-project/blob/25d52fbf96ec927914b

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-28 Thread via cfe-commits
https://github.com/MythreyaK edited https://github.com/llvm/llvm-project/pull/146258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Suggest/Hint Standard Library Include File (PR #146227)

2025-06-28 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 cppm,h,c,inc,cpp -- clang/test/Sema/include-suggestion.c cl

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-28 Thread via cfe-commits
https://github.com/MythreyaK updated https://github.com/llvm/llvm-project/pull/146258 >From a839ba01fc05750ca880ac430a70f7df766f7694 Mon Sep 17 00:00:00 2001 From: Mythreya Kuricheti Date: Sat, 28 Jun 2025 19:06:06 -0700 Subject: [PATCH] [clang] skip explicit obj param in code complete Skips t

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-28 Thread via cfe-commits
https://github.com/MythreyaK created https://github.com/llvm/llvm-project/pull/146258 Skips the first explicit object parameter when generating autocomplete suggestion string See clangd/clangd#2339 >From 3f1bf64fe34fd4e887f94a63ded5d7eb52fdbd59 Mon Sep 17 00:00:00 2001 From: Mythreya Kurichet

[clang] [clang-tools-extra] [libcxx] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-28 Thread Matheus Izvekov via cfe-commits
@@ -5216,6 +5230,38 @@ QualType ASTContext::getDependentBitIntType(bool IsUnsigned, return QualType(New, 0); } +QualType +ASTContext::getPredefinedSugarType(PredefinedSugarType::Kind KD) const { + llvm::FoldingSetNodeID ID; + PredefinedSugarType::Profile(ID, llvm::to_unde

[clang] [clang-tools-extra] [libcxx] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-28 Thread via cfe-commits
@@ -5216,6 +5237,25 @@ QualType ASTContext::getDependentBitIntType(bool IsUnsigned, return QualType(New, 0); } +QualType ASTContext::getPredefinedSugarType(uint32_t KD) const { + using Kind = PredefinedSugarType::Kind; + auto getUnderlyingType = [](const ASTContext &Ctx,

[clang] [clang-tools-extra] [libcxx] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-28 Thread Matheus Izvekov via cfe-commits
@@ -7248,6 +7250,22 @@ QualType TreeTransform::TransformDependentBitIntType( return Result; } +template +QualType TreeTransform::TransformPredefinedSugarType( +TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) { + const PredefinedSugarType *EIT = TL.getTypePtr(); + Qua

[clang] [clang-tools-extra] [libcxx] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-28 Thread Matheus Izvekov via cfe-commits
@@ -2767,6 +2767,10 @@ class DependentBitIntTypeLoc final : public InheritingConcreteTypeLoc {}; +class PredefinedSugarTypeLoc final +: public InheritingConcreteTypeLoc {}; mizvekov wrote: Yeah, but for the current uses of PredefinedSugarType in this p

[clang] [clang] Remove unused includes (NFC) (PR #146254)

2025-06-28 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/146254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Make EndsInComma in ContinuationIndenter consistent (PR #146256)

2025-06-28 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/146256.diff 2 Files Affected: - (modified) clang/lib/Format/ContinuationIndenter.cpp (+9-8) - (modified) clang/unittests/Format/FormatTest.cpp (

[clang] [clang-format] Make EndsInComma in ContinuationIndenter consistent (PR #146256)

2025-06-28 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/146256 None >From b7dd2cee0b6064f29e1f9562d26675152bb2756b Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 28 Jun 2025 18:13:43 -0700 Subject: [PATCH] [clang-format] Make EndsInComma in ContinuationIndenter consist

[clang] [clang] Remove unused includes (NFC) (PR #146254)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Kazu Hirata (kazutakahirata) Changes These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or comp

[clang] [clang] Remove unused includes (NFC) (PR #146254)

2025-06-28 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146254 These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-spec

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-28 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari updated https://github.com/llvm/llvm-project/pull/146247 >From f2ed0c7989d7e181004237a4fa2ba7ae1efe44ed Mon Sep 17 00:00:00 2001 From: Ashwin Banwari Date: Sat, 28 Jun 2025 16:19:55 -0700 Subject: [PATCH 1/3] add err_main_in_named_module --- clang/include/clan

[clang] [clang] [modules] Add err_main_in_named_module (PR #146247)

2025-06-28 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari edited https://github.com/llvm/llvm-project/pull/146247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [modules] add err_main_in_named_module (PR #146247)

2025-06-28 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari edited https://github.com/llvm/llvm-project/pull/146247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [modules] add err_main_in_named_module (PR #146247)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ashwin Banwari (ashwinbanwari) Changes Close https://github.com/llvm/llvm-project/issues/146229 As the issue said, main shouldn't be in any modules. New Error Output: ``` /my/code/directory/main.cpp:3:1: error: 'main' cannot be attached t

[clang] [clang] [modules] add err_main_in_named_module (PR #146247)

2025-06-28 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] [clang] [modules] add err_main_in_named_module (PR #146247)

2025-06-28 Thread Ashwin Banwari via cfe-commits
https://github.com/ashwinbanwari created https://github.com/llvm/llvm-project/pull/146247 Close https://github.com/llvm/llvm-project/issues/146229 As the issue said, main shouldn't be in any modules. New Error Output: ``` /my/code/directory/main.cpp:3:1: error: 'main' cannot be attached to a n

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-28 Thread via cfe-commits
@@ -76,3 +77,31 @@ void def() { T t; U u; } + +int load_field(S* s) { + return s->c; Andres-Salamanca wrote: Done https://github.com/llvm/llvm-project/pull/145971 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-28 Thread via cfe-commits
@@ -326,13 +326,61 @@ mlir::Value CIRGenFunction::emitStoreThroughBitfieldLValue(RValue src, return {}; } +RValue CIRGenFunction::emitLoadOfBitfieldLValue(LValue lv, SourceLocation loc) { + const CIRGenBitFieldInfo &info = lv.getBitFieldInfo(); + + // Get the output type

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-28 Thread via cfe-commits
@@ -375,4 +375,42 @@ def CIR_VisibilityAttr : CIR_EnumAttr { }]; } +//===--===// +// BitfieldInfoAttr +//===--===// + +def BitfieldInfoAttr

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-28 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/145971 >From d2e19a9ce2270ae9d764f1e2ba3978aaab2c1e2a Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Thu, 26 Jun 2025 15:51:02 -0500 Subject: [PATCH 1/5] Get Lvalue for bit-field --- clang/include/cla

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-28 Thread via cfe-commits
@@ -65,6 +65,10 @@ struct CIROpAsmDialectInterface : public OpAsmDialectInterface { os << (boolAttr.getValue() ? "true" : "false"); return AliasResult::FinalAlias; } +if (auto bitfield = mlir::dyn_cast(attr)) { Andres-Salamanca wrote: I wa

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

2025-06-28 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/146245.diff 1 Files Affected: - (modified) clang/lib/Format/BreakableToken.cpp (+1-13) ``diff diff --git a/clang/lib/Format/BreakableT

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

2025-06-28 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/146245 None >From 60a0768fef885cb87e564f6dba7e101befd6ab0d Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 28 Jun 2025 15:52:58 -0700 Subject: [PATCH] [clang-format[NFC] Replace a function with StringRef::contains

[clang] [clang-format] Fix a bug in `ReflowComments: Always` (PR #146202)

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

[clang] f771d08 - [clang-format] Fix a bug in `ReflowComments: Always` (#146202)

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

[clang] [llvm] [AVR] Handle flash RO data mapped to data space for newer devices (PR #146244)

2025-06-28 Thread Tom Vijlbrief via cfe-commits
https://github.com/tomtor updated https://github.com/llvm/llvm-project/pull/146244 >From a08a6a071db9bf553bb64fcfa39d2ed80e000fe6 Mon Sep 17 00:00:00 2001 From: Tom Vijlbrief Date: Fri, 27 Jun 2025 17:16:35 +0200 Subject: [PATCH] [AVR] Handle mapped RO data for newer devices --- clang/include

[clang] [llvm] [AVR] Handle flash RO data mapped to data space for newer devices (PR #146244)

2025-06-28 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/Basic/Targets/AVR.cpp clang/lib/Driver/Tool

[clang] [llvm] [AVR] Handle flash RO data mapped to data space for newer devices (PR #146244)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Tom Vijlbrief (tomtor) Changes Newer AVR devices map (part of the) flash to a 32kB window at 0x8000 in the data/IO space. The linker correctly loads readonly data at 0x8000, but we currently always pull in `__do_copy_data` when we

[clang] [llvm] [AVR] Handle flash RO data mapped to data space for newer devices (PR #146244)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Vijlbrief (tomtor) Changes Newer AVR devices map (part of the) flash to a 32kB window at 0x8000 in the data/IO space. The linker correctly loads readonly data at 0x8000, but we currently always pull in `__do_copy_data` when we encoun

[clang] [llvm] [AVR] Handle flash RO data mapped to data space for newer devices (PR #146244)

2025-06-28 Thread Tom Vijlbrief via cfe-commits
https://github.com/tomtor created https://github.com/llvm/llvm-project/pull/146244 Newer AVR devices map (part of the) flash to a 32kB window at 0x8000 in the data/IO space. The linker correctly loads readonly data at 0x8000, but we currently always pull in `__do_copy_data` when we encounter

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-28 Thread via cfe-commits
@@ -2244,6 +2245,54 @@ mlir::LogicalResult CIRToLLVMComplexImagOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMGetBitfieldOpLowering::matchAndRewrite( +cir::GetBitfieldOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &r

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-06-28 Thread via cfe-commits
@@ -405,6 +406,16 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { return createGlobal(module, loc, uniqueName, type, linkage); } + + mlir::Value createGetBitfield(mlir::Location loc, mlir::Type resultType, +mlir::Value addr, mli

[clang] [CIR] Upstream PackIndexingExpr for ScalarExpr (PR #146239)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes Upstream PackIndexingExpr for ScalarExpr --- Full diff: https://github.com/llvm/llvm-project/pull/146239.diff 2 Files Affected: - (modified) clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp (+4) - (added) cl

[clang] [CIR] Upstream PackIndexingExpr for ScalarExpr (PR #146239)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes Upstream PackIndexingExpr for ScalarExpr --- Full diff: https://github.com/llvm/llvm-project/pull/146239.diff 2 Files Affected: - (modified) clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp (+4) - (added)

[clang] [CIR] Upstream PackIndexingExpr for ScalarExpr (PR #146239)

2025-06-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/146239 Upstream PackIndexingExpr for ScalarExpr >From addc4c8be7497ca61f6a78891da1ce7a5fa9ea69 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 28 Jun 2025 22:54:55 +0200 Subject: [PATCH] [CIR] Upstream Pac

[clang] [clang-tools-extra] [libcxx] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-28 Thread via cfe-commits
https://github.com/YexuanXiao edited https://github.com/llvm/llvm-project/pull/143653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-28 Thread via cfe-commits
https://github.com/YexuanXiao deleted https://github.com/llvm/llvm-project/pull/143653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-28 Thread via cfe-commits
@@ -2767,6 +2767,10 @@ class DependentBitIntTypeLoc final : public InheritingConcreteTypeLoc {}; +class PredefinedSugarTypeLoc final +: public InheritingConcreteTypeLoc {}; YexuanXiao wrote: https://github.com/llvm/llvm-project/blob/f90025ebd930a4719f3

[clang] [clang-tools-extra] [libcxx] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-28 Thread via cfe-commits
https://github.com/YexuanXiao edited https://github.com/llvm/llvm-project/pull/143653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-28 Thread via cfe-commits
@@ -7248,6 +7250,22 @@ QualType TreeTransform::TransformDependentBitIntType( return Result; } +template +QualType TreeTransform::TransformPredefinedSugarType( +TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) { + const PredefinedSugarType *EIT = TL.getTypePtr(); + Qua

[clang] [clang-tools-extra] [libcxx] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-28 Thread via cfe-commits
@@ -1516,6 +1516,23 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target, MSGuidTagDecl = buildImplicitRecord("_GUID"); getTranslationUnitDecl()->addDecl(MSGuidTagDecl); } + + // size_t (C99TC3 6.5.3.4), signed size_t (C++23 5.13.2) and + // ptrdiff_t (C99

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-28 Thread Lukas Döllerer via cfe-commits
Lukasdoe wrote: @yuri91 @sbc100 https://github.com/llvm/llvm-project/pull/146230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-28 Thread Lukas Döllerer via cfe-commits
Lukasdoe wrote: edit: rebased https://github.com/llvm/llvm-project/pull/146230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-28 Thread Lukas Döllerer via cfe-commits
https://github.com/Lukasdoe ready_for_review https://github.com/llvm/llvm-project/pull/146230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-28 Thread Lukas Döllerer via cfe-commits
https://github.com/Lukasdoe updated https://github.com/llvm/llvm-project/pull/146230 From 4cb790f228c9578be163d9cca01e9232b1ca2239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=B6llerer?= Date: Sat, 28 Jun 2025 21:53:09 +0200 Subject: [PATCH] [LLVM][WebAssembly] Implement branch hinting

[clang-tools-extra] [modularize] Use std::tie to implement operator< (NFC) (PR #146220)

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

[clang-tools-extra] 402baea - [modularize] Use std::tie to implement operator< (NFC) (#146220)

2025-06-28 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-06-28T13:04:00-07:00 New Revision: 402baea0a9ff7894565449e41f700c4e6a3f99cb URL: https://github.com/llvm/llvm-project/commit/402baea0a9ff7894565449e41f700c4e6a3f99cb DIFF: https://github.com/llvm/llvm-project/commit/402baea0a9ff7894565449e41f700c4e6a3f99cb.diff L

[clang] [clang] [Sema] Suggest [[noreturn]] for void functions that always throw (PR #146234)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Samarth Narang (snarang181) Changes Implements https://github.com/llvm/llvm-project/issues/146223. --- Full diff: https://github.com/llvm/llvm-project/pull/146234.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1-2) -

[clang] [clang] [Sema] Suggest [[noreturn]] for void functions that always throw (PR #146234)

2025-06-28 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 ready_for_review https://github.com/llvm/llvm-project/pull/146234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] `--header-insertion` CLI fix (PR #146235)

2025-06-28 Thread via cfe-commits
MythreyaK wrote: I tested these locally and seems to work as expected. Please do double-check, just in case I missed something! | config | cli |outcome | |--||| | IWYU| iwyu | inserted | | IWYU| never | not inserte

[clang-tools-extra] [clangd] `--header-insertion` CLI fix (PR #146235)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Mythreya (MythreyaK) Changes In PR #128503, CLI option overwrites only if it was set to `never`. This commit ensures that CLI options always overwrite any config option. Thanks to the fix from @HighCommander4 [here](https://github.com/l

[clang-tools-extra] [clangd] `--header-insertion` CLI fix (PR #146235)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Mythreya (MythreyaK) Changes In PR #128503, CLI option overwrites only if it was set to `never`. This commit ensures that CLI options always overwrite any config option. Thanks to the fix from @HighCommander4 [here](https://g

[clang-tools-extra] [clangd] `--header-insertion` CLI fix (PR #146235)

2025-06-28 Thread via cfe-commits
https://github.com/MythreyaK created https://github.com/llvm/llvm-project/pull/146235 In PR #128503, CLI option overwrites only if it was set to `never`. This commit ensures that CLI options always overwrite any config option. Thanks to the fix from @HighCommander4 [here](https://github.com/l

[clang] [clang] [Sema] Suggest [[noreturn]] for void functions that always throw (PR #146234)

2025-06-28 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 edited https://github.com/llvm/llvm-project/pull/146234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [Sema] Suggest [[noreturn]] for void functions that always throw (PR #146234)

2025-06-28 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/146234 >From c6b4a421c0087a06111df3a6f79b929e7285644b Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 28 Jun 2025 15:31:37 -0400 Subject: [PATCH] Emit a suggestion to explicitly mark the function with [[no

[clang] [clang] [Sema] Suggest [[noreturn]] for void functions that always throw (PR #146234)

2025-06-28 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 created https://github.com/llvm/llvm-project/pull/146234 Fixes https://github.com/llvm/llvm-project/issues/146223. >From 6f450c2686e4c4900234ac9aae9dd085966eff64 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 28 Jun 2025 15:31:37 -0400 Subject: [PATCH] E

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

2025-06-28 Thread Marco Vitale via cfe-commits
mrcvtl wrote: Old clang tidy test failing seems flaky, locally builds correctly. If it continue to fail I can rebase on upstream. https://github.com/llvm/llvm-project/pull/145164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

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

2025-06-28 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/2] [Sema] Fix lifetime extension for temporaries in range-based

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-28 Thread Lukas Döllerer via cfe-commits
https://github.com/Lukasdoe converted_to_draft https://github.com/llvm/llvm-project/pull/146230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-28 Thread Lukas Döllerer via cfe-commits
https://github.com/Lukasdoe edited https://github.com/llvm/llvm-project/pull/146230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-28 Thread Lukas Döllerer via cfe-commits
https://github.com/Lukasdoe updated https://github.com/llvm/llvm-project/pull/146230 From d49de354afa4031364fd08d5089672117d7d8f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=B6llerer?= Date: Sat, 28 Jun 2025 20:11:56 +0200 Subject: [PATCH] [LLVM][WebAssembly] Implement branch hinting

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lld-wasm @llvm/pr-subscribers-clang Author: Lukas Döllerer (Lukasdoe) Changes This commit implements the WebAssembly branch hinting proposal, as detailed at https://webassembly.github.io/branch-hinting/metadata/code/binary.html. This proposal introduce

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-28 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] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-06-28 Thread Lukas Döllerer via cfe-commits
https://github.com/Lukasdoe created https://github.com/llvm/llvm-project/pull/146230 This commit implements the WebAssembly branch hinting proposal, as detailed at https://webassembly.github.io/branch-hinting/metadata/code/binary.html. This proposal introduces a mechanism to convey branch like

[clang-tools-extra] [modularize] Use std::tie to implement operator< (NFC) (PR #146220)

2025-06-28 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/146220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-06-28 Thread Damian Andrei via cfe-commits
https://github.com/xTachyon edited https://github.com/llvm/llvm-project/pull/134551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-06-28 Thread Damian Andrei via cfe-commits
@@ -44,6 +45,11 @@ typedef struct { unsigned Count; } CXStringSet; +typedef struct { + const char *string; + size_t length; +} CStringInfo; xTachyon wrote: Should we love space for possible expansion? https://github.com/llvm/llvm-project/pull/134551

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-06-28 Thread Damian Andrei via cfe-commits
https://github.com/xTachyon updated https://github.com/llvm/llvm-project/pull/134551 >From 6d8d8955c1e3c706e3195e440f9435e5ae197f9f Mon Sep 17 00:00:00 2001 From: Andrei Damian Date: Sun, 6 Apr 2025 19:55:59 +0300 Subject: [PATCH] clang_EvalResult_getAsCXString impl --- clang/include/clang-c/

[clang] [clang][Sema] Suggest/Hint Standard Library Include File (PR #146227)

2025-06-28 Thread via cfe-commits
https://github.com/Mr-Anyone converted_to_draft https://github.com/llvm/llvm-project/pull/146227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Mips] Correctly define IntPtrType (PR #145158)

2025-06-28 Thread Hervé Poussineau via cfe-commits
hpoussin wrote: Ping https://github.com/llvm/llvm-project/pull/145158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Mips] Correctly define IntPtrType (PR #145158)

2025-06-28 Thread Hervé Poussineau via cfe-commits
hpoussin wrote: Ping https://github.com/llvm/llvm-project/pull/145158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Suggest/Hint Standard Library Include File (PR #146227)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Vincent (Mr-Anyone) Changes Clang now tries to suggest and hint standard library include file by emitting the following. ``` 4 | std::unordered_map map; | ^ main.cpp:4:1

[clang] [clang][Sema] Suggest/Hint Standard Library Include File (PR #146227)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vincent (Mr-Anyone) Changes Clang now tries to suggest and hint standard library include file by emitting the following. ``` 4 | std::unordered_map map; | ^ main.cpp:4:10: note:

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

2025-06-28 Thread via cfe-commits
@@ -2374,6 +2374,9 @@ static bool FinishForRangeVarDecl(Sema &SemaRef, VarDecl *Decl, Expr *Init, SemaRef.ObjC().inferObjCARCLifetime(Decl)) Decl->setInvalidDecl(); + if (SemaRef.getLangOpts().CPlusPlus23) yronglin wrote: I think we don't need thi

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

2025-06-28 Thread via cfe-commits
@@ -1341,6 +1342,13 @@ checkExprLifetimeImpl(Sema &SemaRef, const InitializedEntity *InitEntity, } if (IsGslPtrValueFromGslTempOwner && DiagLoc.isValid()) { + +if (SemaRef.getLangOpts().CPlusPlus23) { + if (const VarDecl *VD = cast(InitEntity->get

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

2025-06-28 Thread via cfe-commits
@@ -57,6 +57,7 @@ enum LifetimeKind { }; using LifetimeResult = llvm::PointerIntPair; + yronglin wrote: Nit: Let's revert blank modification. https://github.com/llvm/llvm-project/pull/145164 ___ cfe-commits mail

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

2025-06-28 Thread via cfe-commits
@@ -1584,6 +1589,20 @@ class VarDecl : public DeclaratorDecl, public Redeclarable { NonParmVarDeclBits.IsCXXCondDecl = true; } + /// Determine whether this variable is the compiler-generated '__range' yronglin wrote: ```suggestion /// Whether this v

[clang] [C][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-06-28 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 h,c,cpp -- clang/test/Sema/c2x-fallthrough2.c clang/test/Sem

[clang] [C][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes Fixes: https://github.com/llvm/llvm-project/issues/141659 In C23, something like [[/*possible attributes*/]]; is an attribute declaration, not a statement. So it is not allowed by the syntax in places where a stat

[clang] [C][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-06-28 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/146224 Fixes: https://github.com/llvm/llvm-project/issues/141659 In C23, something like [[/*possible attributes*/]]; is an attribute declaration, not a statement. So it is not allowed by the syntax in places where a

[clang-tools-extra] [modularize] Use std::tie to implement operator< (NFC) (PR #146220)

2025-06-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes std::tie clearly expresses the intent while slightly shortening the code. --- Full diff: https://github.com/llvm/llvm-project/pull/146220.diff 1 Files Affected: - (modified) clang-tools-

[clang-tools-extra] [modularize] Use std::tie to implement operator< (NFC) (PR #146220)

2025-06-28 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146220 std::tie clearly expresses the intent while slightly shortening the code. >From 5a7e851dd568fe212ad0d497b3b090318cfc8857 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 27 Jun 2025 22:10:27 -0700

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-06-28 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141937 >From 185be04e482344ce2f76eeb02859162e1838150e Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Tue, 27 May 2025 19:36:42 + Subject: [PATCH 1/5] [debuginfo][coro] Emit debug info labels for coro

[clang] [CIR] Upstream GenericSelectionExpr (PR #146211)

2025-06-28 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/146211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream GenericSelectionExpr (PR #146211)

2025-06-28 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/146211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Hexagon] NFC: Reduce the amount of version-specific code (PR #145812)

2025-06-28 Thread Brian Cain via cfe-commits
androm3da wrote: @quic-akaryaki maybe this would fix the `MemorySanitizer: use-of-uninitialized-value`? ``` diff --git a/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp b/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp index ecc1b5d2ebe3..5e92ee284769 100644 --- a/llvm/lib/Target/Hexagon/HexagonSubt

[clang] [clang-format] Fix a bug in `ReflowComments: Always` (PR #146202)

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

[clang] [ExtractAPI] Format pointer types correctly (PR #146182)

2025-06-28 Thread Prajwal Nadig via cfe-commits
https://github.com/snprajwal edited https://github.com/llvm/llvm-project/pull/146182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >