[clang] [HLSL] Forward arguments in BuiltinTypeMethodBuilder::callBuiltin. NFC (PR #117789)

2024-11-26 Thread Damyan Pepper via cfe-commits
@@ -656,18 +670,20 @@ BuiltinTypeDeclBuilder::addSimpleTemplateParams(ArrayRef Names, } BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addIncrementCounterMethod() { + using PH = BuiltinTypeMethodBuilder::PlaceHolder; return BuiltinTypeMethodBuilder(SemaRef, *this, "Incre

[clang] [HLSL] Forward arguments in BuiltinTypeMethodBuilder::callBuiltin. NFC (PR #117789)

2024-11-26 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp commented: LGTM - a nit and an idea in the comments. https://github.com/llvm/llvm-project/pull/117789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Forward arguments in BuiltinTypeMethodBuilder::callBuiltin. NFC (PR #117789)

2024-11-26 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/117789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Forward arguments in BuiltinTypeMethodBuilder::callBuiltin. NFC (PR #117789)

2024-11-26 Thread Damyan Pepper via cfe-commits
@@ -564,9 +585,9 @@ struct BuiltinTypeMethodBuilder { OK_Ordinary); } - BuiltinTypeMethodBuilder & - callBuiltin(StringRef BuiltinName, ArrayRef CallParms, - bool AddResourceHandleAsFirstArg = true) { + template + Built

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From f24a87de48c42f310ee73ecf480ea2dcf631881f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 1/9] [ubsan] Change ubsan-unique-traps to use nomerge instead

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
@@ -3919,18 +3919,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, Builder.CreateCondBr(Checked, Cont, TrapBB); EmitBlock(TrapBB); -llvm::CallInst *TrapCall = Builder.CreateCall( -CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), -llvm::

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From f24a87de48c42f310ee73ecf480ea2dcf631881f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 01/10] [ubsan] Change ubsan-unique-traps to use nomerge instea

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond converted_to_draft https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve the lifetime_capture_by diagnostic on the constructor. (PR #117792)

2024-11-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes With this change, the lifetime_capture_by code path will not handle the constructor decl to avoid bogus diagnostics (see the testcase). Instead, we reuse the lifetimebound code as the lifetime_capture_by(this)

[clang] [HLSL] Add ByteAddressBuffer definition to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-26 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/116699 >From 7210fcc7de181be6cad451ce1e885498c90c55fe Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Sat, 9 Nov 2024 01:34:16 + Subject: [PATCH 01/14] adding definition --- clang/lib/Sema/HLSLExternalSemaS

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-26 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/117529 >From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Mon, 25 Nov 2024 09:59:21 +0100 Subject: [PATCH 1/4] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-26 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/117529 >From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Mon, 25 Nov 2024 09:59:21 +0100 Subject: [PATCH 1/5] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
@@ -3919,18 +3919,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, Builder.CreateCondBr(Checked, Cont, TrapBB); EmitBlock(TrapBB); -llvm::CallInst *TrapCall = Builder.CreateCall( -CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), -llvm::

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-26 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka edited https://github.com/llvm/llvm-project/pull/117529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-26 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka commented: @PiotrZSL - [x] Add MakeSmartPtrType in MakeSmartPtrCheck as protected (do not initialize in constructor) - [x] Add MakeSmartPtrType to storeOptions - [x] Read MakeSmartPtrType in MakeSharedPtrCheck & MakeUniquePtrCheck constructors (set differ

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add stack clash protection (PR #117612)

2024-11-26 Thread Raphael Moreira Zinsly via cfe-commits
https://github.com/rzinsly updated https://github.com/llvm/llvm-project/pull/117612 >From f6bb44ca2242623399eb0ea946f38399fed3807c Mon Sep 17 00:00:00 2001 From: Raphael Moreira Zinsly Date: Tue, 26 Nov 2024 16:40:37 -0300 Subject: [PATCH 1/3] [NFC][RISCV] Remove CFIIndex argument from RISCVFr

[clang] [llvm] AMDGPU: Builtins & Codegen support for v_cvt_scalef32_pk_f32_{fp8|bf8} for gfx950 (PR #117741)

2024-11-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/117741 >From ba67e2e766f1432825a505a8e34188c893bd5b75 Mon Sep 17 00:00:00 2001 From: Pravin Jagtap Date: Thu, 18 Apr 2024 01:18:49 -0400 Subject: [PATCH] AMDGPU: Builtins & Codegen support for v_cvt_scalef32_pk_f32_{fp

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From f24a87de48c42f310ee73ecf480ea2dcf631881f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 01/12] [ubsan] Change ubsan-unique-traps to use nomerge instea

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond ready_for_review https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-26 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/117791 >From 1b073f9a06f4a0844d703923c3edd97085b47918 Mon Sep 17 00:00:00 2001 From: einvbri Date: Mon, 25 Nov 2024 10:31:57 +0100 Subject: [PATCH] [analyzer] Modernize, improve and promote chroot checker This chan

[clang] [llvm] [RISCV] Add stack clash protection (PR #117612)

2024-11-26 Thread Raphael Moreira Zinsly via cfe-commits
@@ -0,0 +1,208 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc -mtriple=riscv64 -mattr=+m,+v -O2 < %s \ +; RUN: | FileCheck %s -check-prefix=RV64I rzinsly wrote: It was an oversight on my part, fixed now. https://g

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-26 Thread Richard Smith via cfe-commits
zygoloid wrote: > Hey Richard - We added idempotency to `define_aggregate` in response to > concern from Clang maintainers that it could interact poorly with > `clang-repl`. The argument was that idempotency would provide a better > experience for a user that wanted to re-evaluate an expressio

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From cffa7c3081a1d7b9cb64ac129109cb358d11a751 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 01/14] [ubsan] Change ubsan-unique-traps to use nomerge instea

[clang] 47dbf35 - Reapply "[NFC][clang] Add ubsan-trap-merge.c test to show absence of nomerge" (#117804) (#117805)

2024-11-26 Thread via cfe-commits
Author: Thurston Dang Date: 2024-11-26T14:58:44-08:00 New Revision: 47dbf359041299c5f19f82e7204c6c9675b6e69a URL: https://github.com/llvm/llvm-project/commit/47dbf359041299c5f19f82e7204c6c9675b6e69a DIFF: https://github.com/llvm/llvm-project/commit/47dbf359041299c5f19f82e7204c6c9675b6e69a.diff

[clang] Reapply "[NFC][clang] Add ubsan-trap-merge.c test to show absence of nomerge" (#117804) (PR #117805)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/117805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-26 Thread via cfe-commits
@@ -150,6 +150,16 @@ New check aliases Changes in existing checks ^^ +- Improved :doc:modernize-make-shared + check by adding a new option + `MakeSmartPtrType`` to specify the corresponding smart pointer type, with a + default value of ``::std::sha

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-26 Thread via cfe-commits
@@ -150,6 +150,16 @@ New check aliases Changes in existing checks ^^ +- Improved :doc:modernize-make-shared + check by adding a new option + `MakeSmartPtrType`` to specify the corresponding smart pointer type, with a EugeneZelenko w

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-26 Thread via cfe-commits
@@ -150,6 +150,16 @@ New check aliases Changes in existing checks ^^ +- Improved :doc:modernize-make-shared + check by adding a new option + `MakeSmartPtrType`` to specify the corresponding smart pointer type, with a + default value of ``::std::sha

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From e635c76812eb8a6346e8602ec2eb6e4c389fcf6c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 01/15] [ubsan] Change ubsan-unique-traps to use nomerge instea

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
@@ -3919,18 +3919,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, Builder.CreateCondBr(Checked, Cont, TrapBB); EmitBlock(TrapBB); -llvm::CallInst *TrapCall = Builder.CreateCall( -CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), -llvm::

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-26 Thread Richard Smith via cfe-commits
zygoloid wrote: > @zygoloid would it be correct to say that you want the Standard to leave > idempotency of functions with side effects up to implementations, and, > consequently, you want the model of how side effects are integrated into > constant evaluation to work for both idempotent and n

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From e635c76812eb8a6346e8602ec2eb6e4c389fcf6c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 01/16] [ubsan] Change ubsan-unique-traps to use nomerge instea

[clang] [clang] Diagnose dangling references for parenthesized aggregate initialization. (PR #117690)

2024-11-26 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 approved this pull request. https://github.com/llvm/llvm-project/pull/117690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Diagnose dangling references for parenthesized aggregate initialization. (PR #117690)

2024-11-26 Thread Utkarsh Saxena via cfe-commits
@@ -961,6 +963,17 @@ static void visitLocalsRetainedByInitializer(IndirectLocalPath &Path, if (isa(Init) || isa(Init)) return visitFunctionCallArguments(Path, Init, Visit); + if (auto *CPE = dyn_cast(Init)) { +Path.push_back({IndirectLocalPathEntry::ParenAggInit, C

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-11-26 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm edited https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-11-26 Thread David Truby via cfe-commits
@@ -61,3 +61,24 @@ ! CHECK-TWO-CONFIGS-NEXT: Configuration file: {{.*}}Inputs{{.}}config2{{.}}config-4.cfg ! CHECK-TWO-CONFIGS: -ffp-contract=fast ! CHECK-TWO-CONFIGS: -O3 + +!--- The -l flags should be moved to the end of input list and appear only when linking. +! RUN: %fla

[clang] [clang] Only build static analyzer sources if requested (PR #71653)

2024-11-26 Thread Balazs Benics via cfe-commits
steakhal wrote: As a CSA maintainer, I believe having this component optional is valuable just like @whisperity described. To me, it's not an important subject such that I'd invest time here, but I'm ready to review patches improving the status quo. What is important here that by default it wou

[clang] [clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes (PR #116391)

2024-11-26 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. https://github.com/llvm/llvm-project/pull/116391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang] LoongArch64 support for BIND(C) derived types in mabi=lp64d. (PR #117108)

2024-11-26 Thread Zhaoxin Yang via cfe-commits
@@ -1151,6 +1154,311 @@ struct TargetLoongArch64 : public GenericTarget { return GenericTarget::integerArgumentType(loc, argTy); } + + /// Flatten non-basic types, resulting in an array of types containing only + /// `IntegerType` and `FloatType`. + std::vector flatt

[clang] Treat escaped newlines as whitespace in Lexer::getRawToken. (PR #117548)

2024-11-26 Thread Samira Bazuzi via cfe-commits
bazuzi wrote: > > If an escaped newline should not be considered whitespace, then instead of > > this change, getRawToken should be modified to return true when whitespace > > follows the escaped newline present at Loc > > That sounds like a more promising approach. Is that something you would

[clang] Treat escaped newlines as whitespace in Lexer::getRawToken. (PR #117548)

2024-11-26 Thread Samira Bazuzi via cfe-commits
https://github.com/bazuzi updated https://github.com/llvm/llvm-project/pull/117548 >From 9c8b31dc266b770927785834c841b8ae5a7ebb58 Mon Sep 17 00:00:00 2001 From: Samira Bazuzi Date: Fri, 22 Nov 2024 15:45:55 -0500 Subject: [PATCH 1/2] Treat escaped newlines as whitespace in Lexer::getRawToken.

[clang] [flang] [flang] Preserve fixed form in fc1 -x value (PR #117563)

2024-11-26 Thread via cfe-commits
macurtis-amd wrote: Thanks @banach-space and @DavidTruby for looking at this. > banach-space: Adding new types to > [Types.def](https://github.com/llvm/llvm-project/pull/117563/files#diff-b2abf750cadedc6109158e6f82b66abfaabd7c7c86c650d2a5163dc3e5fc44a7) > is a fairly huge design update. I'm no

[clang] [Clang] Emit stub version of OpenCL Kernel (PR #115821)

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

[clang] Skip escaped newlines before checking for whitespace in Lexer::getRawToken. (PR #117548)

2024-11-26 Thread Samira Bazuzi via cfe-commits
https://github.com/bazuzi edited https://github.com/llvm/llvm-project/pull/117548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-11-26 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > The default behaviour of `ids` is to assume that anything declared in the > > > header is public and it will ensure that anything added in the headers is > > > annotated properly to say it is exposed, making something private would > > > be an explicit decision that t

[clang] [Clang] Emit stub version of OpenCL Kernel (PR #115821)

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

[clang-tools-extra] [clang-tidy] fix false positive in bugprone-return-const-ref-from-parameter (PR #117734)

2024-11-26 Thread via cfe-commits
@@ -179,7 +179,8 @@ Changes in existing checks - Improved :doc:`bugprone-return-const-ref-from-parameter ` check to diagnose potential dangling references when returning a ``const &`` parameter - by using the conditional operator ``cond ? var1 : var2``. + by using the con

[clang-tools-extra] [clang-tidy] fix false positive in bugprone-return-const-ref-from-parameter (PR #117734)

2024-11-26 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 f7dc1d0ac83b7c6b691167d8d02561ba0837b631 80e12b2ed1f324181d280cbd2fd242f63642bed6 --e

[clang] [Clang] prevent errors for deduction guides using deduced type aliases (PR #117450)

2024-11-26 Thread Oleksandr T. via cfe-commits
@@ -11451,7 +11451,11 @@ bool Sema::CheckDeductionGuideDeclarator(Declarator &D, QualType &R, bool MightInstantiateToSpecialization = false; if (auto RetTST = TSI->getTypeLoc().getAsAdjusted()) { - TemplateName SpecifiedName = RetTST.getTypePtr()->getT

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-11-26 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/101469 >From 82ab798fc72c6de64ae527d96393f0dc67307e98 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 1 Aug 2024 12:30:22 +0200 Subject: [PATCH 1/8] [Clang] Add [[clang::diagnose_specializations]] --- cl

[clang-tools-extra] [clang-tidy] fix false positive in bugprone-return-const-ref-from-parameter (PR #117734)

2024-11-26 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/117734 >From 7dd899ec58a61b02a2bd584d021dcddfb20ceaba Mon Sep 17 00:00:00 2001 From: Qizhi Hu <836744...@qq.com> Date: Wed, 27 Nov 2024 00:57:00 +0800 Subject: [PATCH] [clang-tidy] fix false positive in bugprone-return-

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-11-26 Thread Nikolas Klauser via cfe-commits
@@ -473,6 +473,7 @@ def ExpansionToDefined : DiagGroup<"expansion-to-defined">; def FlagEnum : DiagGroup<"flag-enum">; def IncrementBool : DiagGroup<"increment-bool", [DeprecatedIncrementBool]>; def InfiniteRecursion : DiagGroup<"infinite-recursion">; +def InvalidSpecialization

[clang-tools-extra] [clang-tidy] fix false positive in bugprone-return-const-ref-from-parameter (PR #117734)

2024-11-26 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/117734 >From 5d35398c45631a58e283899419f00e4a5e0ba722 Mon Sep 17 00:00:00 2001 From: Qizhi Hu <836744...@qq.com> Date: Wed, 27 Nov 2024 00:57:00 +0800 Subject: [PATCH] [clang-tidy] fix false positive in bugprone-return-

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Is there a branch up for this on https://llvm-compile-time-tracker.com/ so that we've verified that this actually improves performance? https://github.com/llvm/llvm-project/pull/116719 ___ cfe-commits mailing

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/116719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-26 Thread Aaron Ballman via cfe-commits
@@ -14690,6 +14690,13 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) { } } + // The result of __builtin_counted_by_ref cannot be assigned to a variable. + // It allows leaking and modification of bounds safety information. + if (IsBuiltinCountedByRef(VD->getInit())

[clang] Propagate lifetimebound from formal parameters to those in the canonical declaration and use that for analysis (PR #107627)

2024-11-26 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/107627 >From dffc6abf0a1e4b1e8977bf9476bb65d808b46986 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Fri, 6 Sep 2024 14:16:15 -0400 Subject: [PATCH 1/3] Propagate lifetimebound from formal parameter

[clang] Propagate lifetimebound from formal parameters to those in the canonical declaration and use that for analysis (PR #107627)

2024-11-26 Thread via cfe-commits
@@ -266,6 +262,20 @@ void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) { LifetimeBoundAttr::CreateImplicit(Context, FD->getLocation())); } } + } else if (auto *CanonDecl = FD->getCanonicalDecl(); FD != CanonDecl) { +// Propagate the lifetimeb

[clang-tools-extra] [clang-tidy] fix false positive in bugprone-return-const-ref-from-parameter (PR #117734)

2024-11-26 Thread Piotr Zegar via cfe-commits
@@ -18,14 +18,17 @@ namespace clang::tidy::bugprone { void ReturnConstRefFromParameterCheck::registerMatchers(MatchFinder *Finder) { const auto DRef = ignoringParens( declRefExpr( - to(parmVarDecl(hasType(hasCanonicalType( - qualType

[clang-tools-extra] [clang-tidy] fix false positive in bugprone-return-const-ref-from-parameter (PR #117734)

2024-11-26 Thread Piotr Zegar via cfe-commits
@@ -151,6 +151,12 @@ void instantiate(const int ¶m, const float ¶mf, int &mut_param, float &m itf6(mut_paramf); } +template +void f(const T& t) { +const auto get = [&t] -> const T& { return t; }; +return T{}; +} PiotrZSL wrote: Please add tes

[clang] Propagate lifetimebound from formal parameters to those in the canonical declaration and use that for analysis (PR #107627)

2024-11-26 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/107627 >From e9af4e3d8f629fff790f2f573ceccdf01fcb9495 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Fri, 6 Sep 2024 14:16:15 -0400 Subject: [PATCH 1/3] Propagate lifetimebound from formal parameter

[clang-tools-extra] [clang-tidy] fix false positive in bugprone-return-const-ref-from-parameter (PR #117734)

2024-11-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Please add positive test for lambdas. https://github.com/llvm/llvm-project/pull/117734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [llvm] [LoongArch] Support LA V1.1 feature that div.w[u] and mod.w[u] instructions with inputs not signed-extended. (PR #116764)

2024-11-26 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. https://github.com/llvm/llvm-project/pull/116764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit stub version of OpenCL Kernel (PR #115821)

2024-11-26 Thread Shilei Tian via cfe-commits
shiltian wrote: Yes, that's the idea. In that way, we will not have any function call to a `amdgpu_kernel`. https://github.com/llvm/llvm-project/pull/115821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-11-26 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Would be glad to see everyone's feedback on the changes. https://github.com/llvm/llvm-project/pull/113148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit stub version of OpenCL Kernel (PR #115821)

2024-11-26 Thread Joseph Huber via cfe-commits
@@ -126,3 +137,19 @@ void use() { // FVIS-DEFAULT: declare void @ext_func_default() // FVIS-PROTECTED: declare void @ext_func_default() // FVIS-HIDDEN: declare void @ext_func_default() + +// FVIS-DEFAULT: define{{.*}} void @__clang_ocl_kern_imp_kern() +// FVIS-PROTECTED: define

[clang] [Clang] skip consumed analysis for consteval conditions in control-flow terminators (PR #117403)

2024-11-26 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @cor3ntin Thanks for there feedback. I've added release notes and updated the description. @AaronBallman could you review these changes? https://github.com/llvm/llvm-project/pull/117403 ___ cfe-commits mailing list cfe-commits@lists

[clang] [Clang] Emit stub version of OpenCL Kernel (PR #115821)

2024-11-26 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -emit-llvm -o - %s | FileCheck %s shiltian wrote: I think we really need to force auto generate to make (other's) future life much easier. https://github.com/llvm/llvm-project/pull/115821

[clang] [flang] [flang] Preserve fixed form in fc1 -x value (PR #117563)

2024-11-26 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: ``` if ( (a .eq. 0) .and.(b. eq. 1)) then ``` It seems like something in [9fb2db1](https://github.com/llvm/llvm-project/commit/9fb2db1e1f42ae10a9d8c1d9410b5f4e719fdac0) has caused a space to appear between `.` and `eq`. Should we be looking at what that commit did mo

[clang] [llvm] [AArch64][SVE] Change the immediate argument in svextq (PR #115340)

2024-11-26 Thread via cfe-commits
https://github.com/SpencerAbson updated https://github.com/llvm/llvm-project/pull/115340 >From bac0e8b46c284b17f04a68d95b87e8b8bf28f438 Mon Sep 17 00:00:00 2001 From: Spencer Abson Date: Thu, 7 Nov 2024 11:44:27 + Subject: [PATCH] [AArch64][SVE] Fix the immediate argument in svextq The mea

[clang] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-11-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/117732 >From 6a1c51fd8b6b1d04294eaac65b261bedb451f22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 26 Nov 2024 13:10:33 +0100 Subject: [PATCH] [clang] Avoid re-evaluating field bitwidth ---

[clang-tools-extra] [clang-tidy] fix false positive in bugprone-return-const-ref-from-parameter (PR #117734)

2024-11-26 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/117734 Fix https://github.com/llvm/llvm-project/issues/115743 >From 37a518b35b205e3e2e7bfbeab64d2a334519c30d Mon Sep 17 00:00:00 2001 From: Qizhi Hu <836744...@qq.com> Date: Wed, 27 Nov 2024 00:22:05 +0800 Subject: [PAT

[clang-tools-extra] [clang-tidy] fix false positive in bugprone-return-const-ref-from-parameter (PR #117734)

2024-11-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Qizhi Hu (jcsxky) Changes Fix https://github.com/llvm/llvm-project/issues/115743 --- Full diff: https://github.com/llvm/llvm-project/pull/117734.diff 3 Files Affected: - (modified) clang-tools-extra/clang-tidy/bugprone/ReturnConst

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

2024-11-26 Thread Erich Keane via cfe-commits
erichkeane wrote: Hmm, that compile time regression is unfortunate. @vbe-sc as a part of your next version of this patch, can you do some sort of analysis why this would result in further lookups/instantiation/etc? I could comprehend that perhaps we're skipping the 'current instantiation' no

[clang-tools-extra] [clang-tidy] fix false positive in bugprone-return-const-ref-from-parameter (PR #117734)

2024-11-26 Thread via cfe-commits
EugeneZelenko wrote: Please rebase from current `main`. https://github.com/llvm/llvm-project/pull/117734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

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

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-11-26 Thread via cfe-commits
https://github.com/SpencerAbson updated https://github.com/llvm/llvm-project/pull/117717 >From eac5704250a454ede434d4967fb88902b689fce3 Mon Sep 17 00:00:00 2001 From: Spencer Abson Date: Tue, 26 Nov 2024 13:49:12 + Subject: [PATCH 1/2] Refactor parts of SveEmitter.cpp --- clang/include/cl

[clang] [SYCL] Change SYCL version according to standard (PR #114790)

2024-11-26 Thread Greg Lueck via cfe-commits
https://github.com/gmlueck approved this pull request. https://github.com/llvm/llvm-project/pull/114790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move warning about memset/memcpy to NonTriviallyCopyable type… (PR #117387)

2024-11-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/117387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl 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][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 78c7024 - [OpenACC] Implement 'present' for combined constructs.

2024-11-26 Thread via cfe-commits
Author: erichkeane Date: 2024-11-26T10:49:41-08:00 New Revision: 78c7024640a5b511685c445f554b7d985a7cf286 URL: https://github.com/llvm/llvm-project/commit/78c7024640a5b511685c445f554b7d985a7cf286 DIFF: https://github.com/llvm/llvm-project/commit/78c7024640a5b511685c445f554b7d985a7cf286.diff LO

[clang] [clang] Move warning about memset/memcpy to NonTriviallyCopyable type… (PR #117387)

2024-11-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/117387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move warning about memset/memcpy to NonTriviallyCopyable type… (PR #117387)

2024-11-26 Thread Aaron Ballman via cfe-commits
@@ -683,11 +683,13 @@ def SizeofArrayDecay : DiagGroup<"sizeof-array-decay">; def SizeofPointerMemaccess : DiagGroup<"sizeof-pointer-memaccess">; def MemsetTransposedArgs : DiagGroup<"memset-transposed-args">; def DynamicClassMemaccess : DiagGroup<"dynamic-class-memaccess">; -d

[clang] [clang] Move warning about memset/memcpy to NonTriviallyCopyable type… (PR #117387)

2024-11-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Generally LGTM modulo comments from @zmodem https://github.com/llvm/llvm-project/pull/117387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Only build static analyzer sources if requested (PR #71653)

2024-11-26 Thread via cfe-commits
whisperity wrote: Took some measurements on X86. Size-wise the CSA-related libraries and objects are roughly the same. We have 2.2G for the three libraries `lib/libclangStaticAnalzyer{Checkers,Core,Frontend}.a` and then another 2.2G for the `tools/clang/lib/StaticAnalyzer/**` object files. The

[clang] [flang] [Flang] LoongArch64 support for BIND(C) derived types in mabi=lp64d. (PR #117108)

2024-11-26 Thread Tom Eccles via cfe-commits
@@ -1151,6 +1154,311 @@ struct TargetLoongArch64 : public GenericTarget { return GenericTarget::integerArgumentType(loc, argTy); } + + /// Flatten non-basic types, resulting in an array of types containing only + /// `IntegerType` and `FloatType`. + std::vector flatt

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

2024-11-26 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/9177 Here is the re

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From f24a87de48c42f310ee73ecf480ea2dcf631881f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 1/7] [ubsan] Change ubsan-unique-traps to use nomerge instead

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-11-26 Thread Alice Ryhl via cfe-commits
Darksonn wrote: Rust already supports kCFI and I see no reason it can't also support this scheme. We just need to be careful to introduce it in a good way that reduces the risk of mismatched hashing strategies. https://github.com/llvm/llvm-project/pull/117121 __

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2024-11-26 Thread Aaron Ballman via cfe-commits
@@ -6418,6 +6418,12 @@ def warn_signed_bitfield_enum_conversion : Warning< InGroup, DefaultIgnore; def note_change_bitfield_sign : Note< "consider making the bitfield type %select{unsigned|signed}0">; +def warn_ms_bitfield_mismatched_storage_packing : Warning< + "bit-field

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2024-11-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this! Please be sure to also add a release note to `clang/docs/ReleaseNotes.rst` so users know about the new diagnostic. https://github.com/llvm/llvm-project/pull/117428 ___ cfe-commi

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2024-11-26 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/117428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2024-11-26 Thread Aaron Ballman via cfe-commits
@@ -19213,6 +19213,29 @@ void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, Decl *EnclosingDecl, if (Record && FD->getType().isVolatileQualified()) Record->setHasVolatileMember(true); +auto IsNonDependentBitField = [](const FieldDecl *FD) { + if (!FD->

[clang] [clang] Only build static analyzer sources if requested (PR #71653)

2024-11-26 Thread Shoaib Meenai via cfe-commits
smeenai wrote: I think this makes sense in that case, though I'd wait for @llvm-beanz and @petrhosek too. https://github.com/llvm/llvm-project/pull/71653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-26 Thread Jonas Paulsson via cfe-commits
@@ -513,11 +514,26 @@ SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM, } // Handle floating-point types. + // Promote all f16 operations to float, with some exceptions below. + for (unsigned Opc = 0; Opc < ISD::BUILTIN_OP_END; ++Opc) +setOperati

  1   2   3   4   5   6   >