[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-14 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/113881 >From 4a7f17f29a007ce7af0893670a362f738b0d8d6e Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Mon, 21 Oct 2024 15:27:24 +0800 Subject: [PATCH 1/5] [X86] Support -march=diamondrapids Ref.: https://cdrdv2.inte

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

2024-11-14 Thread Craig Topper via cfe-commits
@@ -3040,6 +3040,7 @@ bool Sema::checkTargetVersionAttr(SourceLocation LiteralLoc, Decl *D, enum FirstParam { Unsupported }; enum SecondParam { None }; enum ThirdParam { Target, TargetClones, TargetVersion }; + topperc wrote: Drop this change? https://

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-14 Thread Piyou Chen via cfe-commits
@@ -4216,22 +4216,11 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, llvm::Function *NewFn); static unsigned -TargetMVPriority(const TargetInfo &TI, - const CodeGenFunction:

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

2024-11-14 Thread Piyou Chen via cfe-commits
@@ -3040,6 +3040,7 @@ bool Sema::checkTargetVersionAttr(SourceLocation LiteralLoc, Decl *D, enum FirstParam { Unsupported }; enum SecondParam { None }; enum ThirdParam { Target, TargetClones, TargetVersion }; + BeMg wrote: Nice catch. Dropped. https://

[clang] [Webkit Checkers] Treat const member variables as a safe origin (PR #115594)

2024-11-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-bootstrap-asan` running on `sanitizer-buildbot2` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/52/builds/3732 Here is the relevan

[clang] [Clang] [NFC] Refactor AST visitors in Sema and the static analyser to use DRAV (PR #115144)

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

[clang] [llvm] AMDGPU: Add gfx950 subtarget definitions (PR #116307)

2024-11-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/116307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-11-14 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 95b680e4c353d479fbfb96adb39696042c005e99 9beb5f17bfefcea148c1954b1b7bd458c4372389 --e

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

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

[clang-tools-extra] 4fb1f2e - [clangd] Fix the modification detection logic in `ClangdLSPServer::applyConfiguration`. (#115438)

2024-11-14 Thread via cfe-commits
Author: Michael Park Date: 2024-11-15T02:39:09-05:00 New Revision: 4fb1f2e58a2f423362b75f233896ea0d7179fc7a URL: https://github.com/llvm/llvm-project/commit/4fb1f2e58a2f423362b75f233896ea0d7179fc7a DIFF: https://github.com/llvm/llvm-project/commit/4fb1f2e58a2f423362b75f233896ea0d7179fc7a.diff

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-14 Thread Freddy Ye via cfe-commits
@@ -121,6 +121,7 @@ enum CPUKind { CK_GraniterapidsD, CK_Emeraldrapids, CK_Clearwaterforest, + CK_DiamondRapids, FreddyLeaf wrote: I prefer your style, too. Let's refine CK_SapphireRapids as well in the future https://github.com/llvm/llvm-project/pull/

[clang] [PAC][clang] Add signed GOT cc1 flag (PR #96160)

2024-11-14 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96160 >From 3a5ae0151d6fc0d5753450a4277852e5e090cabe Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Fri, 15 Nov 2024 10:46:27 +0300 Subject: [PATCH] [PAC][clang] Add signed GOT cc1 flag Add `-fptrauth-elf-got` c

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-14 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/113881 >From 4a7f17f29a007ce7af0893670a362f738b0d8d6e Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Mon, 21 Oct 2024 15:27:24 +0800 Subject: [PATCH 1/6] [X86] Support -march=diamondrapids Ref.: https://cdrdv2.inte

[clang] [PAC][clang] Add signed GOT cc1 flag (PR #96160)

2024-11-14 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Rebased on top of current main with fixing conflicts. @MaskRay Would be glad if you give your feedback on this so the PR could be finally merged if no issues are left. https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mai

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-14 Thread Freddy Ye via cfe-commits
@@ -121,6 +121,7 @@ enum CPUKind { CK_GraniterapidsD, CK_Emeraldrapids, CK_Clearwaterforest, + CK_DiamondRapids, FreddyLeaf wrote: ab477fb https://github.com/llvm/llvm-project/pull/113881 ___ cfe-commits mail

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

2024-11-14 Thread Finn Plummer 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]; + let result =

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

2024-11-14 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,39 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-pixel %s -fnative-half-type -emit-llvm -o - | FileCheck %s inbelic wrote: Don't need to specify the filename extension with `-x hlsl` https://github.com/llvm/l

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

2024-11-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic approved this pull request. https://github.com/llvm/llvm-project/pull/114588 ___ 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-14 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/114588 >From 087c2dfeffbadba4df12d5c429bb1e22e9034a3f Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 29 Oct 2024 19:39:31 + Subject: [PATCH 1/5] adding llvm intrinsic --- clang/include/clang/Basic/Bui

[clang] [Clang][NFC] Refactor `Targets.h` to make it publicly accessible (PR #116090)

2024-11-14 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/116090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Refactor `Targets.h` to make it publicly accessible (PR #116090)

2024-11-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,39 @@ +//===--- TargetDefines.h - Target define helpers *- 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] [Clang][NFC] Refactor `Targets.h` to make it publicly accessible (PR #116090)

2024-11-14 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/116090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Refactor `Targets.h` to make it publicly accessible (PR #116090)

2024-11-14 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. This makes total sense to me. You should probably wait for more stamps here, but LGTM https://github.com/llvm/llvm-project/pull/116090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 1b44c3a - [OpenACC] enable 'async' clause for combined constructs

2024-11-14 Thread via cfe-commits
Author: erichkeane Date: 2024-11-14T11:18:06-08:00 New Revision: 1b44c3a1424924a06f5eb00204e57effd7af7874 URL: https://github.com/llvm/llvm-project/commit/1b44c3a1424924a06f5eb00204e57effd7af7874 DIFF: https://github.com/llvm/llvm-project/commit/1b44c3a1424924a06f5eb00204e57effd7af7874.diff LO

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

2024-11-14 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: @ZequanWu Thanks for the bug-catching! I will look into it! https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [docs][asan][lsan] Drop list of supported architechures (PR #116302)

2024-11-14 Thread Evgenii Stepanov via cfe-commits
https://github.com/eugenis approved this pull request. https://github.com/llvm/llvm-project/pull/116302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [docs][asan][lsan] Drop list of supported architechures (PR #116302)

2024-11-14 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/116302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Webkit Checkers] Treat const member variables as a safe origin (PR #115594)

2024-11-14 Thread Rashmi Mudduluru via cfe-commits
@@ -145,25 +145,36 @@ bool isCtorOfSafePtr(const clang::FunctionDecl *F) { return isCtorOfRefCounted(F) || isCtorOfCheckedPtr(F); } -bool isSafePtrType(const clang::QualType T) { +template +static bool isPtrOfType(const clang::QualType T, Predicate Pred) { QualType type

[clang] [Webkit Checkers] Treat const member variables as a safe origin (PR #115594)

2024-11-14 Thread Rashmi Mudduluru via cfe-commits
@@ -0,0 +1,66 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.UncountedCallArgsChecker -verify %s + +#include "mock-types.h" + +namespace std { +} + +namespace call_args_const_refptr_member { + +class Foo { +public: + Foo(); + void bar(); + +private: + const RefP

[clang] [Webkit Checkers] Treat const member variables as a safe origin (PR #115594)

2024-11-14 Thread Rashmi Mudduluru via cfe-commits
@@ -145,25 +145,36 @@ bool isCtorOfSafePtr(const clang::FunctionDecl *F) { return isCtorOfRefCounted(F) || isCtorOfCheckedPtr(F); } -bool isSafePtrType(const clang::QualType T) { +template +static bool isPtrOfType(const clang::QualType T, Predicate Pred) { QualType type

[clang] [Webkit Checkers] Treat const member variables as a safe origin (PR #115594)

2024-11-14 Thread Ryosuke Niwa via cfe-commits
@@ -0,0 +1,66 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.UncountedCallArgsChecker -verify %s + +#include "mock-types.h" + +namespace std { +} + +namespace call_args_const_refptr_member { + +class Foo { +public: + Foo(); + void bar(); + +private: + const RefP

[clang] [Webkit Checkers] Treat const member variables as a safe origin (PR #115594)

2024-11-14 Thread Ryosuke Niwa via cfe-commits
@@ -145,25 +145,36 @@ bool isCtorOfSafePtr(const clang::FunctionDecl *F) { return isCtorOfRefCounted(F) || isCtorOfCheckedPtr(F); } -bool isSafePtrType(const clang::QualType T) { +template +static bool isPtrOfType(const clang::QualType T, Predicate Pred) { QualType type

[clang] [Webkit Checkers] Treat const member variables as a safe origin (PR #115594)

2024-11-14 Thread Ryosuke Niwa via cfe-commits
@@ -145,25 +145,36 @@ bool isCtorOfSafePtr(const clang::FunctionDecl *F) { return isCtorOfRefCounted(F) || isCtorOfCheckedPtr(F); } -bool isSafePtrType(const clang::QualType T) { +template +static bool isPtrOfType(const clang::QualType T, Predicate Pred) { QualType type

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

2024-11-14 Thread via cfe-commits
Author: Joshua Batista Date: 2024-11-14T17:01:13-08:00 New Revision: 47889cdd23e57c0acb68adff44ce5657dc86640e URL: https://github.com/llvm/llvm-project/commit/47889cdd23e57c0acb68adff44ce5657dc86640e DIFF: https://github.com/llvm/llvm-project/commit/47889cdd23e57c0acb68adff44ce5657dc86640e.diff

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-14 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt updated https://github.com/llvm/llvm-project/pull/115902 >From 845256b2ed971a4e42f7f871e8b51e711486261a Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Mon, 11 Nov 2024 16:34:23 -0700 Subject: [PATCH 01/11] [HLSL] Implement WaveActiveAnyTrue intrinsic --- clang/

[clang] [Webkit Checkers] Treat const member variables as a safe origin (PR #115594)

2024-11-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/115594 >From 28ee8321eb6e405fd1ebae9043c3ffafe20a4b35 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 9 Nov 2024 00:14:36 -0800 Subject: [PATCH 1/5] [Webkit Checkers] Treat const member variables as a safe origin

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

2024-11-14 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 closed https://github.com/llvm/llvm-project/pull/115045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-14 Thread via cfe-commits
Author: Joshua Batista Date: 2024-11-14T17:00:58-08:00 New Revision: 478c24b5f86911d14256bad71c85ed0ff061070a URL: https://github.com/llvm/llvm-project/commit/478c24b5f86911d14256bad71c85ed0ff061070a DIFF: https://github.com/llvm/llvm-project/commit/478c24b5f86911d14256bad71c85ed0ff061070a.diff

[clang] [Webkit Checkers] Treat const member variables as a safe origin (PR #115594)

2024-11-14 Thread Ryosuke Niwa via cfe-commits
@@ -0,0 +1,66 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.UncountedCallArgsChecker -verify %s + +#include "mock-types.h" + +namespace std { +} + +namespace call_args_const_refptr_member { + +class Foo { +public: + Foo(); + void bar(); + +private: + const RefP

[clang] [Webkit Checkers] Treat const member variables as a safe origin (PR #115594)

2024-11-14 Thread Ryosuke Niwa via cfe-commits
@@ -145,25 +145,36 @@ bool isCtorOfSafePtr(const clang::FunctionDecl *F) { return isCtorOfRefCounted(F) || isCtorOfCheckedPtr(F); } -bool isSafePtrType(const clang::QualType T) { +template +static bool isPtrOfType(const clang::QualType T, Predicate Pred) { QualType type

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

2024-11-14 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 closed https://github.com/llvm/llvm-project/pull/112600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/11651

[clang] [clang][Analysis][NFC] Let isConfigurationValue take Expr (PR #116266)

2024-11-14 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff e8c07f7458285c6fb2eddff5b7914519de10474d b58bf4d9b7f0757f2208b6c77eff6aeeca07efa4 --e

[clang] [clang] Instantiate attributes on other decl types (PR #115924)

2024-11-14 Thread Eric Astor via cfe-commits
https://github.com/ericastor updated https://github.com/llvm/llvm-project/pull/115924 >From da2e66a6a2636bf1a1ab2e25afdbd29095b6db3f Mon Sep 17 00:00:00 2001 From: Eric Astor Date: Tue, 12 Nov 2024 17:37:42 + Subject: [PATCH 1/3] [clang] Instantiate attributes on other decl types Start pro

[clang] [clang] Instantiate attributes on other decl types (PR #115924)

2024-11-14 Thread Eric Astor via cfe-commits
ericastor wrote: > Still need tests for namespacealiasdecl, typedefnamedecl, and > typealiastemplatedecl actually being instantiated. > > Also, is there a reason why the only way to currently test these are with the > plugins? I would expect there to be SOME builtin attribute that could be >

[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)

2024-11-14 Thread via cfe-commits
https://github.com/AreaZR updated https://github.com/llvm/llvm-project/pull/85465 >From 357b8ca93207c8a405ce908dc8705bb74e578160 Mon Sep 17 00:00:00 2001 From: Rose Date: Fri, 15 Mar 2024 16:43:10 -0400 Subject: [PATCH] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the

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

2024-11-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM now. Thank you for this high quality patch. This isn't the first time, I remember. Excellent track record. https://github.com/llvm/llvm-project/pull/115579 ___ cfe-commits mailing list cfe-c

[clang] [clang] Instantiate attributes on other decl types (PR #115924)

2024-11-14 Thread Erich Keane via cfe-commits
@@ -52,7 +52,7 @@ struct ExampleAttrInfo : public ParsedAttrInfo { AttrHandling handleDeclAttribute(Sema &S, Decl *D, const ParsedAttr &Attr) const override { // Check if the decl is at file scope. -if (!D->getDeclContext()->isFileCo

[clang] [clang] Instantiate attributes on other decl types (PR #115924)

2024-11-14 Thread Erich Keane via cfe-commits
@@ -41,9 +41,9 @@ struct ExampleAttrInfo : public ParsedAttrInfo { bool diagAppertainsToDecl(Sema &S, const ParsedAttr &Attr, const Decl *D) const override { // This attribute appertains to functions only. erichkeane wrote: Do

[clang] [clang] Instantiate attributes on other decl types (PR #115924)

2024-11-14 Thread Erich Keane via cfe-commits
@@ -44,6 +47,11 @@ void fn3() { template_fn<5>(); } // CHECK: -IntegerLiteral 0x{{[0-9a-z]+}} {{}} 'int' 5 // CHECK: -IntegerLiteral 0x{{[0-9a-z]+}} {{}} 'int' 1 // CHECK: -AnnotateAttr 0x{{[0-9a-z]+}} {{}} "example" +// CHECK: -StringLiteral 0x{{[0-9a-z]+}} {{}} 'const char[

[clang] [clang] Instantiate attributes on other decl types (PR #115924)

2024-11-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Still need tests for namespacealiasdecl, typedefnamedecl, and typealiastemplatedecl actually being instantiated. Also, is there a reason why the only way to currently test these are with the plugins? I would expect there to be SOME builtin attribute th

[clang] [clang] Instantiate attributes on other decl types (PR #115924)

2024-11-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/115924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix name lookup for dependent bases (PR #114978)

2024-11-14 Thread Vladislav Belov via cfe-commits
vbe-sc wrote: @sdkrystian, could you, please, take a look? We are about to merge this https://github.com/llvm/llvm-project/pull/114978 ___ 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-11-14 Thread Alex Voicu via cfe-commits
@@ -5390,11 +5390,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] Add CreateRuntimeFunction overload that takes a clang type. (PR #113506)

2024-11-14 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/113506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-14 Thread via cfe-commits
Author: Eli Friedman Date: 2024-11-14T14:35:40-08:00 New Revision: 6bd3f2e8986f4eb7972bc0102ff4a706dacc0d48 URL: https://github.com/llvm/llvm-project/commit/6bd3f2e8986f4eb7972bc0102ff4a706dacc0d48 DIFF: https://github.com/llvm/llvm-project/commit/6bd3f2e8986f4eb7972bc0102ff4a706dacc0d48.diff

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-14 Thread via cfe-commits
@@ -7,26 +7,39 @@ Checks for common roundabout ways to express ``starts_with`` and ``ends_with`` and suggests replacing with the simpler method when it is available. Notably, this will work with ``std::string`` and ``std::string_view``. -.. code-block:: c++ +The check handle

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

2024-11-14 Thread David Salinas via cfe-commits
@@ -0,0 +1,9 @@ +// REQUIRES: system-windows david-salinas wrote: ok, I was just basing this off of existing tests. But I see that recently there has been support for targets in the REQUIRES statements. I'll change these for both the Windows and Linux tests.

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-14 Thread Finn Plummer via cfe-commits
@@ -93,6 +93,7 @@ def int_dx_rsqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>] def int_dx_wave_active_countbits : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i1_ty], [IntrConvergent, IntrNoMem]>; def int_dx_wave_getlaneindex : DefaultAttrsIntrinsic<[llvm_i32

[clang] [clang] Instantiate attributes on other decl types (PR #115924)

2024-11-14 Thread Eric Astor via cfe-commits
https://github.com/ericastor updated https://github.com/llvm/llvm-project/pull/115924 >From da2e66a6a2636bf1a1ab2e25afdbd29095b6db3f Mon Sep 17 00:00:00 2001 From: Eric Astor Date: Tue, 12 Nov 2024 17:37:42 + Subject: [PATCH 1/2] [clang] Instantiate attributes on other decl types Start pro

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/115902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-14 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka approved this pull request. LGTM 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] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-14 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt updated https://github.com/llvm/llvm-project/pull/115902 >From 845256b2ed971a4e42f7f871e8b51e711486261a Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Mon, 11 Nov 2024 16:34:23 -0700 Subject: [PATCH 1/9] [HLSL] Implement WaveActiveAnyTrue intrinsic --- clang/in

[clang] [Clang] [Tests] Refactor most unit tests to use DRAV instead (PR #115132)

2024-11-14 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/115132 >From 0dd745286a124f7142d827810be5185abdc196cf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Mon, 19 Aug 2024 17:46:53 +0200 Subject: [PATCH] [Tests] Refactor most tests to use the dynamic visitor --- clang/u

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-14 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt updated https://github.com/llvm/llvm-project/pull/115902 >From 845256b2ed971a4e42f7f871e8b51e711486261a Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Mon, 11 Nov 2024 16:34:23 -0700 Subject: [PATCH 01/11] [HLSL] Implement WaveActiveAnyTrue intrinsic --- clang/

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

2024-11-14 Thread Alex Voicu via cfe-commits
@@ -5159,16 +5156,19 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, } else if (!ReturnValue.isNull()) { SRetPtr = ReturnValue.getAddress(); } else { - SRetPtr = CreateMemTemp(RetTy, "tmp", &SRetAlloca); + SRetPtr = CreateMemTempWith

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

2024-11-14 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] [clang-tools-extra] [Clang] Use TargetInfo when deciding if an address space is compatible (PR #115777)

2024-11-14 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. Code LGTM. I would still prefer this PR to just contain the NFC refactor, with a follow up that adds the semantic changes to the AMDGPU and NVPTX targets. https://github.com/llvm/llvm-project/pull/115777 ___

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

2024-11-14 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Confirmed that this change causes crash with -Wunsafe-buffer-usage: https://godbolt.org/z/vcv8d6sYr. My previously manual-reduced repro in https://github.com/llvm/llvm-project/pull/91991#issuecomment-2477311737 happens to crash before this change. https://github.com/llvm/llv

[clang] [clang] Instantiate attributes on LabelDecls (PR #115924)

2024-11-14 Thread Eric Astor via cfe-commits
ericastor wrote: Alright, I've scoped this change back down to just LabelDecls, and added tests that avoid the use of plugins. I appreciate your review! https://github.com/llvm/llvm-project/pull/115924 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [clang] Instantiate attributes on LabelDecls (PR #115924)

2024-11-14 Thread Eric Astor via cfe-commits
https://github.com/ericastor edited https://github.com/llvm/llvm-project/pull/115924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Instantiate attributes on other decl types (PR #115924)

2024-11-14 Thread Eric Astor via cfe-commits
https://github.com/ericastor updated https://github.com/llvm/llvm-project/pull/115924 >From da2e66a6a2636bf1a1ab2e25afdbd29095b6db3f Mon Sep 17 00:00:00 2001 From: Eric Astor Date: Tue, 12 Nov 2024 17:37:42 + Subject: [PATCH 1/3] [clang] Instantiate attributes on other decl types Start pro

[clang] [clang] Instantiate attributes on other decl types (PR #115924)

2024-11-14 Thread Eric Astor via cfe-commits
https://github.com/ericastor updated https://github.com/llvm/llvm-project/pull/115924 >From da2e66a6a2636bf1a1ab2e25afdbd29095b6db3f Mon Sep 17 00:00:00 2001 From: Eric Astor Date: Tue, 12 Nov 2024 17:37:42 + Subject: [PATCH 1/5] [clang] Instantiate attributes on other decl types Start pro

[clang] [clang] Instantiate attributes on other decl types (PR #115924)

2024-11-14 Thread Eric Astor via cfe-commits
@@ -52,7 +52,7 @@ struct ExampleAttrInfo : public ParsedAttrInfo { AttrHandling handleDeclAttribute(Sema &S, Decl *D, const ParsedAttr &Attr) const override { // Check if the decl is at file scope. -if (!D->getDeclContext()->isFileCo

[clang] [clang] Handle trivial_abi attribute for Microsoft ABI. (PR #88857)

2024-11-14 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The original patch just changed the calling convention for structs explicitly marked trivial_abi. @rnk wanted to instead introduce the notion of a "trivial-abi-aware" type, i.e. a type that is either trivial_abi, or contains a trivial-abi-aware field/base. The patch was

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

2024-11-14 Thread John McCall via cfe-commits
@@ -5390,11 +5390,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/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-14 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] b05d37d - Revert "Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (#91991)"

2024-11-14 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2024-11-14T13:43:59-08:00 New Revision: b05d37d0d25e5f3ef181e11eb2a61dd816ae72e1 URL: https://github.com/llvm/llvm-project/commit/b05d37d0d25e5f3ef181e11eb2a61dd816ae72e1 DIFF: https://github.com/llvm/llvm-project/commit/b05d37d0d25e5f3ef181e11eb2a61dd816ae72e1.diff LOG

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-14 Thread Helmut Januschka via cfe-commits
@@ -173,7 +222,80 @@ void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) { this); } +void UseStartsEndsWithCheck::handleSubstrMatch(const MatchFinder::MatchResult &Result) { + const auto *SubstrCall = Result.Nodes.getNodeAs("substr_fun"); + const auto

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

2024-11-14 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/114588 >From 087c2dfeffbadba4df12d5c429bb1e22e9034a3f Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 29 Oct 2024 19:39:31 + Subject: [PATCH 1/6] adding llvm intrinsic --- clang/include/clang/Basic/Bui

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

2024-11-14 Thread Aaron Puchert via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-14 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt updated https://github.com/llvm/llvm-project/pull/115902 >From 845256b2ed971a4e42f7f871e8b51e711486261a Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Mon, 11 Nov 2024 16:34:23 -0700 Subject: [PATCH 1/8] [HLSL] Implement WaveActiveAnyTrue intrinsic --- clang/in

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

2024-11-14 Thread John McCall via cfe-commits
@@ -5390,11 +5390,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] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-14 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt updated https://github.com/llvm/llvm-project/pull/115902 >From 845256b2ed971a4e42f7f871e8b51e711486261a Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Mon, 11 Nov 2024 16:34:23 -0700 Subject: [PATCH 1/8] [HLSL] Implement WaveActiveAnyTrue intrinsic --- clang/in

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-14 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 27d43534fd54fecc421a048638140fb4a7004b67 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Enhance modernize-use-starts-ends-with with

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

2024-11-14 Thread Jan Voung via cfe-commits
jvoung wrote: > 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 That is true (and we've considered that -- FWIW, ymand and our team have been maintaining this checker). But as is, we are curr

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

2024-11-14 Thread John McCall via cfe-commits
@@ -5159,16 +5156,19 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, } else if (!ReturnValue.isNull()) { SRetPtr = ReturnValue.getAddress(); } else { - SRetPtr = CreateMemTemp(RetTy, "tmp", &SRetAlloca); + SRetPtr = CreateMemTempWith

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-11-14 Thread Michael Toguchi via cfe-commits
mdtoguchi wrote: Ping https://github.com/llvm/llvm-project/pull/107493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add UNSIGNED (PR #113504)

2024-11-14 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 376713ff505f31b698a3ab095fad7b6e08f99e74 d1e18cf072c63d064a749f580c57dc1c3123accd --e

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

2024-11-14 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Hi, we have found this causing clang to crash with -Wunsafe-buffer-usage: https://godbolt.org/z/nvWxW43fK https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

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

2024-11-14 Thread via cfe-commits
@@ -31,6 +31,10 @@ class UseStartsEndsWithCheck : public ClangTidyCheck { std::optional getCheckTraversalKind() const override { return TK_IgnoreUnlessSpelledInSource; } +private: + void handleSubstrMatch(const ast_matchers::MatchFinder::MatchResult &Result); + void h

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-14 Thread Ashley Coleman via cfe-commits
@@ -93,6 +93,7 @@ def int_dx_rsqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>] def int_dx_wave_active_countbits : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i1_ty], [IntrConvergent, IntrNoMem]>; def int_dx_wave_getlaneindex : DefaultAttrsIntrinsic<[llvm_i32

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

2024-11-14 Thread Justin Stitt via cfe-commits
JustinStitt 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? I believe it was unrelated to this PR https://github.com/llvm/llvm-project/pull/107332 ___

[clang] [clang][Analysis][NFC] Let isConfigurationValue take Expr (PR #116266)

2024-11-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Aaron Puchert (aaronpuchert) Changes The only non-`Expr` Terminator is `ObjCForCollectionStmt`, but that is arguably just a modelling issue, and we return false for every non-`Expr` anyway. Letting the caller cast to `Expr` remov

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-14 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: > also, is it "ok" to change existing tidy's? like people opted in for one, and > that changes now without them knowing? They know by reading the Release Notes 😃. In this case it's a clear improvement anyway, people are getting what they signed up for plus more. Other changes a

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

2024-11-14 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/112600 ___ 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-14 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/115045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-11-14 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/79667 >From 2b526821d4e70f3ea83f95d25f804d9fbcf82612 Mon Sep 17 00:00:00 2001 From: cqwrteur <100043421+trcrsi...@users.noreply.github.com> Date: Sat, 1 Jun 2024 02:55:50 -0400 Subject: [PATCH] [libunwind][libcxx][lib

[clang] [docs][asan][lsan] Drop list of supported architechures (PR #116302)

2024-11-14 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/116302 Full list is quite long, and quality of implementation can vary. Drop the lists to avoid confusion like https://github.com/rust-lang/rust/pull/123617 We don't maintain these for other sanitizers. >From 7da

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

2024-11-14 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/111976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   >