[clang] 1f05703 - [ARM][Thumb] Save FPSCR + FPEXC for save-vfp attribute

2025-03-11 Thread Benson Chu via cfe-commits
Author: Benson Chu Date: 2025-03-10T10:05:15-05:00 New Revision: 1f05703176d43a339b41a474f51c0e8b1a83c9bb URL: https://github.com/llvm/llvm-project/commit/1f05703176d43a339b41a474f51c0e8b1a83c9bb DIFF: https://github.com/llvm/llvm-project/commit/1f05703176d43a339b41a474f51c0e8b1a83c9bb.diff LO

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-11 Thread David Rivera via cfe-commits
RiverDave wrote: > Change looks correct, but looks like this check got one more limitation in > case of code like this: > > ``` > class CastInit { > CastInit() : m(static_cast(9)) {} > int m = 9; > }; > ``` > > And this: > > ``` > class CastInit { > CastInit() : m(static_cast(0)) {} >

[clang] [Clang] Allow devirtualization involving array subscripts with constant indices when the pointee type is known (PR #130528)

2025-03-11 Thread via cfe-commits
https://github.com/AZero13 edited https://github.com/llvm/llvm-project/pull/130528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Move enqueued block handling into clang (PR #128519)

2025-03-11 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra commented: I don't have recent exposure to the OpenCL implementation, but generally eyeballed the code to make sure that the changes do what is described. Is there some confidence that the new scheme actually works? For example, maybe an existing CodeGen test where

[clang-tools-extra] [clang-tidy] Add an option to treat warnings as errors (PR #128221)

2025-03-11 Thread Piotr Zegar via cfe-commits
@@ -374,6 +379,8 @@ def main(): common_clang_tidy_args.append("-extra-arg-before=%s" % arg) for plugin in args.plugins: common_clang_tidy_args.append("-load=%s" % plugin) +if args.warnings_as_errors != "": PiotrZSL wrote: probably this

[clang-tools-extra] [clang-tidy] Add an option to treat warnings as errors (PR #128221)

2025-03-11 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/128221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][LLVM] Implement single-multi vectors MOP4{A/S} (PR #128854)

2025-03-11 Thread via cfe-commits
@@ -3835,7 +3866,7 @@ let TargetPrefix = "aarch64" in { def int_aarch64_sme_luti4_lane_zt_x2 : DefaultAttrsIntrinsic<[llvm_anyvector_ty, LLVMMatchType<0>], [llvm_i32_ty, llvm_nxv16i8_ty, llvm_i32_ty], [ImmArg>, ImmArg>, IntrReadMem]>; -

[clang] [flang] [llvm] [clang] [OpenMP] New OpenMP 6.0 self_maps clause (PR #129888)

2025-03-11 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj closed https://github.com/llvm/llvm-project/pull/129888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/130228 Todo: - [ ] Adapt the bytecode interpreter to the new evaluation model - [ ] Tests for CG & Constant evaluation - [ ] Release notes With this patch, the example shown in https://godbolt.org/z/b64x65716 (the R

[clang-tools-extra] [clang-tidy] Add an option to treat warnings as errors (PR #128221)

2025-03-11 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Release notes entry is missing. Look into clang-tidy 20 release notes and just copy entry and adjust it. https://github.com/llvm/llvm-project/pull/128221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-11 Thread Arthur Eubanks via cfe-commits
@@ -62,16 +62,13 @@ class PassTimingInfo { private: StringMap PassIDCountMap; ///< Map that counts instances of passes - DenseMap> TimingData; ///< timers for pass instances - TimerGroup TG; + DenseMap TimingData; ///< timers for pass instances aeubanks

[clang] [flang] [flang] Add support for -f[no-]verbose-asm (PR #130788)

2025-03-11 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/130788 >From 5d3c1cc1d40b308b93cc47c78c6c3ca677f55155 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 11 Mar 2025 15:54:35 + Subject: [PATCH 1/2] [flang] Add support for -f[no-]verbose-asm This flag provides ex

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130494)

2025-03-11 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %check_clang_tidy %s misc-const-correctness %t \ vbvictor wrote: I suppose this behavior comes from overlapping diag-messages, so guess we need to change diag-message inside `CheckPointee` lambda. https://github.com/llvm/llvm-project/p

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #130729)

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

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #130729)

2025-03-11 Thread Rashmi Mudduluru via cfe-commits
t-rasmud wrote: Thank you for addressing all the feedback. Didn't really mean to make you create a new PR just for that one comment, I should've mentioned it was purely for clarification. https://github.com/llvm/llvm-project/pull/130729 ___ cfe-commi

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130494)

2025-03-11 Thread Baranov Victor via cfe-commits
@@ -145,64 +165,90 @@ void ConstCorrectnessCheck::check(const MatchFinder::MatchResult &Result) { if (ArrayT->getElementType()->isPointerType()) VC = VariableCategory::Pointer; - // Each variable can only be in one category: Value, Pointer, Reference. - // Analysi

[clang] [llvm] Add support for template as type parameter (PR #127654)

2025-03-11 Thread David Blaikie via cfe-commits
dwblaikie wrote: > I am not sure that I understand your concern completely. Consider the > following DWARF output based on my implementation. How would you say "v1" > should be represented ideally? > ``` > 0x0042: DW_TAG_structure_type > DW_AT_calling_convention (DW_CC_pass_by_value) > DW_A

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-03-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics -std=c++11 %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fsyntax-only -verify -fptrauth-intrinsics -std=c++11 %s + +template struct G { + T __ptrauth(0,0,1234) test; +

[clang] Reland Fix amdgpu-arch for dll name on Windows (PR #130624)

2025-03-11 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/130624 Reload aba3005a after fixing build failure. Recently HIP runtime changed dll name to amdhip64_n.dll on Windows, where n is ROCm major version number. Fix amdgpu-arch to search for amdhip64_n.dll on Windows.

[clang] [llvm] Reapply "[AArch64][SVE] Improve fixed-length addressing modes. (#130263)" (PR #130625)

2025-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ricardo Jesus (rj-jesus) Changes This restores commit f01e760c08365426de95f02dc2c2dc670eb47352. The original patch from #129732 exposed what seems to be a bug in `SelectAddrModeIndexedSVE`. Currently, the offset returned by `SelectAddrMo

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-11 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [StaticAnalyzer] Relax the pre-condition of 'setsockopt' (PR #130683)

2025-03-11 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 closed https://github.com/llvm/llvm-project/pull/130683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6501647 - [StaticAnalyzer] Relax the pre-condition of 'setsockopt' (#130683)

2025-03-11 Thread via cfe-commits
Author: Ziqing Luo Date: 2025-03-11T10:23:03-07:00 New Revision: 65016475084f6435dbf252997d53853c2bfdf9be URL: https://github.com/llvm/llvm-project/commit/65016475084f6435dbf252997d53853c2bfdf9be DIFF: https://github.com/llvm/llvm-project/commit/65016475084f6435dbf252997d53853c2bfdf9be.diff LO

[clang] [clang-tools-extra] [clang] improve class type sugar preservation in pointers to members (PR #130537)

2025-03-11 Thread Erich Keane via cfe-commits
@@ -10033,15 +10040,24 @@ class Sema final : public SemaBase { bool InOverloadResolution, QualType &ConvertedType); + enum class CheckMemberPointerConversionResult { erichkeane wrote: Right, i

[clang] [ARM] Using cp15 while mtp =auto and arch is arm_arch6k and support thumb2 (PR #130027)

2025-03-11 Thread Vladi Krapp via cfe-commits
@@ -208,10 +208,17 @@ bool arm::useAAPCSForMachO(const llvm::Triple &T) { bool arm::isHardTPSupported(const llvm::Triple &Triple) { int Ver = getARMSubArchVersionNumber(Triple); llvm::ARM::ArchKind AK = llvm::ARM::parseArch(Triple.getArchName()); - return Triple.isARM() ||

[clang-tools-extra] [clang-tidy] support different precisions (PR #130540)

2025-03-11 Thread Tommy Chen via cfe-commits
@@ -136,6 +136,10 @@ Changes in existing checks ` check by updating suppress warnings logic for ``nullptr`` in ``std::find``. +- Improved :doc:`modernize-use-std-numbers + ` check to support math functions dl8sd11 wrote: Done. https://github.com/llvm/

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

2025-03-11 Thread Oleksandr T. via cfe-commits
@@ -2203,8 +2203,18 @@ Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc, return ParseCXXCondition(nullptr, Loc, CK, MissingOK); } -// Parse the expression. -ExprResult Expr = ParseExpression(); // expression +ExprResult Expr; +{ +

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-11 Thread via cfe-commits
@@ -70,16 +94,38 @@ class ParentMapContext::ParentMap { push_back(Value); } bool contains(const DynTypedNode &Value) { - return Seen.contains(Value); + assert(Value.getMemoizationData()); + bool found = FragileLazySeenCache.contains(&Value); +

[clang] [clang] NNS: don't print trailing scope resolution operator in diagnostics (PR #130529)

2025-03-11 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/130529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-11 Thread via cfe-commits
@@ -3520,21 +3520,24 @@ DecompositionDecl *DecompositionDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation LSquareLoc, QualType T, TypeSourceInfo *TInfo,

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-11 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/128150 >From e27ec113b6d20a34816fcf8daf5206cb7c4605d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Thu, 20 Feb 2025 12:37:15 + Subject: [PATCH] [clang-tidy] Avoid processing declarati

[clang] [Docs] Explain how to propose an extension in Clang (PR #130803)

2025-03-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes We have a list of criteria for proposing an extension in Clang, but we do not have any documentation about how to propose an extension. This adds some basic documentation about how we run RFCs in Clang

[clang] [Docs] Explain how to propose an extension in Clang (PR #130803)

2025-03-11 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Eventually, I expect we'll add documentation about the Clang Area Team to `clang/docs` as .rst files. Once that happens, I think we should switch the `AreaTeamMembers.txt` file to a .rst file and then link to the rendered content from `get_involved.html`. But I figured that

[clang] [StaticAnalyzer] Relax the pre-condition of 'setsockopt' (PR #130683)

2025-03-11 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: Thanks for reviewing! I will create another PR for my questions. https://github.com/llvm/llvm-project/pull/130683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-11 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: @RiverDave If you rebase this change we can merge it, and then if you want you could work on next version in independent PR. https://github.com/llvm/llvm-project/pull/129408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-11 Thread Arthur Eubanks via cfe-commits
@@ -19,6 +19,5 @@ // NPM: InstCombinePass{{$}} // NPM-NOT: InstCombinePass # // TIME: Total{{$}} -// NPM: Pass execution timing report aeubanks wrote: why does this line disappear? https://github.com/llvm/llvm-project/pull/130375 _

[clang] eaca60d - [clang] Hide the `DiagnosticOptions` pointer from `CompilerInvocation` (#106274)

2025-03-11 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-03-11T10:29:39-07:00 New Revision: eaca60d1a9a54ae0aa8626719decef4b11eb939d URL: https://github.com/llvm/llvm-project/commit/eaca60d1a9a54ae0aa8626719decef4b11eb939d DIFF: https://github.com/llvm/llvm-project/commit/eaca60d1a9a54ae0aa8626719decef4b11eb939d.diff L

[clang] [clang-tools-extra] [clang] Hide the `DiagnosticOptions` pointer from `CompilerInvocation` (PR #106274)

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/106274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-11 Thread Piotr Zegar via cfe-commits
@@ -194,15 +199,21 @@ void UseDefaultMemberInitCheck::storeOptions( } void UseDefaultMemberInitCheck::registerMatchers(MatchFinder *Finder) { - auto InitBase = - anyOf(stringLiteral(), characterLiteral(), integerLiteral(), -unaryOperator(hasAnyOperatorName("+

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130494)

2025-03-11 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %check_clang_tidy %s misc-const-correctness %t \ vbvictor wrote: I tried running test on small code with both of the options enabled. ```cpp int a[] = {1, 2}; int *p_local0 = &a[0]; ``` transformed to ```cpp int a[] = {1, 2}; int

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-03-11 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: I somehow thought we had already done something about this, but I can't find any reference to it. Anyway, if we're going to support this as an extension, I don't want to bury it in CGBuilder.h. We should decide exactly when we want it to trigger, an

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-11 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/129408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-11 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/129408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove redundant assertion & fix ClearStatName error (PR #130667)

2025-03-11 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang-tools-extra] [clang] improve class type sugar preservation in pointers to members (PR #130537)

2025-03-11 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This patch ended up being pretty massive... ANYTHING we can do to reduce the size of this would be very appreciated. I DID NOT do more than a cursory look over the tests, so if someone else could do some work to make sure there isn't anything awkward/we

[clang] [CIR] Emit init of local variables (PR #130164)

2025-03-11 Thread Andy Kaylor via cfe-commits
andykaylor wrote: Apparently the code formatting checker won't even let me mention "undef" in a comment. https://github.com/llvm/llvm-project/pull/130164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [clang-tools-extra] [clang] improve class type sugar preservation in pointers to members (PR #130537)

2025-03-11 Thread Erich Keane via cfe-commits
@@ -13461,13 +13486,112 @@ static ElaboratedTypeKeyword getCommonTypeKeyword(const T *X, const T *Y) { : ElaboratedTypeKeyword::None; } +static NestedNameSpecifier *getCommonNNS(ASTContext &Ctx, +

[clang] [clang-format] Don't remove parentheses separated from ellipsis by comma (PR #130471)

2025-03-11 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/130471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIR-V] Use the SPIR-V backend by default (PR #129545)

2025-03-11 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/129545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][WebAssembly] Support the `-m(no-)red-zone` flag. (PR #119997)

2025-03-11 Thread Dan Gohman via cfe-commits
sunfishcode wrote: Is there a use case that needs to disable the red zone globally on Wasm? My understanding is that -mno-red-zone exists for compatibility reasons that don't apply to Wasm. I'm hesitant to add flags adding implicit ABI variants in the absence of use cases. At least with the fu

[clang] 14176d1 - [C2y] Remove WG14 N3459 from the C status page

2025-03-11 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-03-11T14:49:51-04:00 New Revision: 14176d10842dcb8697bc7bbce3a4e252d6f11986 URL: https://github.com/llvm/llvm-project/commit/14176d10842dcb8697bc7bbce3a4e252d6f11986 DIFF: https://github.com/llvm/llvm-project/commit/14176d10842dcb8697bc7bbce3a4e252d6f11986.diff

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-11 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add bounds checks for the hlsl vector arguments and return types (PR #130724)

2025-03-11 Thread Justin Bogner via cfe-commits
@@ -89,23 +89,31 @@ void asuint(double4, out uint4, out uint4); /// \param X The X input value. /// \param Y The Y input value. +template _HLSL_16BIT_AVAILABILITY(shadermodel, 6.2) -const inline half distance(half X, half Y) { +const inline __detail::enable_if_t<__detail::is

[clang] [clang-tools-extra] [llvm] [clangd][WIP] Add doxygen parsing using standalone doxygen parser (PR #128591)

2025-03-11 Thread via cfe-commits
https://github.com/tcottin updated https://github.com/llvm/llvm-project/pull/128591 >From 18fa9e58b04b4e41e2b810fcc4a0c6be48258a1f Mon Sep 17 00:00:00 2001 From: Tim Cottin Date: Tue, 11 Mar 2025 19:00:49 + Subject: [PATCH] [clangd] Add doxygen parsing for hover information --- clang-tool

[clang] 456fa47 - [C2y] Claim conformance to WG14 N3505

2025-03-11 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-03-11T15:04:11-04:00 New Revision: 456fa47bab479f0ef1136d07687bd1b2635b1a26 URL: https://github.com/llvm/llvm-project/commit/456fa47bab479f0ef1136d07687bd1b2635b1a26 DIFF: https://github.com/llvm/llvm-project/commit/456fa47bab479f0ef1136d07687bd1b2635b1a26.diff

[clang] [clang-tools-extra] [clang] improve class type sugar preservation in pointers to members (PR #130537)

2025-03-11 Thread Erich Keane via cfe-commits
@@ -13461,13 +13486,112 @@ static ElaboratedTypeKeyword getCommonTypeKeyword(const T *X, const T *Y) { : ElaboratedTypeKeyword::None; } +static NestedNameSpecifier *getCommonNNS(ASTContext &Ctx, +

[clang] [llvm] [Support] Remove output file checks from `LockFileManager` (PR #130395)

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/130395 >From a9969c43be752ccaa70959fd4527a57dc2981881 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 6 Mar 2025 17:29:34 -0800 Subject: [PATCH 1/3] [Support] Remove output file checks from `LockFileManager

[clang] [Feature]: merge host and kernel dependencies for heterogeneous compilation (PR #119513)

2025-03-11 Thread via cfe-commits
https://github.com/zhouronghua updated https://github.com/llvm/llvm-project/pull/119513 >From bdb0d6d9996344c847ef145d4e55963534f78ceb Mon Sep 17 00:00:00 2001 From: "ronghua.zhou" Date: Fri, 14 Feb 2025 01:04:51 + Subject: [PATCH] [Feature]: support for the BC library file into the compile

[clang] [clang] Fix darwin-related tests' REQUIRES annotation (PR #130138)

2025-03-11 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: Do you have a bot or build to point to for test failures? There is no way to disable Darwin target from clang driver. I think the test might be related to the host platform is not Darwin so the driver didn't infer the target correctly without a default target triple? I

[clang] [HLSL] Add bounds checks for the hlsl vector arguments and return types (PR #130724)

2025-03-11 Thread Justin Bogner via cfe-commits
@@ -45,6 +45,10 @@ template struct is_arithmetic { static const bool Value = __is_arithmetic(T); }; +template +using HLSL_FIXED_VECTOR = bogner wrote: `HLSL_FIXED_VECTOR` looks like a macro to me rather than a type. Why use all caps convention here? htt

[clang] [HLSL] Add bounds checks for the hlsl vector arguments and return types (PR #130724)

2025-03-11 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. Looks good to me. One suggestion for an alternative approach (using `= delete` on some overloads) but you can use your judgement on whether that's worth trying. https://github.com/llvm/llvm-project/pull/130724 __

[clang] [HLSL] Add bounds checks for the hlsl vector arguments and return types (PR #130724)

2025-03-11 Thread Justin Bogner via cfe-commits
@@ -89,23 +89,31 @@ void asuint(double4, out uint4, out uint4); /// \param X The X input value. /// \param Y The Y input value. +template _HLSL_16BIT_AVAILABILITY(shadermodel, 6.2) -const inline half distance(half X, half Y) { +const inline __detail::enable_if_t<__detail::is

[clang] [HLSL] Add bounds checks for the hlsl vector arguments and return types (PR #130724)

2025-03-11 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/130724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add bounds checks for the hlsl vector arguments and return types (PR #130724)

2025-03-11 Thread Farzon Lotfi via cfe-commits
@@ -45,6 +45,10 @@ template struct is_arithmetic { static const bool Value = __is_arithmetic(T); }; +template +using HLSL_FIXED_VECTOR = farzonl wrote: I was using it like a Macro for creating the vector type. https://github.com/llvm/llvm-project/pull/

[clang] [HLSL] Add bounds checks for the hlsl vector arguments and return types (PR #130724)

2025-03-11 Thread Farzon Lotfi via cfe-commits
@@ -89,23 +89,31 @@ void asuint(double4, out uint4, out uint4); /// \param X The X input value. /// \param Y The Y input value. +template _HLSL_16BIT_AVAILABILITY(shadermodel, 6.2) -const inline half distance(half X, half Y) { +const inline __detail::enable_if_t<__detail::is

[clang] 1cb1407 - [HLSL] Add bounds checks for the hlsl vector arguments and return types (#130724)

2025-03-11 Thread via cfe-commits
Author: Farzon Lotfi Date: 2025-03-11T15:13:00-04:00 New Revision: 1cb14078658f9ac573ec4102354106e29d62c46d URL: https://github.com/llvm/llvm-project/commit/1cb14078658f9ac573ec4102354106e29d62c46d DIFF: https://github.com/llvm/llvm-project/commit/1cb14078658f9ac573ec4102354106e29d62c46d.diff

[clang] [HLSL] Add bounds checks for the hlsl vector arguments and return types (PR #130724)

2025-03-11 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/130724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add bounds checks for the hlsl vector arguments and return types (PR #130724)

2025-03-11 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/130724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Allow non-local/non-variable declarations in for loop (PR #129737)

2025-03-11 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Should this have updated: https://clang.llvm.org/c_status.html Also it would have been nice to mention the paper number in the release notes, I am assuming there was a paper? CC @AaronBallman https://github.com/llvm/llvm-project/pull/129737 _

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-03-11 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics -std=c++11 %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fsyntax-only -verify -fptrauth-intrinsics -std=c++11 %s + +template struct G { + T __ptrauth(0,0,1234) test; +

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #130729)

2025-03-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `clang` at step 6 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/18759 Here is

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #130729)

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

[clang] Reland "[clang] Lower modf builtin using `llvm.modf` intrinsic" (PR #129885)

2025-03-11 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: Thanks for the report :+1: It looks like all we have to do is set the legalization rule for f32 to "Promote". Looks like there's actually already logic to do this for a bunch of other nodes: >From X86ISelLowering.cpp: ```c++ // On 32 bit MSVC, `fmodf(f32)` is not defined - only

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #128586)

2025-03-11 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/128586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add support for template as type parameter (PR #127654)

2025-03-11 Thread via cfe-commits
ykhatav wrote: > > I am not sure that I understand your concern completely. Consider the > > following DWARF output based on my implementation. How would you say "v1" > > should be represented ideally? > > ``` > > 0x0042: DW_TAG_structure_type > > DW_AT_calling_convention (DW_CC_pass_by

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #130729)

2025-03-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/12649 Here is the relevant pi

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-03-11 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > > So I believe this should be generalized to all of Windows (and/or > > generalized to check for a COFF object file format?) instead of singling > > out specifically MSVC only. > > Thanks for checking. I can fix the condition but can you please let me know > which of the two

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #130729)

2025-03-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `clang` at step 7 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/1097 Here is the re

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #130729)

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

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-11 Thread Andy Kaylor via cfe-commits
@@ -36,6 +36,18 @@ class ScalarExprEmitter : public StmtVisitor { bool ira = false) : cgf(cgf), builder(builder), ignoreResultAssign(ira) {} + //======// + //

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-11 Thread Andy Kaylor via cfe-commits
@@ -84,26 +96,266 @@ class ScalarExprEmitter : public StmtVisitor { } mlir::Value VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *e) { -mlir::Type type = cgf.convertType(e->getType()); +mlir::Type type = convertType(e->getType()); return builder.create(

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-11 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s + +unsigned char cxxstaticcast_0(unsigned int x) { + return static_cast(x); +} + +// CHECK: cir.func @cxxstaticcast_0 +// C

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-11 Thread Andy Kaylor via cfe-commits
@@ -36,6 +36,18 @@ class ScalarExprEmitter : public StmtVisitor { bool ira = false) : cgf(cgf), builder(builder), ignoreResultAssign(ira) {} + //======// + //

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-11 Thread Andy Kaylor via cfe-commits
@@ -84,26 +96,266 @@ class ScalarExprEmitter : public StmtVisitor { } mlir::Value VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *e) { -mlir::Type type = cgf.convertType(e->getType()); +mlir::Type type = convertType(e->getType()); return builder.create(

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-11 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir andykaylor wrote: Can you expand this test to cover all the cast types you're adding (or remove any that can't be supported yet)? https://github.c

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-11 Thread Andy Kaylor via cfe-commits
@@ -78,6 +79,67 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return create(loc, val, dst); } + //======// + // Cast/Conversion Operators + //===--

[clang] [flang] [llvm] [clang] [OpenMP] New OpenMP 6.0 self_maps clause (PR #129888)

2025-03-11 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/129888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement the `fmod` intrinsic (PR #130320)

2025-03-11 Thread Farzon Lotfi via cfe-commits
@@ -22,56 +22,128 @@ // // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ // RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \ -// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ +// RUN: -emit-llvm -o - | FileCheck %s \ // RUN: -DFNATTRS

[clang] Implement the `fmod` intrinsic (PR #130320)

2025-03-11 Thread Farzon Lotfi via cfe-commits
@@ -22,56 +22,136 @@ // // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ // RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \ -// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ +// RUN: -emit-llvm -o - | FileCheck %s \ // RUN: -DFNATTRS

[clang] Implement the `fmod` intrinsic (PR #130320)

2025-03-11 Thread Deric C. via cfe-commits
@@ -22,56 +22,128 @@ // // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ // RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \ -// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ +// RUN: -emit-llvm -o - | FileCheck %s \ // RUN: -DFNATTRS

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130494)

2025-03-11 Thread via cfe-commits
@@ -40,11 +40,14 @@ class ConstCorrectnessCheck : public ClangTidyCheck { const bool AnalyzeValues; const bool AnalyzeReferences; + const bool AnalyzePointers; EugeneZelenko wrote: How about alphabetical order? Same below. https://github.com/llvm/llvm-p

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-11 Thread Alexey Bataev via cfe-commits
@@ -4668,6 +4668,34 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, assert(Tok.is(tok::comma) && "Expected comma."); (void)ConsumeToken(); } +// Handle original(private / shared) Modifier +if (Kind == OMPC_reduction && getLangOpts().OpenMP

[clang] Implement the `fmod` intrinsic (PR #130320)

2025-03-11 Thread Deric C. via cfe-commits
https://github.com/Icohedron approved this pull request. https://github.com/llvm/llvm-project/pull/130320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add new check bugprone-capture-this-by-field (PR #130297)

2025-03-11 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,114 @@ +//===--- CapturingThisByFieldCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] Add new check bugprone-capture-this-by-field (PR #130297)

2025-03-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/130297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-03-11 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Sorry about that, but the patch which added the automatic `NoteTemplateParameterLocation` was reverted and I had missed the notification. https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [flang] [flang/clang] Adding use of Clang's diagnostics in Flang (PR #130593)

2025-03-11 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: For compiler options, we have various "categories" in `Options.td`, `ClangOptions`, `FlangOptions` etc. which only apply to specific frontends. I haven't looked very closely at this, but I believe that there is only one "category" for warnings. Is this correct? If that the c

[clang] 0aa92d2 - [AMDGPU] Run DL builtin tests for new GFX (#130054)

2025-03-11 Thread via cfe-commits
Author: Mariusz Sikora Date: 2025-03-06T14:24:49+01:00 New Revision: 0aa92d23b206e20fb1e19f4fc0d05d2d293f404f URL: https://github.com/llvm/llvm-project/commit/0aa92d23b206e20fb1e19f4fc0d05d2d293f404f DIFF: https://github.com/llvm/llvm-project/commit/0aa92d23b206e20fb1e19f4fc0d05d2d293f404f.diff

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-03-11 Thread via cfe-commits
@@ -8361,6 +8361,17 @@ class ExprEvaluatorBase return false; } +// If an assertion fails during constant evaluation, give a specific note explaining that +if (FD->getName() == "__assert_fail") { cor3ntin wrote: Maybe we can instead check

[clang-tools-extra] [clang-tidy] Add new check bugprone-capture-this-by-field (PR #130297)

2025-03-11 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,44 @@ +//===--- CapturingThisByFieldCheck.h - clang-tidy ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

<    1   2   3   4   5   6   7   >