[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-28 Thread via cfe-commits
kiran-isaac wrote: fixes #57069, and adds a test reflecting this https://github.com/llvm/llvm-project/pull/102896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Place strdup in the unix.cstring.NullArg list (PR #106387)

2024-08-28 Thread Balazs Benics via cfe-commits
steakhal wrote: In the gcc's stadlib, strdup is already marked as `__attribute__ ((__nonnull__ (1))`, which is checked by `core.NonNullParamChecker`. The bug is [caught](https://godbolt.org/z/3fbrx4jT1), as of today. I don't think there is anything to be done here. https://github.com/llvm/llv

[clang] Place strdup in the unix.cstring.NullArg list (PR #106387)

2024-08-28 Thread Balazs Benics via cfe-commits
steakhal wrote: FYI the compiler explorer link you shared does not invoke the static analyzer. https://github.com/llvm/llvm-project/pull/106387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] Fix #104794: Fixed sret bugs with `clang::musttail` on 32 bit targets (PR #104795)

2024-08-28 Thread via cfe-commits
kiran-isaac wrote: tagged wrong PR in revert commit, see #102896 https://github.com/llvm/llvm-project/pull/104795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-28 Thread via cfe-commits
@@ -5312,6 +5314,120 @@ bool Compiler::VisitComplexUnaryOperator(const UnaryOperator *E) { return true; } +template +bool Compiler::VisitVectorUnaryOperator(const UnaryOperator *E) { + const Expr *SubExpr = E->getSubExpr(); + assert(SubExpr->getType()->isVectorType()); +

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-28 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,90 @@ +// RUN: %clang_cc1 %s -triple x86_64-linux-gnu -Wno-uninitialized -std=c++14 -fsyntax-only -verify +// RUN: %clang_cc1 %s -triple x86_64-linux-gnu -fexperimental-new-constant-interpreter -Wno-uninitialized -std=c++14 -fsyntax-only -verify tbae

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. If CI comes back, the rest looks good to me, thanks! https://github.com/llvm/llvm-project/pull/105996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [clang] Add nuw attribute to GEPs (PR #105496)

2024-08-28 Thread Hari Limaye via cfe-commits
hazzlim wrote: > @mikaelholmen Thanks for the reproducer, this makes the issue clear. BasicAA > is incorrectly returning NoAlias for the pointers due to #98608. > > The issue is that the `add` gets decomposed, but we preserve the nuw flag, > effectively making it an `add nuw i16 n, -1`. Thank

[clang] [clang] Add nuw attribute to GEPs (PR #105496)

2024-08-28 Thread Nikita Popov via cfe-commits
nikic wrote: I don't think we need to revert it. Without this patch it's mostly harmless. I've been working on a fix for this issue. I think we need to track NUW through LinearExpression using something along these lines: https://gist.github.com/nikic/d6986bb62539bba048ced15dd497a4fb https://

[clang] [WIP] [analyzer] Refactor MallocChecker to use `BindExpr` in `evalCall` (PR #106081)

2024-08-28 Thread Pavel Skripkin via cfe-commits
pskrgag wrote: Since all pipelines has successfully finished, I am changing state to normal pr https://github.com/llvm/llvm-project/pull/106081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [WIP] [analyzer] Refactor MallocChecker to use `BindExpr` in `evalCall` (PR #106081)

2024-08-28 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag ready_for_review https://github.com/llvm/llvm-project/pull/106081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-28 Thread via cfe-commits
@@ -0,0 +1,90 @@ +// RUN: %clang_cc1 %s -triple x86_64-linux-gnu -Wno-uninitialized -std=c++14 -fsyntax-only -verify +// RUN: %clang_cc1 %s -triple x86_64-linux-gnu -fexperimental-new-constant-interpreter -Wno-uninitialized -std=c++14 -fsyntax-only -verify yron

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-28 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/105996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-28 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/105996 >From 0e4c511107f76da085a8019cf2eca78c3a5a0754 Mon Sep 17 00:00:00 2001 From: yronglin Date: Mon, 26 Aug 2024 02:09:31 +0800 Subject: [PATCH 1/7] [Clang][Interp] Implement constexpr vector unary operators +, -

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-08-28 Thread Alexandre Ganea via cfe-commits
@@ -92,8 +92,15 @@ class MCTargetOptions { std::string AsSecureLogFile; const char *Argv0 = nullptr; aganea wrote: Would you mind please moving (and adapting) the comment that you've added here above? Both Argv0 and CommandLineArgs are only used for stor

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-08-28 Thread Alexandre Ganea via cfe-commits
@@ -92,8 +92,15 @@ class MCTargetOptions { std::string AsSecureLogFile; const char *Argv0 = nullptr; + + // Deprecated: Use FlatCommandlineArgs instead + // Arguments here are interpreted as coming from clang, formated and end up in LF_BUILDINFO as CommandLineArgs A

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-08-28 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea requested changes to this pull request. https://github.com/llvm/llvm-project/pull/106369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-08-28 Thread Alexandre Ganea via cfe-commits
@@ -950,9 +952,16 @@ void CodeViewDebug::emitBuildInfo() { if (Asm->TM.Options.MCOptions.Argv0 != nullptr) { BuildInfoArgs[BuildInfoRecord::BuildTool] = getStringIdTypeIdx(TypeTable, Asm->TM.Options.MCOptions.Argv0); -BuildInfoArgs[BuildInfoRecord::CommandLine

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-08-28 Thread Alexandre Ganea via cfe-commits
@@ -893,6 +893,8 @@ static TypeIndex getStringIdTypeIdx(GlobalTypeTableBuilder &TypeTable, return TypeTable.writeLeafType(SIR); } +// This just exists for backwards compatability for the deprecated MCTargetOptions::CommandLineArgs +// It assumed a clang compiler frontend

[clang] [Clang][Interp] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-28 Thread via cfe-commits
@@ -0,0 +1,90 @@ +// RUN: %clang_cc1 %s -triple x86_64-linux-gnu -Wno-uninitialized -std=c++14 -fsyntax-only -verify +// RUN: %clang_cc1 %s -triple x86_64-linux-gnu -fexperimental-new-constant-interpreter -Wno-uninitialized -std=c++14 -fsyntax-only -verify yron

[clang] [clang] Fixing Clang HIP inconsistent order for template functions (PR #101627)

2024-08-28 Thread via cfe-commits
Ritanya-B-Bharadwaj wrote: ping https://github.com/llvm/llvm-project/pull/101627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement intrinsics for SVE FAMIN/FAMAX (PR #99042)

2024-08-28 Thread Momchil Velikov via cfe-commits
@@ -135,6 +135,8 @@ enum NodeType : unsigned { UDIV_PRED, UMAX_PRED, UMIN_PRED, + FAMAX_PRED, + FAMIN_PRED, momchil-velikov wrote: How about: ``` case Intrinsic::aarch64_sve_fmin_u: return DAG.getNode(AArch64ISD::FMIN_PRED, SDLoc(N), N->getValueT

[clang] Place strdup in the unix.cstring.NullArg list (PR #106387)

2024-08-28 Thread via cfe-commits
fawdlstty wrote: @steakhal Sorry, I didn't know there was a static checker. I think it should be noted in the documentation for functions whose arguments cannot be 0. May I should check these two functions in the static checker or if I should turn off the pr? https://github.com/llvm/llvm-proj

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-08-28 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/99477 >From d64268021d53e05fb64a4788e99fcd966d7b559a Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Thu, 18 Jul 2024 11:47:56 + Subject: [PATCH 1/8] [clang-tidy][cppcoreguidelines-missing-std-forward] Do

[clang] Place strdup in the unix.cstring.NullArg list (PR #106387)

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

[clang] Place strdup in the unix.cstring.NullArg list (PR #106387)

2024-08-28 Thread Balazs Benics via cfe-commits
steakhal wrote: Let's just close this one. https://github.com/llvm/llvm-project/pull/106387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-08-28 Thread Björn Pettersson via cfe-commits
@@ -125,6 +137,25 @@ class TypeDescriptor { return 1 << (TypeInfo >> 1); } + const char *getBitIntBitCountPointer() const { +DCHECK(isBitIntTy()); +DCHECK(isSignedBitIntTy()); +// Scan Name for zero and return the next address +const char *p = getTypeNam

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-08-28 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/99477 >From d64268021d53e05fb64a4788e99fcd966d7b559a Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Thu, 18 Jul 2024 11:47:56 + Subject: [PATCH 1/9] [clang-tidy][cppcoreguidelines-missing-std-forward] Do

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-28 Thread via cfe-commits
https://github.com/Lukacma approved this pull request. https://github.com/llvm/llvm-project/pull/100278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-28 Thread via cfe-commits
@@ -2142,85 +2178,58 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, -SmallVectorImpl &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHE

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-28 Thread via cfe-commits
@@ -2142,85 +2178,58 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, -SmallVectorImpl &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHE

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-08-28 Thread Clement Courbet via cfe-commits
legrosbuffle wrote: Sorry for the delay (vacations). https://github.com/llvm/llvm-project/pull/99477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement intrinsics for SVE FAMIN/FAMAX (PR #99042)

2024-08-28 Thread Paul Walker via cfe-commits
@@ -135,6 +135,8 @@ enum NodeType : unsigned { UDIV_PRED, UMAX_PRED, UMIN_PRED, + FAMAX_PRED, + FAMIN_PRED, paulwalker-arm wrote: Yep, the latter. We use it here because the ISD node exists for other reasons and so was convenient to reuse here. In ge

[clang] [analyzer] Refactor MallocChecker to use `BindExpr` in `evalCall` (PR #106081)

2024-08-28 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag edited https://github.com/llvm/llvm-project/pull/106081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix CLANG_BOOTSTRAP_TARGETS in Release.cmake (PR #106407)

2024-08-28 Thread Konrad Kleine via cfe-commits
https://github.com/kwk created https://github.com/llvm/llvm-project/pull/106407 Take all `LLVM_RELEASE_FINAL_STAGE_TARGETS` elements and append them prefixed with `stage2-` to `CLANG_BOOTSTRAP_TARGETS`. >From 8abe54ca62eedc1a7a0307eb17d188090160bf30 Mon Sep 17 00:00:00 2001 From: Konrad Kleine

[clang] Fix CLANG_BOOTSTRAP_TARGETS in Release.cmake (PR #106407)

2024-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Konrad Kleine (kwk) Changes Take all `LLVM_RELEASE_FINAL_STAGE_TARGETS` elements and append them prefixed with `stage2-` to `CLANG_BOOTSTRAP_TARGETS`. --- Full diff: https://github.com/llvm/llvm-project/pull/106407.diff 1 Files Affected

[clang] Fix CLANG_BOOTSTRAP_TARGETS in Release.cmake (PR #106407)

2024-08-28 Thread Konrad Kleine via cfe-commits
https://github.com/kwk edited https://github.com/llvm/llvm-project/pull/106407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix CLANG_BOOTSTRAP_TARGETS in Release.cmake (PR #106407)

2024-08-28 Thread Konrad Kleine via cfe-commits
https://github.com/kwk edited https://github.com/llvm/llvm-project/pull/106407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix CLANG_BOOTSTRAP_TARGETS in Release.cmake (PR #106407)

2024-08-28 Thread Konrad Kleine via cfe-commits
https://github.com/kwk converted_to_draft https://github.com/llvm/llvm-project/pull/106407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Added instant events and marking defered templated instantiation. (PR #103039)

2024-08-28 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov requested changes to this pull request. https://github.com/llvm/llvm-project/pull/103039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Added instant events and marking defered templated instantiation. (PR #103039)

2024-08-28 Thread Ilya Biryukov via cfe-commits
@@ -92,13 +94,17 @@ struct TimeTraceMetadata { bool isEmpty() const { return Detail.empty() && File.empty(); } }; +struct TimeTraceProfilerEntry; ilya-biryukov wrote: The idea of sharing most code and configuring only the relevant bits we need to write for

[clang] [llvm] [AArch64] Split FeatureLS64 to LS64_ACCDATA and LS64_V. (PR #101712)

2024-08-28 Thread Tomas Matheson via cfe-commits
@@ -305,9 +305,17 @@ def FeatureWFxT : ExtensionWithMArch<"wfxt", "WFxT", "FEAT_WFxT", def FeatureHCX : Extension<"hcx", "HCX", "FEAT_HCX", "Enable Armv8.7-A HCRX_EL2 system register">; -def FeatureLS64 : ExtensionWithMArch<"ls64", "LS64", - "FEAT_LS64, FEAT_LS64_V, FEAT_L

[clang] [llvm] [AArch64] Split FeatureLS64 to LS64_ACCDATA and LS64_V. (PR #101712)

2024-08-28 Thread Tomas Matheson via cfe-commits
@@ -305,9 +305,17 @@ def FeatureWFxT : ExtensionWithMArch<"wfxt", "WFxT", "FEAT_WFxT", def FeatureHCX : Extension<"hcx", "HCX", "FEAT_HCX", "Enable Armv8.7-A HCRX_EL2 system register">; -def FeatureLS64 : ExtensionWithMArch<"ls64", "LS64", - "FEAT_LS64, FEAT_LS64_V, FEAT_L

[clang] [llvm] [AArch64] Split FeatureLS64 to LS64_ACCDATA and LS64_V. (PR #101712)

2024-08-28 Thread Tomas Matheson via cfe-commits
@@ -3682,6 +3682,8 @@ static const struct Extension { {"sve2-bitperm", {AArch64::FeatureSVE2BitPerm}}, {"sve2p1", {AArch64::FeatureSVE2p1}}, {"ls64", {AArch64::FeatureLS64}}, +{"ls64_v", {AArch64::FeatureLS64_V}}, +{"ls64_accdata", {AArch64::FeatureLS64_ACCD

[clang] [Clang][AST] Add Test Cases for Reference Qualifiers in Opr Overload (PR #102878)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @cor3ntin The solution here #79748 doesn't pass the test too. Kinda expected > not to pass the test clang If tests are not intended to pass, you should expect the diagnostics we issue today, and leave FIXMEs appropriately to indicate where Clang's behavior is wrong. https://

[clang] Adding optin.taint.TaintedDiv checker (PR #106389)

2024-08-28 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/106389 >From ccc5da054903568fbd317d5c773251ed84f8f087 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Wed, 28 Aug 2024 15:32:35 +0200 Subject: [PATCH 1/2] Adding optin.taint.TaintedDiv checker Tainted division operat

[clang] [Clang][AST] Add Test Cases for Reference Qualifiers in Opr Overload (PR #102878)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Here's an example: https://github.com/llvm/llvm-project/blob/114ff99e93edd699fd94cf2a84de75e8845fc76b/clang/test/CXX/drs/cwg10xx.cpp#L85-L90 https://github.com/llvm/llvm-project/pull/102878 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [CodeGen] Create IFUNCs in the program address space, not hard-coded 0 (PR #105726)

2024-08-28 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: NB: I would appreciate a review from someone outside the CHERI project https://github.com/llvm/llvm-project/pull/105726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Fix iteration order of TopLevelRecords (PR #106411)

2024-08-28 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/106411 Fixes #106355 >From 5b47537dd49e79e102f7a809b434c18086274b4b Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Wed, 28 Aug 2024 17:03:22 +0100 Subject: [PATCH] [clang][ExtractAPI] Fix iteration order

[clang] [clang][ExtractAPI] Fix iteration order of TopLevelRecords (PR #106411)

2024-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Grumberg (daniel-grumberg) Changes Fixes #106355 --- Full diff: https://github.com/llvm/llvm-project/pull/106411.diff 2 Files Affected: - (modified) clang/include/clang/ExtractAPI/API.h (+5-6) - (modified) clang/lib/ExtractAPI/A

[clang] [CodeGen] Create IFUNCs in the program address space, not hard-coded 0 (PR #105726)

2024-08-28 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/105726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 73e0aa5 - [CodeGen] Create IFUNCs in the program address space, not hard-coded 0 (#105726)

2024-08-28 Thread via cfe-commits
Author: Jessica Clarke Date: 2024-08-28T17:11:15+01:00 New Revision: 73e0aa58666f235bef091735a5f189882acc1148 URL: https://github.com/llvm/llvm-project/commit/73e0aa58666f235bef091735a5f189882acc1148 DIFF: https://github.com/llvm/llvm-project/commit/73e0aa58666f235bef091735a5f189882acc1148.diff

[clang] [CodeGen] Create IFUNCs in the program address space, not hard-coded 0 (PR #105726)

2024-08-28 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 closed https://github.com/llvm/llvm-project/pull/105726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DXIL] Don't generate per-variable guards for DirectX (PR #106096)

2024-08-28 Thread David Peixotto via cfe-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/106096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DXIL] Don't generate per-variable guards for DirectX (PR #106096)

2024-08-28 Thread David Peixotto via cfe-commits
@@ -94,6 +94,13 @@ class LLVM_LIBRARY_VISIBILITY DirectXTargetInfo : public TargetInfo { BuiltinVaListKind getBuiltinVaListKind() const override { return TargetInfo::VoidPtrBuiltinVaList; } + + void adjust(DiagnosticsEngine &Diags, LangOptions &Opts) override { --

[clang] [DXIL] Don't generate per-variable guards for DirectX (PR #106096)

2024-08-28 Thread David Peixotto via cfe-commits
https://github.com/dmpots approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/106096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fixing Clang HIP inconsistent order for template functions (PR #101627)

2024-08-28 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: is it already fixed by https://github.com/llvm/llvm-project/pull/102661 ? https://github.com/llvm/llvm-project/pull/101627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [clang][ExtractAPI] Fix iteration order of TopLevelRecords (PR #106411)

2024-08-28 Thread via cfe-commits
https://github.com/QuietMisdreavus approved this pull request. https://github.com/llvm/llvm-project/pull/106411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] `__noop` not marked as constexpr #102064 (PR #105983)

2024-08-28 Thread via cfe-commits
@@ -0,0 +1,3 @@ +// RUN: %clang_cc1 -std=c++20 -fms-extensions %s +// expected-no-diagnostics +constexpr int x = []{ __noop; return 0; }(); ofAlpaca wrote: If adding ``RUN: %clang_cc1 %s -std=c++20 -fms-extensions`` at the top line of builtins.cpp, without using

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-28 Thread Matheus Izvekov via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++20 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s + +template class S> +void create_unique() + requires (S{0}, true) {} + +template struct A { + constexpr A(Fn) {}; +}; + +template void create_unique(); +// CHECK: @_

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-28 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/106335 >From b86ebec082a82da967528819e9df7bd16c502b34 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 28 Aug 2024 00:34:12 -0300 Subject: [PATCH 1/2] [clang] mangle placeholder for deduced type as a templat

[clang] [HLSL] Apply NoRecurse attrib to all HLSL functions (PR #105907)

2024-08-28 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/105907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-28 Thread Yuxuan Chen via cfe-commits
@@ -523,6 +523,12 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { NormalCleanupDest = Address::invalid(); } + if (getLangOpts().Coroutines && isCoroutine()) { +auto *Record = FnRetTy->getAsCXXRecordDecl(); +if (Record && Record->hasAttr()) +

[clang] [HLSL] Apply NoRecurse attrib to all HLSL functions (PR #105907)

2024-08-28 Thread David Peixotto via cfe-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/105907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Apply NoRecurse attrib to all HLSL functions (PR #105907)

2024-08-28 Thread David Peixotto via cfe-commits
https://github.com/dmpots approved this pull request. Overall, LGTM. https://github.com/llvm/llvm-project/pull/105907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Apply NoRecurse attrib to all HLSL functions (PR #105907)

2024-08-28 Thread David Peixotto via cfe-commits
@@ -1064,13 +1064,17 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, // OpenCL C 2.0 v2.2-11 s6.9.i: // Recursion is not supported. // + // HLSL + // Recursion is not supported. + // // SYCL v1.2.1 s3.10: // kernels cannot inclu

[clang] [HLSL] Apply NoRecurse attrib to all HLSL functions (PR #105907)

2024-08-28 Thread David Peixotto via cfe-commits
@@ -0,0 +1,93 @@ +// RUN: %clang_cc1 -x hlsl -triple dxil-pc-shadermodel6.3-library -finclude-default-header %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s +// RUN: %clang_cc1 -x hlsl -triple dxil-pc-shadermodel6.0-compute -finclude-default-header %s -emit-llvm -disabl

[clang] [DXIL] Don't generate per-variable guards for DirectX (PR #106096)

2024-08-28 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/106096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] mangle placeholder for deduced type as a template-prefix (PR #106335)

2024-08-28 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++20 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s + +template class S> +void create_unique() + requires (S{0}, true) {} + +template struct A { + constexpr A(Fn) {}; +}; + +template void create_unique(); +// CHECK: @_

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-28 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/102896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-28 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: What's the state of byval handling with the current version of the patch? https://github.com/llvm/llvm-project/pull/102896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-28 Thread Eli Friedman via cfe-commits
@@ -4,6 +4,28 @@ ; CHECK-NOT: vmov efriedma-quic wrote: Extra check lines https://github.com/llvm/llvm-project/pull/102896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-28 Thread Eli Friedman via cfe-commits
@@ -3056,18 +3014,26 @@ bool ARMTargetLowering::IsEligibleForTailCallOptimization( // Exception-handling functions need a special set of instructions to indicate // a return to the hardware. Tail-calling another function would probably // break this. - if (CallerF.hasF

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-28 Thread Eli Friedman via cfe-commits
@@ -3056,18 +3014,26 @@ bool ARMTargetLowering::IsEligibleForTailCallOptimization( // Exception-handling functions need a special set of instructions to indicate // a return to the hardware. Tail-calling another function would probably // break this. - if (CallerF.hasF

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-08-28 Thread via cfe-commits
https://github.com/nebulark updated https://github.com/llvm/llvm-project/pull/106369 >From aad31f04028994801a6034b966820ef5353da219 Mon Sep 17 00:00:00 2001 From: Florian Schmiderer Date: Wed, 28 Aug 2024 12:36:39 +0200 Subject: [PATCH 1/2] Flatten compiler args in Frontend, keep existing beha

[clang] [clang][bytecode] Implement constexpr vector unary operators +, -, ~, ! (PR #105996)

2024-08-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/105996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix #55390 here as well (PR #106395)

2024-08-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/106395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 40db261 - [clang][bytecode] Fix #55390 here as well (#106395)

2024-08-28 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-28T19:09:12+02:00 New Revision: 40db261551e38c9f9f6b6988a8b756504d16dd58 URL: https://github.com/llvm/llvm-project/commit/40db261551e38c9f9f6b6988a8b756504d16dd58 DIFF: https://github.com/llvm/llvm-project/commit/40db261551e38c9f9f6b6988a8b756504d16dd58.diff L

[clang-tools-extra] [clang-tidy] Extend `bugprone-sizeof-expression` with matching `P +- sizeof(T)` and `P +- N * sizeof(T)` cases, add `cert-arr39-c` alias (PR #106061)

2024-08-28 Thread via cfe-commits
https://github.com/whisperity edited https://github.com/llvm/llvm-project/pull/106061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-08-28 Thread via cfe-commits
nebulark wrote: Applied the suggested changes. I also made MCTargetOptions::Argv0 a std::string. This is more consistent with the rest and makes usage for other frontends (e.g. rustc) easier and removes the need for the null check. It's better for cl and cmd in LF_BUILDINFO to always be set, as

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2024-08-28 Thread Matt Arsenault via cfe-commits
@@ -45,7 +45,7 @@ void test3(packedfloat3 *p) { *p = (packedfloat3) { 3.2f, 2.3f, 0.1f }; } // CHECK: @test3( -// CHECK: store <4 x float> {{.*}}, align 4 +// CHECK: store <3 x float> {{.*}}, align 4 arsenm wrote: I guess this has to be a target option then

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-08-28 Thread Galen Elias via cfe-commits
https://github.com/galenelias updated https://github.com/llvm/llvm-project/pull/105597 >From 4118b7dde9adbee7b6aaf5d094d34cb6b64f6c77 Mon Sep 17 00:00:00 2001 From: Galen Elias Date: Wed, 21 Aug 2024 16:33:42 -0700 Subject: [PATCH 1/3] clang-format: Add "AllowShortNamespacesOnASingleLine" opti

[clang] [clang][HLSL] Update DXIL/SPIRV hybird CodeGen tests to use temp var (PR #105930)

2024-08-28 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. Looks great, thanks! Do you need someone to commit this for you? https://github.com/llvm/llvm-project/pull/105930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [clang][HLSL] Update DXIL/SPIRV hybird CodeGen tests to use temp var (PR #105930)

2024-08-28 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/105930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Update DXIL/SPIRV hybird CodeGen tests to use temp var (PR #105930)

2024-08-28 Thread Justin Bogner via cfe-commits
@@ -15,49 +15,49 @@ // RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF,SPIR_CHECK #ifdef __HLSL_ENABLE_16_BIT -// DXIL_NATIVE_HALF: %dx.umad = call i16 @llvm.dx.umad.i16(i16 %0, i16 %1, i16 %2) +// DXIL_NATIVE_HALF: %dx.umad = call i16 @llvm.[[ICF:dx]].umad.i16(i16

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-08-28 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: It looks like precommit CI found some issues: https://buildkite.com/llvm-project/github-pull-requests/builds/93641#0191755a-81be-4291-9346-95bf02e2b39b ``` Clang :: Sema/array-init.c Clang :: Sema/gnu-flags.c ``` https://github.com/llvm/llvm-project/pull/101261 _

[clang] [clang] Improve diagnostics with incompatible VLA types (PR #101261)

2024-08-28 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +void func(int n) { +int grp[n][n]; +int (*ptr)[n]; + +for (int i = 0; i < n; i++) +ptr = &grp[i]; // expected-error {{incompatible assignment of pointers of variable-length array type 'int (*)[n]'

[clang] [clang][test] Rewrote test using $() to work with lit internal shell syntax (PR #105902)

2024-08-28 Thread Connie Zhu via cfe-commits
https://github.com/connieyzhu updated https://github.com/llvm/llvm-project/pull/105902 >From 5801e58f5e89fb90a3b18414e1cb959d027b4fee Mon Sep 17 00:00:00 2001 From: Connie Zhu Date: Fri, 23 Aug 2024 17:23:22 + Subject: [PATCH 1/4] [clang][test] Rewrote test to work with lit internal shell

[clang] [clang][RISCV] Remove `experimental` for vector crypto intrinsics (PR #106359)

2024-08-28 Thread Craig Topper via cfe-commits
topperc wrote: > > Do we still need this? > > ``` > > def Experimental > >: SubtargetFeature<"experimental", "HasExperimental", > > "true", "Experimental intrinsics">; > > ``` > > I guess we do in case there is any other extension that encounter the same > situation lo

[clang] [clang][RISCV] Remove `experimental` for vector crypto intrinsics (PR #106359)

2024-08-28 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/106359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-spir-v Author: Alex Voicu (AlexVlx) Changes This change adds support for correctly lowering the `__scoped` Clang builtins, and corresponding scoped LLVM instructions. These were previously unconditionally lowered to Device scope, which is can b

[clang] [clang-format] Revert "[clang-format][NFC] Delete TT_LambdaArrow (#70… (PR #105923)

2024-08-28 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/105923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test] Rewrote test using $() to work with lit internal shell syntax (PR #105902)

2024-08-28 Thread Connie Zhu via cfe-commits
https://github.com/connieyzhu updated https://github.com/llvm/llvm-project/pull/105902 >From 5801e58f5e89fb90a3b18414e1cb959d027b4fee Mon Sep 17 00:00:00 2001 From: Connie Zhu Date: Fri, 23 Aug 2024 17:23:22 + Subject: [PATCH 1/5] [clang][test] Rewrote test to work with lit internal shell

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-28 Thread John McCall via cfe-commits
@@ -11427,6 +11427,19 @@ static void AnalyzeImplicitConversions( return; } + if (auto *OutArgE = dyn_cast(E)) { +// The base expression is only used to initialize the parameter for +// arguments to `inout` parameters, so we only traverse down the base +// ex

[clang-tools-extra] [clangd] Do not collect macros when clang-tidy checks call into the preprocessor (PR #106329)

2024-08-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, lgtm! https://github.com/llvm/llvm-project/pull/106329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Do not collect macros when clang-tidy checks call into the preprocessor (PR #106329)

2024-08-28 Thread kadir çetinkaya via cfe-commits
@@ -702,6 +704,10 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs, log("Execute() failed when building AST for {0}: {1}", MainInput.getFile(), toString(std::move(Err))); + // Disable the macro collector for the remainder of this function,

[clang-tools-extra] [clangd] Do not collect macros when clang-tidy checks call into the preprocessor (PR #106329)

2024-08-28 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/106329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-28 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/101083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-08-28 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 c9a5e1b665dbba898e9981fd7d48881947e6560e daa76c36453b2e133d7d9496ca930d0eaa742fab --e

[clang] [clang-format] Add new option: WrapNamespaceBodyWithNewlines (PR #106145)

2024-08-28 Thread Björn Schäpers via cfe-commits
@@ -5057,6 +5057,21 @@ struct FormatStyle { /// \version 11 std::vector WhitespaceSensitiveMacros; + /// Insert a newline at the begging and at the end of namespace definition + /// \code + /// false: vs. true: + /// + /// namespace

<    1   2   3   4   5   6   >