[clang-tools-extra] [clang-tidy] Add check 'bugprone-invalid-enum-default-initialization' (PR #136823)

2025-05-28 Thread Balázs Kéri via cfe-commits
@@ -0,0 +1,112 @@ +//===--- InvalidEnumDefaultInitializationCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [Sema] Fix type mismatch error when arguments to elementwise math builtin have different qualifiers, which should be well-formed (PR #141485)

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

[clang] [Sema] Fixed type missmach error when 'builtin-elementwise-math' arguments have different qualifiers, this should be a well-formed. (PR #141485)

2025-05-28 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @QiYueFeiXue I don't think @shafik means to directly copy his words to the PR body/title. Please at least flesh out these dotted parts and make the sentences complete, thanks. https://github.com/llvm/llvm-project/pull/141485 ___ cfe-co

[clang] [Sema] Fixed type missmach error when 'builtin-elementwise-math' arguments have different qualifiers, this should be a well-formed. (PR #141485)

2025-05-28 Thread via cfe-commits
https://github.com/QiYueFeiXue updated https://github.com/llvm/llvm-project/pull/141485 >From 8a579b19136dc2754f530197f3b45d4c993556fc Mon Sep 17 00:00:00 2001 From: QiYue Date: Mon, 26 May 2025 19:51:24 +0800 Subject: [PATCH 1/3] [Sema] built-in args type checking using hasSameUnqualifiedType

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-28 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: not clang-doc %S/Inputs/basic-project/src/Circle.cpp -output=/root/docs 2>&1 | FileCheck %s ilovepi wrote: Well, I had forgotten that `create_directories()` works differently than `create_directory()`, in that its basically `mkdir -p`.

[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

2025-05-28 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 61314076f https://github.com/llvm/llvm-project/actions/runs/15317560723 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-project/compare) https://github.com

[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

2025-05-28 Thread Younan Zhang via cfe-commits
zyn0217 wrote: /cherry-pick 61314076f https://github.com/llvm/llvm-project/pull/141890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

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

[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

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

[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

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

[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

2025-05-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/23407 Here is the relevant piece of the build lo

[clang] 6131407 - [clang] Serialization: support hashing null template arguments (#141890)

2025-05-28 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-05-29T02:08:11-03:00 New Revision: 61314076f78327ffd5e1463c35373c7f4e52d30f URL: https://github.com/llvm/llvm-project/commit/61314076f78327ffd5e1463c35373c7f4e52d30f DIFF: https://github.com/llvm/llvm-project/commit/61314076f78327ffd5e1463c35373c7f4e52d30f.dif

[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

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

[clang] [clang] Serialization: support hashing null template arguments (PR #141890)

2025-05-28 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/141890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] built-in args type checking using hasSameUnqualifiedType (PR #141485)

2025-05-28 Thread via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 %s -fsyntax-only -verify +// expected-no-diagnostics + +// This example uncovered a bug in Sema::BuiltinVectorMath, where we should be +// using ASTContext::hasSameUnqualifiedType(). + +typedef float vec3 __attribute__((ext_vector_type(3))); +

[clang] [llvm] [Clang][LoongArch] Support target attribute for function (PR #140700)

2025-05-28 Thread via cfe-commits
@@ -34,6 +34,19 @@ bool LoongArch::isValidArchName(StringRef Arch) { return false; } +bool LoongArch::isValidFeatureName(StringRef Feature) { + if (Feature.starts_with("+") || Feature.starts_with("-")) { +return false; + } wangleiat wrote: The braces

[clang] [llvm] [Clang][LoongArch] Support target attribute for function (PR #140700)

2025-05-28 Thread via cfe-commits
https://github.com/Ami-zhang updated https://github.com/llvm/llvm-project/pull/140700 >From 1f521b6105a032d4722041d179e96cee28ab4169 Mon Sep 17 00:00:00 2001 From: Ami-zhang Date: Wed, 14 May 2025 15:21:54 +0800 Subject: [PATCH 1/2] [Clang][LoongArch] Support target attribute for function This

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-28 Thread Shafik Yaghmour via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/shafik commented: Very nice change. How are you coming up w/ the target for your improvements? Is this something other folks could try and try and find some inspiration? https://github.com/llvm/llvm-project/pull/141471 _

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-28 Thread Shafik Yaghmour via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -1741,57 +1741,65 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, void Sema::DiagnoseAssignmentEnum(QualType DstType, QualType SrcType, Expr *SrcExpr) { + + const auto *E

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-28 Thread Shafik Yaghmour via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/141471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] built-in args type checking using hasSameUnqualifiedType (PR #141485)

2025-05-28 Thread via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 %s -fsyntax-only -verify +// expected-no-diagnostics + +// This example uncovered a bug in Sema::BuiltinVectorMath, where we should be +// using ASTContext::hasSameUnqualifiedType(). + +typedef float vec3 __attribute__((ext_vector_type(3))); +

[clang] [Sema] built-in args type checking using hasSameUnqualifiedType (PR #141485)

2025-05-28 Thread via cfe-commits
https://github.com/QiYueFeiXue updated https://github.com/llvm/llvm-project/pull/141485 >From 4566e35db95001270dc84fb854fae8081c1e13a4 Mon Sep 17 00:00:00 2001 From: QiYue Date: Mon, 26 May 2025 19:51:24 +0800 Subject: [PATCH 1/2] [Sema] built-in args type checking using hasSameUnqualifiedType

[clang] [llvm] [Clang][LoongArch] Support target attribute for function (PR #140700)

2025-05-28 Thread via cfe-commits
@@ -388,6 +388,76 @@ bool LoongArchTargetInfo::handleTargetFeatures( return true; } +enum class AttrFeatureKind { Arch, Tune, NoFeature, Feature, Invalid }; wangleiat wrote: Is Invalid unused? https://github.com/llvm/llvm-project/pull/140700 __

[clang] [llvm] [Clang][LoongArch] Support target attribute for function (PR #140700)

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

[clang] [llvm] [Clang][LoongArch] Support target attribute for function (PR #140700)

2025-05-28 Thread via cfe-commits
@@ -34,6 +34,19 @@ bool LoongArch::isValidArchName(StringRef Arch) { return false; } +bool LoongArch::isValidFeatureName(StringRef Feature) { + if (Feature.starts_with("+") || Feature.starts_with("-")) { +return false; + } + for (const auto F : AllFeatures) { +Str

[clang] [llvm] [Clang][LoongArch] Support target attribute for function (PR #140700)

2025-05-28 Thread via cfe-commits
https://github.com/wangleiat approved this pull request. LGTM with some minor nits, thanks. https://github.com/llvm/llvm-project/pull/140700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [llvm] [Clang][LoongArch] Support target attribute for function (PR #140700)

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

[clang] [flang] [llvm] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-05-28 Thread via cfe-commits
fanju110 wrote: > @fanju110, Thanks for seeing this through! Hi @tarunprabhu , If everything looks good, could you please merge this PR at your convenience (I don't have merge rights)? Thank you! https://github.com/llvm/llvm-project/pull/136098 __

[clang] [clang][Sema] Declare builtins used in #pragma intrinsic (PR #138205)

2025-05-28 Thread Nick Sarnie via cfe-commits
sarnex wrote: It took me all day but I managed to reproduce the issue with Chromium, investigating more. https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[libunwind] [libunwind][Haiku] Fix signal frame unwinding (PR #135367)

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

[libunwind] 1d9ef82 - [libunwind][Haiku] Fix signal frame unwinding (#135367)

2025-05-28 Thread via cfe-commits
Author: Trung Nguyen Date: 2025-05-28T22:18:55-04:00 New Revision: 1d9ef8211f399a57849d0bc47cb86bf594bac364 URL: https://github.com/llvm/llvm-project/commit/1d9ef8211f399a57849d0bc47cb86bf594bac364 DIFF: https://github.com/llvm/llvm-project/commit/1d9ef8211f399a57849d0bc47cb86bf594bac364.diff

[clang] [clang-format] Handle .h files for LK_C and LK_ObjC (PR #141714)

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

[clang] 7e1a88b - [clang-format] Handle .h files for LK_C and LK_ObjC (#141714)

2025-05-28 Thread via cfe-commits
Author: Owen Pan Date: 2025-05-28T19:10:20-07:00 New Revision: 7e1a88b9d1431e263258e3ff0f729c1fdce342d3 URL: https://github.com/llvm/llvm-project/commit/7e1a88b9d1431e263258e3ff0f729c1fdce342d3 DIFF: https://github.com/llvm/llvm-project/commit/7e1a88b9d1431e263258e3ff0f729c1fdce342d3.diff LOG:

[clang-tools-extra] [clangd] Add tweak to override pure virtuals (PR #139348)

2025-05-28 Thread Marco Maia via cfe-commits
https://github.com/marcogmaia edited https://github.com/llvm/llvm-project/pull/139348 ___ 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 override pure virtuals (PR #139348)

2025-05-28 Thread Marco Maia via cfe-commits
marcogmaia wrote: @kadircet I've added a description about the tweak at the beginning of the file as requested. https://github.com/llvm/llvm-project/pull/139348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

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

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-28 Thread Samarth Narang via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: not clang-doc %S/Inputs/basic-project/src/Circle.cpp -output=/root/docs 2>&1 | FileCheck %s snarang181 wrote: Sorry, I might be misunderstanding but won't `llvm::sys::fs::create_directories()` create a valid directory path? Giving the

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-28 Thread Samarth Narang via cfe-commits
@@ -373,20 +370,16 @@ Example usage for a project using a compile commands database: // Ensure the root output directory exists. if (std::error_code Err = llvm::sys::fs::create_directories(OutDirectory); Err != std::error_code()) { -llvm::errs() << "Failed to cre

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-28 Thread Paul Kirth via cfe-commits
@@ -373,20 +370,16 @@ Example usage for a project using a compile commands database: // Ensure the root output directory exists. if (std::error_code Err = llvm::sys::fs::create_directories(OutDirectory); Err != std::error_code()) { -llvm::errs() << "Failed to cre

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-05-28 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Something along the lines of FunctionTypeArmAttributes seems fine. https://github.com/llvm/llvm-project/pull/141846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake] Turn on LLVM_ENABLE_BACKTRACE for Apple stage1 compiler (PR #141872)

2025-05-28 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/141872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-28 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/141699 >From b2dc4f8a50d86ecdc5fd27fedd7efde5c6882df5 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Tue, 27 May 2025 21:32:41 -0400 Subject: [PATCH 1/2] [clang-doc] Refactor error handling to use ExitOnError

[clang] [CIR] Update tests for global vars (PR #141854)

2025-05-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/141854 >From 462dc6afb219a4005e72d516e922c1c4ab0179d9 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 28 May 2025 13:49:25 -0700 Subject: [PATCH 1/2] [CIR] Update testds for global vars This change updates a

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/141369 >From 3a8bcd052d25d138b3a9a53bbcc69d48500b4b41 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 24 May 2025 14:18:06 +0200 Subject: [PATCH 1/7] [CIR] Upstream global initialization for ComplexType --

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

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

[clang] [clang][modules][deps]Remove -F option from test for clang-scan-deps (PR #141614)

2025-05-28 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: @jamieschmeiser I apologize if this is obvious, but is it a requirement that clang options follow the same conventions as gcc? If so, where is that documented? https://github.com/llvm/llvm-project/pull/141614 ___ cfe-commits mailin

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: cir-opt %s -verify-diagnostics -split-input-file + +!s32i = !cir.int bcardosolopes wrote: Seems like you forgot to remove this file https://github.com/llvm/llvm-project/pull/141369 ___ cfe-com

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -276,4 +276,46 @@ def ConstPtrAttr : CIR_Attr<"ConstPtr", "ptr", [TypedAttrInterface]> { }]; } +//===--===// +// ConstComplexAttr +//===---

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-28 Thread Amr Hesham via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: cir-opt %s -verify-diagnostics -split-input-file + +!s32i = !cir.int AmrDeveloper wrote: Nice, thats better, i think i will do this with Vector too in next PR's https://github.com/llvm/llvm-project/pull/141369 __

[clang] [CIR] Update tests for global vars (PR #141854)

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

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/141369 >From 3a8bcd052d25d138b3a9a53bbcc69d48500b4b41 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 24 May 2025 14:18:06 +0200 Subject: [PATCH 1/6] [CIR] Upstream global initialization for ComplexType --

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM pending comments from other reviewers https://github.com/llvm/llvm-project/pull/141830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-28 Thread Paul Kirth via cfe-commits
ilovepi wrote: Other than some nits the patch is mostly ready to go. It does need a test though, which sadly we don't already have. Please add a lit test under clang-tools-extra/tests/clang-doc. https://github.com/llvm/llvm-project/pull/141699 ___ cf

[clang] [Clang] add fix-it hints for unknown attributes (PR #141305)

2025-05-28 Thread Oleksandr T. via cfe-commits
@@ -7867,15 +7865,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) { void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) { std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\''; + SourceRange NR = AL.getNormalizedRange();

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-28 Thread Paul Kirth via cfe-commits
@@ -371,22 +367,14 @@ Example usage for a project using a compile commands database: sortUsrToInfo(USRToInfo); // Ensure the root output directory exists. - if (std::error_code Err = llvm::sys::fs::create_directories(OutDirectory); - Err != std::error_code()) { -

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-28 Thread Paul Kirth via cfe-commits
@@ -49,6 +49,7 @@ using namespace clang::ast_matchers; using namespace clang::tooling; using namespace clang; +static llvm::ExitOnError ExitOnErr; ilovepi wrote: ```suggestion static llvm::ExitOnError ExitOnErr; ``` Nit: newline between using and the declarat

[clang] [NFCI][ubsan] Precommit tests for -fsanitize-annotate-debug-info (PR #141814)

2025-05-28 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/141814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9553514 - [NFCI][ubsan] Precommit tests for -fsanitize-annotate-debug-info (#141814)

2025-05-28 Thread via cfe-commits
Author: Thurston Dang Date: 2025-05-28T14:12:39-07:00 New Revision: 9553514e4a0cdae580930173410b23ccd35c9e4c URL: https://github.com/llvm/llvm-project/commit/9553514e4a0cdae580930173410b23ccd35c9e4c DIFF: https://github.com/llvm/llvm-project/commit/9553514e4a0cdae580930173410b23ccd35c9e4c.diff

[clang] [ASTWriter] Do not write ObjCCategories if empty. (PR #141841)

2025-05-28 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: This change makes sense to me. I have two questions: 1. Can we add a test that checks that the block is omitted? (maybe via `llvm-bcanalyzer -dump`) 2. Can we make the `explicit-build.cpp` test more robust? (possibly by writing out import signatures) https://github.com/llvm

[clang] [llvm] [SimplifyCFG] Extend jump-threading to allow live local defs (PR #135079)

2025-05-28 Thread via cfe-commits
@@ -3467,13 +3485,23 @@ static bool blockIsSimpleEnoughToThreadThrough(BasicBlock *BB) { // live outside of the current basic block. for (User *U : I.users()) { Instruction *UI = cast(U); - if (UI->getParent() != BB || isa(UI)) -return false; +

[clang] [llvm] [SimplifyCFG] Extend jump-threading to allow live local defs (PR #135079)

2025-05-28 Thread via cfe-commits
@@ -3442,10 +3442,28 @@ bool SimplifyCFGOpt::speculativelyExecuteBB(BranchInst *BI, return true; } +typedef SmallPtrSet BlocksSet; LU-JOHN wrote: Changed. https://github.com/llvm/llvm-project/pull/135079 ___ cfe

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

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

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Andy Kaylor via cfe-commits
@@ -282,22 +282,15 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { cir::LoadOp createLoad(mlir::Location loc, Address addr, bool isVolatile = false) { -mlir::IntegerAttr align; -uint64_t alignment = addr.getAlignment().getQuantity()

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Andy Kaylor via cfe-commits
@@ -428,13 +422,28 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return OpBuilder::InsertPoint(block, block->begin()); }; - mlir::IntegerAttr getSizeFromCharUnits(mlir::MLIRContext *ctx, - clang::CharUnits size) { -// N

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm with a couple of nits https://github.com/llvm/llvm-project/pull/141830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver][OpenMP][SPIR-V] Fix SPIR-V OpenMP DeviceRTL expected file name (PR #141855)

2025-05-28 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/141855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Erich Keane via cfe-commits
@@ -428,13 +422,28 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return OpBuilder::InsertPoint(block, block->begin()); }; - mlir::IntegerAttr getSizeFromCharUnits(mlir::MLIRContext *ctx, - clang::CharUnits size) { -// N

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Erich Keane via cfe-commits
@@ -428,13 +422,28 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return OpBuilder::InsertPoint(block, block->begin()); }; - mlir::IntegerAttr getSizeFromCharUnits(mlir::MLIRContext *ctx, - clang::CharUnits size) { -// N

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Erich Keane via cfe-commits
@@ -428,13 +422,28 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return OpBuilder::InsertPoint(block, block->begin()); }; - mlir::IntegerAttr getSizeFromCharUnits(mlir::MLIRContext *ctx, - clang::CharUnits size) { -// N

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/141830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. what amounts to 2 nits. https://github.com/llvm/llvm-project/pull/141830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Rename -Wdeprecated-switch-case to -Wdeprecated-declarations-switch-case (PR #141779)

2025-05-28 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem closed https://github.com/llvm/llvm-project/pull/141779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f20423f - [clang] Rename -Wdeprecated-switch-case to -Wdeprecated-declarations-switch-case (#141779)

2025-05-28 Thread via cfe-commits
Author: Hans Wennborg Date: 2025-05-28T23:03:10+02:00 New Revision: f20423f496e9ceb340a3c11b54d6a7ff7e74f2bc URL: https://github.com/llvm/llvm-project/commit/f20423f496e9ceb340a3c11b54d6a7ff7e74f2bc DIFF: https://github.com/llvm/llvm-project/commit/f20423f496e9ceb340a3c11b54d6a7ff7e74f2bc.diff

[clang] [clang][Driver][OpenMP][SPIR-V] Fix SPIR-V OpenMP DeviceRTL expected file name (PR #141855)

2025-05-28 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/141855 None >From 18e18ca675a38ef6bf34a4450291ed9ebc85eb66 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 28 May 2025 14:00:46 -0700 Subject: [PATCH] [clang][Driver][OpenMP][SPIR-V] Fix SPIR-V OpenMP DeviceRT

[clang] [CIR] Update tests for global vars (PR #141854)

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

[clang] [CIR] Update testds for global vars (PR #141854)

2025-05-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/141854 >From 462dc6afb219a4005e72d516e922c1c4ab0179d9 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 28 May 2025 13:49:25 -0700 Subject: [PATCH] [CIR] Update testds for global vars This change updates a few

[clang] [CIR] Update testds for global vars (PR #141854)

2025-05-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Typo in the title (s/testds/tests/), else lgtm. https://github.com/llvm/llvm-project/pull/141854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [CIR] Update testds for global vars (PR #141854)

2025-05-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This change updates a few tests for global variable handling to also check classic codegen output so we can easily verify consistency between the two and will be alerted if the classic codegen changes. Th

[clang] [CIR] Update testds for global vars (PR #141854)

2025-05-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This change updates a few tests for global variable handling to also check classic codegen output so we can easily verify consistency between the two and will be alerted if the classic codegen changes.

[clang] [CIR] Defer declarations and tentative definitions (PR #141700)

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

[clang] b574c81 - [CIR] Defer declarations and tentative definitions (#141700)

2025-05-28 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-05-28T13:53:30-07:00 New Revision: b574c811e83a2f638714153cb2f915c625ac945c URL: https://github.com/llvm/llvm-project/commit/b574c811e83a2f638714153cb2f915c625ac945c DIFF: https://github.com/llvm/llvm-project/commit/b574c811e83a2f638714153cb2f915c625ac945c.diff L

[clang] [CIR] Update testds for global vars (PR #141854)

2025-05-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/141854 This change updates a few tests for global variable handling to also check classic codegen output so we can easily verify consistency between the two and will be alerted if the classic codegen changes. This

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/141369 >From 3a8bcd052d25d138b3a9a53bbcc69d48500b4b41 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 24 May 2025 14:18:06 +0200 Subject: [PATCH 1/5] [CIR] Upstream global initialization for ComplexType --

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-05-28 Thread Bill Wendling via cfe-commits
bwendling wrote: @efriedma-quic Okay, I'm not entirely sure I understand @erichkeane's concerns, but that's fine. Are you suggesting adding the salt information to the `FunctionType` instead? https://github.com/llvm/llvm-project/pull/141846 ___ cfe-c

[clang] [clang] Add new warning: not eliding copy on return (missed NRVO) (PR #139973)

2025-05-28 Thread Cory Fields via cfe-commits
theuni wrote: Turning this on points out a pretty surprising missed nrvo opportunity: #38674. The warning is helpful for pointing out missed opportunities in user code, but it's not of much use if it's pointing out missed opportunities for clang too :) https://github.com/llvm/llvm-project/pull

[clang] [Clang] add fix-it hints for unknown attributes (PR #141305)

2025-05-28 Thread Erich Keane via cfe-commits
@@ -7867,15 +7865,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) { void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) { std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\''; + SourceRange NR = AL.getNormalizedRange();

[clang] [Clang] add fix-it hints for unknown attributes (PR #141305)

2025-05-28 Thread Oleksandr T. via cfe-commits
@@ -7867,15 +7865,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) { void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) { std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\''; + SourceRange NR = AL.getNormalizedRange();

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-05-28 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: See #135836 for discussion of why you can't use AttributedType like this. CC @PiJoules https://github.com/llvm/llvm-project/pull/141846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [AArch64] Add missing Neon Types (PR #126945)

2025-05-28 Thread David Green via cfe-commits
davemgreen wrote: Patch up in #141850 https://github.com/llvm/llvm-project/pull/126945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remap paths in OpenMP runtime calls (#82541) (PR #141250)

2025-05-28 Thread Dan McGregor via cfe-commits
dankm wrote: If people are good with this, I don't have commit access, so I'd appreciate somebody merging. https://github.com/llvm/llvm-project/pull/141250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [OpenMP] Fix atomic compare handling with overloaded operators (PR #141142)

2025-05-28 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/141142 >From 07caec33a1113602f3d6ba79357edeae6b66647c Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 22 May 2025 16:21:34 -0500 Subject: [PATCH] [OpenMP] Fix atomic compare handling with overloaded operators

[clang] [OpenMP] Fix atomic compare handling with overloaded operators (PR #141142)

2025-05-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/Sema/SemaOpenMP.cpp clang/test/OpenMP/atomi

[clang] [OpenMP] Fix atomic compare handling with overloaded operators (PR #141142)

2025-05-28 Thread Joseph Huber via cfe-commits
@@ -12062,32 +12154,56 @@ bool OpenMPAtomicCompareCaptureChecker::checkForm3(IfStmt *S, X = BO->getLHS(); D = BO->getRHS(); - auto *Cond = dyn_cast(S->getCond()); - if (!Cond) { + if (auto *Cond = dyn_cast(S->getCond())) { +C = Cond; +if (Cond->getOpcode() != B

[clang] [OpenMP] Fix atomic compare handling with overloaded operators (PR #141142)

2025-05-28 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/141142 >From f2c18ba64744320a8e2a63938b17137a1b6e74d7 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 22 May 2025 16:21:34 -0500 Subject: [PATCH] [OpenMP] Fix atomic compare handling with overloaded operators

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-05-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Bill Wendling (bwendling) Changes The new 'cfi_salt' attribute is used to differentiate between two functions with the same type signature. It's applied to the function declaration, function definition, and function typedefs of the functi

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-05-28 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/141846 The new 'cfi_salt' attribute is used to differentiate between two functions with the same type signature. It's applied to the function declaration, function definition, and function typedefs of the function t

[clang] [Clang] add fix-it hints for unknown attributes (PR #141305)

2025-05-28 Thread Erich Keane via cfe-commits
@@ -7867,15 +7865,16 @@ void Sema::checkUnusedDeclAttributes(Declarator &D) { void Sema::DiagnoseUnknownAttribute(const ParsedAttr &AL) { std::string NormalizedFullName = '\'' + AL.getNormalizedFullName() + '\''; + SourceRange NR = AL.getNormalizedRange();

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrich Lauko (xlauko) Changes - Uses getIIntegerAttr builder method instead of explicit attribute and its type creation. - Adds few helper functions `getAlignmentAttr` to build alignment representing mlir::IntegerAttr. - Remove

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

2025-05-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Henrich Lauko (xlauko) Changes - Uses getIIntegerAttr builder method instead of explicit attribute and its type creation. - Adds few helper functions `getAlignmentAttr` to build alignment representing mlir::IntegerAttr. - Remo

[clang] [CIR] Streamline creation of mlir::IntegerAttrs using mlir::Builder (PR #141830)

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

  1   2   3   4   5   >