[clang] [llvm] [LoongArch] Support amcas[_db].{b/h/w/d} instructions. (PR #114189)

2024-10-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-loongarch Author: None (tangaac) Changes Two options for clang: -mlamcas & -mno-lamcas. Enable or disable amcas[_db].{b/h} instructions. The default is -mno-lamcas. Only works on LoongArch64. --- Patch is 218.99 KiB, truncated to 20.00 KiB belo

[clang] [sema] enhance error handling for compound stmt body in `StmtExpr` (PR #113760)

2024-10-29 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/113760 >From 1ea7857b255f9a260ece14891f4a3a423468a605 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 26 Oct 2024 21:19:04 +0800 Subject: [PATCH 1/2] [sema] enhance error handling for compound stmt body in

[clang] cad0940 - [sema] enhance error handling for compound stmt body in `StmtExpr` (#113760)

2024-10-29 Thread via cfe-commits
Author: Congcong Cai Date: 2024-10-30T14:34:19+08:00 New Revision: cad09404cc804dd35d2f3b742d1d6efb6d5a9449 URL: https://github.com/llvm/llvm-project/commit/cad09404cc804dd35d2f3b742d1d6efb6d5a9449 DIFF: https://github.com/llvm/llvm-project/commit/cad09404cc804dd35d2f3b742d1d6efb6d5a9449.diff

[clang] [sema] enhance error handling for compound stmt body in `StmtExpr` (PR #113760)

2024-10-29 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/113760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-29 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/112424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-29 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/112424 >From a22c6bae4f42f42e67f8e0c2b1f914e50d140099 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Tue, 15 Oct 2024 22:43:24 +0300 Subject: [PATCH 1/3] [Clang] prevent setting default lexical access specifier f

[clang] b47e231 - [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (#113859)

2024-10-29 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-10-29T23:13:23-07:00 New Revision: b47e2316bf083cd2e0e5ac2ef1e9c913f839a51b URL: https://github.com/llvm/llvm-project/commit/b47e2316bf083cd2e0e5ac2ef1e9c913f839a51b DIFF: https://github.com/llvm/llvm-project/commit/b47e2316bf083cd2e0e5ac2ef1e9c913f839a51b.diff

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

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

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

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

[clang] [NFC] Delete unused clang-formatted-file.txt/ClangFormattedStatus.rst files (PR #109220)

2024-10-29 Thread Rahul Joshi via cfe-commits
jurahul wrote: @AaronBallman go ahead with the merge since @owenca has approved? https://github.com/llvm/llvm-project/pull/109220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Delete unused clang-formatted-file.txt/ClangFormattedStatus.rst files (PR #109220)

2024-10-29 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/109220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] convert path to Windows path if user is using a MSYS2 shell (PR #111526)

2024-10-29 Thread Owen Pan via cfe-commits
owenca wrote: > > I personally use Cygwin and it's git understands unix paths is that not the > > case for msys2 > > Git can understand (and will return a) unix path, but it seems MSYS2's python > won't accept unix path. It fails at `os.chdir(toplevel)`, and `toplevel` is a > unix path. Isn'

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

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

[clang] [clang-format] Fix path expansion inside git-clang-format.bat (PR #114078)

2024-10-29 Thread Owen Pan via cfe-commits
@@ -1 +1 @@ -py -3 "%~pn0" %* +py -3 "%~dpn0" %* owenca wrote: ```suggestion py -3 "%~f0" %* ``` See https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/call#batch-parameters. https://github.com/llvm/llvm-project/pull/114078 ___

[clang] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM, need to add new api support as a follow up. https://github.com/llvm/llvm-project/pull/113850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] specify clang --target to fix breakage on AIX (PR #114127)

2024-10-29 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm closed https://github.com/llvm/llvm-project/pull/114127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cc60c46 - specify clang --target to fix breakage on AIX (#114127)

2024-10-29 Thread via cfe-commits
Author: Lei Wang Date: 2024-10-29T21:06:43-07:00 New Revision: cc60c46e39b0fffadc83a905b37d98aff426ac17 URL: https://github.com/llvm/llvm-project/commit/cc60c46e39b0fffadc83a905b37d98aff426ac17 DIFF: https://github.com/llvm/llvm-project/commit/cc60c46e39b0fffadc83a905b37d98aff426ac17.diff LOG:

[clang-tools-extra] [clangd] Support symbolTags for document symbol (PR #113669)

2024-10-29 Thread via cfe-commits
chouzz wrote: @travkin79 It's extracted from `semanticHighlihgting`. As I can see, it means a symbol with a `const` keyword, but to be honest, `const` and `read-only` mostly mean the same thing in C/C++. > Having tags Constant and Read-only might be confusing. Maybe we should > consider rem

[clang] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,83 @@ +/*===- amxfp8intrin.h - AMX intrinsics -*- 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] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

2024-10-29 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/113643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add RasterizerOrderedStructuredBuffer definition to HLSLExternalSemaSource (PR #113648)

2024-10-29 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/113648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add RasterizerOrderedStructuredBuffer definition to HLSLExternalSemaSource (PR #113648)

2024-10-29 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/113648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add RasterizerOrderedStructuredBuffer definition to HLSLExternalSemaSource (PR #113648)

2024-10-29 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/113648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
@@ -17957,6 +17957,8 @@ Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, << Name; Invalid = true; } + if (TUK == TagUseKind::Declaration && Name) shafik wrote: Why do we need to check `Name` as we

[clang] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-29 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/113612 >From 853881983faeeb5b7e0582d3e94037c12df12c7c Mon Sep 17 00:00:00 2001 From: vvd170501 <36827317+vvd170...@users.noreply.github.com> Date: Sat, 26 Oct 2024 00:17:26 +0300 Subject: [PATCH 1/4] Fix variant parsi

[clang] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,92 @@ +/*===- amxfp8intrin.h - AMX intrinsics -*- 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] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,92 @@ +/*===- amxfp8intrin.h - AMX intrinsics -*- 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] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,92 @@ +/*===- amxfp8intrin.h - AMX intrinsics -*- 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] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-29 Thread Vadim D. via cfe-commits
@@ -232,6 +232,37 @@ SYMBOL(ssize, std::, ) SYMBOL(ssize, std::, ) SYMBOL(ssize, std::, ) SYMBOL(ssize, std::, ) +// C++ [range.access.general]: ... the customization point objects +// in [range.access] are available when the header is included. +SYMBOL(begin, std::ranges::, )

[clang] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-29 Thread Vadim D. via cfe-commits
vvd170501 wrote: I've reverted the optimizations, will create a new PR when this one is merged (the commit depends on other changes that I've left in this PR) https://github.com/llvm/llvm-project/pull/113612 ___ cfe-

[clang] [clang-tools-extra] [compiler-rt] [llvm] [TableGen] Remove a pointless check for iPTRAny (PR #113732)

2024-10-29 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 edited https://github.com/llvm/llvm-project/pull/113732 ___ 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-FP8 (PR #113850)

2024-10-29 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang edited https://github.com/llvm/llvm-project/pull/113850 ___ 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-FP8 (PR #113850)

2024-10-29 Thread Phoebe Wang via cfe-commits
@@ -5994,6 +5994,23 @@ let TargetPrefix = "x86" in { [llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_x86amx_ty, llvm_x86amx_ty, llvm_x86amx_ty], []>; + + def int_x86_tdpbf8ps : ClangBuiltin<"__builtin_ia32_

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: The fix looks good to me but I guess everyone needs to be happy w/ the test first. https://github.com/llvm/llvm-project/pull/112111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [llvm] [MIPS] LLVM data layout give i128 an alignment of 16 for mips64 (PR #112084)

2024-10-29 Thread via cfe-commits
yingopq wrote: Ping https://github.com/llvm/llvm-project/pull/112084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-29 Thread Vadim D. via cfe-commits
@@ -352,20 +383,23 @@ SYMBOL(get, std::, /*no headers*/) // providing the type. SYMBOL(make_error_code, std::, /*no headers*/) SYMBOL(make_error_condition, std::, /*no headers*/) +// Similar to std::get, has variants for multiple containers +// (vector, deque, list, etc.) +SYMB

[clang] specify clang --target to fix breakage on AIX (PR #114127)

2024-10-29 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm updated https://github.com/llvm/llvm-project/pull/114127 >From 2c2ddcc9bda277c6da7b51147785c0f1e88b848d Mon Sep 17 00:00:00 2001 From: wlei Date: Tue, 29 Oct 2024 13:28:33 -0700 Subject: [PATCH] specify clang --target to fix breakage on AIX --- clang/test/CodeGen/

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx commented: > Is this a target-independent decision? I could certainly imagine a target > with a generic AS wanting to specify that indirect return addresses (and > maybe even parameters?) should be in that rather than the alloca AS; among > other things, it would al

[clang-tools-extra] [clangd] [Modules] Use ASTReader directly in IsModuleFileUpToDate (PR #113879)

2024-10-29 Thread Chuanqi Xu via cfe-commits
@@ -127,50 +128,65 @@ struct ModuleFile { std::string ModuleFilePath; }; -bool IsModuleFileUpToDate( -PathRef ModuleFilePath, -const PrerequisiteModules &RequisiteModules) { -IntrusiveRefCntPtr Diags = - CompilerInstance::createDiagnostics(new DiagnosticOptions(

[clang-tools-extra] [clangd] [Modules] Use ASTReader directly in IsModuleFileUpToDate (PR #113879)

2024-10-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/113879 >From 99e1989c3b2fad7702795a707d130fe96a93f42f Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 28 Oct 2024 15:54:37 +0800 Subject: [PATCH 1/4] [clangd] [Modules] Use ASTReader directly in IsModuleFileUp

[clang] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Feng Zou via cfe-commits
@@ -0,0 +1,83 @@ +/*===- amxfp8intrin.h - AMX intrinsics -*- 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] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Feng Zou via cfe-commits
https://github.com/fzou1 updated https://github.com/llvm/llvm-project/pull/113850 >From fd570cb8d41f5f94b61d515985245fc81aab633e Mon Sep 17 00:00:00 2001 From: Feng Zou Date: Thu, 24 Oct 2024 21:56:48 +0800 Subject: [PATCH 1/5] Support AMX-FP8 Ref.: https://cdrdv2.intel.com/v1/dl/getContent/67

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Matt Arsenault via cfe-commits
@@ -23,8 +25,10 @@ X Test() // sret argument. // CHECK-CXX98: call void @_ZN1XC1ERKS_( // CHECK-CXX11: call void @_ZN1XC1EOS_( + // CHECK-CXX11-NONZEROALLOCAAS: call void @_ZN1XC1EOS_( arsenm wrote: Can you add more context checks here? https://github.

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Matt Arsenault via cfe-commits
@@ -5390,11 +5391,19 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, V->getType()->isIntegerTy()) V = Builder.CreateZExt(V, ArgInfo.getCoerceToType()); -// If the argument doesn't match, perform a bitcast to coerce it. This -

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +a() {struct b c (sizeof(b * [({ {tree->d* next)} 0 + +// expected-error@3 {{a type specifier is required for all declarations}} +// expected-error@3 {{use of undeclared identifier 'tree'; did you mean 'true'?}} +//

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: So I think on my last comment, using `break` as opposed to `continue` makes sense. Agree @cor3ntin https://github.com/llvm/llvm-project/pull/109298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
shafik wrote: So this is the commit that introduced this 06e41ae5c77c6 and it looks like code like this: ```objc id x(id(0)); ``` we are trying to differentiate a protocol Vs the next parameter? https://github.com/llvm/llvm-project/pull/109298 ___ c

[clang] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,83 @@ +/*===- amxfp8intrin.h - AMX intrinsics -*- 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] [llvm] [X86][AMX] Support AMX-FP8 (PR #113850)

2024-10-29 Thread Feng Zou via cfe-commits
https://github.com/fzou1 updated https://github.com/llvm/llvm-project/pull/113850 >From fd570cb8d41f5f94b61d515985245fc81aab633e Mon Sep 17 00:00:00 2001 From: Feng Zou Date: Thu, 24 Oct 2024 21:56:48 +0800 Subject: [PATCH 1/3] Support AMX-FP8 Ref.: https://cdrdv2.intel.com/v1/dl/getContent/67

[clang] [RISCV] Add sha and supm to checks in riscv-profiles.c (PR #114123)

2024-10-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-darwin` running on `doug-worker-3` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/4284 Here is the r

[clang] Remove device override for operator new when the C++ standard >= 26 (PR #114056)

2024-10-29 Thread Ognyan Mirev via cfe-commits
https://github.com/OgnianM edited https://github.com/llvm/llvm-project/pull/114056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Avoid allocations when reading blob paths (PR #113984)

2024-10-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Looks better than https://github.com/llvm/llvm-project/pull/113984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Alex Voicu via cfe-commits
@@ -5390,11 +5391,19 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, V->getType()->isIntegerTy()) V = Builder.CreateZExt(V, ArgInfo.getCoerceToType()); -// If the argument doesn't match, perform a bitcast to coerce it. This -

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-29 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/113859 >From 8fce7f69eb5e28f6ec648ee0dc4cc23c793f64c0 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 27 Oct 2024 21:43:24 -0700 Subject: [PATCH 1/4] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-29 Thread Ryosuke Niwa via cfe-commits
@@ -83,6 +83,77 @@ void foo7(RefCountable* obj) { bar.obj->method(); } +void foo8(RefCountable* obj) { + RefPtr foo; + { +RefCountable *bar = foo.get(); +// expected-warning@-1{{Local variable 'bar' is uncounted and unsafe [alpha.webkit.UncountedLocalVarsChecker]}

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/114062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Add sha and supm to checks in riscv-profiles.c (PR #114123)

2024-10-29 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/114123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d926828 - [RISCV] Add sha and supm to checks in riscv-profiles.c (#114123)

2024-10-29 Thread via cfe-commits
Author: Craig Topper Date: 2024-10-29T18:08:26-07:00 New Revision: d9268289c3858c4ae877ff3bb90f28c160a977c8 URL: https://github.com/llvm/llvm-project/commit/d9268289c3858c4ae877ff3bb90f28c160a977c8 DIFF: https://github.com/llvm/llvm-project/commit/d9268289c3858c4ae877ff3bb90f28c160a977c8.diff

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Matt Arsenault via cfe-commits
@@ -5390,11 +5391,19 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, V->getType()->isIntegerTy()) V = Builder.CreateZExt(V, ArgInfo.getCoerceToType()); -// If the argument doesn't match, perform a bitcast to coerce it. This -

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Matt Arsenault via cfe-commits
@@ -5390,11 +5391,19 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, V->getType()->isIntegerTy()) V = Builder.CreateZExt(V, ArgInfo.getCoerceToType()); -// If the argument doesn't match, perform a bitcast to coerce it. This -

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: I agree that in theory a target could want to do something else, but that would be an ABI lowering decision. It doesn't naturally come from a source level type. Supporting such a target would require more work, but given the current state of the world just

[clang] [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2024-10-29 Thread Ziqing Luo via cfe-commits
@@ -420,6 +420,118 @@ AST_MATCHER(CXXConstructExpr, isSafeSpanTwoParamConstruct) { return false; } +class MaxValueEval : public RecursiveASTVisitor { + + std::vector val; + ASTContext &Context; + llvm::APInt Max; + unsigned bit_width; + +public: + typedef RecursiveASTV

[clang] [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2024-10-29 Thread Ziqing Luo via cfe-commits
@@ -420,6 +420,118 @@ AST_MATCHER(CXXConstructExpr, isSafeSpanTwoParamConstruct) { return false; } +class MaxValueEval : public RecursiveASTVisitor { + + std::vector val; + ASTContext &Context; + llvm::APInt Max; + unsigned bit_width; + +public: + typedef RecursiveASTV

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-29 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,48 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -emit-llvm -c %s -o %t_1.bc +// RUN: %clangxx -emit-llvm -c %s -o %t_2.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t_1.bc %t_2.bc -o a.spv 2>&1 \ +/

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-10-29 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 approved this pull request. LGTM! Thank you @danakj for the continuous effort! https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-10-29 Thread Ziqing Luo via cfe-commits
@@ -3912,3 +3896,56 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-29 Thread Arvind Sudarsanam via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t.bc -o a.spv 2>&1 \ +// RUN: | FileCheck %s --check-prefix=SIMPLE +// SI

[clang] Remove device override for operator new when the C++ standard >= 26 (PR #114056)

2024-10-29 Thread Artem Belevich via cfe-commits
@@ -91,12 +91,14 @@ __device__ inline void operator delete[](void *ptr, #endif // Device overrides for placement new and delete. +#if _LIBCPP_STD_VER < 26 Artem-B wrote: Yup. Reproducible on compiler explorer: https://godbolt.org/z/xr5nEhGnr https://github.c

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114062 >From d2d2d3d5db3f639aab178f9ca9a20db2842d2b65 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 29 Oct 2024 14:20:44 + Subject: [PATCH 1/3] `sret` args should always point to the `alloca` AS, so we can

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/114062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2024-10-29 Thread Malavika Samak via cfe-commits
@@ -420,6 +420,118 @@ AST_MATCHER(CXXConstructExpr, isSafeSpanTwoParamConstruct) { return false; } +class MaxValueEval : public RecursiveASTVisitor { + + std::vector val; + ASTContext &Context; + llvm::APInt Max; + unsigned bit_width; + +public: + typedef RecursiveASTV

[clang] [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2024-10-29 Thread Ziqing Luo via cfe-commits
@@ -420,6 +420,118 @@ AST_MATCHER(CXXConstructExpr, isSafeSpanTwoParamConstruct) { return false; } +class MaxValueEval : public RecursiveASTVisitor { + + std::vector val; + ASTContext &Context; + llvm::APInt Max; + unsigned bit_width; + +public: + typedef RecursiveASTV

[clang] [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2024-10-29 Thread Ziqing Luo via cfe-commits
@@ -420,6 +420,118 @@ AST_MATCHER(CXXConstructExpr, isSafeSpanTwoParamConstruct) { return false; } +class MaxValueEval : public RecursiveASTVisitor { + + std::vector val; + ASTContext &Context; + llvm::APInt Max; + unsigned bit_width; + +public: + typedef RecursiveASTV

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
@@ -39,7 +39,8 @@ bool Sema::SetMemberAccessSpecifier(NamedDecl *MemberDecl, AccessSpecifier LexicalAS) { if (!PrevMemberDecl) { // Use the lexical access specifier. -MemberDecl->setAccess(LexicalAS); shafik wrote:

[clang] [HLSL] Remove old resource annotations for UAVs and SRVs (PR #114139)

2024-10-29 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/114139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove device override for operator new when the C++ standard >= 26 (PR #114056)

2024-10-29 Thread Ognyan Mirev via cfe-commits
https://github.com/OgnianM edited https://github.com/llvm/llvm-project/pull/114056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-10-29 Thread Sam Elliott via cfe-commits
@@ -2238,6 +2256,17 @@ MVT RISCVTargetLowering::getRegisterTypeForCallingConv(LLVMContext &Context, return PartVT; } +unsigned +RISCVTargetLowering::getNumRegisters(LLVMContext &Context, EVT VT, lenary wrote: This is to prevent an assert that is hit in `R

[clang] Remove device override for operator new when the C++ standard >= 26 (PR #114056)

2024-10-29 Thread Ognyan Mirev via cfe-commits
https://github.com/OgnianM edited https://github.com/llvm/llvm-project/pull/114056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-10-29 Thread via cfe-commits
https://github.com/antangelo edited https://github.com/llvm/llvm-project/pull/98788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove device override for operator new when the C++ standard >= 26 (PR #114056)

2024-10-29 Thread Ognyan Mirev via cfe-commits
@@ -91,12 +91,14 @@ __device__ inline void operator delete[](void *ptr, #endif // Device overrides for placement new and delete. +#if _LIBCPP_STD_VER < 26 OgnianM wrote: Looks like it https://github.com/gcc-mirror/gcc/blob/9dd9a88b75334bc079b8ab5fb2dbb5d56765

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-10-29 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114062 >From d2d2d3d5db3f639aab178f9ca9a20db2842d2b65 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 29 Oct 2024 14:20:44 + Subject: [PATCH 1/2] `sret` args should always point to the `alloca` AS, so we can

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-10-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Helena Kotas (hekota) Changes Introduces `__builtin_hlsl_buffer_update_counter` clang buildin that is used to implement the `IncrementCounter` and `DecrementCounter` methods on `RWStructuredBuffer` and `RasterizerOrderedStructuredBuffer

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-10-29 Thread via cfe-commits
@@ -0,0 +1,316 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++23 -verify %s + +namespace test1 { + template struct Base { +template requires true +Base(T); + }; + + template struct InheritsCtors : public Base { +using Base::Base; + }; + + InheritsCtors inheritsCtors

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-29 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,13 @@ +// Tests the driver when linking LLVM IR bitcode files and targeting SPIR-V +// architecture. +// +// RUN: touch %t.bc +// RUN: %clangxx --target=spirv64 --sycl-link -### %t.bc 2>&1 \ +// RUN: | FileCheck %s -check-prefix=LINK +// LINK: "{{.*}}clang-sycl-linker

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-29 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/112245 >From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Fri, 27 Sep 2024 13:03:12 -0700 Subject: [PATCH 01/12] [Clang][SYCL] Introduce clang-sycl-link-wrapper to li

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-10-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Helena Kotas (hekota) Changes Introduces `__builtin_hlsl_buffer_update_counter` clang buildin that is used to implement the `IncrementCounter` and `DecrementCounter` methods on `RWStructuredBuffer` and `RasterizerOrderedStructured

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-10-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-directx Author: Helena Kotas (hekota) Changes Introduces `__builtin_hlsl_buffer_update_counter` clang buildin that is used to implement the `IncrementCounter` and `DecrementCounter` methods on `RWStructuredBuffer` and `RasterizerOrderedStructur

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-10-29 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/114148 Introduces `__builtin_hlsl_buffer_update_counter` clang buildin that is used to implement the `IncrementCounter` and `DecrementCounter` methods on `RWStructuredBuffer` and `RasterizerOrderedStructuredBuffer` (se

[clang] [clang] Update the lifetimebound example with up-to-date expected warning and change the sample code to be a fully working example (PR #113437)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
@@ -3702,20 +3702,32 @@ user-declared functions. For example: .. code-block:: c++ +#include +#include + +using namespace std::literals; + // Returns m[key] if key is present, or default_value if not. template const U &get_or_default(const std::map

[clang] [clang] Update the lifetimebound example with up-to-date expected warning and change the sample code to be a fully working example (PR #113437)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM, other than the minor comment. https://github.com/llvm/llvm-project/pull/113437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [clang] Update the lifetimebound example with up-to-date expected warning and change the sample code to be a fully working example (PR #113437)

2024-10-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/113437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (PR #113796)

2024-10-29 Thread kadir çetinkaya via cfe-commits
kadircet wrote: can you move these changes into `clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc`? that's the hand-curated version, we try to autogenerate the other one by parsing cppreference. https://github.com/llvm/llvm-project/pull/113796 __

[clang-tools-extra] [clang-tidy] Fix crash in modernize-use-designated-initializers check (PR #113688)

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

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-10-29 Thread via cfe-commits
@@ -1203,10 +1333,291 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-10-29 Thread Jun Wang via cfe-commits
@@ -683,6 +706,59 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { return !A.checkForAllCallLikeInstructions(DoesNotRetrieve, *this, UsedAssumedInformation); } + + // Returns true if FlatScratchInit is needed, i.e

[clang] [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2024-10-29 Thread Malavika Samak via cfe-commits
@@ -420,6 +420,118 @@ AST_MATCHER(CXXConstructExpr, isSafeSpanTwoParamConstruct) { return false; } +class MaxValueEval : public RecursiveASTVisitor { + + std::vector val; + ASTContext &Context; + llvm::APInt Max; + unsigned bit_width; + +public: + typedef RecursiveASTV

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-29 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Hi @bader Thanks very much for your feedback. I have addressed the concerns in the latest commit. Thanks to @jhuber6 for some responses as well. Sincerely https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing list

[clang] [llvm] [X86][AMX] Support AMX-TRANSPOSE (PR #113532)

2024-10-29 Thread Phoebe Wang via cfe-commits
@@ -80,28 +80,41 @@ INITIALIZE_PASS_BEGIN(X86FastTileConfig, DEBUG_TYPE, INITIALIZE_PASS_END(X86FastTileConfig, DEBUG_TYPE, "Fast Tile Register Configure", false, false) -static bool isTileDef(MachineRegisterInfo *MRI, MachineInstr &MI) { +static unsigned g

[clang] [clang][deps] Stop sorting file dependencies (PR #114079)

2024-10-29 Thread Jan Svoboda via cfe-commits
@@ -472,7 +465,8 @@ class FullDeps { JOS.attributeArray("command-line", toJSONStrings(JOS, MD.getBuildArguments())); JOS.attribute("context-hash", StringRef(MD.ID.ContextHash)); -JOS.attributeArray("file-deps",

[clang] [HLSL] Remove old resource annotations for UAVs and SRVs (PR #114139)

2024-10-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Helena Kotas (hekota) Changes UAVs and SRVs have already been converted to use LLVM target types and we can disable generating of the !hlsl.uavs and !hlsl.srvs! annotations. This will enable adding tests for structured buffers wit

  1   2   3   4   5   >