[clang] Set dllimport on Objective C ivar offsets (PR #107604)

2024-09-07 Thread David Chisnall via cfe-commits
https://github.com/davidchisnall approved this pull request. Looks good to me. It might be worth updating the test to make sure that one ivar is implicitly `@protected` if it isn’t already. https://github.com/llvm/llvm-project/pull/107604 ___ cfe-comm

[clang] [clang][bytecode] Implement __builtin_operator{new,delete} (PR #107672)

2024-09-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/107672 None >From fbdde33e018a721bab026dcffb4af22987cc7366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 7 Sep 2024 09:10:00 +0200 Subject: [PATCH] [clang][bytecode] Implement __builtin_oper

[clang] [clang][bytecode] Implement __builtin_operator{new,delete} (PR #107672)

2024-09-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Patch is 21.56 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/107672.diff 6 Files Affected: - (modified) clang/lib/AST/ByteCode/DynamicAllocator.cpp (+9-6

[clang] 83fea8b - [clang][bytecode] Allow continuing when discarded MemberExpr Base fails (#107231)

2024-09-07 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-07T09:33:27+02:00 New Revision: 83fea8b809b284594e6dd133150bb6d365775e5b URL: https://github.com/llvm/llvm-project/commit/83fea8b809b284594e6dd133150bb6d365775e5b DIFF: https://github.com/llvm/llvm-project/commit/83fea8b809b284594e6dd133150bb6d365775e5b.diff L

[clang] [clang][bytecode] Allow continuing when discarded MemberExpr Base fails (PR #107231)

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

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-09-07 Thread Björn Pettersson via cfe-commits
bjope wrote: > > Is that as expected? If so, how should snprintf be used to avoid the > > warning? > > Yes, this is expected. According to the C++ Safe Buffers programming model, > buffer pointers should be changed to std::span. But this new warning is given also when compiling C code. As in

[clang] 610b853 - [clang][bytecode] Implement __builtin_operator{new,delete} (#107672)

2024-09-07 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-07T09:57:26+02:00 New Revision: 610b85395d233b5cbc5a1f112ac3039b888c0a88 URL: https://github.com/llvm/llvm-project/commit/610b85395d233b5cbc5a1f112ac3039b888c0a88 DIFF: https://github.com/llvm/llvm-project/commit/610b85395d233b5cbc5a1f112ac3039b888c0a88.diff L

[clang] [clang][bytecode] Implement __builtin_operator{new,delete} (PR #107672)

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

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-09-07 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,184 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=c++17 %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=c++20 %s + +#if !__has_builtin(__builtin_common_type) +# error +#endif + +// expected-note@*:* {{

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-09-07 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/99473 >From d6903daf0da6979822b8981ea3641455ff6d06f8 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 16 Jul 2024 14:48:10 +0200 Subject: [PATCH 1/7] [Clang] Add __common_type builtin --- clang/include/cl

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #107675)

2024-09-07 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/107675 Fixes #107568. >From 6deac871ceae8ba3918570a4bdbd8476e014a3a1 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 7 Sep 2024 01:39:34 -0700 Subject: [PATCH] [clang-format] Fix a bug in annotating CastRParen Fixe

[clang] [webkit.RefCntblBaseVirtualDtor] Make ThreadSafeRefCounted not generate warnings (PR #107676)

2024-09-07 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/107676 This PR makes WebKit's RefCntblBaseVirtualDtor checker not generate a warning for ThreadSafeRefCounted when the destruction thread is a specific thread. Prior to this PR, we only allowed CRTP classes without a vi

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #107675)

2024-09-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #107568. --- Full diff: https://github.com/llvm/llvm-project/pull/107675.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+17-12) - (modified) clang/unittests/Format/TokenA

[clang] [webkit.RefCntblBaseVirtualDtor] Make ThreadSafeRefCounted not generate warnings (PR #107676)

2024-09-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes This PR makes WebKit's RefCntblBaseVirtualDtor checker not generate a warning for ThreadSafeRefCounted when the destruction thread is a specific thread. Prior to this PR, we only allowed CRTP classes without a

[clang] [webkit.RefCntblBaseVirtualDtor] Make ThreadSafeRefCounted not generate warnings (PR #107676)

2024-09-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes This PR makes WebKit's RefCntblBaseVirtualDtor checker not generate a warning for ThreadSafeRefCounted when the destruction thread is a specific thread. Prior to this PR, we only allowed CRTP

[clang] [clang][bytecode] Implement logical operators for vector type (PR #107678)

2024-09-07 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/107678 Implement `&&`, `||` logical operators for vector type. >From b9da0771d479fe5384f6e83bb1e2b75cd48fd5b4 Mon Sep 17 00:00:00 2001 From: yronglin Date: Sat, 7 Sep 2024 16:53:12 +0800 Subject: [PATCH] [clang][byte

[clang] [clang][bytecode] Implement logical operators for vector type (PR #107678)

2024-09-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes Implement `&&`, `||` logical operators for vector type. --- Full diff: https://github.com/llvm/llvm-project/pull/107678.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+21-2) - (modified

[clang] [clang][bytecode] Implement using operator new/operator delete (PR #107679)

2024-09-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/107679 Reuse the __builtin_operator_{new,delete} implementations. >From 654bc52d1e947d52942878a6a50c73053814d565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 7 Sep 2024 10:52:40 +0200 Subje

[clang] [clang][bytecode] Implement using operator new/operator delete (PR #107679)

2024-09-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Reuse the __builtin_operator_{new,delete} implementations. --- Full diff: https://github.com/llvm/llvm-project/pull/107679.diff 7 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+21-10)

[clang] 7d4afba - [clang][bytecode][NFC] Fix Function::getName() for non-decl functions

2024-09-07 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-09-07T10:56:18+02:00 New Revision: 7d4afba831bcf9b3e50ee7b6a3fbc9c0a7c61597 URL: https://github.com/llvm/llvm-project/commit/7d4afba831bcf9b3e50ee7b6a3fbc9c0a7c61597 DIFF: https://github.com/llvm/llvm-project/commit/7d4afba831bcf9b3e50ee7b6a3fbc9c0a7c61597.diff LO

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-09-07 Thread via cfe-commits
@@ -1917,6 +1929,16 @@ APValue &CallStackFrame::createTemporary(const KeyT *Key, QualType T, return createLocal(Base, Key, T, Scope); } +APValue & +CallStackFrame::createConstexprUnknownAPValues(const VarDecl *Key, + APValue::LV

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

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

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

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

[clang] [clang][bytecode] Implement logical operators for vector type (PR #107678)

2024-09-07 Thread Timm Baeder via cfe-commits
@@ -1267,7 +1268,15 @@ bool Compiler::VisitVectorBinOp(const BinaryOperator *E) { auto getElem = [=](unsigned Offset, unsigned Index) { if (!this->emitGetLocal(PT_Ptr, Offset, E)) return false; -return this->emitArrayElemPop(ElemT, Index, E); +if (!this->em

[clang] [clang][bytecode] Implement logical operators for vector type (PR #107678)

2024-09-07 Thread Timm Baeder via cfe-commits
@@ -1300,6 +1309,16 @@ bool Compiler::VisitVectorBinOp(const BinaryOperator *E) { if (!this->emitGT(ElemT, E)) return false; break; +case BO_LAnd: + // a && b is equivalent to a!=0 & b!=0 tbaederr wrote: I was trying to prove this

[clang] [clang][bytecode] Implement logical operators for vector type (PR #107678)

2024-09-07 Thread Timm Baeder via cfe-commits
@@ -15,6 +15,7 @@ #include "PrimType.h" #include "Program.h" #include "clang/AST/Attr.h" +#include "clang/AST/OperationKinds.h" tbaederr wrote: What is this needed for? A call to `isLogicalOp()` was already in the file before. https://github.com/llvm/llvm-pr

[clang] [clang] Remove an incorrect assertion in ConstantFoldAttrs (PR #105789)

2024-09-07 Thread Timm Baeder via cfe-commits
tbaederr wrote: CC @AaronBallman for an opinion about the AST represenation https://github.com/llvm/llvm-project/pull/105789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Set dllimport on Objective C ivar offsets (PR #107604)

2024-09-07 Thread Frederik Carlier via cfe-commits
https://github.com/qmfrederik updated https://github.com/llvm/llvm-project/pull/107604 >From 64073399d392b187297a6aeb1c6634c271103330 Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Fri, 6 Sep 2024 11:54:59 + Subject: [PATCH 1/2] Set dllimport on Objective C ivar offsets This commit

[clang] Set dllimport on Objective C ivar offsets (PR #107604)

2024-09-07 Thread Frederik Carlier via cfe-commits
qmfrederik wrote: I've added tests to ensure that unmarked ivars are considered protected -- which seems to be the case: https://github.com/llvm/llvm-project/pull/107604/commits/cf93b21734e179144dac34751860b0aa9d2aedaa https://github.com/llvm/llvm-project/pull/107604

[clang] 78cf9b8 - [clang][bytecode] Implement using operator new/operator delete (#107679)

2024-09-07 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-07T12:17:54+02:00 New Revision: 78cf9b830c78daa5aed51b5ca77bb7db9974d1ec URL: https://github.com/llvm/llvm-project/commit/78cf9b830c78daa5aed51b5ca77bb7db9974d1ec DIFF: https://github.com/llvm/llvm-project/commit/78cf9b830c78daa5aed51b5ca77bb7db9974d1ec.diff L

[clang] [clang][bytecode] Implement using operator new/operator delete (PR #107679)

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

[clang] [clang][bytecode] Fix two-pointer-style std::initializer_lists (PR #107682)

2024-09-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/107682 The first pointer needs to point to the first element of the underlying array. This requires some changes to how we handle array expansion >From 4067ab666b9fbfb05b6a22c14de1eededebcb16f Mon Sep 17 00:00:00 200

[clang] [clang][bytecode] Fix two-pointer-style std::initializer_lists (PR #107682)

2024-09-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes The first pointer needs to point to the first element of the underlying array. This requires some changes to how we handle array expansion --- Full diff: https://github.com/llvm/llvm-project/pull/107682.diff

[clang] [clang-tools-extra] [mlir] [mlir] Add insert method for ApplyToEachResultList class (PR #107684)

2024-09-07 Thread via cfe-commits
https://github.com/fawdlstty created https://github.com/llvm/llvm-project/pull/107684 #94968 >From f169f3c57a0a55c1a0dbb8f965bc17a87ceb98d7 Mon Sep 17 00:00:00 2001 From: fawdlstty Date: Fri, 30 Aug 2024 00:23:39 +0800 Subject: [PATCH 1/3] add check for windows platforms api --- .../bugprone

[clang] [clang-tools-extra] [mlir] [mlir] Add insert method for ApplyToEachResultList class (PR #107684)

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

[clang] [clang-tools-extra] [mlir] [mlir] Add insert method for ApplyToEachResultList class (PR #107684)

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

[clang] [clang-tools-extra] [mlir] [mlir] Add insert method for ApplyToEachResultList class (PR #107684)

2024-09-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Fawdlstty (fawdlstty) Changes #94968 --- Full diff: https://github.com/llvm/llvm-project/pull/107684.diff 5 Files Affected: - (modified) clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp (+1-1) - (modi

[clang] Set dllimport on Objective C ivar offsets (PR #107604)

2024-09-07 Thread Frederik Carlier via cfe-commits
@@ -1699,11 +1699,18 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { llvm::Value *EmitIvarOffset(CodeGenFunction &CGF, const ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar) override { -const std::string

[clang] Set dllimport on Objective C ivar offsets (PR #107604)

2024-09-07 Thread Frederik Carlier via cfe-commits
qmfrederik wrote: Thanks @davidchisnall and @compnerd . Let me know if there's anything else you need? https://github.com/llvm/llvm-project/pull/107604 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [llvm] [TableGen] Change SetTheory set/vec to use const Record * (PR #107692)

2024-09-07 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/107692 Change SetTheory::RecSet/RecVec to use const Record pointers. >From 4fc94659b3c245a30902c95be6d9c7bfd1d55f0a Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Sat, 7 Sep 2024 04:33:09 -0700 Subject: [PATCH] [Tab

[clang] d6d6070 - [clang][bytecode] Fix two-pointer-style std::initializer_lists (#107682)

2024-09-07 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-07T14:27:09+02:00 New Revision: d6d60707ec2b60843c5bfc2c3bc44e4478add17a URL: https://github.com/llvm/llvm-project/commit/d6d60707ec2b60843c5bfc2c3bc44e4478add17a DIFF: https://github.com/llvm/llvm-project/commit/d6d60707ec2b60843c5bfc2c3bc44e4478add17a.diff L

[clang] [clang][bytecode] Fix two-pointer-style std::initializer_lists (PR #107682)

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

[clang] [clang][bytecode] Add InitLinkScope for temporary variables (PR #106552)

2024-09-07 Thread Timm Baeder via cfe-commits
tbaederr wrote: In this code: ```c++ namespace ExplicitThisInTemporary { struct B { B *p = this; }; constexpr bool g(B b) { return &b == b.p; } static_assert(g({}), ""); } ``` The AST for the `static_assert` expr is: ``` CallExpr 0x5219ed98 '_Bool' |-ImplicitCastExpr 0x5219ed78 '_Bo

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-07 Thread via cfe-commits
https://github.com/jofrn updated https://github.com/llvm/llvm-project/pull/107458 >From d385e0810bc24dcaf8296501922b50fd88e18415 Mon Sep 17 00:00:00 2001 From: jofernau Date: Thu, 5 Sep 2024 23:31:55 -0400 Subject: [PATCH] [HIP][Clang][CodeGen] Handle hip bin symbols properly. Remove '_' in fa

[clang] [clang][bytecode] Implement logical operators for vector type (PR #107678)

2024-09-07 Thread via cfe-commits
@@ -15,6 +15,7 @@ #include "PrimType.h" #include "Program.h" #include "clang/AST/Attr.h" +#include "clang/AST/OperationKinds.h" yronglin wrote: Hmm, I think it introduced by clangd plugin's IWYU feature, I'll revert this change. https://github.com/llvm/llvm-

[clang] [clang][bytecode] Implement logical operators for vector type (PR #107678)

2024-09-07 Thread via cfe-commits
@@ -1267,7 +1268,15 @@ bool Compiler::VisitVectorBinOp(const BinaryOperator *E) { auto getElem = [=](unsigned Offset, unsigned Index) { if (!this->emitGetLocal(PT_Ptr, Offset, E)) return false; -return this->emitArrayElemPop(ElemT, Index, E); +if (!this->em

[clang] 3ba0755 - [clang][OpenMP] Simplify handling of implicit DSA/mapping information (#106786)

2024-09-07 Thread via cfe-commits
Author: Krzysztof Parzyszek Date: 2024-09-07T09:10:21-05:00 New Revision: 3ba0755d3e50c62d27ac9c37a0250f525dcad28d URL: https://github.com/llvm/llvm-project/commit/3ba0755d3e50c62d27ac9c37a0250f525dcad28d DIFF: https://github.com/llvm/llvm-project/commit/3ba0755d3e50c62d27ac9c37a0250f525dcad28d

[clang] [clang][OpenMP] Simplify handling of implicit DSA/mapping information (PR #106786)

2024-09-07 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/106786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Implement logical operators for vector type (PR #107678)

2024-09-07 Thread via cfe-commits
@@ -1300,6 +1309,16 @@ bool Compiler::VisitVectorBinOp(const BinaryOperator *E) { if (!this->emitGT(ElemT, E)) return false; break; +case BO_LAnd: + // a && b is equivalent to a!=0 & b!=0 yronglin wrote: Should we follow the behav

[clang] [clang][bytecode] Implement logical operators for vector type (PR #107678)

2024-09-07 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/107678 >From b9da0771d479fe5384f6e83bb1e2b75cd48fd5b4 Mon Sep 17 00:00:00 2001 From: yronglin Date: Sat, 7 Sep 2024 16:53:12 +0800 Subject: [PATCH 1/2] [clang][bytecode] Implement logical operators for vector type S

[clang] [clang-format] Introduce "ReflowComments: IndentOnly" to re-indent comments without breaking internal structure (think Doxygen). (PR #96804)

2024-09-07 Thread Ivan Jager via cfe-commits
https://github.com/aij approved this pull request. https://github.com/llvm/llvm-project/pull/96804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-07 Thread via cfe-commits
@@ -1555,6 +1499,11 @@ DeduceTemplateBases(Sema &S, const CXXRecordDecl *RD, return TemplateDeductionResult::Success; } +static PartialOrderingKind +degradeCallPartialOrderingKind(PartialOrderingKind POK) { + return std::min(POK, PartialOrderingKind::NonCall); +} +

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-07 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Only nits at this point. Sorry the review took this long, it was a pretty large PR. Thanks for working on it! https://github.com/llvm/llvm-project/pull/94981 ___ cfe-commits mailing list cfe-commi

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-07 Thread via cfe-commits
@@ -6753,16 +6758,41 @@ ASTContext::getNameForTemplate(TemplateName Name, case TemplateName::UsingTemplate: return DeclarationNameInfo(Name.getAsUsingShadowDecl()->getDeclName(), NameLoc); + case TemplateName::DeducedTemplate: { +Deduce

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

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

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-07 Thread via cfe-commits
@@ -2304,6 +2306,15 @@ class ASTContext : public RefCountedBase { unsigned Index, bool Final) const; + /// Represents a TemplateName which had some of it's default arguments --

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-07 Thread via cfe-commits
@@ -645,6 +645,9 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, // It is sufficient to check value of getAsTemplateDecl. break; + case TemplateName::DeducedTemplate: + // FIXME: We can't reach here. + llvm_unreachable("unimp

[clang] [NFC][rtsan] Docs of how to disable rtsan (PR #107707)

2024-09-07 Thread Chris Apple via cfe-commits
https://github.com/cjappl created https://github.com/llvm/llvm-project/pull/107707 None >From e3e211f65afbc923299c0f413d2c50c7b00884b6 Mon Sep 17 00:00:00 2001 From: Chris Apple Date: Sat, 7 Sep 2024 08:38:06 -0700 Subject: [PATCH] [NFC][rtsan] Docs of how to disable rtsan --- clang/docs/Rea

[clang] [NFC][rtsan] Docs of how to disable rtsan (PR #107707)

2024-09-07 Thread Chris Apple via cfe-commits
cjappl wrote: CC for review @davidtrevelyan https://github.com/llvm/llvm-project/pull/107707 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][rtsan] Docs of how to disable rtsan (PR #107707)

2024-09-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris Apple (cjappl) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/107707.diff 1 Files Affected: - (modified) clang/docs/RealtimeSanitizer.rst (+50) ``diff diff --git a/clang/docs/RealtimeSanitizer.rst b/c

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #107709)

2024-09-07 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/107709 While I am at it, I'm renaming Cache to UniqueDecls and removing TotalNum in favor of UniqueDecls.size(). >From ab2bdf3bcaa18d6c1acaf47724a22dcd4254dd7b Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date:

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #107709)

2024-09-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes While I am at it, I'm renaming Cache to UniqueDecls and removing TotalNum in favor of UniqueDecls.size(). --- Full diff: https://github.com/llvm/llvm-project/pull/107709.diff 1 Files Affected: - (mo

[clang-tools-extra] Add `std::span` to default `bugprone-dangling-handle.HandleClasses` (PR #107711)

2024-09-07 Thread Afonso Faria via cfe-commits
https://github.com/oracle-9 created https://github.com/llvm/llvm-project/pull/107711 `std::span` suffers from the same dangling issues as `std::string_view`. This patch adds `std::span` to the default list of handle classes in `bugprone-dangling-handle`, allowing clang-tidy to catch e.g. the f

[clang-tools-extra] Add `std::span` to default `bugprone-dangling-handle.HandleClasses` (PR #107711)

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

[clang-tools-extra] Add `std::span` to default `bugprone-dangling-handle.HandleClasses` (PR #107711)

2024-09-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Afonso Faria (oracle-9) Changes `std::span` suffers from the same dangling issues as `std::string_view`. This patch adds `std::span` to the default list of handle classes in `bugprone-dangling-handle`, allowing clang-tidy to c

[clang-tools-extra] Add `std::span` to default `bugprone-dangling-handle.HandleClasses` (PR #107711)

2024-09-07 Thread Afonso Faria via cfe-commits
https://github.com/oracle-9 updated https://github.com/llvm/llvm-project/pull/107711 >From 8528404715b4ca6dec7e251548870aba0c64bb04 Mon Sep 17 00:00:00 2001 From: Afonso Faria Date: Sat, 7 Sep 2024 18:03:48 +0100 Subject: [PATCH 1/2] Add std::span to default bugprone-dangling-handle.HandleClas

[clang-tools-extra] [clang-tidy] Add `std::span` to default `bugprone-dangling-handle.HandleClasses` (PR #107711)

2024-09-07 Thread Afonso Faria via cfe-commits
https://github.com/oracle-9 edited https://github.com/llvm/llvm-project/pull/107711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-07 Thread Matheus Izvekov via cfe-commits
@@ -6753,16 +6758,41 @@ ASTContext::getNameForTemplate(TemplateName Name, case TemplateName::UsingTemplate: return DeclarationNameInfo(Name.getAsUsingShadowDecl()->getDeclName(), NameLoc); + case TemplateName::DeducedTemplate: { +Deduce

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #107709)

2024-09-07 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/107709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9c86a7e - [AST] Avoid repeated hash lookups (NFC) (#107709)

2024-09-07 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-07T11:23:26-07:00 New Revision: 9c86a7e9ec716fb54a0b74e13af12cb655723e53 URL: https://github.com/llvm/llvm-project/commit/9c86a7e9ec716fb54a0b74e13af12cb655723e53 DIFF: https://github.com/llvm/llvm-project/commit/9c86a7e9ec716fb54a0b74e13af12cb655723e53.diff L

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #107709)

2024-09-07 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/107709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-win` running on `as-worker-93` while building `clang,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/1093 Here is the releva

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

2024-09-07 Thread via cfe-commits
@@ -1013,15 +1013,15 @@ CXXDefaultArgExpr *CXXDefaultArgExpr::CreateEmpty(const ASTContext &C, return new (Mem) CXXDefaultArgExpr(EmptyShell(), HasRewrittenInit); } -CXXDefaultArgExpr *CXXDefaultArgExpr::Create(const ASTContext &C, -

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-09-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/94981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Finish implementation of P0522 (PR #96023)

2024-09-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/96023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Finish implementation of P0522 (PR #96023)

2024-09-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/96023 >From b29e3d3285a414df74a75404c6fe4a39f4a0725d Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 17 Jun 2024 21:39:08 -0300 Subject: [PATCH] [clang] Finish implementation of P0522 This finishes the clan

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #107675)

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

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-09-07 Thread via cfe-commits
@@ -750,8 +750,22 @@ void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, if (Field->hasInClassInitializer()) { if (VerifyOnly) return; - - ExprResult DIE = SemaRef.BuildCXXDefaultInitExpr(Loc, Field); + ExprResult DIE; +

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-09-07 Thread via cfe-commits
@@ -7849,13 +7854,17 @@ class Sema final : public SemaBase { /// keepInLifetimeExtendingContext - Pull down InLifetimeExtendingContext /// flag from previous context. void keepInLifetimeExtendingContext() { -if (ExprEvalContexts.size() > 2 && -parentEvaluation

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-09-07 Thread via cfe-commits
@@ -5479,6 +5479,7 @@ void Sema::InstantiateVariableInitializer( *this, Sema::ExpressionEvaluationContext::PotentiallyEvaluated, Var); keepInLifetimeExtendingContext(); +keepInRebuildDefaultArgOrInitContext(); cor3ntin wrote: I am not sure tha

[clang] The real option name and not the alias used is displayed in msgs when using a config file (PR #107613)

2024-09-07 Thread Sean Perry via cfe-commits
https://github.com/perry-ca updated https://github.com/llvm/llvm-project/pull/107613 >From 27f31954976948e4e0d194db5da6bc550b4c2200 Mon Sep 17 00:00:00 2001 From: Sean Perry Date: Fri, 6 Sep 2024 10:54:07 -0500 Subject: [PATCH 1/2] clone the alias option too --- clang/lib/Driver/Driver.cpp

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

2024-09-07 Thread via cfe-commits
@@ -7849,13 +7854,17 @@ class Sema final : public SemaBase { /// keepInLifetimeExtendingContext - Pull down InLifetimeExtendingContext /// flag from previous context. void keepInLifetimeExtendingContext() { -if (ExprEvalContexts.size() > 2 && -parentEvaluation

[clang] [clang] Finish implementation of P0522 (PR #96023)

2024-09-07 Thread via cfe-commits
cor3ntin wrote: My concern here is that there is an ongoing lively discussion in CWG. And while I think most solutions considered will end up being isomorphic in outcome, I don't know that we want to go experimenting too much before the dust settles a bit (there is wild variation between imple

[clang-tools-extra] [NFC][clang-tidy] document fix to bugprone-return-const-ref-from-parameter (PR #107641)

2024-09-07 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny approved this pull request. https://github.com/llvm/llvm-project/pull/107641 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false positive in modernize-min-max-use-initializer-list (PR #107649)

2024-09-07 Thread Danny Mösch via cfe-commits
@@ -168,9 +170,11 @@ generateReplacements(const MatchFinder::MatchResult &Match, CharSourceRange::getTokenRange(InnerResult.First->getEndLoc(; } -const SmallVector InnerReplacements = generateReplacements( +const auto [FoundNestedCallInner, InnerRepla

[clang-tools-extra] [clang-tidy] fix false positive in modernize-min-max-use-initializer-list (PR #107649)

2024-09-07 Thread Danny Mösch via cfe-commits
@@ -72,11 +72,10 @@ static FindArgsResult findArgs(const CallExpr *Call) { return Result; } -static SmallVector -generateReplacements(const MatchFinder::MatchResult &Match, - const CallExpr *TopCall, const FindArgsResult &Result, - con

[clang] [clang][docs] Add clang-tutor to ExternalClangExamples. (PR #107665)

2024-09-07 Thread Danny Mösch via cfe-commits
@@ -98,3 +98,6 @@ List of projects and tools uses of reserved identifiers to ensuring that code adheres to lifecycle protocols for certain LibreOffice-specific classes. They may serve as examples for writing RecursiveASTVisitor-based plugins." + +`

[clang] [clang] Finish implementation of P0522 (PR #96023)

2024-09-07 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I believe we have achieved consensus on getting rid of the fallback rules, and this patch does not do much beyond that, if anything. https://github.com/llvm/llvm-project/pull/96023 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang-tools-extra] [clang-tidy] only diagnose definitions in readability-enum-initial-value (PR #107652)

2024-09-07 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny approved this pull request. https://github.com/llvm/llvm-project/pull/107652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC][clang-tidy] reword diagnostic note in definitions-in-headers (PR #106862)

2024-09-07 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny approved this pull request. https://github.com/llvm/llvm-project/pull/106862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-09-07 Thread Timothy Akintilo via cfe-commits
https://github.com/tilobyte updated https://github.com/llvm/llvm-project/pull/101857 >From c1afe853ccacae1605fecfe552bb9a263c6b8c1d Mon Sep 17 00:00:00 2001 From: Timothy Akintilo Date: Sat, 27 Jul 2024 16:17:46 -0500 Subject: [PATCH 1/3] use lambda name instead of operator() --- clang-tools-

[clang] [llvm] [TableGen] Change SetTheory set/vec to use const Record * (PR #107692)

2024-09-07 Thread Rahul Joshi via cfe-commits
@@ -2808,10 +2806,10 @@ RecordRecTy *Record::getType() { return RecordRecTy::get(TrackedRecords, DirectSCs); } -DefInit *Record::getDefInit() { +DefInit *Record::getDefInit() const { if (!CorrespondingDefInit) { -CorrespondingDefInit = -new (TrackedRecords.get

[clang] [llvm] [TableGen] Change SetTheory set/vec to use const Record * (PR #107692)

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

[clang] [llvm] [TableGen] Change SetTheory set/vec to use const Record * (PR #107692)

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

[clang] [llvm] [TableGen] Change SetTheory set/vec to use const Record * (PR #107692)

2024-09-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes Change SetTheory::RecSet/RecVec to use const Record pointers. --- Patch is 27.91 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/107692.diff 11 Files Affected: -

[clang] [Frontend] Avoid repeated hash lookups (NFC) (PR #107728)

2024-09-07 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/107728 None >From ddde00b62ef1acc5532ea24c2fa15a8c67e69ac9 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 7 Sep 2024 11:39:50 -0700 Subject: [PATCH] [Frontend] Avoid repeated hash lookups (NFC) --- cla

[clang] [Frontend] Avoid repeated hash lookups (NFC) (PR #107728)

2024-09-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/107728.diff 1 Files Affected: - (modified) clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp (+4-12) ``diff diff --git a/clang/lib/

[clang] [clang-format] Fix a regression on BAS_AlwaysBreak (PR #107506)

2024-09-07 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/107506 >From bd7da6ec9afabd829010db4c33d088590ab68b5a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 5 Sep 2024 19:44:46 -0700 Subject: [PATCH 1/2] [clang-format] Fix a regression on BAS_AlwaysBreak Fixes #107401.

[clang] [clang-format] Fix a regression on BAS_AlwaysBreak (PR #107506)

2024-09-07 Thread Owen Pan via cfe-commits
@@ -861,7 +861,7 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, // or // cal( // new SomethingElseee()); - !IsSimpleFunction(Current)) { + Current.isNot(

[clang] [clang-format] Fix a regression on BAS_AlwaysBreak (PR #107506)

2024-09-07 Thread Owen Pan via cfe-commits
owenca wrote: > i've also found 3 more cases that point back to same patch in #107574, in > case you want to address all of them with this change I'd rather make incremental changes. Maybe you or @gedare can give them a try. https://github.com/llvm/llvm-project/pull/107506

  1   2   >