[clang] [X86][vectorcall] Do not consume register for indirect return value (PR #97939)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Phoebe Wang (phoebewang) Changes This is how MSVC handles it. https://godbolt.org/z/Eav3vx7cd --- Full diff: https://github.com/llvm/llvm-project/pull/97939.diff 2 Files Affected: - (modified) clang/lib/

[clang] [X86][vectorcall] Do not consume register for indirect return value (PR #97939)

2024-07-06 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang created https://github.com/llvm/llvm-project/pull/97939 This is how MSVC handles it. https://godbolt.org/z/Eav3vx7cd >From cf19ec8d705434ca6d989a72069dba1040c360ca Mon Sep 17 00:00:00 2001 From: Phoebe Wang Date: Sun, 7 Jul 2024 13:14:59 +0800 Subject: [PATCH] [X8

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-07-06 Thread Owen Pan via cfe-commits
@@ -803,6 +803,60 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, return !Tok.Previous->isOneOf(TT_CastRParen, tok::kw_for, tok::kw_while, tok::kw_switch); }; + // Detecting functions is brittle. It wo

[clang] [clang-format][NFC] Annotate function decl l_paren (PR #97938)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/97938.diff 3 Files Affected: - (modified) clang/lib/Format/FormatToken.h (+1) - (modified) clang/lib/Format/TokenAnnotator.cpp (+6) - (modified

[clang] [clang-format][NFC] Annotate function decl l_paren (PR #97938)

2024-07-06 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/97938 None >From eb53318b3c5dec2452c4a0d5aed7944ebdd99380 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 6 Jul 2024 22:21:26 -0700 Subject: [PATCH] [clang-format][NFC] Annotate function decl l_paren --- clang/lib

[clang] [Clang] Protect ObjCMethodList assignment operator against self-assignment (PR #97933)

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

[clang] [Clang] Protect ObjCMethodList assignment operator against self-assig… (PR #97933)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes This patch adds a self-assignment check to the ObjCMethodList assignment operator to prevent issues when an object is assigned to itself. The fix ensures the integrity of the object's data during such assignments.

[clang] [Clang] Protect ObjCMethodList assignment operator against self-assig… (PR #97933)

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

[clang] [Clang] Protect ObjCMethodList assignment operator against self-assig… (PR #97933)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/97933 …nment This patch adds a self-assignment check to the ObjCMethodList assignment operator to prevent issues when an object is assigned to itself. The fix ensures the integrity of the object's data during such a

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

2024-07-06 Thread Younan Zhang via cfe-commits
@@ -60,3 +60,26 @@ template C1>> auto t3() { template C1>> auto t3(); static_assert(is_same()), X>>>); #endif + +namespace GH95735 { + +int g(int fn) { + return [f = fn](auto tpl) noexcept(noexcept(f)) { return f; }(0); +} + +int foo(auto... fn) { + // FIXME: This one hits th

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

2024-07-06 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Thanks for the review. https://github.com/llvm/llvm-project/pull/97166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

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

[clang] f4c7811 - [Clang] Add captures to the instantiation scope for noexcept specifiers (#97166)

2024-07-06 Thread via cfe-commits
Author: Younan Zhang Date: 2024-07-07T09:46:38+08:00 New Revision: f4c781174b4b8fd958d9074c25eb06b6e276cb1c URL: https://github.com/llvm/llvm-project/commit/f4c781174b4b8fd958d9074c25eb06b6e276cb1c DIFF: https://github.com/llvm/llvm-project/commit/f4c781174b4b8fd958d9074c25eb06b6e276cb1c.diff

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

2024-07-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/97166 >From 91a28dcde9dc569b955df92db91c858c550f6ad3 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 29 Jun 2024 21:32:01 +0800 Subject: [PATCH] [Clang] Add captures to the instantiation scope for noexcept spec

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/70976 >From a91f499900d4cea4804833d004b6c4e54a7d8b15 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sun, 3 Sep 2023 17:26:28 -0700 Subject: [PATCH 1/5] [clang] Extend diagnose_if to accept more detailed warni

[clang] [Clang] Guard against null in template instantiation process (PR #97913)

2024-07-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/97913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Guard against null in template instantiation process (PR #97913)

2024-07-06 Thread Younan Zhang via cfe-commits
@@ -636,6 +636,9 @@ bool Sema::SetupConstraintScope( ? FD->getInstantiatedFromMemberFunction() : FD->getInstantiatedFromDecl(); +if (!InstantiatedFrom) + return true; + zyn0217 wrote: This is unnecessary. For both `TK_MemberSp

[clang] [Clang] Guard against null in template instantiation process (PR #97913)

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

[clang] [clang] [NFC] Mark `UnresolvedSetImpl`'s move operations as defaulted (PR #97930)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (MagentaTreehouse) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/97930.diff 1 Files Affected: - (modified) clang/include/clang/AST/UnresolvedSet.h (+2-3) ``diff diff --git a/clang/include/clang/AST/Un

[clang] [clang] [NFC] Mark `UnresolvedSetImpl`'s move operations as defaulted (PR #97930)

2024-07-06 Thread via cfe-commits
https://github.com/MagentaTreehouse created https://github.com/llvm/llvm-project/pull/97930 None >From de625afb940fb87efa10c0ecf0e67c9930eab182 Mon Sep 17 00:00:00 2001 From: Mingyi Chen Date: Sat, 6 Jul 2024 21:25:15 -0400 Subject: [PATCH] [clang] [NFC] Mark `UnresolvedSetImpl`'s move operati

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

2024-07-06 Thread Max Coplan via cfe-commits
https://github.com/vegerot updated https://github.com/llvm/llvm-project/pull/97926 >From c05d739d105b76fcf83985b20762809f6eea6f40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20=F0=9F=91=A8=F0=9F=8F=BD=E2=80=8D=F0=9F=92=BB=20Copl?= =?UTF-8?q?an?= Date: Sat, 6 Jul 2024 17:22:55 -0700 Subject: [

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

2024-07-06 Thread Max Coplan via cfe-commits
vegerot wrote: @AaronBallman please review https://github.com/llvm/llvm-project/pull/97926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Max Coplan (vegerot) Changes This patch adds -Wimplicit-fallthrough to -Wextra. GCC already includes it in -Wextra. This patch also adds a test to check that -Wimplicit-fallthrough is included in -Wextra. Note: This patch may regress pe

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

2024-07-06 Thread Max Coplan via cfe-commits
https://github.com/vegerot ready_for_review https://github.com/llvm/llvm-project/pull/97926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-06 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] Add -Wimplicit-fallthrough to -Wextra (PR #97926)

2024-07-06 Thread Max Coplan via cfe-commits
https://github.com/vegerot created https://github.com/llvm/llvm-project/pull/97926 This patch adds -Wimplicit-fallthrough to -Wextra. GCC already includes it in -Wextra. This patch also adds a test to check that -Wimplicit-fallthrough is included in -Wextra. Note: This patch may regress perf

[clang-tools-extra] [clangd] Use std::make_unique (NFC) (PR #97915)

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

[clang-tools-extra] f767295 - [clangd] Use std::make_unique (NFC) (#97915)

2024-07-06 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-07-07T08:15:09+09:00 New Revision: f767295942288bd70156ad322defac60b568c927 URL: https://github.com/llvm/llvm-project/commit/f767295942288bd70156ad322defac60b568c927 DIFF: https://github.com/llvm/llvm-project/commit/f767295942288bd70156ad322defac60b568c927.diff L

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-06 Thread via cfe-commits
https://github.com/h-vetinari updated https://github.com/llvm/llvm-project/pull/96171 >From 1df587efeb71fb1929667f008d7e9b251863d9d8 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 20 Jun 2024 21:43:31 +1100 Subject: [PATCH 1/4] [cmake] switch to CMake's native check_linker_flag, delet

[clang-tools-extra] [clangd] Use std::make_unique (NFC) (PR #97915)

2024-07-06 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/97915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Use std::make_unique (NFC) (PR #97915)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/97915.diff 1 Files Affected: - (modified) clang-tools-extra/clangd/support/ThreadsafeFS.cpp (+1-1) ``diff diff --git a

[clang-tools-extra] [clangd] Use std::make_unique (NFC) (PR #97915)

2024-07-06 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/97915 None >From 91325539452e0fabef33894d66a0f643319891f2 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 29 Jun 2024 12:40:11 -0700 Subject: [PATCH] [clangd] Use std::make_unique (NFC) --- clang-tools-

[clang] [Clang] Guard against null in template instantiation process (PR #97913)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes This patch adds a null check for InstantiatedFrom to prevent dereferencing a null pointer during the template instantiation process in clang::Sema::SetupConstraintScope(). The fix ensures that the function exits e

[clang] [Clang] Guard against null in template instantiation process (PR #97913)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/97913 This patch adds a null check for InstantiatedFrom to prevent dereferencing a null pointer during the template instantiation process in clang::Sema::SetupConstraintScope(). The fix ensures that the function exi

[clang] [Clang] Prevent null pointer dereference in TransformUnaryTransformType() (PR #97912)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/97912 >From c30e531027828d7b531d3791c48779b465e69360 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Sat, 6 Jul 2024 14:02:16 -0700 Subject: [PATCH 1/3] [Clang] Prevent null pointer dereference in TransformUnaryT

[clang] [Clang] Prevent null pointer dereference in TransformUnaryTransformType() (PR #97912)

2024-07-06 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 8426b51e0e942b27af8a50b9cee53c1b68d139c2 87eceedcfabb4f3f3b7c69f970716a40c745bf7a --

[clang] [Clang] Prevent null pointer dereference in TransformUnaryTransformType() (PR #97912)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/97912 >From c30e531027828d7b531d3791c48779b465e69360 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Sat, 6 Jul 2024 14:02:16 -0700 Subject: [PATCH 1/2] [Clang] Prevent null pointer dereference in TransformUnaryT

[clang] [Clang] Prevent null pointer dereference in TransformUnaryTransformType() (PR #97912)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes This patch adds null check after TransformType call to avoid dereferencing a null pointer when calling getType(). --- Full diff: https://github.com/llvm/llvm-project/pull/97912.diff 1 Files Affected: - (modified

[clang] [Clang] Prevent null pointer dereference in TransformUnaryTransformType() (PR #97912)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/97912 This patch adds null check after TransformType call to avoid dereferencing a null pointer when calling getType(). >From c30e531027828d7b531d3791c48779b465e69360 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Da

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-06 Thread Youngsuk Kim via cfe-commits
@@ -1551,7 +1551,7 @@ ASTNodeImporter::VisitCountAttributedType(const CountAttributedType *T) { Expr *CountExpr = importChecked(Err, T->getCountExpr()); SmallVector CoupledDecls; - for (auto TI : T->dependent_decls()) { + for (const TypeCoupledDeclRefInfo &TI : T->depen

[clang] [clang][Sema] Improve `collectViableConversionCandidates` (PR #97908)

2024-07-06 Thread via cfe-commits
https://github.com/MagentaTreehouse updated https://github.com/llvm/llvm-project/pull/97908 >From def9d161e4ea79ee1b24a8d662a5c0dd17c2dd8f Mon Sep 17 00:00:00 2001 From: Mingyi Chen Date: Sat, 6 Jul 2024 15:41:08 -0400 Subject: [PATCH 1/2] [clang][Sema] Improve `collectViableConversionCandidate

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

2024-07-06 Thread Mike Crowe via cfe-commits
mikecrowe wrote: I'm not particularly happy with the `FormatStringConverter` constructor now taking seven parameters. The risk of them getting muddled isn't huge though because they are all of different types. Should I perhaps put them all into the `FormatStringConverter::Configuration` struct

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

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Mike Crowe (mikecrowe) Changes Expanding all macros in the printf/absl::StrFormat format string before conversion could easily break code if those macros are expended to change their definition between builds. It's important f

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

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Mike Crowe (mikecrowe) Changes Expanding all macros in the printf/absl::StrFormat format string before conversion could easily break code if those macros are expended to change their definition between builds. It's important for this

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

2024-07-06 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe created https://github.com/llvm/llvm-project/pull/97911 Expanding all macros in the printf/absl::StrFormat format string before conversion could easily break code if those macros are expended to change their definition between builds. It's important for this check

[libclc] [libclc] Fix cross in-tree builds (PR #97392)

2024-07-06 Thread via cfe-commits
https://github.com/GO-NFT-GO commented: Ok https://github.com/llvm/llvm-project/pull/97392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix null pointer dereference in VisitUsingEnumDecl (PR #97910)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes This patch addresses static analyzer concern where TSI could be dereferenced after being assigned a null value from SubstType in clang::TemplateDeclInstantiator::VisitUsingEnumDecl(clang::UsingEnumDecl *). The fix

[clang] [Clang] Fix null pointer dereference in VisitUsingEnumDecl (PR #97910)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/97910 This patch addresses static analyzer concern where TSI could be dereferenced after being assigned a null value from SubstType in clang::TemplateDeclInstantiator::VisitUsingEnumDecl(clang::UsingEnumDecl *). The

[clang] [clang][Sema] Improve `collectViableConversionCandidates` (PR #97908)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (MagentaTreehouse) Changes * Use range-based for * The value of `Conv` is not used when `ConvTemplate` is not null, so we do not need to compute it on that path --- Full diff: https://github.com/llvm/llvm-project/pull/97908.diff 1

[clang] [clang][Sema] Improve `collectViableConversionCandidates` (PR #97908)

2024-07-06 Thread via cfe-commits
https://github.com/MagentaTreehouse created https://github.com/llvm/llvm-project/pull/97908 * Use range-based for * The value of `Conv` is not used when `ConvTemplate` is not null, so we do not need to compute it on that path >From def9d161e4ea79ee1b24a8d662a5c0dd17c2dd8f Mon Sep 17 00:00:00 2

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Yupei Liu via cfe-commits
@@ -2379,23 +2379,32 @@ Sema::LambdaScopeForCallOperatorInstantiationRAII:: SemaRef.RebuildLambdaScopeInfo(cast(FD)); - FunctionDecl *Pattern = getPatternFunctionDecl(FD); - if (Pattern) { -SemaRef.addInstantiatedCapturesToScope(FD, Pattern, Scope, MLTAL); + Function

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Yupei Liu via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/97215 >From a997ae70f86230200b1082c9bdc0bdf56e30b7c4 Mon Sep 17 00:00:00 2001 From: letrec Date: Sun, 30 Jun 2024 21:03:23 +0800 Subject: [PATCH 1/2] Fix the order of addInstantiatedParameters in LambdaScopeForCallO

[libunwind] [libunwind] fix unwinding from signal handler (PR #92291)

2024-07-06 Thread Saleem Abdulrasool via cfe-commits
@@ -365,7 +365,12 @@ int DwarfInstructions::stepWithDwarf(A &addressSpace, pint_t pc, // Return address is address after call site instruction, so setting IP to // that does simulates a return. - newRegisters.setIP(returnAddress); + // + // In case

[clang] Enable aarch64-amazon-linux triple (PR #82232)

2024-07-06 Thread Fangrui Song via cfe-commits
MaskRay wrote: > I'm not the owner of this code, but I just dropped by to say that I don't > think this patch will be accepted. A few lines above your changes, there is a > comment that says, "Please don't add more elements to *Triples.". > > @MaskRay is working to reduce the number of target

[clang] Enable aarch64-amazon-linux triple (PR #82232)

2024-07-06 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/82232 ___ 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-06 Thread via cfe-commits
@@ -905,6 +912,7 @@ void Preprocessor::Lex(Token &Result) { // This token is injected to represent the translation of '#include "a.h"' // into "import a.h;". Mimic the notional ';'. case tok::annot_module_include: +case tok::annot_repl_input_end: ---

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

2024-07-06 Thread via cfe-commits
@@ -860,9 +861,15 @@ bool Preprocessor::HandleIdentifier(Token &Identifier) { ModuleImportLoc = Identifier.getLocation(); NamedModuleImportPath.clear(); IsAtImport = true; -ModuleImportExpectsIdentifier = true; CurLexerCallback = CLK_LexAfterModuleImport;

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

2024-07-06 Thread via cfe-commits
@@ -35,6 +35,7 @@ #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/TargetInfo.h" +#include "clang/Basic/TokenKinds.h" cor3ntin wrote: I don't think we need that change https://github.com/llvm/llvm-project/pu

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

2024-07-06 Thread via cfe-commits
@@ -160,6 +160,8 @@ static char GetFirstChar(const Preprocessor &PP, const Token &Tok) { bool TokenConcatenation::AvoidConcat(const Token &PrevPrevTok, const Token &PrevTok, const Token &Tok) const { +

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

2024-07-06 Thread via cfe-commits
@@ -741,6 +757,9 @@ class IdentifierTable { if (Name == "import") II->setModulesImport(true); +if (Name == "module") cor3ntin wrote: ```suggestion else if (Name == "module") ``` https://github.com/llvm/llvm-project/pull/90574 ___

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

2024-07-06 Thread via cfe-commits
https://github.com/cor3ntin commented: I think this is starting to look pretty good. Can we simplify further by lexing the partition along with the module name, when there is one? We could also have a ModuleNameInfo::toString() function we could use in a couple places. https://github.com/llv

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

2024-07-06 Thread via cfe-commits
https://github.com/cor3ntin edited 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] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-07-06 Thread Alex MacLean via cfe-commits
AlexMaclean wrote: > Can you add some tests to demonstrate that this patch will enable more > optimizations in some real-world applications? I can extend the existing test cases to make them more elaborate/real-looking, but I'm guessing that would not qualify as "real-world". This patch is mo

[clang] [clang-installapi] ] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/97900 >From dd36ef6dd52f57d175fd60534172f0e28e11ef48 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Sat, 6 Jul 2024 08:29:26 -0700 Subject: [PATCH 1/3] [InstallAPI] Fix potential null pointer dereference in file

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes Reported by Static Analyzer Tool: In clang::ASTNodeImporter::VisitCountAttributedType(clang::CountAttributedType const *): Using the auto keyword without an & causes the copy of an object of type TypeCoupledDeclRe

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/97902 Reported by Static Analyzer Tool: In clang::ASTNodeImporter::VisitCountAttributedType(clang::CountAttributedType const *): Using the auto keyword without an & causes the copy of an object of type TypeCoupledDe

[clang] [clang-installapi] ] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/97900 >From dd36ef6dd52f57d175fd60534172f0e28e11ef48 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Sat, 6 Jul 2024 08:29:26 -0700 Subject: [PATCH 1/2] [InstallAPI] Fix potential null pointer dereference in file

[clang] Adds an arbitrary pseudonym to clang"s windows mangler... (PR #97792)

2024-07-06 Thread via cfe-commits
memory-thrasher wrote: PR updated to output mangled function name matching the one from godbolt for this specific use case. I suggest someone better at this stuff than me should eventually attempt to implement a more comprehensive mimicry. https://github.com/llvm/llvm-project/pull/97792 __

[clang] Adds an arbitrary pseudonym to clang"s windows mangler... (PR #97792)

2024-07-06 Thread via cfe-commits
https://github.com/memory-thrasher updated https://github.com/llvm/llvm-project/pull/97792 >From 9f909ffb4714294d62264e541a44137adfcd7cb9 Mon Sep 17 00:00:00 2001 From: Sidney Kelley Date: Thu, 4 Jul 2024 23:03:16 -0700 Subject: [PATCH] Adds an arbitrary pseudonym to clang"s windows mangler to

[clang] [clang-installapi] ] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-06 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 9e9404387d3b787305dc8bf21b0e20c477b6ff39 dd36ef6dd52f57d175fd60534172f0e28e11ef48 --

[clang] [clang-installapi] ] Fix potential null pointer dereference in file enumeration (PR #97900)

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

[clang] [[clang-installapi] ] Fix potential null pointer dereference in file enumeration (PR #97900)

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

[clang] [InstallAPI] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes This patch addresses a static analyser concern about a potential null pointer dereference in the clang::installapi::enumerateFiles function. The recursive_directory_iterator could become invalid (i.e., i.State set

[clang] [InstallAPI] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/97900 This patch addresses a static analyser concern about a potential null pointer dereference in the clang::installapi::enumerateFiles function. The recursive_directory_iterator could become invalid (i.e., i.State

[clang] Adds an arbitrary pseudonym to clang"s windows mangler... (PR #97792)

2024-07-06 Thread via cfe-commits
memory-thrasher wrote: > Godbolt for reference: https://godbolt.org/z/b9v8KhPET Huh. Must be my vstools install on this windows laptop is out of date or broken in some other way. I could copy the scheme in that use case into my PR for at least a non-zero chance that it would match the msvc man

[clang] [Clang] [C23] Implement N2653: u8 strings are char8_t[] (PR #97208)

2024-07-06 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/97208 >From ef0072d1fc9b14f7ee657fa95f44a686b78b525a Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 30 Jun 2024 12:07:54 +0100 Subject: [PATCH 1/6] [Clang] [C23] Implement N2653: u8 strings are char8_t[] ---

[clang] e55585f - [Clang] Fix typo in cxx_status.html

2024-07-06 Thread via cfe-commits
Author: cor3ntin Date: 2024-07-06T16:18:20+02:00 New Revision: e55585fd7bddf5bb3824a53cbe2971206d3c20c6 URL: https://github.com/llvm/llvm-project/commit/e55585fd7bddf5bb3824a53cbe2971206d3c20c6 DIFF: https://github.com/llvm/llvm-project/commit/e55585fd7bddf5bb3824a53cbe2971206d3c20c6.diff LOG:

[clang] [Clang] fix cast failures by adjusting the resolution of record declaration contexts to handle semantic and lexical distinctions (PR #96228)

2024-07-06 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/96228 >From 9e2730da07df0ee5102912490a687ba40bf06def Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 24 Jun 2024 18:55:51 +0300 Subject: [PATCH] [Clang] fix cast failures by adjusting the resolution of record

[clang] [Clang] prevent checking destructor reference with an invalid initializer (PR #97860)

2024-07-06 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/97860 >From cb3c677c9eb10998ed7357cdde2722f3b3c1c847 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 6 Jul 2024 00:24:06 +0300 Subject: [PATCH] [Clang] prevent checking destructor reference with an invalid in

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

2024-07-06 Thread via cfe-commits
cor3ntin wrote: > Thank you work on this! I really like this feature. Will this PR also provide > support for the new constant interpreter? The new constant interpreter seems > to already support some unknown constexpr features (FYI > https://godbolt.org/z/xTYhGEfxT). It has the concept of `Du

[clang] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-07-06 Thread Pierre d'Herbemont via cfe-commits
pdherbemont wrote: > LGTM. Let me know if you need me to merge this change. Yes, please! https://github.com/llvm/llvm-project/pull/95455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang][Sema] Improve `Sema::CheckCXXDefaultArguments` (PR #97338)

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

[clang] [Clang] [C23] Implement N2653: u8 strings are char8_t[] (PR #97208)

2024-07-06 Thread via cfe-commits
@@ -1165,6 +1165,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI, DefineType("__WCHAR_TYPE__", TI.getWCharType(), Builder); DefineType("__WINT_TYPE__", TI.getWIntType(), Builder); DefineTypeSizeAndWidth("__SIG_ATOMIC", TI.getSigAtomicType(), TI, Builder)

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-07-06 Thread via cfe-commits
@@ -2068,7 +2068,8 @@ bool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { } // If we have a digit separator, continue. - if (C == '\'' && (LangOpts.CPlusPlus14 || LangOpts.C23)) { + if (C == '\'' && + (LangOpts.CPlusPlus14 || LangOpts.C23 || Parsing

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

2024-07-06 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM, thanks! I think your fixme can be resolved in a follow up PR https://github.com/llvm/llvm-project/pull/97166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [Clang] Simplify release notes and remove irrelevant comment (PR #96407)

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

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

2024-07-06 Thread via cfe-commits
@@ -60,3 +60,26 @@ template C1>> auto t3() { template C1>> auto t3(); static_assert(is_same()), X>>>); #endif + +namespace GH95735 { + +int g(int fn) { + return [f = fn](auto tpl) noexcept(noexcept(f)) { return f; }(0); +} + +int foo(auto... fn) { + // FIXME: This one hits th

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread via cfe-commits
@@ -2379,23 +2379,32 @@ Sema::LambdaScopeForCallOperatorInstantiationRAII:: SemaRef.RebuildLambdaScopeInfo(cast(FD)); - FunctionDecl *Pattern = getPatternFunctionDecl(FD); - if (Pattern) { -SemaRef.addInstantiatedCapturesToScope(FD, Pattern, Scope, MLTAL); + Function

[clang] [Clang] Simplify release notes and remove irrelevant comment (PR #96407)

2024-07-06 Thread Gábor Spaits via cfe-commits
https://github.com/spaits closed https://github.com/llvm/llvm-project/pull/96407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] de88b2c - [Clang] Simplify release notes and remove irrelevant comment (#96407)

2024-07-06 Thread via cfe-commits
Author: Gábor Spaits Date: 2024-07-06T15:22:51+02:00 New Revision: de88b2cb16af4bba659d0bb2ddf10bda681ec84d URL: https://github.com/llvm/llvm-project/commit/de88b2cb16af4bba659d0bb2ddf10bda681ec84d DIFF: https://github.com/llvm/llvm-project/commit/de88b2cb16af4bba659d0bb2ddf10bda681ec84d.diff

[clang] [Sema] Fix crash in Sema::FindInstantiatedDecl (PR #96509)

2024-07-06 Thread via cfe-commits
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?= Message-ID: In-Reply-To: cor3ntin wrote: Thanks for the fix; I think this makes sense. Can you provide a release note? https://github.com/llvm/llvm-project/pull/96509 ___ cfe-commits mailing list cfe-co

[clang] [Clang] Simplify release notes and remove irrelevant comment (PR #96407)

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

[clang] [clang] CTAD: Generate deduction guides for alias templates from non-template explicit deduction guides (PR #96686)

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

[clang] [clang] CTAD: Generate deduction guides for alias templates from non-template explicit deduction guides (PR #96686)

2024-07-06 Thread Younan Zhang via cfe-commits
@@ -3216,6 +3226,44 @@ void DeclareImplicitDeductionGuidesForTypeAlias( Guides.suppressDiagnostics(); for (auto *G : Guides) { +if (auto *DG = dyn_cast(G)) { + // The deduction guide is a non-template function decl, we just clone it. + auto *FunctionType = +

[clang] Reapply "[Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads" (#97002) (PR #97894)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikolas Klauser (philnik777) Changes This reverts commit 567b2c608c307c097315dd5ec4d6a5bbcddf898d. --- Full diff: https://github.com/llvm/llvm-project/pull/97894.diff 5 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+4-1) -

[clang] [clang] CTAD: Generate deduction guides for alias templates from non-template explicit deduction guides (PR #96686)

2024-07-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. One nit, otherwise LGTM. Regarding the issue of attaching the constraint to a non-template function, pragmatically, this is just something internal to compiler, and we're still conforming to the standard in terms of the user's codes. So, i

[clang] Reapply "[Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads" (#97002) (PR #97894)

2024-07-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/97894 This reverts commit 567b2c608c307c097315dd5ec4d6a5bbcddf898d. >From 43b1972a867bf9fa16fdf0d93dcbca4deae9fd13 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 29 Jun 2024 21:51:02 +0200 Subject: [PAT

[clang] Enable aarch64-amazon-linux triple (PR #82232)

2024-07-06 Thread Byoungchan Lee via cfe-commits
bc-lee wrote: I'm not the owner of this code, but I just dropped by to say that I don't think this patch will be accepted. A few lines above your changes, there is a comment that says, "Please don't add more elements to *Triples.". @MaskRay is working to reduce the number of target triples like

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

2024-07-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/97806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] be3a8b8 - [clang] Add C++26 diagnostics to compatibility diagnosic groups (#97806)

2024-07-06 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-07-06T15:52:19+04:00 New Revision: be3a8b8d94608746b22cb0cf3fc03af33b7d8648 URL: https://github.com/llvm/llvm-project/commit/be3a8b8d94608746b22cb0cf3fc03af33b7d8648 DIFF: https://github.com/llvm/llvm-project/commit/be3a8b8d94608746b22cb0cf3fc03af33b7d8648.

  1   2   >