[clang] [Clang][NFCI] Prefer non-canonical template arguments for synthesized CTAD guides (PR #99840)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes This seems to be low-hanging fruit: We could remove all calls to `Context.getCanonicalTemplateArgument()` and gain a better diagnostic/AST. The non-canonical template arguments shouldn't make a difference wh

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-21 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/86212 >From f2f3356da08d68dab4431f49d0921515560e4927 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Fri, 8 Mar 2024 15:06:28 +0100 Subject: [PATCH] BTI,GCS,PAC Module flag update. Module flag is used to in

[clang] [Clang][NFCI] Prefer non-canonical template arguments for synthesized CTAD guides (PR #99840)

2024-07-21 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/99840 This seems to be low-hanging fruit: We could remove all calls to `Context.getCanonicalTemplateArgument()` and gain a better diagnostic/AST. The non-canonical template arguments shouldn't make a difference when

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-07-21 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/93977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-07-21 Thread Fangrui Song via cfe-commits
@@ -5337,9 +5337,13 @@ def mmadd4 : Flag<["-"], "mmadd4">, Group, def mno_madd4 : Flag<["-"], "mno-madd4">, Group, HelpText<"Disable the generation of 4-operand madd.s, madd.d and related instructions.">; def mmsa : Flag<["-"], "mmsa">, Group, - HelpText<"Enable MSA ASE (M

[clang] [Clang] Remove NetBSD/i386 workaround for FP eval method with older versions (PR #74025)

2024-07-21 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/74025 >From bfee80b825aeb5c99f23149a2c4317eda10c1cd4 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Thu, 30 Nov 2023 20:50:01 -0500 Subject: [PATCH] [Clang] Remove NetBSD/i386 workaround for FP eval method with older ve

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-21 Thread via cfe-commits
yronglin wrote: Thanks! https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-21 Thread Davide Italiano via cfe-commits
dcci wrote: Notice you already reverted, thanks. I'll follow-up with a reproducer once `creduce` finishes running. https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-21 Thread Davide Italiano via cfe-commits
dcci wrote: > This is clearer, I think I may have figured out where the problem is. ^ I have a reproducer that's running through `creduce`. It should be ready tomorrow morning PST time, and I'll add you here. In the meanwhile, do you mind if I revert this given we understand it breaks several

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-21 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > It would be nice to have a reproducer. I can't tell the root cause from this > error, so I can't use it to strengthen the current tests. I intend to provide a reproducer. I just can't do it today. So don't wait on it as a justification to avoid reverting. https://github.com/

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-21 Thread via cfe-commits
yronglin wrote: > This commit seems to have broken well-formed code in thrift: > > ``` > fbcode/thrift/compiler/generate/t_py_generator.cc:881:20: error: declaration > of variable 'module' with deduced type 'const auto &' requires an initializer > 881 | for (const auto &module : modules) {

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-21 Thread via cfe-commits
yronglin wrote: > I am also seeing breakages which are solved by reverting this change. > > The failure occurs when importing modules from within header files: > > ``` > error: expected a module name after 'import' >11 | import std; > ``` It would be nice to have a reproducer. I can't tell

[clang] Revert "[Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros" (PR #99838)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes Reverts llvm/llvm-project#90574 --- Patch is 55.48 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/99838.diff 19 Files Affected: - (modified) clang/docs/ReleaseNotes.r

[clang] c91e852 - Revert "[Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros" (#99838)

2024-07-21 Thread via cfe-commits
Author: yronglin Date: 2024-07-22T13:16:51+08:00 New Revision: c91e85278cb87a35924d86463d3c0a379c64e9d1 URL: https://github.com/llvm/llvm-project/commit/c91e85278cb87a35924d86463d3c0a379c64e9d1 DIFF: https://github.com/llvm/llvm-project/commit/c91e85278cb87a35924d86463d3c0a379c64e9d1.diff LOG:

[clang] Revert "[Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros" (PR #99838)

2024-07-21 Thread via cfe-commits
https://github.com/yronglin closed https://github.com/llvm/llvm-project/pull/99838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros" (PR #99838)

2024-07-21 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/99838 Reverts llvm/llvm-project#90574 >From 3830c428298d0f781e1a82d1885d8903e7169c4d Mon Sep 17 00:00:00 2001 From: yronglin Date: Mon, 22 Jul 2024 13:16:19 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"[Clang]=20Implem

[clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-07-21 Thread Anton Korobeynikov via cfe-commits
asl wrote: @ahatanak Will you please take a look into all these issues? https://github.com/llvm/llvm-project/pull/93906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SPARC][clang] Add -m(no-)v8plus flags handling (PR #98713)

2024-07-21 Thread Brad Smith via cfe-commits
brad0 wrote: @AaronBallman https://github.com/llvm/llvm-project/pull/98713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-21 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I don't think I'll be able to provide a reproducer today. Regardless, bugs in modules are in general not easy to reduce. Unless you think you can fix this soon enough, I think a revert is appropriate here. https://github.com/llvm/llvm-project/pull/90574

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-21 Thread via cfe-commits
yronglin wrote: Thank you for reporting this issue. if we have a reproducer, I'll try to quick fix it today. https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-21 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I am also seeing breakages which are solved by reverting this change. The failure occurs when importing modules from within header files: ``` error: expected a module name after 'import' 11 | import std; ``` https://github.com/llvm/llvm-project/pull/90574 ___

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-21 Thread Davide Italiano via cfe-commits
dcci wrote: Code in question: https://github.com/facebook/fbthrift/blob/ccfcd6743488c26d720bc4ff3348534491078b43/thrift/compiler/generate/t_py_generator.cc#L881 ^ I am trying to find out a reduced testcase, but sending this here in case it rings a bell. https://github.com/llvm/llvm-project/pul

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-21 Thread Davide Italiano via cfe-commits
dcci wrote: This commit seems to have broken well-formed code in thrift: ``` fbcode/thrift/compiler/generate/t_py_generator.cc:881:20: error: declaration of variable 'module' with deduced type 'const auto &' requires an initializer 881 | for (const auto &module : modules) { |

[clang] [clang] Add -Wimplicit-fallthrough to -Wextra (PR #97926)

2024-07-21 Thread Max Coplan via cfe-commits
vegerot wrote: > CTMark is not compiled with `-Wextra`, so we'd not get any useful data out of > this patch. What changes does one have to do to enable > `-Wimplicit-fallthrough` by default (not just for `-Wextra`)? @nikic done! At [vegerot/llvm-project/perf/add-implicit-fallthrough-to-wextr

[clang] [Clang] fix generic lambda inside requires-clause of friend function template (PR #99813)

2024-07-21 Thread Younan Zhang via cfe-commits
@@ -1691,10 +1691,7 @@ class ConstraintRefersToContainingTemplateChecker using inherited::TransformTemplateTypeParmType; QualType TransformTemplateTypeParmType(TypeLocBuilder &TLB, TemplateTypeParmTypeLoc TL, bool) { -assert(TL.g

[clang] [Clang] fix generic lambda inside requires-clause of friend function template (PR #99813)

2024-07-21 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/99813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix generic lambda inside requires-clause of friend function template (PR #99813)

2024-07-21 Thread Younan Zhang via cfe-commits
@@ -1691,10 +1691,7 @@ class ConstraintRefersToContainingTemplateChecker using inherited::TransformTemplateTypeParmType; QualType TransformTemplateTypeParmType(TypeLocBuilder &TLB, TemplateTypeParmTypeLoc TL, bool) { -assert(TL.g

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-21 Thread Yi-Chi Lee via cfe-commits
https://github.com/yichi170 edited https://github.com/llvm/llvm-project/pull/99075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] replaced the usage of `asctime` with `strftime` (PR #99075)

2024-07-21 Thread Yi-Chi Lee via cfe-commits
@@ -1721,11 +1721,13 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { Diag(Tok.getLocation(), diag::warn_pp_date_time); // MSVC, ICC, GCC, VisualAge C++ extension. The generated string should be // of the form "Ddd Mmm dd hh::mm::ss ", which is returned b

[clang] d15ada2 - [PAC] Incorrect codegen for constant global init with polymorphic MI (#99741)

2024-07-21 Thread via cfe-commits
Author: Oliver Hunt Date: 2024-07-21T18:59:33-07:00 New Revision: d15ada24b1fbbd72776022383a5c557a1a056413 URL: https://github.com/llvm/llvm-project/commit/d15ada24b1fbbd72776022383a5c557a1a056413 DIFF: https://github.com/llvm/llvm-project/commit/d15ada24b1fbbd72776022383a5c557a1a056413.diff L

[clang] [PAC] Incorrect codegen for constant global init with polymorphic MI (PR #99741)

2024-07-21 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl closed https://github.com/llvm/llvm-project/pull/99741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-21 Thread via cfe-commits
ofAlpaca wrote: @Endilll I have added testcase and release note, please help review. Thanks. https://github.com/llvm/llvm-project/pull/99542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [PAC] Incorrect codegen for constant global init with polymorphic MI (PR #99741)

2024-07-21 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/99741 >From 5822eb8f5b0d420a89d539f8fd2e23c69983967a Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 19 Jul 2024 22:48:26 -0700 Subject: [PATCH 1/2] [PAC] Incorrect codegen for constant global init with polymorph

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-07-21 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 closed https://github.com/llvm/llvm-project/pull/92997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4321300 - [PowerPC] Support -fpatchable-function-entry (#92997)

2024-07-21 Thread via cfe-commits
Author: Chen Zheng Date: 2024-07-22T08:51:51+08:00 New Revision: 43213002b99e32d618f2afbbaaeb2ff8dfc84e33 URL: https://github.com/llvm/llvm-project/commit/43213002b99e32d618f2afbbaaeb2ff8dfc84e33 DIFF: https://github.com/llvm/llvm-project/commit/43213002b99e32d618f2afbbaaeb2ff8dfc84e33.diff LO

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Max Winkler (MaxEW707) Changes MSDN docs for reference: https://learn.microsoft.com/en-us/cpp/build/reference/zc-referencebinding-enforce-reference-binding-rules?view=msvc-170 The warning referenced in tha

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-21 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/99833 MSDN docs for reference: https://learn.microsoft.com/en-us/cpp/build/reference/zc-referencebinding-enforce-reference-binding-rules?view=msvc-170 The warning referenced in that MSDN article: https://learn.micros

[clang-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)

2024-07-21 Thread via cfe-commits
=?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= Message-ID: In-Reply-To: isuckatcs wrote: > If we support them, then they should be tested. 100% agreed https://github.com/llvm/llvm-project/pull/89925 _

[clang] [clang] Implement type/address discrimination of type_info vtable. (PR #99726)

2024-07-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/99726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement type/address discrimination of type_info vtable. (PR #99726)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,87 @@ +// RUN: %clang_cc1 -DENABLE_TID=0 -I%S -std=c++11 -triple=arm64e-apple-darwin \ +// RUN: -fptrauth-calls -fptrauth-intrinsics \ +// RUN: -fptrauth-vtable-pointer-type-discrimination \ +// RUN: -fptrauth-vtable-pointer-address-discrimination \ +// RUN: %s

[clang] [clang] Implement type/address discrimination of type_info vtable. (PR #99726)

2024-07-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/99726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement type/address discrimination of type_info vtable. (PR #99726)

2024-07-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/99726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -365,6 +365,40 @@ llvm::Constant *CodeGenModule::getFunctionPointer(GlobalDecl GD, return getFunctionPointer(getRawFunctionPointer(GD, Ty), FuncType); } +CGPointerAuthInfo CodeGenModule::getMemberFunctionPointerAuthInfo(QualType FT) { + assert(FT->getAs() && "MemberPoi

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,433 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -o - %s | FileCheck -check-prefixes=CHECK,NODEBUG %s +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsic

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -3417,11 +3417,13 @@ uint16_t ASTContext::getPointerAuthTypeDiscriminator(QualType T) const { if (T->isFunctionPointerType() || T->isFunctionReferenceType()) T = T->getPointeeType(); - if (T->isFunctionType()) + if (T->isFunctionType()) { encodeTypeForFunction

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -853,6 +877,25 @@ llvm::Value *ItaniumCXXABI::EmitMemberDataPointerAddress( "memptr.offset"); } +// See if it's possible to return a constant signed pointer. +static llvm::Constant *pointerAuthResignConstant( +llvm::Value *Ptr, const C

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -1036,9 +1155,32 @@ llvm::Constant *ItaniumCXXABI::BuildMemberPointer(const CXXMethodDecl *MD, // least significant bit of adj then makes exactly the same // discrimination as the least significant bit of ptr does for // Itanium. - MemPtr[0] = l

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -1036,9 +1155,32 @@ llvm::Constant *ItaniumCXXABI::BuildMemberPointer(const CXXMethodDecl *MD, // least significant bit of adj then makes exactly the same // discrimination as the least significant bit of ptr does for // Itanium. - MemPtr[0] = l

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -5877,119 +5882,130 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, CallArgs.freeArgumentMemory(*this); // Extract the return value. - RValue Ret = [&] { -switch (RetAI.getKind()) { -case ABIArgInfo::CoerceAndExpand: { - auto coercionT

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
@@ -71,6 +71,15 @@ void has_ptrauth_vtable_pointer_type_discrimination() {} void no_ptrauth_vtable_pointer_type_discrimination() {} #endif +// This is always enabled when ptrauth_calls is enabled, on new enough clangs. kovdan01 wrote: We already have this tes

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/99576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Implement authentication for C++ member function pointers (PR #99576)

2024-07-21 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 commented: LGTM with minor non-blocking nits. However, I'd prefer to wait for @asl 's review before merging the PR. I'm OK with merging whenever @asl is. https://github.com/llvm/llvm-project/pull/99576 ___ cfe-commits maili

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #99574)

2024-07-21 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: I see a crash in `drivers/thermal/thermal_core.c` in Linux kernels without commit [daeeb032f42d](https://git.kernel.org/linus/daeeb032f42d066a49e07b7f6effc9f51b7a5479) ("thermal: core: Move threshold out of struct thermal_trip") after this change. `cvise` spits out: ```c

[clang] [clang-format] Fix a bug in annotating FunctionAnnotationRParen (PR #99802)

2024-07-21 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/99802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0387cd0 - [clang-format] Fix a bug in annotating FunctionAnnotationRParen (#99802)

2024-07-21 Thread via cfe-commits
Author: Owen Pan Date: 2024-07-21T14:54:50-07:00 New Revision: 0387cd052b081d6bc9856ef756942a5df1a2a301 URL: https://github.com/llvm/llvm-project/commit/0387cd052b081d6bc9856ef756942a5df1a2a301 DIFF: https://github.com/llvm/llvm-project/commit/0387cd052b081d6bc9856ef756942a5df1a2a301.diff LOG:

[clang] [clang-format] Fix a bug in annotating FunctionAnnotationRParen (PR #99802)

2024-07-21 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/99802 >From a24f1411ba233e9f14ffa87e6abd139616b8cfed Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 21 Jul 2024 00:08:20 -0700 Subject: [PATCH 1/2] [clang-format] Fix a bug in annotating FunctionAnnotationRParen F

[clang] [clang-format] Fix a bug in annotating StartOfName (PR #99791)

2024-07-21 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/99791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] dcebe29 - [clang-format] Fix a bug in annotating StartOfName (#99791)

2024-07-21 Thread via cfe-commits
Author: Owen Pan Date: 2024-07-21T13:14:18-07:00 New Revision: dcebe297367f48a71a5ecea3bcdd54671195da1b URL: https://github.com/llvm/llvm-project/commit/dcebe297367f48a71a5ecea3bcdd54671195da1b DIFF: https://github.com/llvm/llvm-project/commit/dcebe297367f48a71a5ecea3bcdd54671195da1b.diff LOG:

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/89490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Diag mismatch 97878 (PR #99824)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Braden Helmer (bradenhelmer) Changes Fixes #97878 --- Full diff: https://github.com/llvm/llvm-project/pull/99824.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaOverload.cpp (+1-1) - (modified) clang/test/SemaCXX/cxx2b-deducing

[clang] Diag mismatch 97878 (PR #99824)

2024-07-21 Thread Braden Helmer via cfe-commits
https://github.com/bradenhelmer created https://github.com/llvm/llvm-project/pull/99824 Fixes #97878 >From e4c3701ea6be894b1094f45d0590c61e5aa44897 Mon Sep 17 00:00:00 2001 From: Braden Helmer Date: Sun, 21 Jul 2024 14:10:17 -0400 Subject: [PATCH 1/2] Fix diag mismatch --- clang/lib/Sema/Se

[clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-07-21 Thread Hana Dusíková via cfe-commits
hanickadot wrote: When this change is building at Compiler Explorer I noticed it spams build output with warnings: ``` In file included from /root/llvm-project/clang/include/clang/AST/Type.h:31, from /root/llvm-project/clang/include/clang/AST/DeclarationName.h:16,

[clang] [llvm] Reapply "Add source file name for template instantiations in -ftime-trace" (PR #99757)

2024-07-21 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/99757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ecaacd1 - Reapply "Add source file name for template instantiations in -ftime-trace" (#99757)

2024-07-21 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2024-07-21T20:55:34+02:00 New Revision: ecaacd14c35996ad6ee53da6af6c9f4cf36d9110 URL: https://github.com/llvm/llvm-project/commit/ecaacd14c35996ad6ee53da6af6c9f4cf36d9110 DIFF: https://github.com/llvm/llvm-project/commit/ecaacd14c35996ad6ee53da6af6c9f4cf36d9110.diff

[clang] [llvm] Revert "Add source file name for template instantiations in -ftime-trace" (PR #99534)

2024-07-21 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: Acknowledged. I will use the`skip-precommit-approval` label from now on. https://github.com/llvm/llvm-project/pull/99534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [llvm] Reapply "[Clang] Implement resolution for CWG1835 (#92957)" (PR #98547)

2024-07-21 Thread Nico Weber via cfe-commits
nico wrote: Independent of the other issues, it looks like this also re-introduces #98878 https://github.com/llvm/llvm-project/pull/98547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang-format] Fix a bug in annotating StartOfName (PR #99791)

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

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-21 Thread via cfe-commits
https://github.com/ofAlpaca updated https://github.com/llvm/llvm-project/pull/99542 >From 2a381b47002db3c7a119a893c1a70e0b1604151f Mon Sep 17 00:00:00 2001 From: schiang Date: Thu, 18 Jul 2024 09:53:35 +0800 Subject: [PATCH 1/3] Pass 'Scope *' for 'SetDeclDefaulted()' and related utlis --- cl

[clang] [clang-format] Fix a bug in annotating FunctionAnnotationRParen (PR #99802)

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

[clang] [llvm] Revert "Add source file name for template instantiations in -ftime-trace" (PR #99534)

2024-07-21 Thread David Blaikie via cfe-commits
dwblaikie wrote: (if you don't need a code review for a change, you can commit it directly without a pull request - if you're making a PR not for code review but for presubmit checks, please label to `skip-precommit-approval` to clarify that you aren't waiting for approval (and that the change

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Just double checked and tested again, seems good to me. Please merge on my behalf, I do not have commit access. I'll keep an eye out if anything breaks. https://github.com/llvm/llvm-project/pull/89490 ___ cfe-commits mailing list cfe-c

[clang] [llvm] [ARM][AArch64] Split FEAT_SHA1 from FEAT_SHA256. (PR #99816)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Alexandros Lamprineas (labrinea) Changes These features can be detected individually in Function Multiversioning therefore we would like to support them as separate features. --- Patch is 109.44 KiB, tru

[clang] [llvm] [ARM][AArch64] Split FEAT_SHA1 from FEAT_SHA256. (PR #99816)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-arm Author: Alexandros Lamprineas (labrinea) Changes These features can be detected individually in Function Multiversioning therefore we would like to support them as separate features. --- Patch is 109.44 KiB, truncated to 20.00 KiB below, f

[clang] [llvm] [ARM][AArch64] Split FEAT_SHA1 from FEAT_SHA256. (PR #99816)

2024-07-21 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea converted_to_draft https://github.com/llvm/llvm-project/pull/99816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. Stopping the execution is now graceful on my machine as well, thanks. https://github.com/llvm/llvm-project/pull/89490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Update: shutdown is now graceful on my machine. Please test on others if possible. 3.7+ is now required, which I think is fine given we want to make 3.8 the minimum across LLVM. Rebased on top of the `allow-no-checks` commit. https://github.com/llvm/llvm-project/pull/89490 ___

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/89490 >From ba200d4376cd0e9086220cc08de939c40489cd04 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Sat, 20 Apr 2024 02:58:25 + Subject: [PATCH] [run-clang-tidy.py] Refactor, add progress indicator, add

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/89490 >From c0de68b59850f873a21ad5944b74b53fc3a1c4a8 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Sat, 20 Apr 2024 02:58:25 + Subject: [PATCH] [run-clang-tidy.py] Refactor, add progress indicator, add

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/89490 >From 89f05df307dc839cef0037495e2f233eacb10b22 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Sat, 20 Apr 2024 02:58:25 + Subject: [PATCH] [run-clang-tidy.py] Refactor, add progress indicator, add

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-07-21 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/89490 >From d736bf96f5342752f17f7cb7c8e0f2a68ed3d996 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Sat, 20 Apr 2024 02:58:25 + Subject: [PATCH] [run-clang-tidy.py] Refactor, add progress indicator, add

[clang] [Clang] fix generic lambda inside requires-clause of friend function template (PR #99813)

2024-07-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Zhikai Zeng (Backl1ght) Changes fixes https://github.com/llvm/llvm-project/issues/98258 The cause is that the assertion "Nothing should reference a value below the actual template depth" is incorrect since we can have a generic lambda ins

[clang] [Clang] fix generic lambda inside requires-clause of friend function template (PR #99813)

2024-07-21 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght created https://github.com/llvm/llvm-project/pull/99813 fixes https://github.com/llvm/llvm-project/issues/98258 The cause is that the assertion "Nothing should reference a value below the actual template depth" is incorrect since we can have a generic lambda inside

[clang] 7f17b6b - [MC] Migrate to new createAsmStreamer that avoids unused bool parameters

2024-07-21 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-07-21T09:23:45-07:00 New Revision: 7f17b6b740bd49b84430a46b366381bfc8b74fb0 URL: https://github.com/llvm/llvm-project/commit/7f17b6b740bd49b84430a46b366381bfc8b74fb0 DIFF: https://github.com/llvm/llvm-project/commit/7f17b6b740bd49b84430a46b366381bfc8b74fb0.diff

[clang] [Clang][AST] {CXXDefaultArgExpr, CXXDefaultInitExpr}::hasRewrittenInit return true iff the init expression was really rebuild (PR #99748)

2024-07-21 Thread via cfe-commits
https://github.com/yronglin closed https://github.com/llvm/llvm-project/pull/99748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-21 Thread Mike Crowe via cfe-commits
mikecrowe wrote: @5chmidti wrote: > It should be possible to detect this case comparing the FileID of the call's > location and the format expression's location. If they differ, then they are > different arguments -> different macros. Although, I haven't checked that yet. I had thought so too

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-21 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/97911 >From f6c1a231681092189a621e2bc6af97300b2a7bfa Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Wed, 12 Jun 2024 21:06:26 +0100 Subject: [PATCH 1/6] [clang-tidy] Only expand macros in modernize-use-std-format/

[clang] [Clang][Interp] Diagnose use sizeless vector type as the argument of `__builtin_vectorelements` (PR #99794)

2024-07-21 Thread via cfe-commits
@@ -2735,6 +2736,13 @@ inline bool InvalidDeclRef(InterpState &S, CodePtr OpPC, return CheckDeclRef(S, OpPC, DR); } +inline bool SizelessVectorElementSize(InterpState &S, CodePtr OpPC) { yronglin wrote: Thanks, agree 100%, it should keeps same behavior with

[clang] [Clang][Interp] Diagnose use sizeless vector type as the argument of `__builtin_vectorelements` (PR #99794)

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

[clang] [Clang][Interp] Diagnose use sizeless vector type as the argument of `__builtin_vectorelements` (PR #99794)

2024-07-21 Thread via cfe-commits
@@ -29,6 +29,7 @@ #include "State.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Expr.h" +#include "clang/Basic/DiagnosticSema.h" yronglin wrote: Removed. https://github.com/llvm/llvm-project/pull/99794 __

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

2024-07-21 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/99773 From ebf1c6996f18cbd706ec3d76a1887c58c9ce3230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Sat, 20 Jul 2024 20:12:45 +0200 Subject: [PATCH] [clang-tidy] `bugprone-exception-esca

[clang] [Clang][Interp] Diagnose use sizeless vector type as the argument of `__builtin_vectorelements` (PR #99794)

2024-07-21 Thread via cfe-commits
@@ -1698,10 +1698,8 @@ bool Compiler::VisitUnaryExprOrTypeTraitExpr( if (Kind == UETT_VectorElements) { if (const auto *VT = E->getTypeOfArgument()->getAs()) return this->emitConst(VT->getNumElements(), E); - -// FIXME: Apparently we need to catch the fact that

[clang] [Clang][Interp] Diagnose use sizeless vector type as the argument of `__builtin_vectorelements` (PR #99794)

2024-07-21 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/99794 >From 163c9201ddf944e9e7eeef54a620bcc89fbe9b3d Mon Sep 17 00:00:00 2001 From: yronglin Date: Sun, 21 Jul 2024 10:54:41 +0800 Subject: [PATCH 1/3] [Clang][Interp] Diagnose use sizeless vector type as the argumen

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

2024-07-21 Thread Hana Dusíková via cfe-commits
@@ -518,6 +518,10 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`exception-escape ` hanickadot wrote: Oh, s

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

2024-07-21 Thread via cfe-commits
@@ -518,6 +518,10 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`exception-escape ` + check to correctly detect exception ha

[clang-tools-extra] [clang-tidy] `bugprone-exception-escape` didn't detech catching of an exception with pointer type by `void *` exception handler (PR #99773)

2024-07-21 Thread via cfe-commits
@@ -518,6 +518,10 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`exception-escape ` + check to correctly detect exception ha

  1   2   >