[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-04-06 Thread Paul Heidekrüger via cfe-commits
paulhdk wrote: Gentle bump. Thank you for taking a look! https://github.com/llvm/llvm-project/pull/95220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Handle invalid variable template specialization whose type depends on itself (PR #134522)

2025-04-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/134522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add 'cl' to enable OpenCL kernel file formatting (PR #134529)

2025-04-06 Thread Wenju He via cfe-commits
https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/134529 None >From ac389b8b92fbb77c8884515d8f7293b4af17dfa5 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Sun, 6 Apr 2025 18:30:42 +0800 Subject: [PATCH] [clang-format] Add 'cl' to enable OpenCL kernel file formattin

[clang] [clang-format] Add 'cl' to enable OpenCL kernel file formatting (PR #134529)

2025-04-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Wenju He (wenju-he) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/134529.diff 1 Files Affected: - (modified) clang/tools/clang-format/git-clang-format (+1) ``diff diff --git a/clang/tools/clang-form

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

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

[clang] [Clang][AMDGPU] Enable `avail-extern-to-local` for ThinLTO in HIP (PR #134476)

2025-04-06 Thread Shilei Tian via cfe-commits
shiltian wrote: https://github.com/llvm/llvm-project/pull/134541 resolves the missing `__assert_fail` issue. https://github.com/llvm/llvm-project/pull/134476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [Clang][Sema] Handle invalid variable template specialization whose type depends on itself (PR #134522)

2025-04-06 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis created https://github.com/llvm/llvm-project/pull/134522 Fixes #51347 >From ccab3dc1f18ffeda9acb07c0bd5f80f65cc788b9 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Sun, 6 Apr 2025 15:06:56 +0800 Subject: [PATCH] Handle invalid variable template specialization whose t

[clang-tools-extra] [clangd] Implement simple folding of preprocessor branches (rebased) (PR #121449)

2025-04-06 Thread Shan Pen via cfe-commits
bricle wrote: hope you guys are doing well, really need this feature, thank you for your contribution! https://github.com/llvm/llvm-project/pull/121449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [X86][AVX10] Make warning message more informative, NFCI (PR #134528)

2025-04-06 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang created https://github.com/llvm/llvm-project/pull/134528 None >From 04852072c016e6df3c9b6d834ba34c443593aa04 Mon Sep 17 00:00:00 2001 From: "Wang, Phoebe" Date: Sun, 6 Apr 2025 18:22:22 +0800 Subject: [PATCH] [X86][AVX10] Make warning message more informative, NFC

[clang] [X86][AVX10] Make warning message more informative, NFCI (PR #134528)

2025-04-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Phoebe Wang (phoebewang) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/134528.diff 2 Files Affected: - (modified) clang/lib/Driver/ToolChains/Arch/X86.cpp (+6-2) - (modified) clang/test/Driver/x86-target-feat

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/134536 This change adds ArraySubscriptExpr for fixed size ArrayType Issue #130197 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 S

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change adds ArraySubscriptExpr for fixed size ArrayType Issue #130197 --- Full diff: https://github.com/llvm/llvm-project/pull/134536.diff 10 Files Affected: - (modified) clang/include/clang/CIR

[clang] [Clang][Sema] Handle invalid variable template specialization whose type depends on itself (PR #134522)

2025-04-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yanzuo Liu (zwuis) Changes Fixes #51347 --- Full diff: https://github.com/llvm/llvm-project/pull/134522.diff 4 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+2) - (modified) clang/include/clang/Basic/DiagnosticSemaKinds.td

[clang] [Driver][XCore][NFC] Remove redundant setting of IsIntegratedAssemblerDefault (PR #130397)

2025-04-06 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/130397 >From e3ac24a490948d52b280a4afbc0fa557244932a1 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Fri, 7 Mar 2025 21:50:15 -0500 Subject: [PATCH] [Driver][XCore][NFC] Remove redundant setting of IsIntegratedAssemble

[clang] [clang-format] Add 'cl' to enable OpenCL kernel file formatting (PR #134529)

2025-04-06 Thread Wenju He via cfe-commits
https://github.com/wenju-he edited https://github.com/llvm/llvm-project/pull/134529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Enable `avail-extern-to-local` for ThinLTO in HIP (PR #134476)

2025-04-06 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/134476 >From b537a910f5869c9267ba20793d1531d63a205fdb Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Sun, 6 Apr 2025 11:24:24 -0400 Subject: [PATCH] [Clang][AMDGPU] Enable `avail-extern-to-local` for ThinLTO in HIP

[clang] [Clang][AMDGPU] Enable `avail-extern-to-local` for ThinLTO in HIP (PR #134476)

2025-04-06 Thread Shilei Tian via cfe-commits
shiltian wrote: Hmm, the failure is weird. I can't reproduce it locally. Change it to something else and hopefully this can "resolve" the issue. https://github.com/llvm/llvm-project/pull/134476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [alpha.webkit.ForwardDeclChecker] Recognize a forward declared template specialization (PR #134545)

2025-04-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes This PR fixes a bug that when a template specialization is declared with a forward declaration of a template, the checker fails to find its definition in the same translation unit and erroneo

[clang] [alpha.webkit.ForwardDeclChecker] Recognize a forward declared template specialization (PR #134545)

2025-04-06 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/134545 This PR fixes a bug that when a template specialization is declared with a forward declaration of a template, the checker fails to find its definition in the same translation unit and erroneously emit an unsafe f

[clang] [alpha.webkit.ForwardDeclChecker] Recognize a forward declared template specialization (PR #134545)

2025-04-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/lib/StaticAnalyzer/Checkers/WebKit/ForwardDeclC

[clang] [alpha.webkit.ForwardDeclChecker] Recognize a forward declared template specialization (PR #134545)

2025-04-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes This PR fixes a bug that when a template specialization is declared with a forward declaration of a template, the checker fails to find its definition in the same translation unit and erroneously emit an unsaf

[clang] [alpha.webkit.ForwardDeclChecker] Recognize a forward declared template specialization (PR #134545)

2025-04-06 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/134545 >From a6c4a36a0c7a9b24e0f44748f3d92eee013ab645 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 6 Apr 2025 09:26:33 -0700 Subject: [PATCH 1/2] [alpha.webkit.ForwardDeclChecker] Recognize a forward declared

[clang] [llvm] [LLVM][Clang][Cygwin] Fix Cygwin builds (PR #134458)

2025-04-06 Thread via cfe-commits
Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= Message-ID: In-Reply-To: @@ -236,8 +236,7 @@ class ItaniumCXXABI : public CXXABI { CallingConv getDefaultMethodCallConv(bool isVariadic) const override { const llvm::Triple &T = Conte

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-04-06 Thread Damian Andrei via cfe-commits
xTachyon wrote: @AaronBallman :smile: 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] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -442,6 +457,25 @@ class CIRGenFunction : public CIRGenTypeCache { mlir::LogicalResult emitDeclStmt(const clang::DeclStmt &s); LValue emitDeclRefLValue(const clang::DeclRefExpr *e); + /// Emit an if on a boolean condition to the specified blocks. + /// FIXME: Based on

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -135,6 +135,55 @@ mlir::Location CIRGenFunction::getLoc(mlir::Location lhs, mlir::Location rhs) { return mlir::FusedLoc::get(locs, metadata, &getMLIRContext()); } +bool CIRGenFunction::ContainsLabel(const Stmt *s, bool ignoreCaseStmts) { Andres-Salamanca

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -263,6 +264,72 @@ static void terminateBody(CIRGenBuilderTy &builder, mlir::Region &r, b->erase(); } +mlir::LogicalResult CIRGenFunction::emitIfStmt(const IfStmt &s) { + mlir::LogicalResult res = mlir::success(); + // The else branch of a consteval if statement is al

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -263,6 +264,72 @@ static void terminateBody(CIRGenBuilderTy &builder, mlir::Region &r, b->erase(); } +mlir::LogicalResult CIRGenFunction::emitIfStmt(const IfStmt &s) { + mlir::LogicalResult res = mlir::success(); + // The else branch of a consteval if statement is al

[clang] [llvm] [DirectX] Use scalar arguments for @llvm.dx.dot intrinsics (PR #134570)

2025-04-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner created https://github.com/llvm/llvm-project/pull/134570 The `dx.dot2`, `dot3`, and `dot4` intrinsics exist purely to lower `dx.fdot`, and they map exactly to the DXIL ops of the same name. Using vectors for their arguments adds unnecessary complexity and causes us to

[clang] [clang][doc]: Merge entries with duplicate content. (PR #134089)

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

[clang] [llvm] [DirectX] Use scalar arguments for @llvm.dx.dot intrinsics (PR #134570)

2025-04-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Justin Bogner (bogner) Changes The `dx.dot2`, `dot3`, and `dot4` intrinsics exist purely to lower `dx.fdot`, and they map exactly to the DXIL ops of the same name. Using vectors for their arguments adds unnecessary complexity and causes u

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-04-06 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/115821 ___ 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-04-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Damian Andrei (xTachyon) Changes Tries to implement #69749. >From Discord: ` In terms of how to solve it... I'm hoping we can extend CXString to be length-aware and then add an interface that returns a CXString object instead. Perhaps cl

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-04-06 Thread Damian Andrei via cfe-commits
https://github.com/xTachyon updated https://github.com/llvm/llvm-project/pull/134551 >From 88a7517918ff8f6a5521527e9e1a141af09035c5 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] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -0,0 +1,254 @@ +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll +/

[clang-tools-extra] [clang-tidy] Switch misc-confusable-identifiers check to a faster algorithm. (PR #130369)

2025-04-06 Thread Richard Smith via cfe-commits
zygoloid wrote: Ping. https://github.com/llvm/llvm-project/pull/130369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -447,6 +448,133 @@ mlir::LogicalResult cir::ReturnOp::verify() { return success(); } +//===--===// +// IfOp +//===--===// + +ParseResult

[clang] [clang] fix RecursiveASTVisitor traversal from type to decl (PR #132551)

2025-04-06 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: @mizvekov, could you clarify please what is the point of traversing the host type twice? The tests pass if just remove the `if` statement. https://github.com/llvm/llvm-project/pull/132551 ___ cfe-commits mailing list cfe-commits@lis

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -263,6 +264,72 @@ static void terminateBody(CIRGenBuilderTy &builder, mlir::Region &r, b->erase(); } +mlir::LogicalResult CIRGenFunction::emitIfStmt(const IfStmt &s) { + mlir::LogicalResult res = mlir::success(); + // The else branch of a consteval if statement is al

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [clang] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-06 Thread Thurston Dang via cfe-commits
thurstond wrote: > This will be fixed here: #134560 Thank you! https://github.com/llvm/llvm-project/pull/132748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][XCore][NFC] Remove redundant setting of IsIntegratedAssemblerDefault (PR #130397)

2025-04-06 Thread Brad Smith via cfe-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/130397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [Clang][Cmake] fix libtool duplicate member name warnings (PR #133850)

2025-04-06 Thread Farzon Lotfi via cfe-commits
farzonl wrote: > I'm still somewhat confused about why that one file in particular is > problematic, but I guess if this works it's fine. > > Would making these OBJECT instead of STATIC libraries avoid the issue perhaps? No OBJECT seems to cause many more linker errors. So i'm going to stick w

[clang] [clang-tools-extra] [clang] Do not share ownership of `PreprocessorOptions` (PR #133467)

2025-04-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-win-fast` running on `as-builder-3` while building `clang-tools-extra,clang` at step 8 "test-build-unified-tree-check-clang-unit". Full details are available at: https://lab.llvm.org/buildbot/#/builders/2/bu

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -447,6 +448,133 @@ mlir::LogicalResult cir::ReturnOp::verify() { return success(); } +//===--===// +// IfOp +//===--===// + +ParseResult

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] [clang] fix serialization of SubstNonTypeTemplateParmExpr (PR #134560)

2025-04-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This fixes a couple of mistakes introduced when merging https://github.com/llvm/llvm-project/pull/132748 Fixes msan failure reported here: https://github.com/llvm/llvm-project/pull/132748#issuecomment-2

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-06 Thread via cfe-commits
irymarchyk wrote: If this was done previously I think this is doable. I will take a look and make appropriate changes. Thanks. https://github.com/llvm/llvm-project/pull/134337 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [clang] fix serialization of SubstNonTypeTemplateParmExpr (PR #134560)

2025-04-06 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/134560 This fixes a couple of mistakes introduced when merging https://github.com/llvm/llvm-project/pull/132748 Fixes msan failure reported here: https://github.com/llvm/llvm-project/pull/132748#issuecomment-2781105

[clang] [clang] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-06 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: This will be fixed here: https://github.com/llvm/llvm-project/pull/134560 https://github.com/llvm/llvm-project/pull/132748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [clang]: fix reference compatibility in overload resolution (PR #133035)

2025-04-06 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung edited https://github.com/llvm/llvm-project/pull/133035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add more tests for _Countof (PR #133333)

2025-04-06 Thread Alejandro Colomar via cfe-commits
https://github.com/alejandro-colomar updated https://github.com/llvm/llvm-project/pull/13 >From b8f95e71efec49e90ed20bc1f78fe2055caccece Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Thu, 27 Mar 2025 23:51:18 +0100 Subject: [PATCH] Add more tests for _Countof Link:

[clang] Add more tests for _Countof (PR #133333)

2025-04-06 Thread Alejandro Colomar via cfe-commits
https://github.com/alejandro-colomar edited https://github.com/llvm/llvm-project/pull/13 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add more tests for _Countof (PR #133333)

2025-04-06 Thread Alejandro Colomar via cfe-commits
https://github.com/alejandro-colomar edited https://github.com/llvm/llvm-project/pull/13 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [Clang][Cmake] fix libtool duplicate member name warnings (PR #133850)

2025-04-06 Thread Nikita Popov via cfe-commits
nikic wrote: I'm still somewhat confused about why that one file in particular is problematic, but I guess if this works it's fine. Would making these OBJECT instead of STATIC libraries avoid the issue perhaps? https://github.com/llvm/llvm-project/pull/133850 __

[clang] [clang] fix RecursiveASTVisitor traversal from type to decl (PR #132551)

2025-04-06 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Which host type twice? In case the MemberPointerType represents a class adjustment, this visits the actual class type, instead of just the as-written qualifier. example: https://gcc.godbolt.org/z/M5qfGPGMf I didn't expect we would have in-tree users of the RecursiveVisitor for

[clang] [CIR] Add if statement support (PR #134333)

2025-04-06 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/134333 >From 89f0f528f981223273b2c1548c9a71f2ceeca329 Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Thu, 3 Apr 2025 12:07:25 -0500 Subject: [PATCH 1/2] [CIR] Add if statement support Upstream if statem

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-04-06 Thread Damian Andrei via cfe-commits
https://github.com/xTachyon created https://github.com/llvm/llvm-project/pull/134551 Tries to implement #69749. >From Discord: ` In terms of how to solve it... I'm hoping we can extend CXString to be length-aware and then add an interface that returns a CXString object instead. Perhaps clang_

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-04-06 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] f2987f2 - [X86][AVX10] Make warning message more informative, NFCI (#134528)

2025-04-06 Thread via cfe-commits
Author: Phoebe Wang Date: 2025-04-07T08:31:02+08:00 New Revision: f2987f255ae99cc43cd0da61ac42150af71b0ad6 URL: https://github.com/llvm/llvm-project/commit/f2987f255ae99cc43cd0da61ac42150af71b0ad6 DIFF: https://github.com/llvm/llvm-project/commit/f2987f255ae99cc43cd0da61ac42150af71b0ad6.diff L

[clang] [X86][AVX10] Make warning message more informative, NFCI (PR #134528)

2025-04-06 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/134528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] aef000d - [clang] fix serialization of SubstNonTypeTemplateParmExpr (#134560)

2025-04-06 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-04-06T21:57:20-03:00 New Revision: aef000dd43b8ee2397e71f877217a9ecbd23c608 URL: https://github.com/llvm/llvm-project/commit/aef000dd43b8ee2397e71f877217a9ecbd23c608 DIFF: https://github.com/llvm/llvm-project/commit/aef000dd43b8ee2397e71f877217a9ecbd23c608.dif

[clang] [clang] fix serialization of SubstNonTypeTemplateParmExpr (PR #134560)

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

[clang] [flang] [driver] Generalize the code that adds the path of libflang_rt.runtime.a. (PR #134362)

2025-04-06 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/134362 >From cd100a70479adbb4619d685e345485eea99987c5 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Fri, 4 Apr 2025 06:10:56 -0400 Subject: [PATCH 1/2] [driver] Generalize adding the path of libflang_rt.runtime

[clang] [flang] [driver] Generalize the code that adds the path of libflang_rt.runtime.a. (PR #134362)

2025-04-06 Thread Daniel Chen via cfe-commits
DanielCChen wrote: > Can you please explain why you want to link the static library by default? > For example, Clang has these options > https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-static-libgcc > that allow users to force the static linking, and, I think, by def

[clang] [X86][AVX10] Make warning message more informative, NFCI (PR #134528)

2025-04-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve2-vla-2stage` running on `linaro-g4-02` while building `clang` at step 12 "ninja check 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/199/builds/2630 Here is the relevant piece

[clang] [clang] fix serialization of SubstNonTypeTemplateParmExpr (PR #134560)

2025-04-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-win` running on `avx512-intel64-win` while building `clang` at step 4 "cmake stage 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/81/builds/6042 Here is the relevant pi

[clang-tools-extra] da6e245 - [clang-tidy] Improve `bugprone-capturing-this-in-member-variable` check: add support of `bind` functions. (#132635)

2025-04-06 Thread via cfe-commits
Author: Baranov Victor Date: 2025-04-07T09:57:55+08:00 New Revision: da6e2454fff3fbc86861e31b60f18d3467354375 URL: https://github.com/llvm/llvm-project/commit/da6e2454fff3fbc86861e31b60f18d3467354375 DIFF: https://github.com/llvm/llvm-project/commit/da6e2454fff3fbc86861e31b60f18d3467354375.diff

[clang-tools-extra] [clang-tidy] Improve `bugprone-capturing-this-in-member-variable` check: add support of `bind` functions. (PR #132635)

2025-04-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/132635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6ce0fd7 - [clang] NFC: clean trailing whitespaces in clang/test/CXX/drs/cwg15xx.cpp

2025-04-06 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2025-04-06T23:42:27-03:00 New Revision: 6ce0fd7f74502a75120bef43f12f56e3a5d80dfd URL: https://github.com/llvm/llvm-project/commit/6ce0fd7f74502a75120bef43f12f56e3a5d80dfd DIFF: https://github.com/llvm/llvm-project/commit/6ce0fd7f74502a75120bef43f12f56e3a5d80dfd.dif