[clang] [TargetVersion] Only enable on RISC-V and AArch64 (PR #115991)

2024-11-13 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/115991 >From 28f7a2adc055ec6f30790e1e9535c71241a08e29 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Tue, 12 Nov 2024 20:56:47 -0800 Subject: [PATCH 1/3] [TargetVersion] Only enable on RISC-V and AArch64 --- clang/inclu

[clang] [clang] Catch missing format attributes (PR #105479)

2024-11-13 Thread Budimir Aranđelović via cfe-commits
@@ -0,0 +1,251 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c_diagnostics -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -Wmissing-format-attribute -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -x c++ -verify=ex

[clang] [clang] Catch missing format attributes (PR #105479)

2024-11-13 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovichtec updated https://github.com/llvm/llvm-project/pull/105479 From 3d7798af7e6341b9655b9b98c7053c4478ab9a9c Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribute

[clang] Revert "[Fuchsia][CMake] Enable new libc header gen" (PR #116174)

2024-11-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes Reverts llvm/llvm-project#102371 --- Full diff: https://github.com/llvm/llvm-project/pull/116174.diff 1 Files Affected: - (modified) clang/cmake/caches/Fuchsia-stage2.cmake (+4-2) ``diff diff --

[clang] Revert "[Fuchsia][CMake] Enable new libc header gen" (PR #116174)

2024-11-13 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/116174 Reverts llvm/llvm-project#102371 >From be995b825da9c12c8fead48d2e5ba575f154bddf Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 13 Nov 2024 23:32:07 -0800 Subject: [PATCH] Revert "[Fuchsia][CMake] Enable

[clang] Revert "[Fuchsia][CMake] Enable new libc header gen" (PR #116174)

2024-11-13 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/116174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 627b8f8 - Revert "[Fuchsia][CMake] Enable new libc header gen" (#116174)

2024-11-13 Thread via cfe-commits
Author: Petr Hosek Date: 2024-11-13T23:32:20-08:00 New Revision: 627b8f87e2c499c62df2e9bd6048f795fd085545 URL: https://github.com/llvm/llvm-project/commit/627b8f87e2c499c62df2e9bd6048f795fd085545 DIFF: https://github.com/llvm/llvm-project/commit/627b8f87e2c499c62df2e9bd6048f795fd085545.diff LO

[clang] [MS] Add /Zc:tlsGuards option to control tls guard emission (PR #113830)

2024-11-13 Thread Maurice Heumann via cfe-commits
momo5502 wrote: > LGTM Thanks, would you mind merging it for me please https://github.com/llvm/llvm-project/pull/113830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Print the PostInitializer target in exploded-graph-rewriter (PR #116034)

2024-11-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/116034 >From 7faee31bc4bc0b1a9fd037a99f54856c84affc91 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Wed, 13 Nov 2024 12:55:06 +0100 Subject: [PATCH 1/2] [analyzer] Print the PostInitializer target in exploded-gr

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2024-11-13 Thread Chris Copeland via cfe-commits
@@ -311,11 +311,15 @@ ARMBaseTargetMachine::getSubtargetImpl(const Function &F) const { // function that reside in TargetOptions. resetTargetOptions(F); I = std::make_unique(TargetTriple, CPU, FS, *this, isLittle, -F.hasMinSi

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2024-11-13 Thread Chris Copeland via cfe-commits
chrisnc wrote: > There's quite a lot of test changes that I presume needed to make FWIW, virtually all of the test changes were due to cases where LLVM would silently use soft-float despite the hard-float ABI being explicitly requested, which is exactly the incorrect behavior that this PR is m

[clang] [HLSL] Add empty struct test cases to `__builtin_hlsl_is_typed_resource_element_compatible` test file (PR #115045)

2024-11-13 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/115045 >From ef4a7eea3eacce4f77b628aebe7f2838733971d0 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 5 Nov 2024 10:35:59 -0800 Subject: [PATCH 1/7] add empty struct test cases --- .../SemaHLSL/Types/Traits

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2024-11-13 Thread Chris Copeland via cfe-commits
@@ -459,9 +459,6 @@ def warn_drv_assuming_mfloat_abi_is : Warning< def warn_drv_unsupported_float_abi_by_lib : Warning< "float ABI '%0' is not supported by current library">, InGroup; -def warn_drv_no_floating_point_registers: Warning< chrisnc wrote: `-Wun

[clang-tools-extra] [clang-tidy] Improved readability redundant casting with enums (PR #111424)

2024-11-13 Thread Congcong Cai via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: https://github.com/HerrCai0907 commented: Is it really a false negative? In another word, does `enum E1 : char {};` mean `E1` is the type alias of `char`? I

[clang] [TargetVersion] Only enable on RISC-V and AArch64 (PR #115991)

2024-11-13 Thread Piyou Chen via cfe-commits
BeMg wrote: Update: 1. Add the testcase 2. in this target -> on this target https://github.com/llvm/llvm-project/pull/115991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Remove unused includes (NFC) (PR #116168)

2024-11-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Identified with misc-include-cleaner. --- Full diff: https://github.com/llvm/llvm-project/pull/116168.diff 11 Files Affected: - (modified) clang/utils/TableGen/ASTTableGen.cpp (+1-2) - (modified) c

[clang] [TableGen] Remove unused includes (NFC) (PR #116168)

2024-11-13 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/116168 Identified with misc-include-cleaner. >From 94726c689ccf54e3117e188b141b2af39703fc92 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 13 Nov 2024 21:50:50 -0800 Subject: [PATCH] [TableGen] Remove u

[clang] 813f7c3 - [X86][AMX] Support AMX-TRANSPOSE, part 2 (#115660)

2024-11-13 Thread via cfe-commits
Author: Phoebe Wang Date: 2024-11-14T13:51:04+08:00 New Revision: 813f7c3820d00349fe23bfc6ba26159764541540 URL: https://github.com/llvm/llvm-project/commit/813f7c3820d00349fe23bfc6ba26159764541540 DIFF: https://github.com/llvm/llvm-project/commit/813f7c3820d00349fe23bfc6ba26159764541540.diff L

[clang] [llvm] [X86][AMX] Support AMX-TRANSPOSE, part 2 (PR #115660)

2024-11-13 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/115660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AMX] Support AMX-TRANSPOSE, part 2 (PR #115660)

2024-11-13 Thread Feng Zou via cfe-commits
https://github.com/fzou1 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/115660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d492001 - [Fuchsia][CMake] Enable new libc header gen (#102371)

2024-11-13 Thread via cfe-commits
Author: Petr Hosek Date: 2024-11-13T11:45:54-08:00 New Revision: d492001bdcd7bfcd19ada7459a6b0eaf81ba3ba2 URL: https://github.com/llvm/llvm-project/commit/d492001bdcd7bfcd19ada7459a6b0eaf81ba3ba2 DIFF: https://github.com/llvm/llvm-project/commit/d492001bdcd7bfcd19ada7459a6b0eaf81ba3ba2.diff LO

[clang] 2283d50 - [LoongArch] add la v1.1 features for sys::getHostCPUFeatures (#115832)

2024-11-13 Thread via cfe-commits
Author: tangaac Date: 2024-11-14T11:25:32+08:00 New Revision: 2283d50447369fc576eced8aca1cf0f54bdc235b URL: https://github.com/llvm/llvm-project/commit/2283d50447369fc576eced8aca1cf0f54bdc235b DIFF: https://github.com/llvm/llvm-project/commit/2283d50447369fc576eced8aca1cf0f54bdc235b.diff LOG:

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread John McCall via cfe-commits
@@ -697,45 +699,21 @@ class Qualifiers { /// every address space is a superset of itself. /// CL2.0 adds: /// __generic is a superset of any address space except for __constant. - static bool isAddressSpaceSupersetOf(LangAS A, LangAS B) { -// Address spaces must

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/115777 >From 23a8d5af0ab181814885bca6ab6494be9d71f59b Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 13 Nov 2024 18:14:05 -0600 Subject: [PATCH 1/4] use ASTContext --- .../bugprone/VirtualNearMissCheck.cpp

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread Joseph Huber via cfe-commits
@@ -697,45 +699,21 @@ class Qualifiers { /// every address space is a superset of itself. /// CL2.0 adds: /// __generic is a superset of any address space except for __constant. - static bool isAddressSpaceSupersetOf(LangAS A, LangAS B) { -// Address spaces must

[clang] [llvm] [LoongArch] add la v1.1 features for sys::getHostCPUFeatures (PR #115832)

2024-11-13 Thread Lu Weining via cfe-commits
https://github.com/SixWeining closed https://github.com/llvm/llvm-project/pull/115832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LoongArch] add la v1.1 features for sys::getHostCPUFeatures (PR #115832)

2024-11-13 Thread Lu Weining via cfe-commits
https://github.com/SixWeining edited https://github.com/llvm/llvm-project/pull/115832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I'm not sure what unrelated code you're saying would need to pulled into a > .cpp file. It looks like there's only one actual call to > `TI.isAddressSpaceSupersetOf`, so if you just pass around an `ASTContext &` > to that point, nothing else will need to drill into it. And fra

[clang] [llvm] [LoongArch] add la v1.1 features for sys::getHostCPUFeatures (PR #115832)

2024-11-13 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. LGTM. Tips: It's not necessary to use force-push to address review comments. Add new commits and they will be squashed when merge. https://github.com/llvm/llvm-project/pull/115832 ___ cfe-commi

[clang] [llvm] [LoongArch] add la v1.1 features for sys::getHostCPUFeatures (PR #115832)

2024-11-13 Thread via cfe-commits
https://github.com/tangaac updated https://github.com/llvm/llvm-project/pull/115832 >From 206bfe8e5e504620c1cd089298a2fedf8c4f3d23 Mon Sep 17 00:00:00 2001 From: tangaac Date: Tue, 12 Nov 2024 16:31:57 +0800 Subject: [PATCH 1/2] add la v1.1 features for sys::getHostCPUFeatures --- clang/lib/D

[clang] [llvm] [LoongArch] add la v1.1 features for sys::getHostCPUFeatures (PR #115832)

2024-11-13 Thread via cfe-commits
@@ -14,6 +14,7 @@ #include "clang/Driver/Options.h" #include "llvm/TargetParser/Host.h" #include "llvm/TargetParser/LoongArchTargetParser.h" +#include tangaac wrote: It's added automatically by the lsp clangd, I will delete it. https://github.com/llvm/llvm-p

[clang] [llvm] [LoongArch] add la v1.1 features for sys::getHostCPUFeatures (PR #115832)

2024-11-13 Thread Lu Weining via cfe-commits
@@ -14,6 +14,7 @@ #include "clang/Driver/Options.h" #include "llvm/TargetParser/Host.h" #include "llvm/TargetParser/LoongArchTargetParser.h" +#include SixWeining wrote: Is this header necessary? https://github.com/llvm/llvm-project/pull/115832 __

[clang] [clang][docs] Revise documentation for `__builtin_reduce_(max|min)`. (PR #114637)

2024-11-13 Thread via cfe-commits
https://github.com/c8ef closed https://github.com/llvm/llvm-project/pull/114637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Rename CODE_OWNERS -> Maintainers (PR #114544)

2024-11-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/114544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6e614e1 - [clang][docs] Revise documentation for `__builtin_reduce_(max|min)`. (#114637)

2024-11-13 Thread via cfe-commits
Author: c8ef Date: 2024-11-14T09:28:51+08:00 New Revision: 6e614e11df6a152082b51a1b18332cb8730a4032 URL: https://github.com/llvm/llvm-project/commit/6e614e11df6a152082b51a1b18332cb8730a4032 DIFF: https://github.com/llvm/llvm-project/commit/6e614e11df6a152082b51a1b18332cb8730a4032.diff LOG: [cl

[clang-tools-extra] [clang-tidy] Fix false positive in cppcoreguidelines-avoid-const-or-ref-data-members when detecting templated classes with inheritance (PR #115180)

2024-11-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/115180 >From 428283c7b61ca50d40ffd3ddc5c08aca39f39533 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 7 Nov 2024 00:35:47 +0800 Subject: [PATCH 1/2] [clang-tidy] fix false positive when detecting templated

[clang-tools-extra] [clang-tidy] Fix false positive in cppcoreguidelines-avoid-const-or-ref-data-members when detecting templated classes with inheritance (PR #115180)

2024-11-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/115180 >From 428283c7b61ca50d40ffd3ddc5c08aca39f39533 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 7 Nov 2024 00:35:47 +0800 Subject: [PATCH 1/2] [clang-tidy] fix false positive when detecting templated

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-13 Thread Eli Friedman via cfe-commits
@@ -8732,6 +8732,18 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { } } + // zero sized static arrays are not allowed in HIP device functions + if (getLangOpts().HIP && + DeclAttrsMatchCUDAMode(getLangOpts(), getCurFunctionDecl())) {

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-13 Thread Vigneshwar Jayakumar via cfe-commits
@@ -8732,6 +8732,18 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { } } + // zero sized static arrays are not allowed in HIP device functions + if (getLangOpts().HIP && + DeclAttrsMatchCUDAMode(getLangOpts(), getCurFunctionDecl())) {

[clang] [llvm] [LoongArch] add la v1.1 features for sys::getHostCPUFeatures (PR #115832)

2024-11-13 Thread via cfe-commits
https://github.com/tangaac updated https://github.com/llvm/llvm-project/pull/115832 >From 206bfe8e5e504620c1cd089298a2fedf8c4f3d23 Mon Sep 17 00:00:00 2001 From: tangaac Date: Tue, 12 Nov 2024 16:31:57 +0800 Subject: [PATCH 1/2] add la v1.1 features for sys::getHostCPUFeatures --- clang/lib/D

[clang] [analyzer][Solver] Early return if sym is concrete on assuming (PR #115579)

2024-11-13 Thread Ding Fei via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_analyze_cc1 %s \ +// RUN: -analyzer-checker=debug.ExprInspection \ +// RUN: -verify + +void clang_analyzer_eval(int); + +void test_derived_sym_simplification_on_assume(int s0, int s1) { + int elem = s0 + s1 + 1; + if (elem-- == 0) // elem = s

[clang] [WebKit checkers] Treat ref() and incrementCheckedPtrCount() as trivial (PR #115695)

2024-11-13 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/115695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP][OMPIRBuilder] Handle non-failing calls properly (PR #115863)

2024-11-13 Thread Michael Kruse via cfe-commits
@@ -345,18 +344,15 @@ TEST_F(OpenMPIRBuilderTest, CreateBarrier) { IRBuilder<> Builder(BB); - OpenMPIRBuilder::InsertPointOrErrorTy BarrierIP1 = - OMPBuilder.createBarrier({IRBuilder<>::InsertPoint()}, OMPD_for); - assert(BarrierIP1 && "unexpected error"); + ASSERT_

[clang] [WebKit checkers] Treat ref() and incrementCheckedPtrCount() as trivial (PR #115695)

2024-11-13 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/115695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Allow fast math flags on fptrunc and fpext (PR #115894)

2024-11-13 Thread Yingwei Zheng via cfe-commits
@@ -1875,13 +1873,17 @@ Instruction *InstCombinerImpl::visitFPTrunc(FPTruncInst &FPT) { // fptrunc (select Cond, (fpext X), Y --> select Cond, X, (fptrunc Y) Value *NarrowY = Builder.CreateFPTrunc(Y, Ty); Value *Sel = Builder.CreateSelect(Cond, X, NarrowY, "n

[clang-tools-extra] [clang-tidy][modernize-use-starts-ends-with] Fix minor mistake in error message (PR #116132)

2024-11-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nicolas van Kempen (nicovank) Changes In one of the cases recently added to this check in #110448, the error message is no longer accurate as the comparison is not with zero. #116033 brought my attention to this as it may add

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread John McCall via cfe-commits
@@ -697,45 +699,21 @@ class Qualifiers { /// every address space is a superset of itself. /// CL2.0 adds: /// __generic is a superset of any address space except for __constant. - static bool isAddressSpaceSupersetOf(LangAS A, LangAS B) { -// Address spaces must

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/115777 >From 23a8d5af0ab181814885bca6ab6494be9d71f59b Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 13 Nov 2024 18:14:05 -0600 Subject: [PATCH 1/3] use ASTContext --- .../bugprone/VirtualNearMissCheck.cpp

[clang] [analyzer][Solver] Early return if sym is concrete on assuming (PR #115579)

2024-11-13 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/115579 >From 19b47c6ad25453c6be74bfd4cbdb7bc7eeed401c Mon Sep 17 00:00:00 2001 From: dingfei Date: Sat, 9 Nov 2024 10:28:59 +0800 Subject: [PATCH 1/3] [StaticAnalyzer] early return if sym is concrete on assuming Thi

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/115777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-13 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > @vitalybuka any idea how lldb-server is failing with `UNRESOLVED`? How in the > world are any of the changes here affecting lldb-server? flake? https://github.com/llvm/llvm-project/pull/107332 ___ cfe-commits mailing list cfe-comm

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread John McCall via cfe-commits
@@ -17,34 +17,34 @@ #include "clang/Basic/TargetInfo.h" #include "clang/Basic/TargetOptions.h" #include "llvm/Support/Compiler.h" +#include "llvm/Support/NVPTXAddrSpace.h" #include "llvm/TargetParser/Triple.h" #include namespace clang { namespace targets { static cons

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/115777 >From 23a8d5af0ab181814885bca6ab6494be9d71f59b Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 13 Nov 2024 18:14:05 -0600 Subject: [PATCH 1/2] use ASTContext --- .../bugprone/VirtualNearMissCheck.cpp

[clang-tools-extra] [clang-tidy][modernize-use-starts-ends-with] Fix minor mistake in error message (PR #116132)

2024-11-13 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank created https://github.com/llvm/llvm-project/pull/116132 In one of the cases recently added to this check in #110448, the error message is no longer accurate as the comparison is not with zero. #116033 brought my attention to this as it may add another comparison w

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread John McCall via cfe-commits
@@ -31,6 +31,7 @@ namespace clang { template class CanProxy; template struct CanProxyAdaptor; class CXXRecordDecl; +class ASTContext; rjmccall wrote: Minor nit: these are alphabetized. https://github.com/llvm/llvm-project/pull/115777 _

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: Broadly LGTM. A few structural requests. https://github.com/llvm/llvm-project/pull/115777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Remove requires system-linux from some driver tests (PR #111976)

2024-11-13 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/111976 >From 7391edf32b0d745a7d57bee5ee2cec8520b646a5 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 11 Oct 2024 14:33:32 +0400 Subject: [PATCH 01/10] clang: Remove requires system-linux from some driver test

[clang] [llvm] [OpenMP][OMPIRBuilder] Handle non-failing calls properly (PR #115863)

2024-11-13 Thread Michael Kruse via cfe-commits
@@ -235,10 +235,9 @@ class OpenMPIRBuilderTest : public testing::Test { return Error::success(); }; -Expected LoopResult = -OMPBuilder.createCanonicalLoop(Loc, LoopBodyGenCB, CastedTripCount); -assert(LoopResult && "unexpected error"); -CanonicalL

[clang] 73b577c - [WebKit checkers] Treat ref() and incrementCheckedPtrCount() as trivial (#115695)

2024-11-13 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-11-13T16:28:01-08:00 New Revision: 73b577cc8c8a8ceeac87de5953a2c643e125d43e URL: https://github.com/llvm/llvm-project/commit/73b577cc8c8a8ceeac87de5953a2c643e125d43e DIFF: https://github.com/llvm/llvm-project/commit/73b577cc8c8a8ceeac87de5953a2c643e125d43e.diff

[clang] [WebKit checkers] Treat ref() and incrementCheckedPtrCount() as trivial (PR #115695)

2024-11-13 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/115695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Oh, you can just forward-declare `class ASTContext` at the top of that file. > It's funny that that isn't already there. Done, and a sema test. https://github.com/llvm/llvm-project/pull/115777 ___ cfe-commits mailing list cfe-commits

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/115777 >From 23a8d5af0ab181814885bca6ab6494be9d71f59b Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 13 Nov 2024 18:14:05 -0600 Subject: [PATCH] use ASTContext --- .../bugprone/VirtualNearMissCheck.cpp

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/115777 >From bc76c323aefe52b019375cf3a3227223e2d97133 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 13 Nov 2024 18:14:05 -0600 Subject: [PATCH] use ASTContext --- .../bugprone/VirtualNearMissCheck.cpp

[clang] [HLSL] get inout/out ABI for array parameters working (PR #111047)

2024-11-13 Thread Chris B via cfe-commits
@@ -5322,6 +5324,11 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, IRCallArgs[FirstIRArg] = Val; break; } + } else if (I->getType()->isArrayParameterType()) { +// use the tmp created by the HLSLOutArgExpr +/

[libunwind] [libunwind][Haiku] Improve support (PR #115462)

2024-11-13 Thread Brad Smith via cfe-commits
brad0 wrote: cc @MaskRay https://github.com/llvm/llvm-project/pull/115462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] adfa6b7 - Document that the lifetime of the caller-side `trivial_abi` parameter ends before the call. (#116100)

2024-11-13 Thread via cfe-commits
Author: Richard Smith Date: 2024-11-13T15:38:44-08:00 New Revision: adfa6b762dc53bc53377785d824264a3311e829d URL: https://github.com/llvm/llvm-project/commit/adfa6b762dc53bc53377785d824264a3311e829d DIFF: https://github.com/llvm/llvm-project/commit/adfa6b762dc53bc53377785d824264a3311e829d.diff

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-13 Thread Eli Friedman via cfe-commits
@@ -8732,6 +8732,18 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { } } + // zero sized static arrays are not allowed in HIP device functions + if (getLangOpts().HIP && + DeclAttrsMatchCUDAMode(getLangOpts(), getCurFunctionDecl())) {

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/115777 >From 1e400acbd574703adcebd704c53991427815b090 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 12 Nov 2024 11:20:19 -0600 Subject: [PATCH 1/2] [Clang] Use TargetInfo when deciding is an address space is

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread John McCall via cfe-commits
rjmccall wrote: Oh, you can just forward-declare `class ASTContext` at the top of that file. It's funny that that isn't already there. https://github.com/llvm/llvm-project/pull/115777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] Document that the lifetime of the caller-side `trivial_abi` parameter ends before the call. (PR #116100)

2024-11-13 Thread Richard Smith via cfe-commits
https://github.com/zygoloid closed https://github.com/llvm/llvm-project/pull/116100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-11-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/115051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-11-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 requested changes to this pull request. I don't think it is a good way to suppress all warning when we find gtest macro. 1. it will confuse user who really want to check even in test file. 2. the user can disable this rules in test folder or even use nolint the test

[clang] [Clang] add single quotes around __builtin_bit_cast (PR #116120)

2024-11-13 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman should the release notes be updated for such a minor change? https://github.com/llvm/llvm-project/pull/116120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [Clang] add single quotes around __builtin_bit_cast (PR #116120)

2024-11-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes https://github.com/llvm/llvm-project/issues/116118 --- Full diff: https://github.com/llvm/llvm-project/pull/116120.diff 2 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticSemaKinds

[clang] [Clang] add single quotes around __builtin_bit_cast (PR #116120)

2024-11-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/116120 Fixes https://github.com/llvm/llvm-project/issues/116118 >From d93fd0c7e9bceb7c4725cebc01375dd16d9ef58d Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 14 Nov 2024 01:35:28 +0200 Subject: [PATCH] [Clan

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-11-13 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti requested changes to this pull request. I don't think we can ignore a TU simply because it has the Google Test header included, which this will do. This would ignore real problems, such as ```c++ #include #include void issue(const absl::optional &opt) { if (!opt.

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread John McCall via cfe-commits
rjmccall wrote: I'm not sure what you're saying would need to pulled into a .cpp file. It looks like there's only one actual call to `TI.isAddressSpaceSupersetOf`, so if you just pass around an `ASTContext &` to that point, nothing else will need to drill into it. And frankly that entire exp

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/115777 >From 1e400acbd574703adcebd704c53991427815b090 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 12 Nov 2024 11:20:19 -0600 Subject: [PATCH] [Clang] Use TargetInfo when deciding is an address space is comp

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > Okay the problem with using `ASTContext` here is that it creates some > > recursive includes. ~I can do this by moving the check into `Type.cpp` > > instead, so this will be function call instead of being inlined.~ This > > would require a lot of extra stuff so I'm going to

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-11-13 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Apologies for the late response, I don't have much time to perform in-depth reviews. Tagging additional reviewers @5chmidti @HerrCai0907 https://github.com/llvm/llvm-project/pull/115051 ___ cfe-commits mailing list cfe-commits@l

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread John McCall via cfe-commits
rjmccall wrote: > Okay the problem with using `ASTContext` here is that it creates some > recursive includes. ~I can do this by moving the check into `Type.cpp` > instead, so this will be function call instead of being inlined.~ This would > require a lot of extra stuff so I'm going to defer i

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Okay the problem with using `ASTContext` here is that it creates some recursive includes. I can do this by moving the check into `Type.cpp` instead, so this will be function call instead of being inlined. https://github.com/llvm/llvm-project/pull/115777 _

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Make +sve2-aes an alias of +sve2+sve-aes (PR #116026)

2024-11-13 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/116026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Address spaces from language dialects generally have required relationships > and behaviors in the language, and that really shouldn't be overridden by > targets. However, targets do need to be able to decide how target-specific > address spaces work, including how they intera

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2024-11-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: So the main reason I want this is so that I don't need to keep passing `-nogpulib` because targeting plain C/C++ should not require the ROCm device libs. https://github.com/llvm/llvm-project/pull/99687 ___ cfe-commits mailing list cfe-

[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding is an address space is compatible (PR #115777)

2024-11-13 Thread John McCall via cfe-commits
rjmccall wrote: Address spaces from language dialects generally have required relationships and behaviors in the language, and that really shouldn't be overridden by targets. However, targets do need to be able to decide how target-specific address spaces work, including how they interact with

[clang] [HLSL] Add empty struct test cases to `__builtin_hlsl_is_typed_resource_element_compatible` test file (PR #115045)

2024-11-13 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/115045 >From ef4a7eea3eacce4f77b628aebe7f2838733971d0 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 5 Nov 2024 10:35:59 -0800 Subject: [PATCH 1/6] add empty struct test cases --- .../SemaHLSL/Types/Traits

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-13 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud updated https://github.com/llvm/llvm-project/pull/114606 >From cc19550fdbaca4b77e90de57c472a31a8c3f8293 Mon Sep 17 00:00:00 2001 From: Rashmi Mudduluru Date: Fri, 1 Nov 2024 14:10:50 -0700 Subject: [PATCH 1/6] [Webkit Checkers] Introduce a Webkit checker for memory

[clang] Remove Linux search paths on Windows (PR #113628)

2024-11-13 Thread Joseph Huber via cfe-commits
@@ -272,6 +277,13 @@ class RocmInstallationDetector { return Loc->second; } + void init(bool DetectHIPRuntime = true, bool DetectDeviceLib = false) { jhuber6 wrote: I don't understand why we need this, isn't it fine just to let it fail? Let the detect

[clang] [MS] Add /Zc:tlsGuards option to control tls guard emission (PR #113830)

2024-11-13 Thread Eli Friedman via cfe-commits
@@ -4063,6 +4063,11 @@ defm threadsafe_statics : BoolFOption<"threadsafe-statics", NegFlag, PosFlag>; +defm tls_guards : BoolFOption<"tls-guards", + LangOpts<"TlsGuards">, DefaultTrue, efriedma-quic wrote: My understanding is that if a tls variable is def

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-13 Thread Rashmi Mudduluru via cfe-commits
@@ -0,0 +1,117 @@ +//===- MemoryUnsafeCastChecker.cpp -*- C++ -*-==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apach

[clang] [MS] Add /Zc:tlsGuards option to control tls guard emission (PR #113830)

2024-11-13 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/113830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add empty struct test cases to `__builtin_hlsl_is_typed_resource_element_compatible` test file (PR #115045)

2024-11-13 Thread Joshua Batista via cfe-commits
@@ -1,109 +1,28 @@ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-library -finclude-default-header -fnative-half-type -verify %s // expected-no-diagnostics -struct oneInt { -int i; -}; - -struct twoInt { - int aa; - int ab; -}; - -struct threeInts { - oneInt o; -

[clang] Remove Linux search paths on Windows (PR #113628)

2024-11-13 Thread Joseph Huber via cfe-commits
@@ -6440,7 +6440,8 @@ const ToolChain &Driver::getToolChain(const ArgList &Args, TC = std::make_unique(*this, Target, Args); break; case llvm::Triple::AMDHSA: - TC = std::make_unique(*this, Target, Args); + TC = std::make_unique(*this, Target, Args, +

[clang] [Clang] Allow all address spaces to be converted to the default (PR #112248)

2024-11-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/112248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NVPTX] Set cache line size to 128 for __GCC_DESTRUCTIVE_SIZE (PR #115248)

2024-11-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: ping https://github.com/llvm/llvm-project/pull/115248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-13 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -verify + + +void test_arg_missing() { + __builtin_hlsl_elementwise_clip(); + // expected-error@-1 {{too few arguments to function call, expected 1, have 0

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-13 Thread Chris B via cfe-commits
@@ -483,10 +583,103 @@ static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema &S, .addDefaultHandleConstructor(S, RC); } +BinaryOperator *constructSizeOfLEQ16Expr(ASTContext &Context, + SourceLocation NameLoc, +

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-13 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: ping https://github.com/llvm/llvm-project/pull/115048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >