[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t literals be typedefs instead of built-in types (PR #143653)

2025-06-10 Thread Matheus Izvekov via cfe-commits
@@ -6726,17 +6726,63 @@ QualType ASTContext::getTagDeclType(const TagDecl *Decl) const { return getTypeDeclType(const_cast(Decl)); } +// Inject __size_t, __signed_size_t, and __ptrdiff_t to provide portable hints +// and diagnostics. In C and C++, expressions of type size_t

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t literals be typedefs instead of built-in types (PR #143653)

2025-06-10 Thread Matheus Izvekov via cfe-commits
@@ -1961,11 +1969,20 @@ class ASTContext : public RefCountedBase { /// . /// /// The sizeof operator requires this (C99 6.5.3.4p4). - CanQualType getSizeType() const; + QualType getSizeType() const; mizvekov wrote: Can you provide `CanQualType getCanon

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t literals be typedefs instead of built-in types (PR #143653)

2025-06-10 Thread Matheus Izvekov via cfe-commits
@@ -320,6 +321,69 @@ bool clang::analyze_format_string::ParseUTF8InvalidSpecifier( // Methods on ArgType. //===--===// +static bool namedTypeToLengthModifierKind(QualType QT, +

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

2025-06-10 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: Thank you all for valuable feedbacks. I have improved the PR by - supporting different character encodings - adding more test cases - updating the release notes https://github.com/llvm/llvm-project/pull/143487 ___ cfe-commits maili

[clang] [Clang][Driver] Override complex number calculation method by -fno-fast-math (PR #132680)

2025-06-10 Thread Shunsuke Watanabe via cfe-commits
s-watanabe314 wrote: Thank you for the review! I will also merge a minor change to initialize `ComplexRangeStr` and `GccRangeComplexOption` together. https://github.com/llvm/llvm-project/pull/132680 ___ cfe-commits mailing list cfe-commits@lists.llvm.

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

2025-06-10 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/143487 >From 5825b324e47c78a939d8e62d1101e1574fd04638 Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Tue, 10 Jun 2025 15:50:10 +0800 Subject: [PATCH 1/3] [-Wunterminated-string-initialization] Handle C string li

[clang] c2cb571 - [Clang][NFC] Move UntypedParameters instead of copy (#143646)

2025-06-10 Thread via cfe-commits
Author: Shafik Yaghmour Date: 2025-06-10T23:41:41-07:00 New Revision: c2cb571c6cbcec75ab401974348f9f0d9b2190db URL: https://github.com/llvm/llvm-project/commit/c2cb571c6cbcec75ab401974348f9f0d9b2190db DIFF: https://github.com/llvm/llvm-project/commit/c2cb571c6cbcec75ab401974348f9f0d9b2190db.dif

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

2025-06-10 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/143487 >From 5825b324e47c78a939d8e62d1101e1574fd04638 Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Tue, 10 Jun 2025 15:50:10 +0800 Subject: [PATCH 1/2] [-Wunterminated-string-initialization] Handle C string li

[clang] [Clang][Tooling][NFC] Use move to avoid copies of large objects (PR #143603)

2025-06-10 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/143603 >From 6bcbd5e1691edd4cbc36bd0c318cdd3b526db1c3 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Tue, 10 Jun 2025 13:51:19 -0700 Subject: [PATCH 1/2] [Clang][Tooling][NFC] Use move to avoid copies of large ob

[clang-tools-extra] [clangd] Implement LSP 3.17 positionEncoding (PR #142903)

2025-06-10 Thread via cfe-commits
someoneinjd wrote: Ping https://github.com/llvm/llvm-project/pull/142903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][OpenMP] Fix mapping of arrays of structs with members with mappers (PR #142511)

2025-06-10 Thread Abhinav Gaba via cfe-commits
abhinavgaba wrote: @alexey-bataev, @jdoerfert, please help review. Thanks. https://github.com/llvm/llvm-project/pull/142511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t literals be typedefs instead of built-in types (PR #143653)

2025-06-10 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][NFC] Move UntypedParameters instead of copy (PR #143646)

2025-06-10 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/143646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t literals be typedefs instead of built-in types (PR #143653)

2025-06-10 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] [CIR] Function calls with aggregate arguments and return values (PR #143377)

2025-06-10 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/143377 >From df020dfa578d504521c1178dcc161a651eb0b0fa Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Mon, 9 Jun 2025 18:35:08 +0800 Subject: [PATCH] [CIR] Function calls with aggregate arguments and return values This

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t literals be typedefs instead of built-in types (PR #143653)

2025-06-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines Author: YexuanXiao (YexuanXiao) Changes Includeing the results of `sizeof`, `sizeof...`, `__datasizeof`, `__alignof`, `_Alignof`, `alignof`, `_Countof`, `size_t` literals, and signed `size_t` literals, as well as the results of pointer-point

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t literals be typedefs instead of built-in types (PR #143653)

2025-06-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: YexuanXiao (YexuanXiao) Changes Includeing the results of `sizeof`, `sizeof...`, `__datasizeof`, `__alignof`, `_Alignof`, `alignof`, `_Countof`, `size_t` literals, and signed `size_t` literals, as well a

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t literals be typedefs instead of built-in types (PR #143653)

2025-06-10 Thread via cfe-commits
YexuanXiao wrote: CC @AaronBallman 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] Make the result type of sizeof/pointer subtraction/size_t literals be typedefs instead of built-in types (PR #143653)

2025-06-10 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-tools-extra] [clang-doc] add namespaces to JSON generator (PR #143209)

2025-06-10 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/143209 ___ 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 namespaces to JSON generator (PR #143209)

2025-06-10 Thread Erick Velez via cfe-commits
@@ -0,0 +1,108 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --output=%t --format=json --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/index.json + +class MyClass {}; + +void myFunction(int Param); + +namespace NestedNamespace { +} // namespace Nested

[clang] Reland: "[Frontend][PCH]-Add support for ignoring PCH options (-ignore-pch). (#142409)" (PR #143614)

2025-06-10 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t + +// Create PCH without -ignore-pch. +// RUN: %clang -x c++-header %S/../Modules/Inputs/codegen-flags/foo.h -### 2>&1 | FileCheck %s -check-prefix=CHECK-EMIT-PCH MaskRay wrote: `%S/../` references auxilia

[clang] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-10 Thread Sirui Mu via cfe-commits
@@ -0,0 +1,78 @@ +// 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] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-10 Thread Sirui Mu via cfe-commits
https://github.com/Lancern edited https://github.com/llvm/llvm-project/pull/142981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-10 Thread Sirui Mu via cfe-commits
@@ -229,6 +231,19 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { cir::IntType getUInt32Ty() { return typeCache.UInt32Ty; } cir::IntType getUInt64Ty() { return typeCache.UInt64Ty; } + cir::ConstantOp getConstInt(mlir::Location loc, llvm::APSInt intVal); + + cir

[clang] [CIR] Upstream minimal builtin function call support (PR #142981)

2025-06-10 Thread Sirui Mu via cfe-commits
https://github.com/Lancern approved this pull request. LGTM except 2 nits https://github.com/llvm/llvm-project/pull/142981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for emitting constructors (PR #143639)

2025-06-10 Thread Sirui Mu via cfe-commits
https://github.com/Lancern edited https://github.com/llvm/llvm-project/pull/143639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for emitting constructors (PR #143639)

2025-06-10 Thread Sirui Mu via cfe-commits
@@ -496,6 +496,47 @@ cir::FuncOp CIRGenFunction::generateCode(clang::GlobalDecl gd, cir::FuncOp fn, return fn; } +void CIRGenFunction::emitConstructorBody(FunctionArgList &args) { + assert(!cir::MissingFeatures::sanitizers()); + const auto *ctor = cast(curGD.getDecl()); +

[clang] [CIR] Upstream support for emitting constructors (PR #143639)

2025-06-10 Thread Sirui Mu via cfe-commits
https://github.com/Lancern requested changes to this pull request. https://github.com/llvm/llvm-project/pull/143639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for emitting constructors (PR #143639)

2025-06-10 Thread Sirui Mu via cfe-commits
@@ -21,6 +21,88 @@ using namespace clang; using namespace clang::CIRGen; +/// Checks whether the given constructor is a valid subject for the +/// complete-to-base constructor delgation optimization, i.e. emitting the +/// complete constructor as a simple call to the base cons

[clang] [CIR] Upstream support for emitting constructors (PR #143639)

2025-06-10 Thread Sirui Mu via cfe-commits
https://github.com/Lancern edited https://github.com/llvm/llvm-project/pull/143639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Use StringRef for RequiredExtensions in RVVIntrinsicDef (PR #143503)

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

[clang] [lldb] [llvm] [debuginfo][coro] Fix linkage name for clones of coro functions (PR #141889)

2025-06-10 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Thanks. I feel good with it. https://github.com/llvm/llvm-project/pull/141889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Cache required extensions string for RVVIntrinsicDef (PR #143503)

2025-06-10 Thread Brandon Wu via cfe-commits
@@ -385,7 +390,8 @@ void RISCVIntrinsicManagerImpl::InitRVVIntrinsic( uint32_t Index = IntrinsicList.size(); assert(IntrinsicList.size() == (size_t)Index && "Intrinsics indices overflow."); - IntrinsicList.push_back({BuiltinName, Record.RequiredExtensions, Signatu

[clang] [RISCV] Use StringRef for RequiredExtensions in RVVIntrinsicDef (PR #143503)

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

[clang] [RISCV] Use StringRef for RequiredExtensions in RVVIntrinsicDef (PR #143503)

2025-06-10 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat edited https://github.com/llvm/llvm-project/pull/143503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Cache required extensions string for RVVIntrinsicDef (PR #143503)

2025-06-10 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/143503 >From 06013a60b51bdc61977c19c80231ed93c0278d66 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Tue, 10 Jun 2025 03:07:12 -0700 Subject: [PATCH] [RISCV] Use StringRef for RequiredExtensions in RVVIntrinsicDef T

[clang] [RISCV] Cache required extensions string for RVVIntrinsicDef (PR #143503)

2025-06-10 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/143503 >From 56de91cf1693b9983ed6828e5daadc94f78e978c Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Tue, 10 Jun 2025 03:07:12 -0700 Subject: [PATCH 1/2] [RISCV] Cache required extensions string for RVVIntrinsicDef

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

2025-06-10 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: FWIW, I sent https://github.com/llvm/llvm-project/pull/143647 https://github.com/llvm/llvm-project/pull/142828 ___ 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-10 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 93b0bf635a287aac55f6da39f38c1cf257efa824 https://github.com/llvm/llvm-project/actions/runs/15574087990 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-proje

[clang] [llvm] [PGO][Offload] Fix offload coverage mapping (PR #143490)

2025-06-10 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough closed https://github.com/llvm/llvm-project/pull/143490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 67ff66e - [PGO][Offload] Fix offload coverage mapping (#143490)

2025-06-10 Thread via cfe-commits
Author: Ethan Luis McDonough Date: 2025-06-10T20:19:38-05:00 New Revision: 67ff66e67734c0b283ec676899e5b89b67fdafcb URL: https://github.com/llvm/llvm-project/commit/67ff66e67734c0b283ec676899e5b89b67fdafcb DIFF: https://github.com/llvm/llvm-project/commit/67ff66e67734c0b283ec676899e5b89b67fdafc

[clang] [Clang] fix missing source location for errors in macro-expanded (PR #143460)

2025-06-10 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk 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][OpenCL] Declare cl_amd_media_ops/cl_amd_media_ops2 builtins with -fdeclare-opencl-builtins (PR #143507)

2025-06-10 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= Message-ID: In-Reply-To: @@ -0,0 +1,98 @@ +// RUN: %clang_cc1 %s -triple amdgcn-unknown-unknown -verify -pedantic -Wconversion -Werror -fsyntax-only -

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for requiring unwind v2 to be used (equivalent to MSVC's /d2epilogunwindrequirev2) (PR #143577)

2025-06-10 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The only code that generates prologues and epilogues is PrologEpilogInserter. There isn't any way to skip the normal codegen codepath. (You can write a naked function, but then you'd be responsible for writing your own unwind directives.) reportFatalInternalError seems

[clang] [CIR] Upstream support for calling constructors (PR #143579)

2025-06-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/143579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b9329fe - [CIR] Upstream support for calling constructors (#143579)

2025-06-10 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-06-10T16:50:29-07:00 New Revision: b9329fe88e47741d9c20ab92f892ac52457e6195 URL: https://github.com/llvm/llvm-project/commit/b9329fe88e47741d9c20ab92f892ac52457e6195 DIFF: https://github.com/llvm/llvm-project/commit/b9329fe88e47741d9c20ab92f892ac52457e6195.diff L

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

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

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

2025-06-10 Thread Fazlay Rabbi via cfe-commits
https://github.com/mdfazlay updated https://github.com/llvm/llvm-project/pull/143442 >From a1bbf8e2971c7cc3b20162835f68b6f538d4f55b Mon Sep 17 00:00:00 2001 From: Fazlay Rabbi Date: Mon, 9 Jun 2025 14:12:24 -0700 Subject: [PATCH 1/4] [OpenMP 60] Initial parsing/sema for `need_device_addr` modi

[clang] [llvm] [NFC][HLSL][DXIL] Move D3D12.h enums and flags to DXILABI (PR #143041)

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

[clang] [llvm] [NFC][HLSL][DXIL] Move D3D12.h enums and flags to DXILABI (PR #143041)

2025-06-10 Thread Finn Plummer via cfe-commits
inbelic wrote: I will mark this as draft until I re-update it to use the values from DXContainer.h. Some of the enums are not yet defined, so either we will wait until they are defined to refactor, or, we can define them here. https://github.com/llvm/llvm-project/pull/143041 __

[clang-tools-extra] [clangd] Add languages as server capabilities (PR #75633)

2025-06-10 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Using `"ServerCapabilities.experimental"` sounds reasonable to me. https://github.com/llvm/llvm-project/pull/75633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland: "[Frontend][PCH]-Add support for ignoring PCH options (-ignore-pch). (#142409)" (PR #143614)

2025-06-10 Thread Ying Yi via cfe-commits
MaggieYingYi wrote: > LGTM. > Thanks @mizvekov. > So what changed since the last commit is that preprocessing-only mode doesn't > imply the semantics of this flag anymore. > Yes, only ignore PCH option when `-ignore-pch` is used in the command line. The preprocessing-only mode (-E) doesn't

[clang] [CIR] Add initial support for bitfields in structs (PR #142041)

2025-06-10 Thread via cfe-commits
@@ -223,21 +272,114 @@ void CIRRecordLowering::fillOutputFields() { fieldTypes.size() - 1; // A field without storage must be a bitfield. assert(!cir::MissingFeatures::bitfields()); + if (!member.data) +setBitFieldInfo(member.fieldDecl, memb

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

2025-06-10 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: hu

[clang] [CIR] Add initial support for bitfields in structs (PR #142041)

2025-06-10 Thread Andy Kaylor via cfe-commits
@@ -223,21 +272,114 @@ void CIRRecordLowering::fillOutputFields() { fieldTypes.size() - 1; // A field without storage must be a bitfield. assert(!cir::MissingFeatures::bitfields()); + if (!member.data) +setBitFieldInfo(member.fieldDecl, memb

[clang] [CIR] Upstream support for calling constructors (PR #143579)

2025-06-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/143579 >From 844b07e53937d3496405fd2c58148bd03c1f7407 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Mon, 9 Jun 2025 09:38:55 -0700 Subject: [PATCH 1/3] [CIR] Upstream support for calling constructors This change

[clang] Reland: "[Frontend][PCH]-Add support for ignoring PCH options (-ignore-pch). (#142409)" (PR #143614)

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

[clang] Reland: "[Frontend][PCH]-Add support for ignoring PCH options (-ignore-pch). (#142409)" (PR #143614)

2025-06-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM. So what changed since the last commit is that preprocessing-only mode doesn't imply the semantics of this flag anymore. I think It's good practice to mention what changed since original landing. https://github.com/llvm/llvm-project

[clang] Reland: "[Frontend][PCH]-Add support for ignoring PCH options (-ignore-pch). (#142409)" (PR #143614)

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

[clang] [CIR] Add initial support for bitfields in structs (PR #142041)

2025-06-10 Thread Andy Kaylor via cfe-commits
@@ -223,21 +272,114 @@ void CIRRecordLowering::fillOutputFields() { fieldTypes.size() - 1; // A field without storage must be a bitfield. assert(!cir::MissingFeatures::bitfields()); + if (!member.data) +setBitFieldInfo(member.fieldDecl, memb

[clang] Reload "[Frontend][PCH]-Add support for ignoring PCH options (-ignore-pch). (#142409)" (PR #143614)

2025-06-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Ying Yi (MaggieYingYi) Changes Visual Studio has an argument to ignore all PCH related switches. clang-cl has also support option /Y-. Having the same option in clang would be helpful. This commit is to add support for ignoring PCH

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for requiring unwind v2 to be used (equivalent to MSVC's /d2epilogunwindrequirev2) (PR #143577)

2025-06-10 Thread Daniel Paoliello via cfe-commits
dpaoliello wrote: I'm happy to change these back to `llvm_unreachable` or `reportFatalInternalError`. Is it possible for something other than LLVM to emit the prolog and epilog, like hand-written assembly or a frontend (e.g., for a custom calling convention). I'll change the too many epilog e

[clang] Reload "[Frontend][PCH]-Add support for ignoring PCH options (-ignore-pch). (#142409)" (PR #143614)

2025-06-10 Thread Ying Yi via cfe-commits
https://github.com/MaggieYingYi created https://github.com/llvm/llvm-project/pull/143614 Visual Studio has an argument to ignore all PCH related switches. clang-cl has also support option /Y-. Having the same option in clang would be helpful. This commit is to add support for ignoring PCH opti

[clang] [Clang] Set the FTM for trivial relocation (PR #142936)

2025-06-10 Thread via cfe-commits
EricWF wrote: I'm OK with this, but @ldionne should be the one to approve. https://github.com/llvm/llvm-project/pull/142936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIRV] Use resource names (PR #143412)

2025-06-10 Thread Justin Bogner via cfe-commits
@@ -243,7 +243,7 @@ CGHLSLRuntime::getCreateHandleFromBindingIntrinsic() { case llvm::Triple::dxil: return std::pair(llvm::Intrinsic::dx_resource_handlefrombinding, true); case llvm::Triple::spirv: -return std::pair(llvm::Intrinsic::spv_resource_handlefrombinding, f

[clang] [llvm] [HLSL][SPIRV] Use resource names (PR #143412)

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

[clang] [Clang][NFC] Move HeadingAndSpellings to avoid copying (PR #143611)

2025-06-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes Static analysis flagged that we could move HeadingAndSpellings and avoid a copy of a large object. --- Full diff: https://github.com/llvm/llvm-project/pull/143611.diff 1 Files Affected: - (modified) cla

[clang] [Clang][NFC] Move HeadingAndSpellings to avoid copying (PR #143611)

2025-06-10 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/143611 Static analysis flagged that we could move HeadingAndSpellings and avoid a copy of a large object. >From 55d520891a09e3cd3ef85eeba501ad80d8240619 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Tue, 10 Jun

[clang] [CIR] Upstream support for calling constructors (PR #143579)

2025-06-10 Thread Andy Kaylor via cfe-commits
@@ -1393,6 +1393,57 @@ RValue CIRGenFunction::emitCXXMemberCallExpr(const CXXMemberCallExpr *ce, ce, md, returnValue, hasQualifier, qualifier, isArrow, base); } +void CIRGenFunction::emitCXXConstructExpr(const CXXConstructExpr *e, +

[clang] [clang][AArch64] test -cc1 -print-enabled-extensions (PR #143570)

2025-06-10 Thread David Green via cfe-commits
https://github.com/davemgreen approved this pull request. https://github.com/llvm/llvm-project/pull/143570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][HLSL][DXIL] Move D3D12.h enums and flags to DXILABI (PR #143041)

2025-06-10 Thread Justin Bogner via cfe-commits
https://github.com/bogner requested changes to this pull request. https://github.com/llvm/llvm-project/pull/143041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][HLSL][DXIL] Move D3D12.h enums and flags to DXILABI (PR #143041)

2025-06-10 Thread Justin Bogner via cfe-commits
@@ -99,6 +99,128 @@ enum class SamplerFeedbackType : uint32_t { const unsigned MinWaveSize = 4; const unsigned MaxWaveSize = 128; +// Definition of the various d3d12.h enumerations and flags. The definitions of +// all values here correspond to their description in the d3d12.h

[clang] [CIR] Add initial support for bitfields in structs (PR #142041)

2025-06-10 Thread Andy Kaylor via cfe-commits
andykaylor wrote: Sorry for the delay in getting back to this. The summary of what I am about to say is that I'm in agreement with the plan of moving forward with the current implementation, but I have some lingering thoughts about it that I want to explore. > As you noticed, we went higher l

[clang-tools-extra] [clang-tidy] Add modernize-make-direct check (PR #118120)

2025-06-10 Thread Helmut Januschka via cfe-commits
hjanuschka wrote: @denzor200 feedback addressed. @firewave also your feedback addressed. thank you both for your time, i kind of missed notifications for this PR https://github.com/llvm/llvm-project/pull/118120 ___ cfe-commits mailing list cfe-commit

[clang] [lldb] [llvm] [debuginfo][coro] Fix linkage name for clones of coro functions (PR #141889)

2025-06-10 Thread Adrian Vogelsgesang via cfe-commits
vogelsgesang wrote: @ChuanqiXu9 do you want to take another look? (given that this is a NFC for Swift, and primarily changes C++ behavior) Alternatively, is it fine by you if I ship this based on @Michael137's approval? https://github.com/llvm/llvm-project/pull/141889 __

[clang] [lldb] [llvm] [debuginfo][coro] Fix linkage name for clones of coro functions (PR #141889)

2025-06-10 Thread Adrian Vogelsgesang via cfe-commits
vogelsgesang wrote: > The LLDB test failure seems expected. The demangled frame name changed Good catch. I updated the LLDB test expectations just now https://github.com/llvm/llvm-project/pull/141889 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [lldb] [llvm] [debuginfo][coro] Fix linkage name for clones of coro functions (PR #141889)

2025-06-10 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141889 >From 700c1c465ff7f29dc980356f36844a12d580 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Tue, 27 May 2025 23:50:18 + Subject: [PATCH 1/3] [debuginfo][coro] Fix linkage name for clones of

[clang] [CIR] Upstream support for calling constructors (PR #143579)

2025-06-10 Thread Amr Hesham via cfe-commits
@@ -1393,6 +1393,57 @@ RValue CIRGenFunction::emitCXXMemberCallExpr(const CXXMemberCallExpr *ce, ce, md, returnValue, hasQualifier, qualifier, isArrow, base); } +void CIRGenFunction::emitCXXConstructExpr(const CXXConstructExpr *e, +

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-06-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/139827 >From 0d1a56f8020a1a676977df3f848eac896242e81b Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 13 May 2025 21:35:06 +0200 Subject: [PATCH 1/7] [CIR] Upstream splat op for VectorType --- clang/inclu

[clang-tools-extra] [clang-tidy] Add modernize-make-direct check (PR #118120)

2025-06-10 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/118120 >From c741fffc1aa978e39946bb34efc455dc9333f993 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Fri, 29 Nov 2024 19:17:36 +0100 Subject: [PATCH 1/3] [clang-tidy] Add modernize-make-direct check Adds a n

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

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

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-06-10 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > vector_splat_test > Can you update the checks in this PR before committing? Sure, I will update the splat test function in this PR, and in NFS PR i will update the old tests https://github.com/llvm/llvm-project/pull/139827 ___ c

[clang] [CIR] Add initial support for bitfields in structs (PR #142041)

2025-06-10 Thread via cfe-commits
Andres-Salamanca wrote: @andykaylor https://github.com/llvm/llvm-project/pull/142041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for calling constructors (PR #143579)

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

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

2025-06-10 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/4] Place holder message for sizeof operator in loops. --

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

2025-06-10 Thread via cfe-commits
@@ -25,20 +40,29 @@ int main() { auto lambda2 = [](int){}; auto lambda3 = [](double){}; - kernel(lambda1); - kernel2(lambda2); - kernel3(lambda3); + kernel_wrapper(lambda1); + kernel2_wrapper(lambda2); + kernel3_wrapper(lambda3); // Ensure the kernels are named

[clang] [Clang][Driver] Override complex number calculation method by -fno-fast-math (PR #132680)

2025-06-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm -- thanks for sticking with this! https://github.com/llvm/llvm-project/pull/132680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [CIR] Upstream support for calling constructors (PR #143579)

2025-06-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper approved this pull request. https://github.com/llvm/llvm-project/pull/143579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for calling constructors (PR #143579)

2025-06-10 Thread Amr Hesham via cfe-commits
@@ -1393,6 +1393,57 @@ RValue CIRGenFunction::emitCXXMemberCallExpr(const CXXMemberCallExpr *ce, ce, md, returnValue, hasQualifier, qualifier, isArrow, base); } +void CIRGenFunction::emitCXXConstructExpr(const CXXConstructExpr *e, +

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

2025-06-10 Thread 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] [CIR] Upstream splat op for VectorType (PR #139827)

2025-06-10 Thread Andy Kaylor via cfe-commits
@@ -135,4 +135,38 @@ cir.func @vector_insert_element_test() { // CHECK:cir.return // CHECK: } +cir.func @vector_splat_test() { +%0 = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["a", init] +%1 = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["shl", init] +

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-06-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/139827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-06-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. Other than pattern matching the value identifiers in the test, this looks good to me. https://github.com/llvm/llvm-project/pull/139827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

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

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

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

2025-06-10 Thread via cfe-commits
@@ -29,21 +29,10 @@ int foo() { } template -__attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) { +[[clang::sycl_external]] void kernel_single_task(const Func &kernelFunc) { schittir wrote: Agreed. It should have been [[clang::sycl_k

[clang-tools-extra] [clangd] Add tweak to abbreviate function templates (PR #74710)

2025-06-10 Thread Jeremy Stucki via cfe-commits
jeremystucki wrote: Thank you for the review @vbvictor! Much appreciated https://github.com/llvm/llvm-project/pull/74710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add tweak to abbreviate function templates (PR #74710)

2025-06-10 Thread Jeremy Stucki via cfe-commits
@@ -0,0 +1,352 @@ +//===-- AbbreviateFunctionTemplate.cpp ---*- 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: Ap

[clang-tools-extra] [clangd] Add tweak to abbreviate function templates (PR #74710)

2025-06-10 Thread Jeremy Stucki via cfe-commits
https://github.com/jeremystucki updated https://github.com/llvm/llvm-project/pull/74710 >From 4a32f94492d69af5244c276624abc95bca0ef166 Mon Sep 17 00:00:00 2001 From: Jeremy Stucki Date: Fri, 27 Oct 2023 16:33:13 +0200 Subject: [PATCH 1/4] [clangd] Add tweak to abbreviate function templates Co-

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

2025-06-10 Thread via cfe-commits
@@ -1,128 +1,128 @@ // RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s void bar(int &Data) {} -// CHECK: define dso_local void @[[RAW_REF:[a-zA-Z0-9_]+]](ptr noundef nonnull align 4 dereferenceable(4) % +// CHEC

  1   2   3   4   5   >