[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

[clang] [HLSL] Implement SV_GroupID semantic (PR #115911)

2024-11-13 Thread Zhengxing li via cfe-commits
@@ -27,3 +27,25 @@ struct ST2 { static uint X : SV_DispatchThreadID; uint s : SV_DispatchThreadID; }; + +[numthreads(8,8,1)] +// expected-error@+1 {{attribute 'SV_GroupID' only applies to a field or parameter of type 'uint/uint2/uint3'}} +void CSMain_GID(float ID : SV_

[clang] [HLSL] Implement SV_GroupID semantic (PR #115911)

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

[clang] [HLSL] Implement SV_GroupID semantic (PR #115911)

2024-11-13 Thread Zhengxing li via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -finclude-default-header -disable-llvm-passes -o - %s | FileCheck %s + +// Make sure SV_GroupID translated into dx.group.id. + +// CHECK: define void @foo() +// CHECK: %[[#ID:]] = cal

[clang] [HLSL] Implement SV_GroupID semantic (PR #115911)

2024-11-13 Thread Zhengxing li via cfe-commits
https://github.com/lizhengxing updated https://github.com/llvm/llvm-project/pull/115911 >From 6418461717614d5879688d32a0ab9bf9d9137328 Mon Sep 17 00:00:00 2001 From: Zhengxing Li Date: Tue, 1 Oct 2024 15:13:34 -0700 Subject: [PATCH 1/2] [HLSL] Implement SV_GroupID semantic Support SV_GroupID a

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

2024-11-13 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. Minor comments, but rest LGTM. Code correct as ticket is currently defined. We may want to move the behavior you currently have in cgbuiltins to hlsl_intrinsics.h. That way for spirv instead of a basic block we could do a c++ if statement

[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] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-13 Thread Farzon Lotfi via cfe-commits
@@ -770,6 +770,15 @@ def CheckAccessFullyMapped : DXILOp<71, checkAccessFullyMapped> { let stages = [Stages]; } +def Discard : DXILOp<82, discard> { + let Doc = "discard the current pixel"; + let LLVMIntrinsic = int_dx_discard; + let arguments = [Int1Ty]; ---

[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] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-13 Thread Chris B via cfe-commits
@@ -323,30 +324,129 @@ struct TemplateParameterListBuilder { S.Context, Builder.Record->getDeclContext(), SourceLocation(), SourceLocation(), /* TemplateDepth */ 0, Position, &S.Context.Idents.get(Name, tok::TokenKind::identifier), -/* Typename *

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

2024-11-13 Thread Farzon Lotfi via cfe-commits
@@ -19180,6 +19221,11 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: { "asuint operands types mismatch"); return handleHlslSplitdouble(E, this); } + case Builtin::BI__builtin_hlsl_elementwise_clip: + farzonl wrote: delete the space htt

[clang] [clang codegen] Add CreateRuntimeFunction overload that takes a clang type. (PR #113506)

2024-11-13 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/113506 >From 7f259d75f18422fff05ac11526b5a0a1b73312fd Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Wed, 23 Oct 2024 16:12:27 -0700 Subject: [PATCH] [clang codegen] Add CreateRuntimeFunction overload that tak

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

2024-11-13 Thread Chris B 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] [HLSL] Add empty struct test cases to `__builtin_hlsl_is_typed_resource_element_compatible` test file (PR #115045)

2024-11-13 Thread Chris B 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] [llvm] Reland "[LLVM] Add IRNormalizer Pass" (PR #113780)

2024-11-13 Thread Vladimir Vereschaka via cfe-commits
https://github.com/vvereschaka approved this pull request. @justinfargnoli , I have checked the latest changes locally on the ubuntu expensive builder. They works fine there, thank you. LGTM. https://github.com/llvm/llvm-project/pull/113780 ___ cfe-co

[clang] Reland: [clang][test] add testing for the AST matcher reference (PR #112168)

2024-11-13 Thread Omair Javaid via cfe-commits
omjavaid wrote: @5chmidti Sorry for the delay. I have tested this and it seems to compile on windows msvc without any regressions. https://github.com/llvm/llvm-project/pull/112168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

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

2024-11-13 Thread Joseph Huber via cfe-commits
@@ -3060,6 +3060,9 @@ Generic_GCC::Generic_GCC(const Driver &D, const llvm::Triple &Triple, : ToolChain(D, Triple, Args), GCCInstallation(D), CudaInstallation(D, Triple, Args), RocmInstallation(D, Triple, Args) { getProgramPaths().push_back(getDriver().Dir); + llv

[clang] [clang] Introduce a new UEFI target predefine. (PR #111719)

2024-11-13 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/111719 >From 05eab970b59c61b22e8afa1ed9381906ae925c03 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Wed, 9 Oct 2024 10:16:58 -0700 Subject: [PATCH 1/3] [clang] Introduce a new UEFI target predefine. --- clang/lib/Bas

[clang] [llvm] Reland "[LLVM] Add IRNormalizer Pass" (PR #113780)

2024-11-13 Thread Justin Fargnoli via cfe-commits
justinfargnoli wrote: > Is it possible/easy to split > https://github.com/llvm/llvm-project/commit/ef6a751a794c3e2d266cac0242629043ddd0d2aa > into a new PR? Certainly, @boomanaiden154! Please see #116108 :) https://github.com/llvm/llvm-project/pull/113780 _

[clang] [Clang] Add support for scoped atomic thread fence (PR #115545)

2024-11-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/115545 >From be73e1600846f6026c03d2e3107b4237f54c51ac Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 8 Nov 2024 15:42:04 -0600 Subject: [PATCH 1/5] [Clang] Add support for scoped atomic thread fence Summary: P

[clang] [-Wunsafe-buffer-usage] Fix false positives in warning againt 2-parameter std::span constructor (PR #115797)

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

[clang] 0dcb0ac - [-Wunsafe-buffer-usage] Fix false positives in warning againt 2-parameter std::span constructor (#115797)

2024-11-13 Thread via cfe-commits
Author: Malavika Samak Date: 2024-11-13T13:08:52-08:00 New Revision: 0dcb0acf8265e1486f4f3715cef01987af1391cd URL: https://github.com/llvm/llvm-project/commit/0dcb0acf8265e1486f4f3715cef01987af1391cd DIFF: https://github.com/llvm/llvm-project/commit/0dcb0acf8265e1486f4f3715cef01987af1391cd.diff

[clang] 95fa5f3 - [OpenACC] Fix ast-print test that failed due to copy/paste error

2024-11-13 Thread via cfe-commits
Author: erichkeane Date: 2024-11-13T13:02:13-08:00 New Revision: 95fa5f39a0506948bd3c81842c7828d7892023cd URL: https://github.com/llvm/llvm-project/commit/95fa5f39a0506948bd3c81842c7828d7892023cd DIFF: https://github.com/llvm/llvm-project/commit/95fa5f39a0506948bd3c81842c7828d7892023cd.diff LO

<    1   2   3   4   5   6   7   8   9   10   >