[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-12 Thread Justin Stitt via cfe-commits
@@ -10818,11 +10819,39 @@ static bool IsImplicitBoolFloatConversion(Sema &S, Expr *Ex, bool ToBool) { FloatCandidateBT && (FloatCandidateBT->isFloatingPoint())); } +/// Check to see if the wraps or no_wraps attribute may have been lost through +/// a function call.

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-12 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt edited https://github.com/llvm/llvm-project/pull/115094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Revert "[clang][flang] Support -time in both clang and flang" (PR #115955)

2024-11-12 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu closed https://github.com/llvm/llvm-project/pull/115955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MSP430] Default to unsigned char (PR #115964)

2024-11-12 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/115964 >From 712bbc59b1976a35c8aba4bdea8728d7e9f2b425 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 12 Nov 2024 16:02:17 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-12 Thread Justin Stitt via cfe-commits
@@ -4852,6 +4862,10 @@ BinaryOperator::BinaryOperator(const ASTContext &Ctx, Expr *lhs, Expr *rhs, if (hasStoredFPFeatures()) setStoredFPFeatures(FPFeatures); setDependence(computeDependence(this)); + if (hasWrappingOperand(Ctx)) JustinStitt wrote: A

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

2024-11-12 Thread Thorsten Schütt via cfe-commits
@@ -3730,10 +3730,10 @@ Fast-Math Flags LLVM IR floating-point operations (:ref:`fneg `, :ref:`fadd `, :ref:`fsub `, :ref:`fmul `, :ref:`fdiv `, -:ref:`frem `, :ref:`fcmp `), and :ref:`phi `, -:ref:`select `, or :ref:`call ` instructions that return -floating-point types may u

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-12 Thread Rahul Joshi via cfe-commits
jurahul wrote: Its not clear to me if the failure is real or intermittent: FAILURE Failed to match LIBC_NAMESPACE::mkdirat(AT_FDCWD, TEST_DIR, S_IRWXU) against Succeeds(0). Expected return value to be equal to 0 but got -1. Expected errno to be equal to "Success" but got "File exists". https:

[clang] [codegen] Fix crash in codegen caused by pointer calculation overflow (PR #115791)

2024-11-12 Thread via cfe-commits
vabridgers wrote: Closing this review since this approach is not appropriate. https://github.com/llvm/llvm-project/pull/115791 ___ 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-12 Thread Eric Astor via cfe-commits
@@ -9,7 +9,7 @@ void CheckEnumerations() { // Check that non-vector 'mode' attribute is OK with enumeration types. typedef T __attribute__((mode(QI))) T1; typedef T T2 __attribute__((mode(HI))); - typedef T __attribute__((mode(V8SI))) T3; // expected-error{{mode 'V8SI' i

[clang] [flang] Revert "[clang][flang] Support -time in both clang and flang" (PR #115955)

2024-11-12 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/115955 Reverts llvm/llvm-project#109165 This created a buildbot failure on [Fuchsia](https://lab.llvm.org/buildbot/#/builders/11/builds/8080). >From 86e5163d2403cebb179815ea8ee012f13d273efd Mon Sep 17 00:00:00 20

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

2024-11-12 Thread Eric Astor via cfe-commits
ericastor wrote: > The change is reasonable, but I need to see tests for each of the types. > > In general, we've had the attitude of "we can enable this instantiation once > we see examples of it being useful", so we need tests to make sure it is > instantiated, AND that it is useful. This m

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

2024-11-12 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt 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] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-12 Thread Finn Plummer via cfe-commits
@@ -1920,6 +1923,24 @@ bool SPIRVInstructionSelector::selectSign(Register ResVReg, return Result; } +bool SPIRVInstructionSelector::selectWaveActiveAnyTrue(Register ResVReg, + const SPIRVType *ResType, +

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

2024-11-12 Thread Finn Plummer via cfe-commits
@@ -19108,6 +19108,21 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: { /*ReturnType=*/Op0->getType(), CGM.getHLSLRuntime().getStepIntrinsic(), ArrayRef{Op0, Op1}, nullptr, "hlsl.step"); } + case Builtin::BI__builtin_hlsl_wave_active_any_true: { +Int

[clang] [llvm] Reland [clang][AArch64] Add getHostCPUFeatures to query for enabled f… (PR #115467)

2024-11-12 Thread David Green via cfe-commits
https://github.com/davemgreen approved this pull request. Thanks that does look like it did it. https://github.com/llvm/llvm-project/pull/115467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-fullbuild-dbg-asan` running on `libc-x86_64-debian-fullbuild` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/171/builds/10204 Here is

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

2024-11-12 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] 7b5e285 - [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (#115573)

2024-11-12 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-11-12T14:39:02-08:00 New Revision: 7b5e285d16090c2ddf4ee539c410d24bde52cbea URL: https://github.com/llvm/llvm-project/commit/7b5e285d16090c2ddf4ee539c410d24bde52cbea DIFF: https://github.com/llvm/llvm-project/commit/7b5e285d16090c2ddf4ee539c410d24bde52cbea.diff L

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/115573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang-Repl] Add support for out-of-process execution. (PR #110418)

2024-11-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-with-thin-lto-ubuntu` running on `as-worker-92` while building `clang` at step 7 "test-stage1-compiler". Full details are available at: https://lab.llvm.org/buildbot/#/builders/127/builds/1404 Here is the relevant pie

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-11-12 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 >From 3a962270521aa7b48b64e5ac5fa0edb900990023 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 10 Oct 2024 16:05:50 -0700 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [codegen] Fix crash in codegen caused by pointer calculation overflow (PR #115791)

2024-11-12 Thread via cfe-commits
vabridgers wrote: @efriedma-quic , thanks for the comments. I'll explore a more appropriate solution. https://github.com/llvm/llvm-project/pull/115791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-11-12 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/115487 >From 5e24d212f797b5fa1b6da1526c807046373d3c21 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 8 Nov 2024 16:13:17 +0200 Subject: [PATCH 1/2] [Clang] skip default argument instantiation for non-definin

[clang] [codegen] Fix crash in codegen caused by pointer calculation overflow (PR #115791)

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

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

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

[clang] [clang] [NFC] Split checkAttributesAfterMerging() to multiple functions (PR #115464)

2024-11-12 Thread Jacek Caban via cfe-commits
https://github.com/cjacek approved this pull request. https://github.com/llvm/llvm-project/pull/115464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][lang][TableGen] Simplify `EmitClangDiagsIndexName` (PR #115962)

2024-11-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/115962 Simplify `EmitClangDiagsIndexName` to directly sort records instead of creating an array of `RecordIndexElement` containing record name and sorting it. >From 07c74bee58d1a56978b1cba00755cc3ca14cb71f Mon Sep 17

[clang] [NFC][Clang] Use StringRef instead of string in ClangDiagnosticEmitter (PR #115959)

2024-11-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/115959 >From 04b7434139ffdb412797e9d4fe7d31ecbdbe7748 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Tue, 12 Nov 2024 15:38:02 -0800 Subject: [PATCH] [NFC][Clang] Use StringRef instead of string in ClangDiagnosticEm

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-12 Thread Justin Stitt via cfe-commits
@@ -6664,6 +6664,13 @@ def err_builtin_counted_by_ref_invalid_lhs_use : Error< def err_builtin_counted_by_ref_has_side_effects : Error< "'__builtin_counted_by_ref' argument cannot have side-effects">; +def warn_wraps_attr_var_decl_type_not_integer : Warning<

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-12 Thread Justin Stitt via cfe-commits
@@ -6664,6 +6664,13 @@ def err_builtin_counted_by_ref_invalid_lhs_use : Error< def err_builtin_counted_by_ref_has_side_effects : Error< "'__builtin_counted_by_ref' argument cannot have side-effects">; +def warn_wraps_attr_var_decl_type_not_integer : Warning< + "using attrib

[clang] [clang][RISCV] Support `norelax` attribute for RISCV (PR #115981)

2024-11-12 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: I disagree that this is a thing which should exist. It's solving the problem in the wrong place. https://github.com/llvm/llvm-project/pull/115981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

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

[clang] [clang][RISCV] Support `norelax` attribute for RISCV (PR #115981)

2024-11-12 Thread Yangyu Chen via cfe-commits
cyyself wrote: > I disagree that this is a thing which should exist. It's solving the problem > in the wrong place. Since a clean solution needs GLIBC update, I think this can be a workaround now for some generated IFUNC resolvers, such as target_clones or target_versions. https://github.com/

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-12 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Naming wise I prefer `wrap` -> `no_sanitize("undefined")` already exists but does not apply to variables and types `no_wrap` -> `sanitize("undefined")` does not exist, and a little confusing (no_wrap as well). It may look it enabled sanitization. Would it make sense to suppo

[clang] de0fd64 - [AMDGPU] Introduce a new generic target `gfx9-4-generic` (#115190)

2024-11-12 Thread via cfe-commits
Author: Shilei Tian Date: 2024-11-12T23:11:05-05:00 New Revision: de0fd64bedd23660f557833cc0108c3fb2be3918 URL: https://github.com/llvm/llvm-project/commit/de0fd64bedd23660f557833cc0108c3fb2be3918 DIFF: https://github.com/llvm/llvm-project/commit/de0fd64bedd23660f557833cc0108c3fb2be3918.diff L

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

2024-11-12 Thread Craig Topper via cfe-commits
@@ -952,14 +952,43 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) { ReplaceNode(Node, Res); return; } + case RISCVISD::BuildGPRPair: { +SDValue Ops[] = { +CurDAG->getTargetConstant(RISCV::GPRPairRegClassID, DL, MVT::i32), +Node->getOperand(0), +

[clang] [llvm] [AMDGPU] Introduce a new generic target `gfx9-4-generic` (PR #115190)

2024-11-12 Thread Shilei Tian via cfe-commits
shiltian wrote: ### Merge activity * **Nov 12, 11:06 PM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/115190). https://github.com/llvm/llvm-project/pull/115190 __

[clang] [NFC][Clang] Use StringRef instead of string in ClangDiagnosticEmitter (PR #115959)

2024-11-12 Thread Kazu Hirata via cfe-commits
@@ -145,7 +146,7 @@ static bool diagGroupBeforeByName(const Record *LHS, const Record *RHS) { RHS->getValueAsString("GroupName"); } -using DiagsInGroupTy = std::map>; +using DiagsInGroupTy = std::map>; kazutakahirata wrote: If you are putting `Strin

[clang] [NFC][Clang] Use StringRef instead of string in ClangDiagnosticEmitter (PR #115959)

2024-11-12 Thread Kazu Hirata via cfe-commits
@@ -117,15 +118,15 @@ namespace { return CategoryIDs[CategoryString]; } -typedef std::vector::const_iterator const_iterator; +typedef std::vector::const_iterator const_iterator; const_iterator begin() const { return CategoryStrings.begin(); } const_

[clang] [Clang] [NFC] Add "human" diagnostic argument format (PR #115835)

2024-11-12 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb closed https://github.com/llvm/llvm-project/pull/115835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Create aliases with custom_command (PR #115885)

2024-11-12 Thread Michał Górny via cfe-commits
@@ -355,11 +355,13 @@ function(add_libclc_builtin_set) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${obj_suffix} DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" ) foreach( a ${ARG_ALIASES} ) set( alias_suffix "${a}-${ARG_TRIPLE}.bc" ) -add_custom_target( ${alias_suffix}

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

2024-11-12 Thread Justin Fargnoli via cfe-commits
justinfargnoli wrote: > @justinfargnoli in few words the problem is in the broken link order for > those two Key references. @vvereschaka thank you for your [detail description](https://github.com/llvm/llvm-project/pull/113780#issuecomment-2448416385) of the issue. I've attempted to address

[clang] [llvm] [AMDGPU] Introduce a new generic target `gfx9-4-generic` (PR #115190)

2024-11-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/115190 >From 15a01715c36063e35cf01043e51da26c60b00246 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 6 Nov 2024 12:49:45 -0500 Subject: [PATCH] [AMDGPU] Introduce a new generic target `gfx9-4-generic` --- cla

[clang] [llvm] [AMDGPU] Introduce a new generic target `gfx9-4-generic` (PR #115190)

2024-11-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/115190 ___ 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-11-12 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM we can do the code sharing as a follow up if we want https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] Reapply "[clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #115823)

2024-11-12 Thread Utkarsh Saxena via cfe-commits
@@ -3867,6 +3869,117 @@ static void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) { S.Context, AL, EncodingIndices.data(), EncodingIndices.size())); } +LifetimeCaptureByAttr *Sema::ParseLifetimeCaptureByAttr(const ParsedAttr &AL, +

[clang] Reapply "[clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #115823)

2024-11-12 Thread Utkarsh Saxena via cfe-commits
@@ -1889,6 +1889,36 @@ def LifetimeBound : DeclOrTypeAttr { let SimpleHandler = 1; } +def LifetimeCaptureBy : DeclOrTypeAttr { + let Spellings = [Clang<"lifetime_capture_by", 0>]; + let Subjects = SubjectList<[ParmVar, ImplicitObjectParameter], ErrorDiag>; + let Args = [V

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

2024-11-12 Thread Vladimir Vereschaka via cfe-commits
vvereschaka wrote: Thank you @justinfargnoli , sure, I'll check these changes tomorrow. https://github.com/llvm/llvm-project/pull/113780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

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

2024-11-12 Thread via cfe-commits
@@ -135,8 +135,13 @@ void loongarch::getLoongArchTargetFeatures(const Driver &D, Features.push_back("+lsx"); std::string ArchName; - if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) + if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) { ArchName

[clang] 9a365bc - [Clang] [NFC] Add "human" diagnostic argument format (#115835)

2024-11-12 Thread via cfe-commits
Author: Boaz Brickner Date: 2024-11-13T07:58:11+01:00 New Revision: 9a365bc9a0dc92f25c0f1fdc25925b442dfe1455 URL: https://github.com/llvm/llvm-project/commit/9a365bc9a0dc92f25c0f1fdc25925b442dfe1455 DIFF: https://github.com/llvm/llvm-project/commit/9a365bc9a0dc92f25c0f1fdc25925b442dfe1455.diff

[clang] [clang] Warn on mismatched RequiresCapability attributes (PR #67520)

2024-11-12 Thread Aaron Puchert via cfe-commits
@@ -2282,6 +2308,9 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) { const NamedDecl *D = walker.getDecl(); CurrentFunction = dyn_cast(D); + if (isa(D)) aaronpuchert wrote: The way I understand this, `isa` checks if the argument is a

[clang] [clang] Warn on mismatched RequiresCapability attributes (PR #67520)

2024-11-12 Thread Aaron Puchert via cfe-commits
@@ -2073,6 +2073,18 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { Warnings.emplace_back(std::move(Warning), getNotes()); } + void handleAttributeMismatch(const NamedDecl *ThisDecl, + const NamedDecl *Pre

[clang] 1791b25 - [clang][CIR] Change buildX functions to emitX (#115568)

2024-11-12 Thread via cfe-commits
Author: Shoaib Meenai Date: 2024-11-12T09:56:25-08:00 New Revision: 1791b25f43f4e6a0b21284ce8076cfab160cb61a URL: https://github.com/llvm/llvm-project/commit/1791b25f43f4e6a0b21284ce8076cfab160cb61a DIFF: https://github.com/llvm/llvm-project/commit/1791b25f43f4e6a0b21284ce8076cfab160cb61a.diff

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

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

[clang] [llvm] Emit constrained atan2 intrinsic for clang builtin (PR #113636)

2024-11-12 Thread Tex Riddell via cfe-commits
https://github.com/tex3d edited https://github.com/llvm/llvm-project/pull/113636 ___ 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-12 Thread Vladislav Belov via cfe-commits
vbe-sc wrote: @sdkrystian ping 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] Warn on mismatched RequiresCapability attributes (PR #67520)

2024-11-12 Thread Aaron Puchert via cfe-commits
@@ -2249,7 +2249,7 @@ void fooF1(Foo *f) EXCLUSIVE_LOCKS_REQUIRED(f->mu_) { f->a = 1; } -void fooF2(Foo *f); +void fooF2(Foo *f); // expected-warning {{attribute mismatch between function declarations of 'fooF2'}} void fooF2(Foo *f) EXCLUSIVE_LOCKS_REQUIRED(f->mu_) { -

[clang] [analyzer] Allow copying empty structs (1/4) (PR #115916)

2024-11-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/115916 We represent copies of structs by LazyCompoundVals, that is basically a snapshot of the Store and Region that your copy would refer to. This snapshot is actually not taken for empty structs (structs that have

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

2024-11-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-directx Author: Ashley Coleman (V-FEXrt) Changes Resolves https://github.com/llvm/llvm-project/issues/99160 - [x] Implement `WaveActiveAnyTrue` clang builtin, - [x] Link `WaveActiveAnyTrue` clang builtin with `hlsl_intrinsics.h` - [x] Add sem

[clang] [clang][APINotes] Add support for the SwiftEscapable attribute (PR #115866)

2024-11-12 Thread Saleem Abdulrasool via cfe-commits
@@ -647,6 +647,13 @@ static void ProcessAPINotes(Sema &S, TagDecl *D, const api_notes::TagInfo &Info, D->addAttr(SwiftAttrAttr::Create(S.Context, "~Copyable")); } + if (auto Escapable = Info.isSwiftEscapable()) { +if (*Escapable) + D->addAttr(SwiftAttrAttr::

[clang] [clang][APINotes] Add support for the SwiftEscapable attribute (PR #115866)

2024-11-12 Thread Saleem Abdulrasool via cfe-commits
@@ -589,10 +589,16 @@ class TagTableInfo uint8_t Copyable = endian::readNext(Data); -if (Copyable == kSwiftNonCopyable) +if (Copyable == kSwiftDoesNotConform) Info.setSwiftCopyable(std::optional(false)); -else if (Copyable == kSwiftCopyable) +

[clang] [clang][APINotes] Add support for the SwiftEscapable attribute (PR #115866)

2024-11-12 Thread Saleem Abdulrasool via cfe-commits
@@ -757,6 +763,15 @@ class TagInfo : public CommonTypeInfo { SwiftCopyable = Value.value_or(false); } + std::optional isSwiftEscapable() const { +return SwiftEscapableSpecified ? std::optional(SwiftEscapable) + : std::nullopt; + }

[clang] [clang][APINotes] Add support for the SwiftEscapable attribute (PR #115866)

2024-11-12 Thread Saleem Abdulrasool via cfe-commits
@@ -1266,11 +1266,11 @@ class CommonTypeTableInfo class TagTableInfo : public CommonTypeTableInfo { public: unsigned getUnversionedInfoSize(const TagInfo &TI) { -return 2 + (TI.SwiftImportAs ? TI.SwiftImportAs->size() : 0) + - 2 + (TI.SwiftRetainOp ? TI.SwiftRet

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

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

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-12 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,38 @@ +#include +#include +#include + +#define CLC_SIGN(TYPE, F) \ + _CLC_DEF _CLC_OVERLOAD TYPE __clc_sign(TYPE x) { \ +if (__clc_isnan(x)) {

[clang] [Clang] enhance diagnostic by attaching source location to deduced type in trailing return without auto (PR #115786)

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

[clang] [Clang] enhance diagnostic by attaching source location to deduced type in trailing return without auto (PR #115786)

2024-11-12 Thread Aaron Ballman via cfe-commits
@@ -4887,9 +4887,18 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, cast(T)->getKeyword() != AutoTypeKeyword::Auto || cast(T)->isConstrained())) { -S.Diag(D.getDecl

[clang] Reapply "[analyzer][NFC] Make RegionStore dumps deterministic" (PR #115884)

2024-11-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/115884 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [test] Move CodeGen/aarch64-* into the AArch64 subfolder (PR #115818)

2024-11-12 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray commented: You could also create an ARM/ directory, and move arm-* files into that too (186 files) https://github.com/llvm/llvm-project/pull/115818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

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

2024-11-12 Thread via cfe-commits
Sirraide wrote: ping 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] [analyzer] Refine LCV handling in Store for better taint propagation (PR #114835)

2024-11-12 Thread Balazs Benics via cfe-commits
steakhal wrote: This is now superseded by the individual commits (PRs). https://github.com/llvm/llvm-project/pull/114835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-12 Thread via cfe-commits
Sirraide wrote: ping https://github.com/llvm/llvm-project/pull/115132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-12 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/102371 >From 6dbb8be2352d0cdad44d293f7cc5c13f55ec243d Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 7 Aug 2024 07:40:09 + Subject: [PATCH] [Fuchsia][CMake] Enable new libc header gen All issues blocking t

[clang] [llvm] [Clang-Repl] Add support for out-of-process execution. (PR #110418)

2024-11-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-hwasan` running on `sanitizer-buildbot12` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/3504 Here is the rel

[clang] [clang][bytecode] SourceInfo::Source might be null (PR #115905)

2024-11-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/115905 This broke in 23fbaff9a3fd2b26418e0c2f10b701049399251f, but the old .dyn_cast<> handled null. >From 1040853e20625745112a1b0160c628021b62ad59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date:

[clang] [clang][bytecode] SourceInfo::Source might be null (PR #115905)

2024-11-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This broke in 23fbaff9a3fd2b26418e0c2f10b701049399251f, but the old .dyn_cast<> handled null. --- Full diff: https://github.com/llvm/llvm-project/pull/115905.diff 3 Files Affected: - (modified) clang/lib/

[clang] [llvm] Reland [clang][AArch64] Add getHostCPUFeatures to query for enabled f… (PR #115467)

2024-11-12 Thread Elvina Yakubova via cfe-commits
https://github.com/ElvinaYakubova updated https://github.com/llvm/llvm-project/pull/115467 >From 8453bd11fa366b4865dce64b55d2a548c8b74a42 Mon Sep 17 00:00:00 2001 From: Elvina Yakubova Date: Fri, 8 Nov 2024 03:11:44 -0800 Subject: [PATCH 1/3] Reland [clang][AArch64] Add getHostCPUFeatures to qu

[clang] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-12 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/115921 None >From 3c233df64906972016c26909263cfd53940d87a0 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 12 Nov 2024 04:28:37 + Subject: [PATCH 1/4] Reapply "[clang] Introduce [[clang::lifetime_capture_b

[clang] [Clang] Prevent Null Pointer Dereference in in sema::​isNormalAssignmentOperator() (PR #115880)

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

[clang] [clang] Extend clang's to define *LONG_LONG*_ macros for bionic (PR #115406)

2024-11-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Release note and test coverage? > > I tested it locally. I copied code to `prebuilt/.../limits.h` in aosp and > removed bionic's copy and rebuilt to see whether it works. And it worked > well. Any extra upstream test coverage needed? Yes, we've got tests for Clang-supp

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

2024-11-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eric Astor (ericastor) Changes Start propagating attributes on (e.g.) labels inside of templated functions to their instances. --- Full diff: https://github.com/llvm/llvm-project/pull/115924.diff 2 Files Affected: - (modified) clang/li

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

2024-11-12 Thread Eric Astor via cfe-commits
https://github.com/ericastor created https://github.com/llvm/llvm-project/pull/115924 Start propagating attributes on (e.g.) labels inside of templated functions to their instances. >From da2e66a6a2636bf1a1ab2e25afdbd29095b6db3f Mon Sep 17 00:00:00 2001 From: Eric Astor Date: Tue, 12 Nov 2024

[clang] [clang] Extend clang's to define *LONG_LONG*_ macros for bionic (PR #115406)

2024-11-12 Thread via cfe-commits
ZijunZhaoCCK wrote: > Release note and test coverage? I tested it locally. I copied code to `prebuilt/.../limits.h` in aosp and removed bionic's copy and rebuilt to see whether it works. And it worked well. Any extra upstream test coverage needed? https://github.com/llvm/llvm-project/pull/115

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

2024-11-12 Thread Joshua Cranmer via cfe-commits
@@ -3730,10 +3730,10 @@ Fast-Math Flags LLVM IR floating-point operations (:ref:`fneg `, :ref:`fadd `, :ref:`fsub `, :ref:`fmul `, :ref:`fdiv `, -:ref:`frem `, :ref:`fcmp `), and :ref:`phi `, -:ref:`select `, or :ref:`call ` instructions that return -floating-point types may u

[clang] [analyzer] Don't copy field-by-field conjured LazyCompoundVals (2/4) (PR #115917)

2024-11-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/115917 Split from #114835 >From a16c5e514b5a80b20e7a7eb377686012026d2dc4 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sat, 2 Nov 2024 14:13:00 +0100 Subject: [PATCH 1/2] [analyzer] Allow copying empty structs (

[clang] Add Aaron Puchert as the maintainer for thread safety analysis (PR #115920)

2024-11-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/115920 Aaron has been helping out with TSA for several years and is highly knowledgeable about the implementation. >From ae64d3e98eb0456e06d76a04bdfe30e389773936 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date

[clang] [analyzer] Allow copying empty structs (1/4) (PR #115916)

2024-11-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes We represent copies of structs by LazyCompoundVals, that is basically a snapshot of the Store and Region that your copy would refer to. This snapshot is actually not taken for empty struc

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

2024-11-12 Thread Erich Keane via cfe-commits
@@ -9,7 +9,7 @@ void CheckEnumerations() { // Check that non-vector 'mode' attribute is OK with enumeration types. typedef T __attribute__((mode(QI))) T1; typedef T T2 __attribute__((mode(HI))); - typedef T __attribute__((mode(V8SI))) T3; // expected-error{{mode 'V8SI' i

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-11-12 Thread Aaron Ballman via cfe-commits
@@ -2068,7 +2068,8 @@ bool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { } // If we have a digit separator, continue. - if (C == '\'' && (LangOpts.CPlusPlus14 || LangOpts.C23)) { + if (C == '\'' && + (LangOpts.CPlusPlus14 || LangOpts.C23 || Parsing

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

2024-11-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: The change is reasonable, but I need to see tests for each of the types. In general, we've had the attitude of "we can enable this instantiation once we see examples of it being useful", so we need tests to make sure it is instantiated, AND that it is u

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

2024-11-12 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] enhance diagnostic by attaching source location to deduced type in trailing return without auto (PR #115786)

2024-11-12 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/115786 >From da1b3982e84114cb1214ca5c3d8ed520d1589b83 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Tue, 12 Nov 2024 00:59:37 +0200 Subject: [PATCH 1/6] [Clang] enhance diagnostic by attaching source location to

[clang] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-12 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 f9125ddc1faafaceac9064e889cd9b4a77523677 4f6e2bf7ae5356e226442755bb88833b01a9d683 --e

[clang] [clang][APINotes] Add support for the SwiftEscapable attribute (PR #115866)

2024-11-12 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Some minor comments left. https://github.com/llvm/llvm-project/pull/115866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __ugly__ spelling for the msvc attribute scope (PR #113765)

2024-11-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman I'm not _super_ worried about these specific cases, but I'd > like to know how to proceed with `msvc` attributes we'd like to use in libc++ > generally. I think there's three options. 1) Don't use `msvc` attributes in libc++ as they're not fit for use in s

[clang] [Clang] enhance diagnostic by attaching source location to deduced type in trailing return without auto (PR #115786)

2024-11-12 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Thanks! This looks great https://github.com/llvm/llvm-project/pull/115786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] enhance diagnostic by attaching source location to deduced type in trailing return without auto (PR #115786)

2024-11-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -4887,9 +4887,20 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, cast(T)->getKeyword() != AutoTypeKeyword::Auto || cast(T)->isConstrained())) { -S.Diag(D.getDecl

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-11-12 Thread via cfe-commits
@@ -2068,7 +2068,8 @@ bool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { } // If we have a digit separator, continue. - if (C == '\'' && (LangOpts.CPlusPlus14 || LangOpts.C23)) { + if (C == '\'' && + (LangOpts.CPlusPlus14 || LangOpts.C23 || Parsing

[clang] [llvm] [AMDGPU] Introduce a new generic target `gfx9-4-generic` (PR #115190)

2024-11-12 Thread Shilei Tian via cfe-commits
shiltian wrote: gentle ping https://github.com/llvm/llvm-project/pull/115190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-12 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm updated https://github.com/llvm/llvm-project/pull/115894 >From 9001ad621028caa0ca2095156f28fac88deb8525 Mon Sep 17 00:00:00 2001 From: John Brawn Date: Wed, 6 Nov 2024 12:15:17 + Subject: [PATCH 1/2] [IR] Allow fast math flags on fptrunc and fpext This con

<    1   2   3   4   5   6   >