[clang] [clang-tools-extra] [clangd] [AST] Handle uninitialized type constraints (PR #110496)

2024-09-30 Thread Florian Albrechtskirchinger via cfe-commits
https://github.com/falbrechtskirchinger updated https://github.com/llvm/llvm-project/pull/110496 >From 20042cc1b4ada2065813e118c24236a61e83d1a9 Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger Date: Mon, 30 Sep 2024 12:58:15 +0200 Subject: [PATCH] [clangd] [AST] Handle uninitialized t

[clang] [clang][x86] Add constexpr support for BZHI intrinsics (PR #110508)

2024-09-30 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 c0e97c4dfc936ed13ae9696f0615d7e648268bc9 0cb0f899c185bb729e1ee2f48d78d4ef81d0ace9 --e

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread via cfe-commits
higher-performance wrote: > THOUGH: that makes me wonder, have you played with virtual bases yet? Are we > 'sane' for those? I have not, but those can't be aggregates, right? > The function should be pretty easy though > `// DFS for bases, but it doesn't seem worth the effort to work much har

[clang] [libcxx] [libc++][modules] Rewrite the modulemap to have fewer top-level modules (PR #110501)

2024-09-30 Thread A. Jiang via cfe-commits
@@ -1,2125 +1,2235 @@ -// Main C++ standard library interfaces -module std_algorithm [system] { - header "algorithm" - export * -} -module std_any [system] { - header "any" - export * -} -module std_array [system] { - header "array" - export * -} -module std_atomic [system]

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-30 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com edited https://github.com/llvm/llvm-project/pull/90933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread via cfe-commits
@@ -0,0 +1,36 @@ +//===--- NondeterministicPointerUsageCheck.h - clang-tidy ---*- C++ -*-===// EugeneZelenko wrote: Ditto. https://github.com/llvm/llvm-project/pull/110471 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread via cfe-commits
@@ -0,0 +1,67 @@ +//===--- NondetermnisticPointerUsageCheck.cpp - clang-tidy ===// EugeneZelenko wrote: Please make is same length as closing header line. https://github.com/llvm/llvm-project/pull/110471 __

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread via cfe-commits
https://github.com/EugeneZelenko commented: Please mention new check in Release Notes. https://github.com/llvm/llvm-project/pull/110471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread via cfe-commits
https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/110471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-30 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/90933 >From c1a0219457a3c162d7fa6b9d70750ba7a040d9f2 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 26 Apr 2024 20:02:52 -0700 Subject: [PATCH 1/7] [ThinLTO][NFC] Prep for two-codegen rounds --- clang/lib/

[clang] [clang][Itanium Mangle] Enable mangling of enclosing class for member… (PR #110503)

2024-09-30 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. Thank you, this looks good to me. Let’s wait for a bit to see if other reviewers have any additional comments. https://github.com/llvm/llvm-project/pull/110503 ___ cfe-commits mailing list cfe-comm

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

2024-09-30 Thread Oliver Stannard via cfe-commits
ostannard wrote: Continued in #109943. 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] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-30 Thread Kyungwoo Lee via cfe-commits
kyulee-com wrote: @teresajohnson Here is the summary for the latest commit. Sorry about a few more dependent PRs whose commits also appear in this PR. - Refactored `ThinBackend`, which was also a function, but is now a type. It's set up when an LTO object is created by the linker. I can now sto

[clang] [HLSL] Use HLSLToolChain for Vulkan (PR #110306)

2024-09-30 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/110306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-30 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard closed 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] 9f6cd56 - [HLSL] Use HLSLToolChain for Vulkan (#110306)

2024-09-30 Thread via cfe-commits
Author: Steven Perron Date: 2024-09-30T10:26:14-04:00 New Revision: 9f6cd56d5a366d1b75a62a207b6568d362ea82d5 URL: https://github.com/llvm/llvm-project/commit/9f6cd56d5a366d1b75a62a207b6568d362ea82d5 DIFF: https://github.com/llvm/llvm-project/commit/9f6cd56d5a366d1b75a62a207b6568d362ea82d5.diff

[clang] [clang][x86] Add constexpr support for all remaining TBM intrinsics (PR #110515)

2024-09-30 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/110515 BEXTRI is already handled, so we just need to tag the rest of the intrinsics, which are all expanded to generic patterns. As these are expanded I felt it better to test against the equivalent pattern instead o

[clang] [clang][x86] Add constexpr support for all remaining TBM intrinsics (PR #110515)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Simon Pilgrim (RKSimon) Changes BEXTRI is already handled, so we just need to tag the rest of the intrinsics, which are all expanded to generic patterns. As these are expanded I felt it better to test against the equivalent pattern inste

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread Erich Keane via cfe-commits
@@ -551,3 +551,14 @@ struct full_of_empty empty_test_2(void) { struct full_of_empty e; return e; // no-warning } + +struct with_explicit_field { + int x; + int y [[clang::requires_explicit_initialization]]; // expected-note {{declared}} erichkeane wrote:

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot2` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/4341 Here is the relevant piece of

[clang] [clang][x86] Add constexpr support for LZCNT/TZCNT intrinsics (PR #110499)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Simon Pilgrim (RKSimon) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/110499.diff 8 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+6) - (modified) clang/include/clang/Bas

[clang] [compiler-rt] [llvm] [AArch64] Split FeatureMTE to FEAT_MTE and FEAT_MTE2. (PR #109299)

2024-09-30 Thread via cfe-commits
Wilco1 wrote: > I think this difference would be ok in practice, since I can't imagine any > scenario in which it would be beneficial to choose a +memtag version of a > function when FEAT_MTE2 is not supported. However, if we include +memtag in > FMV with this discrepancy, then we do have to b

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-30 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Ping for review! @MaskRay @petrhosek . Thanks so much! https://github.com/llvm/llvm-project/pull/108570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][x86] Add constexpr support for LZCNT/TZCNT intrinsics (PR #110499)

2024-09-30 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 c0e97c4dfc936ed13ae9696f0615d7e648268bc9 b61842abda168ea02bb6b25598ce6d08757bb4f7 --e

[clang] [Clang] Add __builtin_(elementwise|reduce)_(max|min)imum (PR #110198)

2024-09-30 Thread Matt Arsenault via cfe-commits
@@ -273,6 +273,74 @@ void test_builtin_elementwise_min(int i, short s, double d, float4 v, int3 iv, u // expected-error@-1 {{1st argument must be a vector, integer or floating point type (was '_Complex float')}} } +void test_builtin_elementwise_maximum(int i, short s, floa

[clang] [HLSL][SPIRV] Fix calling convention for call in entry function. (PR #110275)

2024-09-30 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/110275 >From 1c2aab054266196844f3e67d4740292a2cf7 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Tue, 17 Sep 2024 16:22:57 -0400 Subject: [PATCH 1/3] [HLSL][SPIRV] Fix calling convention for call in entry fun

[clang] [HLSL][SPIRV] Fix calling convention for call in entry function. (PR #110275)

2024-09-30 Thread Steven Perron via cfe-commits
@@ -415,6 +415,7 @@ void CGHLSLRuntime::emitEntryFunction(const FunctionDecl *FD, } CallInst *CI = B.CreateCall(FunctionCallee(Fn), Args); + CI->setCallingConv(Fn->getCallingConv()); (void)CI; s-perron wrote: Done. https://github.com/llvm/llvm-proje

[clang] [HLSL][SPIRV] Fix calling convention for call in entry function. (PR #110275)

2024-09-30 Thread Steven Perron via cfe-commits
@@ -316,6 +316,11 @@ class LLVM_LIBRARY_VISIBILITY SPIRVTargetInfo : public BaseSPIRVTargetInfo { SizeType = TargetInfo::UnsignedInt; resetDataLayout("e-i64:64-v16:16-v24:32-v32:32-v48:64-" "v96:128-v192:256-v256:256-v512:512-v1024:1024-G1"); + +

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 From 4fb69942effb3cf34d07f33a14a95757b6ca5ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 17:05:42 +0200 Subjec

[clang] [clang] Fix static analyzer concerns (PR #110243)

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

[clang] [flang] [llvm] [openmp] [flang][driver] rename flang-new to flang (PR #110023)

2024-09-30 Thread Brad Richardson via cfe-commits
https://github.com/everythingfunctional updated https://github.com/llvm/llvm-project/pull/110023 >From 649a73478c78389560042030a9717a05e8e338a8 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Wed, 25 Sep 2024 13:25:22 -0500 Subject: [PATCH 1/3] [flang][driver] rename flang-new to flang --

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
@@ -115,6 +113,8 @@ New check aliases Changes in existing checks ^^ +- Added `ctime` and `localtime` to clang-tidy. zimirza wrote: Sure, I have updated the release notes text. Could you please check if it is ok? https://github.com/llv

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?= Message-ID: In-Reply-To: @@

[clang] [Clang][TableGen] Change Opcodes Emitter to use const Record * (PR #110588)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/110588.diff 1 Files Affected: - (modified) clang/utils/TableGen/ClangOpcodesEmitter.cpp (+8-8) ``diff diff --git a/clang/utils/TableGen/C

[clang] [Clang][TableGen] Change Opcodes Emitter to use const Record * (PR #110588)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/110588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating angles containing FatArrow (PR #108671)

2024-09-30 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/108671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 463a4f1 - [Clang][Concepts] Normalize SizeOfPackExpr's pack declaration (#110238)

2024-09-30 Thread via cfe-commits
Author: Younan Zhang Date: 2024-10-01T12:28:30+08:00 New Revision: 463a4f15044c04279583d6d0da73ae49f4c242ec URL: https://github.com/llvm/llvm-project/commit/463a4f15044c04279583d6d0da73ae49f4c242ec DIFF: https://github.com/llvm/llvm-project/commit/463a4f15044c04279583d6d0da73ae49f4c242ec.diff

[clang] [clang-format] Fix a bug in annotating angles containing FatArrow (PR #108671)

2024-09-30 Thread Owen Pan via cfe-commits
@@ -243,14 +244,16 @@ class AnnotatingParser { // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (InExpr && !Line.startsWith(tok::kw_template) && + if

[clang] [Clang][Sema] Fix templated array size calculation. (PR #96464)

2024-09-30 Thread via cfe-commits
https://github.com/awson updated https://github.com/llvm/llvm-project/pull/96464 >From 096b999120cc28844d780acbc16f8308b3a54160 Mon Sep 17 00:00:00 2001 From: awson Date: Mon, 24 Jun 2024 10:34:51 +0300 Subject: [PATCH 1/3] [Clang][Sema] don't handle ArraySize/AllocType early. --- clang/lib/Se

[clang] [Clang][Concepts] Normalize SizeOfPackExpr's pack declaration (PR #110238)

2024-09-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/110238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change Opcodes Emitter to use const Record * (PR #110588)

2024-09-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/110588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-30 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -5794,6 +5794,30 @@ static void handleRequiresCapabilityAttr(Sema &S, Decl *D, RequiresCapabilityAttr(S.Context, AL, Args.data(), Args.size()); D->addAttr(RCA); + + if (const auto *FD = dy

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

2024-09-30 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -5794,6 +5794,30 @@ static void handleRequiresCapabilityAttr(Sema &S, Decl *D, RequiresCapabilityAttr(S.Context, AL, Args.data(), Args.size()); D->addAttr(RCA); + + if (const auto *FD = dy

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

2024-09-30 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: > So the semantics here are: if there is any `requires_capability` attribute on > a function, it needs to exactly match the set of `requires_capability` > attributes on every previous declaration? Or in

[clang] [clangd] [AST] Handle uninitialized type constraints (PR #110496)

2024-09-30 Thread Florian Albrechtskirchinger via cfe-commits
https://github.com/falbrechtskirchinger updated https://github.com/llvm/llvm-project/pull/110496 >From c090601a032c6ba406928821ec4296d190edade5 Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger Date: Mon, 30 Sep 2024 12:58:15 +0200 Subject: [PATCH] [clangd][AST] Handle uninitialized ty

[clang] [clang-tools-extra] [clangd] [AST] Handle uninitialized type constraints (PR #110496)

2024-09-30 Thread Florian Albrechtskirchinger via cfe-commits
falbrechtskirchinger wrote: > We need to resort to `-fallow-pch-with-compiler-errors` :) Ah, thanks! I would not have figured that out on my own. :) > Specifically, add the following file to `clang/test/PCH` (or somehow merge it > into a pre-existing test, which I'd prefer) I looked through t

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 From 4fb69942effb3cf34d07f33a14a95757b6ca5ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 17:05:42 +0200 Subjec

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 From 4fb69942effb3cf34d07f33a14a95757b6ca5ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 17:05:42 +0200 Subjec

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread Erich Keane via cfe-commits
@@ -551,3 +551,14 @@ struct full_of_empty empty_test_2(void) { struct full_of_empty e; return e; // no-warning } + +struct with_explicit_field { + int x; + int y [[clang::requires_explicit_initialization]]; // expected-note 2{{'y' declared here}} erichke

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-30 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s + +namespace GH49093 { + class B { + public: +static int a() { return 0; } // expected-note {{member is declared here}} +decltype(a< 0 >(0)) test;// expected-error {{member 'a' used before its

[clang] [Clang][CodeGen] Emit load of GEP after EmitMemberExpr (PR #110487)

2024-09-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: This is sort of the same comment I've made on other related patches... but I think the fundamental issue here is that StructAccessBase is skipping over CK_LValueToRValue casts. Once you jump over such a cast, you're looking at expressions which are

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread via cfe-commits
@@ -551,3 +551,14 @@ struct full_of_empty empty_test_2(void) { struct full_of_empty e; return e; // no-warning } + +struct with_explicit_field { + int x; + int y [[clang::requires_explicit_initialization]]; // expected-note 2{{'y' declared here}} higher-

[clang] [clang][bytecode] Implement ia32_bextr builitns (PR #110513)

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

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread via cfe-commits
@@ -5214,9 +5215,9 @@ unsigned RecordDecl::getODRHash() { // Only calculate hash on first call of getODRHash per record. ODRHash Hash; Hash.AddRecordDecl(this); - // For RecordDecl the ODRHash is stored in the remaining 26 - // bit of RecordDeclBits, adjust the hash to

[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

2024-09-30 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/95712 >From 2c9e7c16524b7ce3bf818e451279722dc45d3efc Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Mon, 23 Sep 2024 23:12:23 -0400 Subject: [PATCH 1/4] just defaults --- clang-tools-extra/clangd/Config.h

[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

2024-09-30 Thread Tor Shepherd via cfe-commits
@@ -755,12 +812,33 @@ class InlayHintVisitor : public RecursiveASTVisitor { bool NameHint = shouldHintName(Args[I], Name); bool ReferenceHint = shouldHintReference(Params[I], ForwardedParams[I]); + bool IsDefault = isa(Args[I]); torshepherd w

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Diag seems reasonable to me now. I want Aaron to take another look (he's sadly out this week, so it'll have to be when he gets back), but I think this seems to make sense here. https://github.com/llvm/llvm-project/pull/107786 _

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-30 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @erichkeane thanks for the feedback https://github.com/llvm/llvm-project/pull/107786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 From 4fb69942effb3cf34d07f33a14a95757b6ca5ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 17:05:42 +0200 Subjec

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-30 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/110327 >From 4f235c0e9c539cdaa2bab9a7f8228f33c0fea2b8 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 26 Sep 2024 14:34:16 -0700 Subject: [PATCH 1/2] Add codegen for existing resource types and make HLSLAttribut

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-30 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/109180 >From 3c58861f3e8c2f1333d0b36c6f5b7ba7f3d9e187 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 18 Sep 2024 12:20:19 -0700 Subject: [PATCH 1/6] add cross hlsl function --- clang/include/clang/Basic/Bu

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-30 Thread Helena Kotas via cfe-commits
@@ -4488,6 +4488,30 @@ void CXXNameMangler::mangleType(const ArrayParameterType *T) { mangleType(cast(T)); } +void CXXNameMangler::mangleType(const HLSLAttributedResourceType *T) { + mangleType(T->getWrappedType()); + const HLSLAttributedResourceType::Attributes &Attrs =

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread via cfe-commits
@@ -0,0 +1,67 @@ +//===--- NondetermnisticPointerUsageCheck.cpp - clang-tidy ===// vabridgers wrote: Done, thanks https://github.com/llvm/llvm-project/pull/110471 ___ cfe-commits mailing list cfe-commits@li

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread via cfe-commits
@@ -0,0 +1,31 @@ +.. title:: clang-tidy - bugprone-nondeterministic-pointer-usage + +nondeterministic-pointer-usage +== + +Finds nondeterministic usages of pointers in unordered containers. + +One canonical example is iteration across a container of poi

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread via cfe-commits
@@ -0,0 +1,31 @@ +.. title:: clang-tidy - bugprone-nondeterministic-pointer-usage + +nondeterministic-pointer-usage +== + +Finds nondeterministic usages of pointers in unordered containers. + +One canonical example is iteration across a container of poi

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

2024-09-30 Thread Aaron Puchert via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -5794,6 +5794,30 @@ static void handleRequiresCapabilityAttr(Sema &S, Decl *D, RequiresCapabilityAttr(S.Context, AL, Args.data(), Args.size()); D->addAttr(RCA); + + if (const auto *FD = dy

[clang] [clang][CodeGen] Emit improved memory effects and return status for AsmStmt (PR #110510)

2024-09-30 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: > We need documentation for the exact assumptions we're making here. Sure, we can try to work on this (and your other remarks). But what do you have in mind? Since this form of inline assembly is a gcc extension, I consider the gcc documentation and implementation authorita

[clang] [libc] [llvm] [mlir] [TableGen] Change TableGenMain to use const RecordKeeper (PR #110578)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/110578 Change TableGenMain's `MainFn` argument to be a function that accepts a const reference to RecordKeeper. >From 40ad0205938492a163b6c261b7c46a78b7e65e32 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 30

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > creation of an advisory group. Why isn't `misc` suitable for this use case? It would be confusing to have both groups I think, and may lead to bike-shedding discussions in the future about where a check belongs in misc or advisory. https://github.com/llvm/llvm-project/p

[clang] [clang] Redeclare function templates instances per primary template (PR #110387)

2024-09-30 Thread Matheus Izvekov via cfe-commits
@@ -3949,28 +3949,15 @@ TemplateDeductionResult Sema::FinishTemplateArgumentDeduction( TemplateArgumentList::CreateCopy(Context, CanonicalBuilder); Info.reset(SugaredDeducedArgumentList, CanonicalDeducedArgumentList); + FunctionTemplate = FunctionTemplate->getMostRec

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 From 4fb69942effb3cf34d07f33a14a95757b6ca5ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 17:05:42 +0200 Subjec

[clang] 8518178 - [clang][bytecode] Implement ia32_bextr builitns (#110513)

2024-09-30 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-30T20:07:28+02:00 New Revision: 85181788576151cc4b52d38d9b52d04f26179530 URL: https://github.com/llvm/llvm-project/commit/85181788576151cc4b52d38d9b52d04f26179530 DIFF: https://github.com/llvm/llvm-project/commit/85181788576151cc4b52d38d9b52d04f26179530.diff L

[clang] [HLSL] Treat `main` as any other function (PR #110546)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes HLSL doesn't distinguish `main` from any other function. It does treat entry points special, but they're not required to be called `main` so we have a different attribute annotation t

[clang] [HLSL][SPIRV] Fix calling convention for call in entry function. (PR #110542)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Steven Perron (s-perron) Changes Fix the calling convention used for the call in the entry point wrapper. No calling convention is currently set. It can easily use the calling convention of the function that is being called. Without this,

[clang] [HLSL][SPIRV] Fix calling convention for call in entry function. (PR #110542)

2024-09-30 Thread Steven Perron via cfe-commits
https://github.com/s-perron ready_for_review https://github.com/llvm/llvm-project/pull/110542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-09-30 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: (See discussion on #110487) https://github.com/llvm/llvm-project/pull/110497 ___ 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 calls with homogeneous FP struct types (PR #110506)

2024-09-30 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/110506 >From 328357f2300ebe55b8385c01f9c655f703933736 Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Mon, 30 Sep 2024 11:07:45 + Subject: [PATCH 1/5] [IR] Allow fast math flags on calls with homogeneous FP s

[clang] [llvm] [IR] Allow fast math flags on calls with homogeneous FP struct types (PR #110506)

2024-09-30 Thread Benjamin Maxwell via cfe-commits
@@ -1122,6 +1122,26 @@ define void @fastMathFlagsForArrayCalls([2 x float] %f, [2 x double] %d1, [2 x < ret void } +declare { float, float } @fmf_struct_f32() +declare { double, double } @fmf_struct_f64() +declare { <4 x double>, <4 x double> } @fmf_struct_v4f64() + +; CHEC

[clang] [llvm] [IR] Allow fast math flags on calls with homogeneous FP struct types (PR #110506)

2024-09-30 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 c0e97c4dfc936ed13ae9696f0615d7e648268bc9 6e7bebcf5c219b4934ad2acefea93d5456040196 --e

[clang] df3f291 - [TBAA] Add tests with pointers to structs to tbaa-pointers.c.

2024-09-30 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-09-30T19:54:05+01:00 New Revision: df3f291d2a64bb01bc8fab69f296923c1c798909 URL: https://github.com/llvm/llvm-project/commit/df3f291d2a64bb01bc8fab69f296923c1c798909 DIFF: https://github.com/llvm/llvm-project/commit/df3f291d2a64bb01bc8fab69f296923c1c798909.diff

[clang] [llvm] [IR] Allow fast math flags on calls with homogeneous FP struct types (PR #110506)

2024-09-30 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/110506 >From 328357f2300ebe55b8385c01f9c655f703933736 Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Mon, 30 Sep 2024 11:07:45 + Subject: [PATCH 1/5] [IR] Allow fast math flags on calls with homogeneous FP s

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-30 Thread Chris B via cfe-commits
@@ -4492,6 +4492,31 @@ void CXXNameMangler::mangleType(const ArrayParameterType *T) { mangleType(cast(T)); } +void CXXNameMangler::mangleType(const HLSLAttributedResourceType *T) { + mangleType(T->getWrappedType()); + const HLSLAttributedResourceType::Attributes &Attrs =

[clang] Add support for aligning BlockComments in declarations (PR #109497)

2024-09-30 Thread via cfe-commits
JessehMSFT wrote: Ping https://github.com/llvm/llvm-project/pull/109497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] clang-format-ignore: Add support for double asterisk patterns (PR #110560)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Ameer J (ameerj) Changes Adds `**` support for `.clang-format-ignore` to support similar pattern matching to [.gitignore](https://mirrors.edge.kernel.org/pub/software/scm/git/docs/gitignore.html#_pattern_format) closes #110160 --

[clang] [clang][Itanium Mangle] Enable mangling of enclosing class for member… (PR #110503)

2024-09-30 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/110503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread via cfe-commits
whisperity wrote: > Q) I ended up expanding upon the C++ simulation header, but had thoughts > about breaking that up into multiple smaller files. Maybe there's an > opportunity to refactor some C++ simulation files across multiple checkers as > a seperate PR first, or maybe even as part of t

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-30 Thread Chris B via cfe-commits
@@ -3753,6 +3754,32 @@ void MicrosoftCXXNameMangler::mangleType(const DependentBitIntType *T, Error(Range.getBegin(), "DependentBitInt type") << Range; } +void MicrosoftCXXNameMangler::mangleType(const HLSLAttributedResourceType *T, +

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread via cfe-commits
whisperity wrote: > And to determine if it's bad one needs to understand how the result of the > lookup or the individual elements of the iteration are used. And the issue here is that, in the extreme case, even a completely omniscient call graph oracle would still fail at proving immunity to

[clang] [TBAA] Extend pointer TBAA to pointers of non-builtin types. (PR #110569)

2024-09-30 Thread Florian Hahn via cfe-commits
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/110569 Extend the logic added in 123c036bd361d (https://github.com/llvm/llvm-project/pull/76612) to support pointers to non-builtin types by using the mangled name of the canonical type. >From 71bc337c625b83f950581312e4

[clang] [TBAA] Extend pointer TBAA to pointers of non-builtin types. (PR #110569)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Florian Hahn (fhahn) Changes Extend the logic added in 123c036bd361d (https://github.com/llvm/llvm-project/pull/76612) to support pointers to non-builtin types by using the mangled name of the canonical type. --- Full diff: https://github

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-30 Thread Helena Kotas via cfe-commits
@@ -4488,6 +4488,30 @@ void CXXNameMangler::mangleType(const ArrayParameterType *T) { mangleType(cast(T)); } +void CXXNameMangler::mangleType(const HLSLAttributedResourceType *T) { + mangleType(T->getWrappedType()); + const HLSLAttributedResourceType::Attributes &Attrs =

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-30 Thread Chris B via cfe-commits
@@ -10506,7 +10506,9 @@ def err_second_argument_to_cwsc_not_pointer : Error< "second argument to __builtin_call_with_static_chain must be of pointer type">; def err_vector_incorrect_num_initializers : Error< - "%select{too many|too few}0 elements in vector initialization (

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-30 Thread Chris B via cfe-commits
@@ -10506,7 +10506,9 @@ def err_second_argument_to_cwsc_not_pointer : Error< "second argument to __builtin_call_with_static_chain must be of pointer type">; def err_vector_incorrect_num_initializers : Error< - "%select{too many|too few}0 elements in vector initialization (

[clang] [HLSL][clang] Add elementwise builtin for atan2 (p3) (PR #110187)

2024-09-30 Thread Tex Riddell via cfe-commits
https://github.com/tex3d updated https://github.com/llvm/llvm-project/pull/110187 >From 3669af3b40c85f1287f2c2fcb27bfc4282babd6a Mon Sep 17 00:00:00 2001 From: Tex Riddell Date: Fri, 13 Sep 2024 18:56:58 -0700 Subject: [PATCH] [HLSL][clang] Add elementwise builtin for atan2 (p3) This change is

[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

2024-09-30 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/95712 >From 2c9e7c16524b7ce3bf818e451279722dc45d3efc Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Mon, 23 Sep 2024 23:12:23 -0400 Subject: [PATCH 1/3] just defaults --- clang-tools-extra/clangd/Config.h

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread Erich Keane via cfe-commits
@@ -551,3 +551,14 @@ struct full_of_empty empty_test_2(void) { struct full_of_empty e; return e; // no-warning } + +struct with_explicit_field { + int x; + int y [[clang::requires_explicit_initialization]]; // expected-note 2{{'y' declared here}} erichke

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread via cfe-commits
@@ -268,6 +268,69 @@ static void CheckStringInit(Expr *Str, QualType &DeclT, const ArrayType *AT, updateStringLiteralType(Str, DeclT); } +template +std::enable_if_t()( + std::declval()))>, + size_t> +forEachFieldRecursive(const RecordDec

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread via cfe-commits
@@ -551,3 +551,14 @@ struct full_of_empty empty_test_2(void) { struct full_of_empty e; return e; // no-warning } + +struct with_explicit_field { + int x; + int y [[clang::requires_explicit_initialization]]; // expected-note 2{{'y' declared here}} higher-

[clang] [HLSL] Treat `main` as any other function (PR #110546)

2024-09-30 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/110546 HLSL doesn't distinguish `main` from any other function. It does treat entry points special, but they're not required to be called `main` so we have a different attribute annotation to mark them. At the mom

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 From 4fb69942effb3cf34d07f33a14a95757b6ca5ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 17:05:42 +0200 Subjec

<    1   2   3   4   5   6   >