[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/91699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes Availability diagnostic in instantiated template functions was intentionally skipped in the original [commit](https://github.com/llvm/llvm-project/commit/5cd57177a51abc7b0bfe18f70566572dbccab9a0) years ago w

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-05-10 Thread Akira Hatanaka via cfe-commits
@@ -172,6 +172,27 @@ static bool checkArgCount(Sema &S, CallExpr *Call, unsigned DesiredArgCount) { << /*is non object*/ 0 << Call->getArg(1)->getSourceRange(); } +static bool checkBuiltinVerboseTrap(CallExpr *Call, Sema &S) { ahatanak wrote: clang

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Cooper Partin via cfe-commits
@@ -177,16 +177,19 @@ void justAtAvailable(void) { #ifdef OBJCPP -int f(char) AVAILABLE_10_12; +int f(char) AVAILABLE_10_12; // #f_char_def int f(int); template int use_f() { - // FIXME: We should warn here! - return f(T()); + // expected-warning@#f_call {{'f' is only

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Cooper Partin via cfe-commits
https://github.com/coopp edited https://github.com/llvm/llvm-project/pull/91699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-05-10 Thread Eric Wright via cfe-commits
efwright wrote: @jhuber6 @shiltian @jdoerfert mentioned you may be interested in taking a look at this. https://github.com/llvm/llvm-project/pull/91261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks fine to me. I assume this doesn't impact other test passes right? Now there is work being done when before it was doing an early out for template instantiations. https://github.com/llvm/llvm-project/pull/91699 ___

[clang] [test] Move RISCV tests to clang/test/CodeGen/RISCV/ (PR #91783)

2024-05-10 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM. I think most of there were in CodeGen because they are based on aarch64 tests. I guess AArch64 doesn't have its own directory. https://github.com/llvm/llvm-project/pull/91783 ___ cfe-commits

[clang-tools-extra] [WIP][clang-tidy] Ignore `if consteval` in else-after-return (PR #91588)

2024-05-10 Thread Christopher Di Bella via cfe-commits
cjdb wrote: Thanks for your patch! Would you be able to add a test case for this please? https://github.com/llvm/llvm-project/pull/91588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Helena Kotas via cfe-commits
@@ -177,16 +177,19 @@ void justAtAvailable(void) { #ifdef OBJCPP -int f(char) AVAILABLE_10_12; +int f(char) AVAILABLE_10_12; // #f_char_def int f(int); template int use_f() { - // FIXME: We should warn here! - return f(T()); + // expected-warning@#f_call {{'f' is only

[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

2024-05-10 Thread Rajveer Singh Bharadwaj via cfe-commits
Rajveer100 wrote: I am not sure what causes the build failure here. https://github.com/llvm/llvm-project/pull/91119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Emma Pilkington via cfe-commits
@@ -177,16 +177,19 @@ void justAtAvailable(void) { #ifdef OBJCPP -int f(char) AVAILABLE_10_12; +int f(char) AVAILABLE_10_12; // #f_char_def int f(int); template int use_f() { - // FIXME: We should warn here! - return f(T()); epilk wrote: Could you che

[clang] [clang-tools-extra] Reapply "[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)" (PR #91393)

2024-05-10 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @adrian-prantl I tested this patch locally and it fixes the crash in LLDB https://github.com/llvm/llvm-project/pull/91393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [clang-tools-extra] Reapply "[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)" (PR #91393)

2024-05-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I have no problem with this, if it passes CI, I think this is fine. https://github.com/llvm/llvm-project/pull/91393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-10 Thread Andy Kaylor via cfe-commits
@@ -238,3 +238,17 @@ // RUN: %clang -### -fno-unsafe-math-optimizations -funsafe-math-optimizations \ // RUN: -ffp-contract=off -c %s 2>&1 | FileCheck --check-prefix=CHECK-FPC-OFF %s +// RUN: %clang -### -funsafe-math-optimizations -ffp-contract=off -c %s 2>&1 \

[clang] [llvm] [AArch64] Fix feature flags dependecies (PR #90612)

2024-05-10 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm commented: This might need reworked since I landed https://github.com/llvm/llvm-project/pull/90987.. Ping me internally if I can help. https://github.com/llvm/llvm-project/pull/90612 ___ cfe-commits mailing list cfe-c

[clang] [llvm] [AArch64] Fix feature flags dependecies (PR #90612)

2024-05-10 Thread Tomas Matheson via cfe-commits
@@ -22,6 +22,14 @@ // RUN: %clang -target aarch64 -march=armv9.5-a+cpa -### -c %s 2>&1 | FileCheck -check-prefix=V95A-CPA %s // V95A-CPA: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "generic" "-target-feature" "+v9.5a"{{.*}} "-target-feature" "+cpa" +// RUN: %clang

[clang] [llvm] [AArch64] Fix feature flags dependecies (PR #90612)

2024-05-10 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/90612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Fix feature flags dependecies (PR #90612)

2024-05-10 Thread Tomas Matheson via cfe-commits
@@ -1942,12 +1942,10 @@ def : RWSysReg<"PM",0b11, 0b000, 0b0100, 0b0011, 0b001>; // 2023 ISA Extension // AArch64 Floating-point Mode Register controls behaviors of the FP8 -// instructions (FEAT_FPMR) tmatheson-arm wrote: The comment `(FEAT_

[clang] [llvm] [AArch64] Fix feature flags dependecies (PR #90612)

2024-05-10 Thread Tomas Matheson via cfe-commits
@@ -1996,7 +1996,6 @@ TEST(TargetParserTest, AArch64ExtensionFeatures) { AArch64::AEK_D128, AArch64::AEK_LSE128, AArch64::AEK_SPECRES2, AArch64::AEK_RASv2, AArch64::AEK_ITE, AArch64::AEK_GCS, - AArch64::AEK_FPMR, AArch64::AEK_

[clang] [llvm] [AArch64] Fix feature flags dependecies (PR #90612)

2024-05-10 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/90612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix incorrect passing of _BitInt args (PR #90741)

2024-05-10 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,14 @@ +// REQUIRES: arm-registered-target +// RUN: %clang_cc1 -triple aarch64-none-elf \ +// RUN: -O2 \ +// RUN: -emit-llvm -fexperimental-max-bitint-width=1024 -o - %s | FileCheck %s efriedma-quic wrote: Digging a bit into the history, I found cl

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/91699 >From 6220a5f61f92c3161772fd7c2be9d387169f8e03 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 9 May 2024 22:14:05 -0700 Subject: [PATCH 1/2] Enable unguarded availability diagnostic on instantiated templa

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-05-10 Thread Helena Kotas via cfe-commits
@@ -177,16 +177,19 @@ void justAtAvailable(void) { #ifdef OBJCPP -int f(char) AVAILABLE_10_12; +int f(char) AVAILABLE_10_12; // #f_char_def int f(int); template int use_f() { - // FIXME: We should warn here! - return f(T()); hekota wrote: Thanks for t

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Craig Topper via cfe-commits
topperc wrote: > Unless `lld/test/ELF` tests will get a failure, the `lld/` part should > ideally be dropped from this PR. This separation is a convention. > > Otherwise (a) with just a `[RISCV]` tag and (b) with many RISCV-specific > changes, lld folks (like I) might not notice this patch. A

[clang] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() (PR #91712)

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

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-10 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/91400 >From a5de583aa94ef794a083c8b27df6dc6fc0762cb7 Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Tue, 7 May 2024 16:54:35 -0400 Subject: [PATCH 1/5] Add option to exclude headers from clang-tidy analysis This

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-10 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @AaronBallman, can you take a look at that patch, hopefully to move forward as seems the other reviewers are busy. https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-10 Thread Justin Cady via cfe-commits
@@ -311,7 +311,12 @@ ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer( : Context(Ctx), ExternalDiagEngine(ExternalDiagEngine), RemoveIncompatibleErrors(RemoveIncompatibleErrors), GetFixesFromNotes(GetFixesFromNotes), - EnableNolintBlocks(EnableNolin

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-10 Thread Justin Cady via cfe-commits
@@ -311,7 +311,12 @@ ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer( : Context(Ctx), ExternalDiagEngine(ExternalDiagEngine), RemoveIncompatibleErrors(RemoveIncompatibleErrors), GetFixesFromNotes(GetFixesFromNotes), - EnableNolintBlocks(EnableNolin

[clang] [clang] Add test for CWG1820 "Qualified typedef names" (PR #91765)

2024-05-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/91765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] CTAD alias: fix the transformation for the require-clause expr (PR #90961)

2024-05-10 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/90961 >From 9cc438e2def2fa98af71ba79eb82e033f3d5905a Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 3 May 2024 11:04:21 +0200 Subject: [PATCH] [clang] CTAD alias: refine the transformation for the require-clause

[clang] [clang] CTAD alias: fix the transformation for the require-clause expr (PR #90961)

2024-05-10 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 099c1527f6088305fc253e9598685faa85544a8e 9cc438e2def2fa98af71ba79eb82e033f3d5905a --

[clang] [test] Move RISCV tests to clang/test/CodeGen/RISCV/ (PR #91783)

2024-05-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/91783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e9f53e4 - [test] Move RISCV tests to clang/test/CodeGen/RISCV/

2024-05-10 Thread via cfe-commits
Author: Fangrui Song Date: 2024-05-10T13:22:07-07:00 New Revision: e9f53e4095d8a8600b5c5d445c73e2d5a6f45abb URL: https://github.com/llvm/llvm-project/commit/e9f53e4095d8a8600b5c5d445c73e2d5a6f45abb DIFF: https://github.com/llvm/llvm-project/commit/e9f53e4095d8a8600b5c5d445c73e2d5a6f45abb.diff

[clang] [test] Move RISCV tests to clang/test/CodeGen/RISCV/ (PR #91783)

2024-05-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/91783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use constant rounding mode for floating literals (PR #90877)

2024-05-10 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel commented: I'm generally happy with the testing and semantics at this point. https://github.com/llvm/llvm-project/pull/90877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang][static analyzer] ignore try statements in dead code checker (PR #91675)

2024-05-10 Thread Andrew Sukach via cfe-commits
https://github.com/soukatch deleted https://github.com/llvm/llvm-project/pull/91675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code (PR #91478)

2024-05-10 Thread Siu Chi Chan via cfe-commits
@@ -0,0 +1,55 @@ +/*=== __clang_hip_device_macro_guards.h - guards for HIP device macros -=== + * + * 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: Apach

[clang] [Clang][HIP] Warn when __AMDGCN_WAVEFRONT_SIZE is used in host code (PR #91478)

2024-05-10 Thread Siu Chi Chan via cfe-commits
https://github.com/scchan approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/91478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Clean up fp-contract handling in clang driver (PR #91271)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -238,3 +238,17 @@ // RUN: %clang -### -fno-unsafe-math-optimizations -funsafe-math-optimizations \ // RUN: -ffp-contract=off -c %s 2>&1 | FileCheck --check-prefix=CHECK-FPC-OFF %s +// RUN: %clang -### -funsafe-math-optimizations -ffp-contract=off -c %s 2>&1 \

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-10 Thread via cfe-commits
https://github.com/antangelo edited https://github.com/llvm/llvm-project/pull/91046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Revert default behavior change of P0522R0 implementation (PR #91811)

2024-05-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/91811 This partially reverts b86e0992bfa6c58be077d82d824016f590ac5d90. Just the default is changed back, on the Driver side. No Frontend changes. The positive spelling of the flag is undeprecated. No documentation ch

[clang] [clang] Revert default behavior change of P0522R0 implementation (PR #91811)

2024-05-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Matheus Izvekov (mizvekov) Changes This partially reverts b86e0992bfa6c58be077d82d824016f590ac5d90. Just the default is changed back, on the Driver side. No Frontend changes. The positive spelling of the flag is undeprecated. No do

[clang] [clang] Revert default behavior change of P0522R0 implementation (PR #91811)

2024-05-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This partially reverts b86e0992bfa6c58be077d82d824016f590ac5d90. Just the default is changed back, on the Driver side. No Frontend changes. The positive spelling of the flag is undeprecated. No documenta

[clang] [clang] Revert default behavior change of P0522R0 implementation (PR #91811)

2024-05-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/91811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Revert default behavior change of P0522R0 implementation (PR #91811)

2024-05-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This should probably also change the release note that still says we've changed this to on by default. https://github.com/llvm/llvm-project/pull/91811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [clang] Revert default behavior change of P0522R0 implementation (PR #91811)

2024-05-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/91811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Revert default behavior change of P0522R0 implementation (PR #91811)

2024-05-10 Thread Erich Keane via cfe-commits
@@ -7249,15 +7249,15 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.addOptOutFlag(CmdArgs, options::OPT_fassume_unique_vtables, options::OPT_fno_assume_unique_vtables); - // -frelaxed-template-template-args is deprecated. - if (

[clang] aa0776d - Revert "[Pipelines] Do not run CoroSplit and CoroCleanup in LTO pre-link pipeline (#90310)" and related patches

2024-05-10 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2024-05-10T21:28:13Z New Revision: aa0776de464984e78ae1cc329bf541e9dd43631f URL: https://github.com/llvm/llvm-project/commit/aa0776de464984e78ae1cc329bf541e9dd43631f DIFF: https://github.com/llvm/llvm-project/commit/aa0776de464984e78ae1cc329bf541e9dd43631f.diff LOG:

[clang] [llvm] [Pipelines] Do not run CoroSplit and CoroCleanup in LTO pre-link pipeline (PR #90310)

2024-05-10 Thread Reid Kleckner via cfe-commits
rnk wrote: Hey, I went ahead and reverted this patch in aa0776de464984e78ae1cc329bf541e9dd43631f because it is incompatible with ASan ThinLTO builds. I think you have uncovered a latent issue in the ASan + thinlto configuration that is not really the fault of this change, but I didn't see a

[clang] [clang] Revert default behavior change of P0522R0 implementation (PR #91811)

2024-05-10 Thread via cfe-commits
cor3ntin wrote: @erichkeane The goal is to provide a temporary working default, and a proper fix next fix, so that folks who are impacted by the break (everyone working on stdexec) isn't impacted longer than necessary. So I'll go and merge that and we can discuss a longer-term solution monday

[clang] 2d5634a - [clang] Revert default behavior change of P0522R0 implementation (#91811)

2024-05-10 Thread via cfe-commits
Author: Matheus Izvekov Date: 2024-05-10T23:32:34+02:00 New Revision: 2d5634a4b39d8e5497b6a67caa54049b3cfade8e URL: https://github.com/llvm/llvm-project/commit/2d5634a4b39d8e5497b6a67caa54049b3cfade8e DIFF: https://github.com/llvm/llvm-project/commit/2d5634a4b39d8e5497b6a67caa54049b3cfade8e.dif

[clang] [clang] Revert default behavior change of P0522R0 implementation (PR #91811)

2024-05-10 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/91811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-10 Thread via cfe-commits
cor3ntin wrote: We operated a partial revert here https://github.com/llvm/llvm-project/pull/91811 That should fix the issues in trunk while we investigate the regression more thoroughly https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-10 Thread Bill Wendling via cfe-commits
bwendling wrote: @apple-fcloutier: > think that there's room to allow `__counted_by` on incomplete types so that a > TU where it's complete could use it (and we have use cases where that would > be handy), but our implementation doesn't support it at this time. This can > be added without dis

[clang] [Clang][Sema] Revise the transformation of CTAD parameters of nested class templates (PR #91628)

2024-05-10 Thread via cfe-commits
@@ -2583,11 +2580,27 @@ struct ConvertConstructorToDeductionGuideTransform { //-- The types of the function parameters are those of the constructor. for (auto *OldParam : TL.getParams()) { - ParmVarDecl *NewParam = - transformFunctionTypeParam(OldPara

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-10 Thread Bill Wendling via cfe-commits
bwendling wrote: @rapidsna @delcypher @apple-fcloutier @kees: Okay, I think I see what the complication is. Are you trying to prevent the use case of someone writing something like: ```c struct bar; struct foo { size_t count; struct bar *ptr __counted_by(count); }; ``` where `ptr` is a p

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-05-10 Thread Fangrui Song via cfe-commits
MaskRay wrote: Some older toolchains were probably contributed with a lot of `CmdArgs.push_back` uncovered by tests. They are not good examples to follow. For new toolchains, we do want all constructed `CmdArgs.push_back` to be covered. This allows refactoring by someone who is unfamiliar with

[clang] Revert "Revert "[OpenMP][TR12] change property of map-type modifier."… (PR #91821)

2024-05-10 Thread via cfe-commits
https://github.com/jyu2-git created https://github.com/llvm/llvm-project/pull/91821 … (#90885)" This reverts commit eea81aa29848361eb5b24f24d2af643fdeb9adfd. >From f1b80dab94d13ef6d2425fdbae5b0ca532490584 Mon Sep 17 00:00:00 2001 From: Jennifer Yu Date: Tue, 7 May 2024 18:24:53 -0700 Subject:

[clang] Revert "Revert "[OpenMP][TR12] change property of map-type modifier."… (PR #91821)

2024-05-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (jyu2-git) Changes … (#90885)" This reverts commit eea81aa29848361eb5b24f24d2af643fdeb9adfd. --- Patch is 29.70 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/91821.diff 4 Files Affecte

[clang] [clang] Fix self-capturing `__block` variables (PR #89475)

2024-05-10 Thread via cfe-commits
ille-apple wrote: Ping :) https://github.com/llvm/llvm-project/pull/89475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix tests broken by #91811 (PR #91822)

2024-05-10 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/91822 A few tests were checking for all driver flags. We should revert this commit when we revert #91811 >From f2acd718bf4e24441a214309a1896771fe6c9fc9 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sat, 11 May

[clang] [Clang] Fix tests broken by #91811 (PR #91822)

2024-05-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: cor3ntin (cor3ntin) Changes A few tests were checking for all driver flags. We should revert this commit when we revert #91811 --- Full diff: https://github.com/llvm/llvm-project/pull/91822.diff 2 Files Affected: - (modified) cla

[clang] [Clang] Fix tests broken by #91811 (PR #91822)

2024-05-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. https://github.com/llvm/llvm-project/pull/91822 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "Revert "[OpenMP][TR12] change property of map-type modifier."… (PR #91821)

2024-05-10 Thread via cfe-commits
jyu2-git wrote: Hi @alexey-bataev, Sorry for bother you again. This is just re-check in the change you review before. Plus a I need remove -fsyntex-only for my test target_ast_print.cpp due to resent community change of e74a7a9fd79. Thanks. Jennifer https://github.com/llvm/llvm-project/pu

[clang] Revert "Revert "[OpenMP][TR12] change property of map-type modifier."… (PR #91426)

2024-05-10 Thread via cfe-commits
https://github.com/jyu2-git converted_to_draft https://github.com/llvm/llvm-project/pull/91426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4198aeb - [Clang] Fix tests broken by #91811 (#91822)

2024-05-10 Thread via cfe-commits
Author: cor3ntin Date: 2024-05-11T00:42:56+02:00 New Revision: 4198aebc96cb0236fc63e29a92d886e6a2e3fedb URL: https://github.com/llvm/llvm-project/commit/4198aebc96cb0236fc63e29a92d886e6a2e3fedb DIFF: https://github.com/llvm/llvm-project/commit/4198aebc96cb0236fc63e29a92d886e6a2e3fedb.diff LOG:

[clang] [Clang] Fix tests broken by #91811 (PR #91822)

2024-05-10 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/91822 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Bounds-Safety] Reserve slot in SanitizerHandler enum for Bounds-Safety (PR #91032)

2024-05-10 Thread Dan Liew via cfe-commits
delcypher wrote: @vitalybuka Ping https://github.com/llvm/llvm-project/pull/91032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Jessica Clarke via cfe-commits
@@ -5272,8 +5272,16 @@ static std::string getGNUProperty(uint32_t Type, uint32_t DataSize, return OS.str(); case GNU_PROPERTY_AARCH64_FEATURE_1_AND: case GNU_PROPERTY_X86_FEATURE_1_AND: -OS << ((Type == GNU_PROPERTY_AARCH64_FEATURE_1_AND) ? "aarch64 feature: " -

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Jessica Clarke via cfe-commits
@@ -85,6 +85,35 @@ void RISCVTargetELFStreamer::finishAttributeSection() { ELF::SHT_RISCV_ATTRIBUTES, AttributeSection); } +void RISCVTargetELFStreamer::emitNoteSection(unsigned Flags) { jrtc27 wrote: I know this is what AArch64 call

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Jessica Clarke via cfe-commits
@@ -5283,14 +5291,21 @@ static std::string getGNUProperty(uint32_t Type, uint32_t DataSize, OS << ""; return OS.str(); } + if (Type == GNU_PROPERTY_AARCH64_FEATURE_1_AND) { - DumpBit(GNU_PROPERTY_AARCH64_FEATURE_1_BTI, "BTI"); - DumpBit(GNU_PROPE

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Jessica Clarke via cfe-commits
@@ -118,6 +147,19 @@ void RISCVTargetELFStreamer::finish() { } MCA.setELFHeaderEFlags(EFlags); + + unsigned GNUNoteFlags = 0; + + // check ZICFILP or ZICFISS with features + // TODO should we check with codegen enable ex. -mllvm jrtc27 wrote: This seem

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Jessica Clarke via cfe-commits
@@ -118,6 +147,19 @@ void RISCVTargetELFStreamer::finish() { } MCA.setELFHeaderEFlags(EFlags); + + unsigned GNUNoteFlags = 0; + + // check ZICFILP or ZICFISS with features jrtc27 wrote: Not sure this adds anything, but if it's staying please properly st

[clang] [lld] [llvm] [RISCV] Support .note.gnu.property for enable Zicfiss and Zicfilp extension (PR #77414)

2024-05-10 Thread Jessica Clarke via cfe-commits
@@ -35,6 +35,8 @@ class RISCVTargetStreamer : public MCTargetStreamer { RISCVABI::ABI TargetABI = RISCVABI::ABI_Unknown; bool HasRVC = false; bool HasTSO = false; + bool HasZICFILP = false; jrtc27 wrote: Make the fields and methods all Zifoo https://gi

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-10 Thread Dan Liew via cfe-commits
delcypher wrote: > @rapidsna @delcypher @apple-fcloutier @kees: > > Okay, I think I see what the complication is. Are you trying to prevent the > use case of someone writing something like: > > ```c > struct bar; > > struct foo { > size_t count; > struct bar *ptr __counted_by(count); > };

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-05-10 Thread NAKAMURA Takumi via cfe-commits
@@ -190,18 +190,30 @@ class SourceMappingRegion { bool isBranch() const { return FalseCount.has_value(); } + bool isMCDCBranch() const { +const auto *BranchParams = std::get_if(&MCDCParams); +assert(BranchParams == nullptr || BranchParams->ID >= 0); +return (B

[clang-tools-extra] [clang-tidy] `readability-simplify-boolean-expr` avoid to warn expression expand from macro when ``IgnoreMacro`` option is enabled. (PR #91757)

2024-05-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91757 >From e23675eae31ed9c3cc4bbf31d3bc43b492ef5eac Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 9 May 2024 00:51:58 +0800 Subject: [PATCH 1/2] [clang-tidy] avoid false postive when ignore macro Fixes:

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/91400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-10 Thread Kees Cook via cfe-commits
kees wrote: > As @apple-fcloutier @rapidsna noted this is how `-fbounds-safety` is > currently implemented (because its much simpler) but it is a restriction that > could be lifted in future by only requiring `struct bar` to be defined at the > point that `foo::bar` is used rather than when t

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread Vadim D. via cfe-commits
@@ -572,32 +572,43 @@ struct FragmentCompiler { #else static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags; #endif -auto Filters = std::make_shared>(); -for (auto &HeaderPattern : F.IgnoreHeader) { - // Anchor on the right. - std::string AnchoredPat

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-10 Thread Dan Liew via cfe-commits
delcypher wrote: > It's not a lie, because the contents of a pointer don't contribute to the > size of the struct containing that pointer. Consider this example. It tries to illustrate why putting `__counted_by()` on a pointer to a structs containing flexible array members doesn't make sense.

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread Vadim D. via cfe-commits
@@ -572,32 +572,43 @@ struct FragmentCompiler { #else static llvm::Regex::RegexFlags Flags = llvm::Regex::NoFlags; #endif -auto Filters = std::make_shared>(); -for (auto &HeaderPattern : F.IgnoreHeader) { - // Anchor on the right. - std::string AnchoredPat

[clang] 504cf55 - [InstallAPI] Pass explicit module cache to avoid permissions issues.

2024-05-10 Thread Cyndy Ishida via cfe-commits
Author: Cyndy Ishida Date: 2024-05-10T17:17:38-07:00 New Revision: 504cf554639360525c3f746e7296a242350b2af9 URL: https://github.com/llvm/llvm-project/commit/504cf554639360525c3f746e7296a242350b2af9 DIFF: https://github.com/llvm/llvm-project/commit/504cf554639360525c3f746e7296a242350b2af9.diff

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread Vadim D. via cfe-commits
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) { Pointee(writtenInclusion("\"dir/unused.h\""; } +TEST(IncludeCleaner, SystemUnusedHeaders) { + auto TU = TestTU::withCode(R"cpp( +#include +#include +SystemClass x; + )c

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread Vadim D. via cfe-commits
@@ -135,6 +135,21 @@ TEST(IncludeCleaner, GetUnusedHeaders) { Pointee(writtenInclusion("\"dir/unused.h\""; } +TEST(IncludeCleaner, SystemUnusedHeaders) { + auto TU = TestTU::withCode(R"cpp( +#include +#include +SystemClass x; + )c

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-10 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/91101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-10 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw commented: Oops I forgot to submit my review comment :( https://github.com/llvm/llvm-project/pull/91101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-10 Thread Yingwei Zheng via cfe-commits
@@ -1352,20 +1352,43 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, auto &Context = CalledFunction->getContext(); // Collect valid attributes for all params. - SmallVector ValidParamAttrs; + SmallVector ValidObjParamAttrs, ValidExactParamAttrs; bool

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-10 Thread Yingwei Zheng via cfe-commits
@@ -1383,15 +1406,54 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, AttributeList AL = NewInnerCB->getAttributes(); for (unsigned I = 0, E = InnerCB->arg_size(); I < E; ++I) { // Check if the underlying value for the parameter is an argumen

[clang] [Clang] Add support for [[msvc::noinline]] attribute. (PR #91720)

2024-05-10 Thread Xu Zhang via cfe-commits
https://github.com/simonzgx updated https://github.com/llvm/llvm-project/pull/91720 >From 2dd3d3385642d88d538bc37673018f1231a56b14 Mon Sep 17 00:00:00 2001 From: Xu Zhang Date: Fri, 10 May 2024 01:24:24 +0800 Subject: [PATCH 1/2] [Clang] Add support for [[msvc::noinline]] attribute. (#90941)

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-10 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/87208 >From 35db92dfd0c2b43fc7afde5b093598763c4b8c89 Mon Sep 17 00:00:00 2001 From: Vadim Dudkin Date: Mon, 1 Apr 2024 02:26:14 +0300 Subject: [PATCH 1/4] Add config option to analyze unused system headers --- clan

[clang] [analyzer] Treat bitwise_cast, std::addressof, and new as trivial in WebKit checkers. (PR #91830)

2024-05-10 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/91830 None >From 7773b0635aabeba769c0050e243f26008795d84b Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 10 May 2024 18:42:07 -0700 Subject: [PATCH] [analyzer] Treat bitwise_cast, std::addressof, and new as triv

[clang] [analyzer] Treat bitwise_cast, std::addressof, and new as trivial in WebKit checkers. (PR #91830)

2024-05-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/91830.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp (+6-1) - (modified) clang/test/Analysis/Ch

[clang] [analyzer] Treat bitwise_cast, std::addressof, and new as trivial in WebKit checkers. (PR #91830)

2024-05-10 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 21be8182239a9c87a50071d122d5532037fd8305 7773b0635aabeba769c0050e243f26008795d84b --

[clang] [analyzer] Treat bitwise_cast, std::addressof, and new as trivial in WebKit checkers. (PR #91830)

2024-05-10 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91830 >From 7773b0635aabeba769c0050e243f26008795d84b Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 10 May 2024 18:42:07 -0700 Subject: [PATCH 1/2] [analyzer] Treat bitwise_cast, std::addressof, and new as trivia

[clang] [analyzer] Treat bitwise_cast, std::addressof, and new as trivial in WebKit checkers. (PR #91830)

2024-05-10 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/91830 >From 7773b0635aabeba769c0050e243f26008795d84b Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 10 May 2024 18:42:07 -0700 Subject: [PATCH 1/3] [analyzer] Treat bitwise_cast, std::addressof, and new as trivia

[clang] [clang-format] Add option to remove leading blank lines (PR #91221)

2024-05-10 Thread Owen Pan via cfe-commits
owenca wrote: I think this is a good time to combine the `KeepEmptyLines...` options. For example: ``` KeepEmptyLines: AtStartOfBlock: true AtStartOfFile: false AtEndOfFile: true ``` https://github.com/llvm/llvm-project/pull/91221 ___ cfe-commit

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-05-10 Thread Fangrui Song via cfe-commits
@@ -819,6 +819,43 @@ class LLVM_LIBRARY_VISIBILITY X86_64TargetInfo : public X86TargetInfo { } }; +// x86-64 UEFI target +class LLVM_LIBRARY_VISIBILITY UEFIX86_64TargetInfo +: public UEFITargetInfo { +public: + UEFIX86_64TargetInfo(const llvm::Triple &Triple, const Tar

<    1   2   3   4   >