[clang] Fix a crash introduced by 3d5e9ab by adding a nullptr check. (PR #90301)

2024-04-28 Thread Balazs Benics via cfe-commits
@@ -54,7 +54,7 @@ class UncountedCallArgsChecker bool shouldVisitImplicitCode() const { return false; } bool TraverseDecl(Decl *D) { -if (isa(D) && isRefType(safeGetName(D))) +if (D && isa(D) && isRefType(safeGetName(D))) steakhal w

[clang] [Clang][Sema] Fix a bug on template partial specialization with issue on deduction of nontype tempalte parameter (PR #90376)

2024-04-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good to me. https://github.com/llvm/llvm-project/pull/90376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-28 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/89906 >From e87546f2bc0c7d213b6c1f2b414e0ce5335b3e47 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 24 Apr 2024 11:53:28 +0200 Subject: [PATCH 1/5] [Clang] Implement C++26 Attributes for Structured Bindings

[clang] [Clang][Sema] Fix a bug on template partial specialization with issue on deduction of nontype tempalte parameter (PR #90376)

2024-04-28 Thread Younan Zhang via cfe-commits
@@ -8508,6 +8507,16 @@ Sema::BuildExpressionFromDeclTemplateArgument(const TemplateArgument &Arg, } else { assert(ParamType->isReferenceType() && "unexpected type for decl template argument"); +if (ParamType->isLValueReferenceType()) + if (NonTypeTemp

[clang] 487967a - [Modules] Don't replace local declarations with external declaration with lower visibility

2024-04-28 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-28T15:23:39+08:00 New Revision: 487967af82053cd08022635a2ff768385d936c80 URL: https://github.com/llvm/llvm-project/commit/487967af82053cd08022635a2ff768385d936c80 DIFF: https://github.com/llvm/llvm-project/commit/487967af82053cd08022635a2ff768385d936c80.diff LO

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-28 Thread Nikolas Klauser via cfe-commits
@@ -14638,6 +14649,8 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { return true; } + case Builtin::BIfmin: + case Builtin::BIfminf: philnik777 wrote: These have to be made `constexpr`, at least in C++23. C++ stdlibs can't override th

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-28 Thread Kishan Parmar via cfe-commits
https://github.com/Long5hot updated https://github.com/llvm/llvm-project/pull/77732 >From cc5fe4a6aa4762040077ab39edb6677f42638673 Mon Sep 17 00:00:00 2001 From: Kishan Parmar Date: Sun, 28 Apr 2024 14:18:42 +0530 Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU for

[clang] [clang] Implement CWG2851: floating-point conversions in converted constant expressions (PR #90387)

2024-04-28 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/90387 https://cplusplus.github.io/CWG/issues/2851.html The only time the target type for a converted constant expression is a floating-point type is in a NTTP, so this only affects C++20+. >From 3d56657f03ab6824bf

[clang] [clang] Implement CWG2851: floating-point conversions in converted constant expressions (PR #90387)

2024-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes https://cplusplus.github.io/CWG/issues/2851.html The only time the target type for a converted constant expression is a floating-point type is in a NTTP, so this only affects C++20+. --- Full diff: https:

[clang] [clang] Implement CWG2851: floating-point conversions in converted constant expressions (PR #90387)

2024-04-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I'm fine with the way DR test is written, but I'm not qualified to review the contents on the test, unfortunately. I'd like to point to related Core issues [CWG2836](https://cplusplus.github.io/CWG/issues/2836.html) and [CWG2864](https://cplusplus.github.

[clang] [Clang][Sema] Fix a bug on template partial specialization with issue on deduction of nontype tempalte parameter (PR #90376)

2024-04-28 Thread Qizhi Hu via cfe-commits
@@ -8508,6 +8507,16 @@ Sema::BuildExpressionFromDeclTemplateArgument(const TemplateArgument &Arg, } else { assert(ParamType->isReferenceType() && "unexpected type for decl template argument"); +if (ParamType->isLValueReferenceType()) + if (NonTypeTemp

[clang] [Clang][Sema] Fix a bug on template partial specialization with issue on deduction of nontype tempalte parameter (PR #90376)

2024-04-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/90376 >From 641f3e695c4bf7cd67e9aff0e0d345b59ad88685 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 28 Apr 2024 14:24:30 +0800 Subject: [PATCH] [Clang][Sema] Fix a bug on template partial specialization with issue o

[clang] [Clang][Sema] Fix a bug on template partial specialization with issue on deduction of nontype tempalte parameter (PR #90376)

2024-04-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 37eb9c9632fb5e82827d1a0559f2279e9a9f1969 641f3e695c4bf7cd67e9aff0e0d345b59ad88685 --

[clang] [Clang][Sema] Fix a bug on template partial specialization with issue on deduction of nontype tempalte parameter (PR #90376)

2024-04-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/90376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix a bug on template partial specialization with issue on deduction of nontype tempalte parameter (PR #90376)

2024-04-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/90376 >From f28eba548ae942ab3e567e7b2550a461e8fd5eac Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 28 Apr 2024 14:24:30 +0800 Subject: [PATCH] [Clang][Sema] Fix a bug on template partial specialization with issue o

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #90389)

2024-04-28 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker created https://github.com/llvm/llvm-project/pull/90389 Such struct types: ``` struct { struct{} a; long long b; }; stuct { struct{} a; double b; }; ``` For such structures, Lo is NoClass and Hi is Integer/SSE. And when this structure argument is passed, the

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #90389)

2024-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Longsheng Mou (CoTinker) Changes Such struct types: ``` struct { struct{} a; long long b; }; stuct { struct{} a; double b; }; ``` For such structures, Lo is NoClass and Hi is Integer/SSE. And when t

[clang] [clang] Allow constexpr cast from `void*` in more cases (PR #89484)

2024-04-28 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang] Add new flag -Wpointer-integer-ordered-compare (PR #88489)

2024-04-28 Thread via cfe-commits
https://github.com/vincent-mailhol approved this pull request. As far as my understanding of the LLVM project goes, this change looks good to me. I am not an expert of this project, but regardless and for what it is worth, here is my approval (with one nitpick). https://github.com/llvm/llvm-pr

[clang] Add new flag -Wpointer-integer-ordered-compare (PR #88489)

2024-04-28 Thread via cfe-commits
@@ -245,6 +245,13 @@ Modified Compiler Flags f3 *c = (f3 *)x; } +- Added a new diagnostic flag ``-Wpointer-integer-ordered-compare`` which is + grouped under ``-Wpointer-integer-compare`` and moved previously + ungrouped diagnostics ``ext_typecheck_ordered_compa

[clang] Add new flag -Wpointer-integer-ordered-compare (PR #88489)

2024-04-28 Thread via cfe-commits
https://github.com/vincent-mailhol edited https://github.com/llvm/llvm-project/pull/88489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

2024-04-28 Thread via cfe-commits
https://github.com/luolent created https://github.com/llvm/llvm-project/pull/90391 Hi, parenthesis were added as requested on ternary operators with non trivial conditions. I used this [precedence table](https://en.cppreference.com/w/cpp/language/operator_precedence) to make sure we get the

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

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

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

2024-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-systemz @llvm/pr-subscribers-backend-amdgpu @llvm/pr-subscribers-clang Author: None (luolent) Changes Hi, parenthesis were added as requested on ternary operators with non trivial conditions. I used this [precedence table](https://en.cpprefere

[clang] [llvm] [RISCV] Add processor definition and scheduling model for XiangShan-KunMingHu (PR #90392)

2024-04-28 Thread via cfe-commits
=?utf-8?b?6YOd5bq36L6+?= Message-ID: In-Reply-To: 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" secti

[clang] [llvm] [RISCV] Add processor definition and scheduling model for XiangShan-KunMingHu (PR #90392)

2024-04-28 Thread via cfe-commits
=?utf-8?b?6YOd5bq36L6+?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Bhe6669) Changes The "XiangShan" is a high-performance open-source RISC-V processor project, and The "KunMingHu" architecture is its third generation. Official documentation can b

[clang] 367efa0 - [NFC] [Modules] Avoid scanning the stored decl list twice when replace

2024-04-28 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-28T18:31:10+08:00 New Revision: 367efa0b0542e6f4171e8c914728946c302ab24b URL: https://github.com/llvm/llvm-project/commit/367efa0b0542e6f4171e8c914728946c302ab24b DIFF: https://github.com/llvm/llvm-project/commit/367efa0b0542e6f4171e8c914728946c302ab24b.diff LO

[clang] [llvm] [RISCV] Add processor definition and scheduling model for XiangShan-KunMingHu (PR #90392)

2024-04-28 Thread Yingwei Zheng via cfe-commits
=?utf-8?b?6YOd5bq36L6+?= Message-ID: In-Reply-To: @@ -378,3 +378,31 @@ def XIANGSHAN_NANHU : RISCVProcessorModel<"xiangshan-nanhu", TuneZExtHFusion, TuneZExtWFusion,

[clang] [Modules] Process include files changes with -fmodules-validate-input-files-content and -fno-pch-timestamp options (PR #90319)

2024-04-28 Thread Ivan Murashko via cfe-commits
https://github.com/ivanmurashko updated https://github.com/llvm/llvm-project/pull/90319 >From 2a07774317c288ebe6cc55fed2fafd2989ba853e Mon Sep 17 00:00:00 2001 From: Ivan Murashko Date: Fri, 26 Apr 2024 22:45:26 +0100 Subject: [PATCH] [Modules] Process include files changes with -fmodules-vali

[clang] [llvm] [RISCV] Add processor definition and scheduling model for XiangShan-KunMingHu (PR #90392)

2024-04-28 Thread Yingwei Zheng via cfe-commits
=?utf-8?b?6YOd5bq36L6+?= Message-ID: In-Reply-To: @@ -0,0 +1,1489 @@ +//==- RISCVSchedXiangShanKunMingHu.td - XiangShanKunMingHu Scheduling Defs -*- tablegen -*-=// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/

[clang] [llvm] [RISCV] Add processor definition and scheduling model for XiangShan-KunMingHu (PR #90392)

2024-04-28 Thread Yingwei Zheng via cfe-commits
=?utf-8?b?6YOd5bq36L6+?= Message-ID: In-Reply-To: @@ -0,0 +1,1489 @@ +//==- RISCVSchedXiangShanKunMingHu.td - XiangShanKunMingHu Scheduling Defs -*- tablegen -*-=// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/

[clang] [llvm] [RISCV] Add processor definition and scheduling model for XiangShan-KunMingHu (PR #90392)

2024-04-28 Thread Yingwei Zheng via cfe-commits
=?utf-8?b?6YOd5bq36L6+?= Message-ID: In-Reply-To: @@ -0,0 +1,1489 @@ +//==- RISCVSchedXiangShanKunMingHu.td - XiangShanKunMingHu Scheduling Defs -*- tablegen -*-=// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/

[clang] [llvm] [RISCV] Add processor definition and scheduling model for XiangShan-KunMingHu (PR #90392)

2024-04-28 Thread Yingwei Zheng via cfe-commits
=?utf-8?b?6YOd5bq36L6+?= Message-ID: In-Reply-To: @@ -0,0 +1,1489 @@ +//==- RISCVSchedXiangShanKunMingHu.td - XiangShanKunMingHu Scheduling Defs -*- tablegen -*-=// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

2024-04-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: Please update the PR subject as its a lot more than just X86AsmParser.cpp https://github.com/llvm/llvm-project/pull/90391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

2024-04-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 738c135ee09de66a26805530d314c2f28d1eca02 f860432b9434c81ab55d5eded9c976edc58c3fab --

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

2024-04-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: Please address the clang-format warnings the CI has reported https://github.com/llvm/llvm-project/pull/90391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] bfd269d - [AMDGPU] Fix test failing on Windows for `ld.lld.exe`

2024-04-28 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2024-04-28T06:36:09-05:00 New Revision: bfd269d0d0d6cb58235a838eb659eef97e4f2ebf URL: https://github.com/llvm/llvm-project/commit/bfd269d0d0d6cb58235a838eb659eef97e4f2ebf DIFF: https://github.com/llvm/llvm-project/commit/bfd269d0d0d6cb58235a838eb659eef97e4f2ebf.diff

[clang] [clang] Implement CWG2851: floating-point conversions in converted constant expressions (PR #90387)

2024-04-28 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/90387 >From a87399f8a41bb7d9a61c2d44c75836d86c6b4c38 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 28 Apr 2024 09:48:47 +0100 Subject: [PATCH] [clang] Implement CWG2851: floating-point conversions in conver

[clang] [clang] Implement CWG2851: floating-point conversions in converted constant expressions (PR #90387)

2024-04-28 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/90387 >From 13e2943dea677daf8976ab55a673d43982ac8a4c Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 28 Apr 2024 09:48:47 +0100 Subject: [PATCH] [clang] Implement CWG2851: floating-point conversions in conver

[clang] [clang] Implement CWG2851: floating-point conversions in converted constant expressions (PR #90387)

2024-04-28 Thread Mital Ashok via cfe-commits
MitalAshok wrote: Waiting on #90352 because it's not on the cxx_dr_status page yet (`make_dr_status` doesn't do anything) https://github.com/llvm/llvm-project/pull/90387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

2024-04-28 Thread via cfe-commits
https://github.com/luolent updated https://github.com/llvm/llvm-project/pull/90391 >From 2a6b6a3b160ae49b20da6c8cc9f8d858ddb598eb Mon Sep 17 00:00:00 2001 From: luolent Date: Sat, 27 Apr 2024 22:17:58 +0300 Subject: [PATCH] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for cl

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

2024-04-28 Thread via cfe-commits
https://github.com/luolent updated https://github.com/llvm/llvm-project/pull/90391 >From 54c6c6b7d71f5ff293412f5f91e9f880480284f8 Mon Sep 17 00:00:00 2001 From: luolent Date: Sat, 27 Apr 2024 22:17:58 +0300 Subject: [PATCH] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for cl

[clang] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in dependent context (PR #90240)

2024-04-28 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/90240 >From 131783211a23d007b5b6f1d5691306df4dec716b Mon Sep 17 00:00:00 2001 From: yronglin Date: Sat, 27 Apr 2024 01:38:34 +0800 Subject: [PATCH 1/5] [Clang] Fix incorrect handling of #pragma {GCC} unroll N in depe

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-28 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/89942 >From 8c5f1d0f92d77bffec88759c19133a0bac130f32 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 24 Apr 2024 23:36:10 +0800 Subject: [PATCH 1/7] [Clang] Implement P2748R5 "Disallow Binding a Returned Glvalue t

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe created https://github.com/llvm/llvm-project/pull/90397 Add a new clang-tidy check that converts absl::StrFormat (and similar functions) to std::format (and similar functions.) Split the configuration of FormatStringConverter out to a separate Configuration class

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Mike Crowe via cfe-commits
mikecrowe wrote: This check was originally proposed and reviewed at https://reviews.llvm.org/D154287 last year but never landed since I did not (and still do not) have commit access. Near the end of that review, @PiotrZSL wrote: > To be honest, I do not see to much use case for this check. But

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Mike Crowe (mikecrowe) Changes Add a new clang-tidy check that converts absl::StrFormat (and similar functions) to std::format (and similar functions.) Split the configuration of FormatStringConverter out to a separate Configuration

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Mike Crowe (mikecrowe) Changes Add a new clang-tidy check that converts absl::StrFormat (and similar functions) to std::format (and similar functions.) Split the configuration of FormatStringConverter out to a separate Config

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread via cfe-commits
@@ -0,0 +1,50 @@ +//===--- UseStdFormatCheck.h - clang-tidy ---*- 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: Apa

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

2024-04-28 Thread via cfe-commits
luolent wrote: > Please update the PR subject as its a lot more than just X86AsmParser.cpp Hi @RKSimon All the issues mentioned are fixed. The tile of the PR is misleading. The title is the same as the issue (#85868) it corresponds to. Got a look to other PR's and I thought that this is the u

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/90397 >From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sun, 28 Apr 2024 12:41:46 +0100 Subject: [PATCH 1/2] [clang-tidy] Add modernize-use-std-format check Add a new cla

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

2024-04-28 Thread Mehdi Amini via cfe-commits
joker-eph wrote: PR should be named according to what they are actually achieving, I'm not sure why the GitHub issue title is relevant? https://github.com/llvm/llvm-project/pull/90391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/89796 >From 662f160418c704f45e57e751168903d774b74303 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 23 Apr 2024 17:41:25 +0100 Subject: [PATCH 1/4] Add initial support for AMDGCN flavoured SPIRV. --- clang/lib/

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/89796 >From 662f160418c704f45e57e751168903d774b74303 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 23 Apr 2024 17:41:25 +0100 Subject: [PATCH 1/5] Add initial support for AMDGCN flavoured SPIRV. --- clang/lib/

[clang] [clang-repl] fix top-level statement declaration context (PR #75547)

2024-04-28 Thread Pavel Kalugin via cfe-commits
p4vook wrote: Looking for someone with knowledge of Clang AST, because I can't figure out the correct context to insert the statement into. Current implementation breaks "for" loop. https://github.com/llvm/llvm-project/pull/75547 ___ cfe-commits mail

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Joseph Huber via cfe-commits
@@ -673,8 +673,12 @@ std::unique_ptr AllocateTarget(const llvm::Triple &Triple, } case llvm::Triple::spirv64: { if (os != llvm::Triple::UnknownOS || -Triple.getEnvironment() != llvm::Triple::UnknownEnvironment) +Triple.getEnvironment() != llvm::Triple::

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Joseph Huber via cfe-commits
@@ -54,3 +56,77 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions &Opts, BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder); DefineStd(Builder, "SPIRV64", Opts); } + +namespace { +const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {}); + +} //

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Joseph Huber via cfe-commits
@@ -54,3 +56,77 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions &Opts, BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder); DefineStd(Builder, "SPIRV64", Opts); } + +namespace { +const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {}); + +} //

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,108 @@ +//===--- UseStdFormatCheck.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-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. To be honest I'm not sure why it wasn't merged, there were some dependences on other changes and modernize-use-std-print check, and somehow it fall under radar. Overall looks fine. Please fix pointed out nits that pop up. https://github.

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/90397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,108 @@ +//===--- UseStdFormatCheck.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-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Piotr Zegar via cfe-commits
@@ -627,7 +628,8 @@ void FormatStringConverter::finalizeFormatText() { // It's clearer to convert printf("Hello\r\n"); to std::print("Hello\r\n") // than to std::println("Hello\r"); - if (StringRef(StandardFormatString).ends_with("\\n") && + if (Config.AllowTrailingNewli

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,84 @@ +.. title:: clang-tidy - modernize-use-std-format + +modernize-use-std-format + + +Converts calls to ``absl::StrFormat``, or other functions via +configuration options, to C++20's ``std::format``, or another function +via a configuration op

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,48 @@ +//===--- UseStdFormatCheck.h - clang-tidy ---*- 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: Apa

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,97 @@ +// RUN: %check_clang_tidy \ +// RUN: -std=c++20 %s modernize-use-std-format %t -- \ +// RUN: -config="{CheckOptions: [{key: StrictMode, value: true}]}" \ +// RUN: -- -isystem %clang_tidy_headers +// RUN: %check_clang_tidy \ +// RUN: -std=c++20 %s moderniz

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Alex Voicu via cfe-commits
@@ -54,3 +56,77 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions &Opts, BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder); DefineStd(Builder, "SPIRV64", Opts); } + +namespace { +const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {}); + +} //

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/89796 >From 662f160418c704f45e57e751168903d774b74303 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 23 Apr 2024 17:41:25 +0100 Subject: [PATCH 1/6] Add initial support for AMDGCN flavoured SPIRV. --- clang/lib/

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Joseph Huber via cfe-commits
@@ -6088,6 +6088,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, StringRef Prefix = llvm::Triple::getArchTypePrefix(getTarget().getTriple().getArch()); if (!Prefix.empty()) { +if (Prefix == "spv" && +getTarget().getTr

[clang] [lld] [llvm] [MachineOutliner][CGData] Append Content Hash To Outlined Function Name (PR #90400)

2024-04-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 b6824c9d459da059e247a60c1ebd1aeb580dacc2 6186c576e8ebfb80af7a58c6d8d24ca0f7277ade --

[clang] [lld] [llvm] Leaf + cgdata (PR #90401)

2024-04-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 b6824c9d459da059e247a60c1ebd1aeb580dacc2 9b99b234ef4edb68fc6d9734595d53685e16927c --

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/90397 >From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Sun, 28 Apr 2024 12:41:46 +0100 Subject: [PATCH 1/8] [clang-tidy] Add modernize-use-std-format check Add a new cla

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Mike Crowe via cfe-commits
@@ -0,0 +1,97 @@ +// RUN: %check_clang_tidy \ +// RUN: -std=c++20 %s modernize-use-std-format %t -- \ +// RUN: -config="{CheckOptions: [{key: StrictMode, value: true}]}" \ +// RUN: -- -isystem %clang_tidy_headers +// RUN: %check_clang_tidy \ +// RUN: -std=c++20 %s moderniz

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Mike Crowe via cfe-commits
@@ -0,0 +1,108 @@ +//===--- UseStdFormatCheck.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] 8ad092f - [cc1as] Respect -mrelax-all

2024-04-28 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-04-28T09:42:43-07:00 New Revision: 8ad092f126bd1d6f9fe6006eba1e3115a080235e URL: https://github.com/llvm/llvm-project/commit/8ad092f126bd1d6f9fe6006eba1e3115a080235e DIFF: https://github.com/llvm/llvm-project/commit/8ad092f126bd1d6f9fe6006eba1e3115a080235e.diff

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Alex Voicu via cfe-commits
@@ -6088,6 +6088,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, StringRef Prefix = llvm::Triple::getArchTypePrefix(getTarget().getTriple().getArch()); if (!Prefix.empty()) { +if (Prefix == "spv" && +getTarget().getTr

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Joseph Huber via cfe-commits
@@ -6088,6 +6088,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, StringRef Prefix = llvm::Triple::getArchTypePrefix(getTarget().getTriple().getArch()); if (!Prefix.empty()) { +if (Prefix == "spv" && +getTarget().getTr

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Alex Voicu via cfe-commits
@@ -6088,6 +6088,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, StringRef Prefix = llvm::Triple::getArchTypePrefix(getTarget().getTriple().getArch()); if (!Prefix.empty()) { +if (Prefix == "spv" && +getTarget().getTr

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-04-28 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,60 @@ +// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions + +struct exception {}; + +void correct() { + try { + throw exception(); + } catch(const exception &) { + throw; + } +} + +void correct2() { + try { + throw exception

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-04-28 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,50 @@ +//===--- ExceptionRethrowCheck.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: Apa

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-04-28 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,37 @@ +//===--- ExceptionRethrowCheck.h - clang-tidy ---*- 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: Apa

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-04-28 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,50 @@ +//===--- ExceptionRethrowCheck.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: Apa

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-04-28 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,50 @@ +//===--- ExceptionRethrowCheck.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: Apa

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-04-28 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,50 @@ +//===--- ExceptionRethrowCheck.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: Apa

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-04-28 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/86448 >From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sun, 24 Mar 2024 18:39:54 + Subject: [PATCH 1/4] [clang-tidy] Added bugprone-exception-rethrow check Identifie

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Joseph Huber via cfe-commits
@@ -309,7 +309,45 @@ StringRef AMDGPU::getCanonicalArchName(const Triple &T, StringRef Arch) { void AMDGPU::fillAMDGPUFeatureMap(StringRef GPU, const Triple &T, StringMap &Features) { // XXX - What does the member GPU mean if device name str

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Alex Voicu via cfe-commits
@@ -309,7 +309,45 @@ StringRef AMDGPU::getCanonicalArchName(const Triple &T, StringRef Arch) { void AMDGPU::fillAMDGPUFeatureMap(StringRef GPU, const Triple &T, StringMap &Features) { // XXX - What does the member GPU mean if device name str

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Joseph Huber via cfe-commits
@@ -309,7 +309,45 @@ StringRef AMDGPU::getCanonicalArchName(const Triple &T, StringRef Arch) { void AMDGPU::fillAMDGPUFeatureMap(StringRef GPU, const Triple &T, StringMap &Features) { // XXX - What does the member GPU mean if device name str

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Joseph Huber via cfe-commits
@@ -54,3 +56,76 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions &Opts, BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder); DefineStd(Builder, "SPIRV64", Opts); } + +static const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {}); + +ArrayRef S

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Alex Voicu via cfe-commits
@@ -54,3 +56,76 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions &Opts, BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder); DefineStd(Builder, "SPIRV64", Opts); } + +static const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {}); + +ArrayRef S

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Joseph Huber via cfe-commits
@@ -54,3 +56,76 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions &Opts, BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder); DefineStd(Builder, "SPIRV64", Opts); } + +static const AMDGPUTargetInfo AMDGPUTI(llvm::Triple("amdgcn-amd-amdhsa"), {}); + +ArrayRef S

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-28 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. LG https://github.com/llvm/llvm-project/pull/89796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6dd9061 - [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (#89906)

2024-04-28 Thread via cfe-commits
Author: cor3ntin Date: 2024-04-28T20:25:44+02:00 New Revision: 6dd90616c477d83c156eed62c880e951bb508cfd URL: https://github.com/llvm/llvm-project/commit/6dd90616c477d83c156eed62c880e951bb508cfd DIFF: https://github.com/llvm/llvm-project/commit/6dd90616c477d83c156eed62c880e951bb508cfd.diff LOG:

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-28 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/89906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Return early in isWordLike() for non-Verilog (PR #90363)

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

[clang] [clang-format] Set Change.TokenLength to ColumnWidth (PR #90378)

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

[clang-tools-extra] [clang-tidy] Ignore unevaluated context in bugprone-optional-value-conversion (PR #90410)

2024-04-28 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/90410 Ignore optionals in unevaluated context, like static_assert or decltype. Closes #89593 >From 7dcbe220d74f2be4ade8429e6c0e710d7d7c58a4 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sun, 28 Apr 2024 19:16:43

[clang-tools-extra] [clang-tidy] Ignore unevaluated context in bugprone-optional-value-conversion (PR #90410)

2024-04-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes Ignore optionals in unevaluated context, like static_assert or decltype. Closes #89593 --- Full diff: https://github.com/llvm/llvm-project/pull/90410.diff 3 Files Affected: - (modified) clang-tools-

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny approved this pull request. Only a few nits concerning non-functional code/text. Other than that LGTM. https://github.com/llvm/llvm-project/pull/90397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang-tools-extra] [clang-tidy] Add modernize-use-std-format check (PR #90397)

2024-04-28 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny edited https://github.com/llvm/llvm-project/pull/90397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >