[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-10 Thread via cfe-commits
XDeme wrote: I have updated the comment a little, because there is some case we can't handle: ```cpp template struct Goo F() {} ``` we can't distinguish if this is a class or function. We could check if F() is macro by checking if it is all uppercase, to identify a macro, but I am not sure if th

[llvm] [clang] New calling convention preserve_none (PR #76868)

2024-01-10 Thread via cfe-commits
@@ -2868,6 +2868,11 @@ def M68kRTD: DeclOrTypeAttr { let Documentation = [M68kRTDDocs]; } +def PreserveNone : DeclOrTypeAttr { + let Spellings = [Clang<"preserve_none">]; weiguozhi wrote: I tried to add ``` let Subjects = SubjectList<[Function]>; ``` But

[clang] [Driver, sanitizer] Remove RequiresPIE and msan's RequiresPIE setting (PR #77689)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes This variable causes clang to default to -fPIE when no PIC/PIC option is specified. msan used to require PIE because many `kMemoryLayout` made the low address (used by ET_EXEC executables) invalid. Current ms

[clang] [Driver, sanitizer] Remove RequiresPIE and msan's RequiresPIE setting (PR #77689)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Fangrui Song (MaskRay) Changes This variable causes clang to default to -fPIE when no PIC/PIC option is specified. msan used to require PIE because many `kMemoryLayout` made the low address (used by ET_EXEC executables) invalid. Cur

[clang] e51fe95 - [clang][NFC] Improve comments in C++ DR test suite (#77670)

2024-01-10 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-01-11T02:12:23+04:00 New Revision: e51fe958a226888f57ad3646034e6060b830f01a URL: https://github.com/llvm/llvm-project/commit/e51fe958a226888f57ad3646034e6060b830f01a DIFF: https://github.com/llvm/llvm-project/commit/e51fe958a226888f57ad3646034e6060b830f01a.

[clang] [clang][parse] Fix UAF in MaybeDestroyTemplates (PR #77698)

2024-01-10 Thread via cfe-commits
https://github.com/DavidKorczynski created https://github.com/llvm/llvm-project/pull/77698 There are cases where `Tok.is(tok::eof)` is true and `PP.mightHavePendingAnnotationTokens()` is also true, and in these cases a UAF may happen on the destroyed template IDs. Fixes: https://bugs.chromium

[clang] [clang][parse] Fix UAF in MaybeDestroyTemplates (PR #77698)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (DavidKorczynski) Changes There are cases where `Tok.is(tok::eof)` is true and `PP.mightHavePendingAnnotationTokens()` is also true, and in these cases a UAF may happen on the destroyed template IDs. Fixes: https://bugs.chromium.org

[clang] [clang][parse] Fix UAF in MaybeDestroyTemplates (PR #77698)

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

[clang] [clang-format]: Fix formatting of if statements with BlockIndent (PR #77699)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Gedare Bloom (gedare) Changes A bug with BlockIndent prevents line breaks within if (and else if) clauses. While fixing this bug, it appears that AlignAfterOpenBracket is not designed to work with loop and if statements, but Always

[clang] [Clang][Sema] Fix NULL dereferences for invalid references (PR #77703)

2024-01-10 Thread via cfe-commits
https://github.com/DavidKorczynski created https://github.com/llvm/llvm-project/pull/77703 OSS-Fuzz has reported for a bit of time (since early 2020) a couple of NULL dereferences due to the Info reference becoming a reference to a NULL pointer. Am not entirely sure if this is the desired fix

[clang] [Clang][Sema] Fix NULL dereferences for invalid references (PR #77703)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (DavidKorczynski) Changes OSS-Fuzz has reported for a bit of time (since early 2020) a couple of NULL dereferences due to the Info reference becoming a reference to a NULL pointer. Am not entirely sure if this is the desired fix sinc

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Emilia Kond (rymiel) Changes clang-format performs a heuristic to see if a right parenthesis is the parenthesis of a cast expression. This check never looked ahead to see if the next token is an ampamp && token. This resulted in th

[clang] [Clang][Docs] Fix #40293 Add help text to coverage flag (PR #77705)

2024-01-10 Thread via cfe-commits
https://github.com/widberg created https://github.com/llvm/llvm-project/pull/77705 As raised in https://github.com/llvm/llvm-project/issues/40293 `--coverage` does not have help text so it does not show up in `--help`. If you have suggestions to improve the help text I am more than happy to in

[clang] [Clang][Docs] Fix #40293 Add help text to coverage flag (PR #77705)

2024-01-10 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 i

[clang] [Clang][Docs] Fix #40293 Add help text to coverage flag (PR #77705)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: widberg (widberg) Changes As raised in https://github.com/llvm/llvm-project/issues/40293 `--coverage` does not have help text so it does not show up in `--help`. If you have suggestions to improve the help text I am more than happy to int

[clang-tools-extra] [clang] [llvm] [mlir] [emacs] Fix Emacs library formatting (PR #76110)

2024-01-10 Thread via cfe-commits
darkfeline wrote: I will ask around internally and let you know after ~2 weeks. https://github.com/llvm/llvm-project/pull/76110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-binary-utilities Author: Michael Spencer (Bigcheese) Changes A previous commit (82f75ed) made clang ignore .gch files that were not Clang AST files. This broke `-gmodules`, which embeds the Clang AST into an object file

[clang] 66d022f - [clang][analyzer] Fix incorrect range of 'ftell' in the StdLibraryFunctionsChecker (#77576)

2024-01-10 Thread via cfe-commits
Author: Ben Shi Date: 2024-01-11T09:10:34+08:00 New Revision: 66d022f326779c8abe80b272751fab1a1099 URL: https://github.com/llvm/llvm-project/commit/66d022f326779c8abe80b272751fab1a1099 DIFF: https://github.com/llvm/llvm-project/commit/66d022f326779c8abe80b272751fab1a1099.diff LOG:

[clang] [clang-format] Don't confuse initializer equal signs in for loops (PR #77712)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Emilia Kond (rymiel) Changes clang-format has logic to align declarations of multiple variables of the same type, aligning them at the equals sign. This logic is applied in for loops as well. However, this alignment logic also erro

[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

2024-01-10 Thread via cfe-commits
dyung wrote: @bwendling the test you added `CodeGen/attr-counted-by.c` appears to be failing on quite a few bots, can you take a look? Some failing bots: - https://lab.llvm.org/buildbot/#/builders/164/builds/48660 - https://lab.llvm.org/buildbot/#/builders/188/builds/40261 - https://lab.llvm.or

[libunwind] [openmp] [lld] [clang] [mlir] [clang-tools-extra] [flang] [compiler-rt] [lldb] [llvm] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-10 Thread via cfe-commits
https://github.com/HaohaiWen updated https://github.com/llvm/llvm-project/pull/77608 >From 80a650763278061630e6ff5635bbc3a2dacc093e Mon Sep 17 00:00:00 2001 From: Haohai Wen Date: Wed, 10 Jan 2024 16:09:00 +0800 Subject: [PATCH 1/4] [BranchFolding][SEH] Add test to track SEH CFG optimization

[libunwind] [openmp] [lld] [clang] [mlir] [clang-tools-extra] [flang] [compiler-rt] [lldb] [llvm] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

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

[libunwind] [libunwind] fix dynamic .eh_frame registration (PR #77185)

2024-01-10 Thread via cfe-commits
SihangZhu wrote: @lhames Could you check again, I have fixed the implementation as you decribed https://github.com/llvm/llvm-project/pull/77185 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[openmp] [lld] [lldb] [clang-tools-extra] [compiler-rt] [libunwind] [llvm] [flang] [mlir] [clang] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-10 Thread via cfe-commits
@@ -1624,6 +1632,15 @@ bool BranchFolder::OptimizeBlock(MachineBasicBlock *MBB) { } else { DidChange = true; PMBB->ReplaceUsesOfBlockWith(MBB, CurTBB); + // Add rest successors of MBB to successors of CurTBB. Those +

[flang] [clang] [clang-tools-extra] [lldb] [libunwind] [openmp] [llvm] [lld] [mlir] [compiler-rt] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-10 Thread via cfe-commits
@@ -1363,6 +1363,14 @@ bool BranchFolder::OptimizeBlock(MachineBasicBlock *MBB) { MachineBasicBlock *Pred = *(MBB->pred_end()-1); Pred->ReplaceUsesOfBlockWith(MBB, &*FallThrough); } + // Add rest successors of MBB to successors of FallThrough. Those

[clang] [clang][ExtractAPI] improve template argument name deduction (PR #77716)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erick Velez (evelez7) Changes The names of template arguments in partial specializations or parameters used as types might be mangled according to index and depth. Instead of looping through parameter lists to find matches like we do now,

[compiler-rt] [libc] [lld] [flang] [mlir] [clang-tools-extra] [lldb] [llvm] [libcxx] [clang] Don't emit relax relocs like R_X86_64_REX_GOTPCRELX on X86 target for OPENMP internal vars. (PR #75564)

2024-01-10 Thread via cfe-commits
https://github.com/UmeshKalappa0 updated https://github.com/llvm/llvm-project/pull/75564 >From 4125e4a709c594562fa6c52f045ba7442e3cb523 Mon Sep 17 00:00:00 2001 From: Umesh Kalappa Date: Fri, 15 Dec 2023 11:52:52 +0530 Subject: [PATCH 1/4] Problem :For Kernel Modules ,emitting the relocs like

[clang] 5a66c8d - [Clang][doc] Add blank line before lists (#77573)

2024-01-10 Thread via cfe-commits
Author: Wang Pengcheng Date: 2024-01-11T11:03:58+08:00 New Revision: 5a66c8ddc393dabbeba6c488bb802ebd9d43dd7f URL: https://github.com/llvm/llvm-project/commit/5a66c8ddc393dabbeba6c488bb802ebd9d43dd7f DIFF: https://github.com/llvm/llvm-project/commit/5a66c8ddc393dabbeba6c488bb802ebd9d43dd7f.diff

[clang] cc77e33 - [clang-format] Don't apply severe penalty if no possible column formats (#76675)

2024-01-10 Thread via cfe-commits
Author: James Grant Date: 2024-01-10T19:32:14-08:00 New Revision: cc77e33271371e6ea29569ba06db9cfd1aac022a URL: https://github.com/llvm/llvm-project/commit/cc77e33271371e6ea29569ba06db9cfd1aac022a DIFF: https://github.com/llvm/llvm-project/commit/cc77e33271371e6ea29569ba06db9cfd1aac022a.diff L

[clang] b2c0c6f - [clang-format]: Split alignment of declarations around assignment (#69340)

2024-01-10 Thread via cfe-commits
Author: Gedare Bloom Date: 2024-01-10T19:35:03-08:00 New Revision: b2c0c6f3f2741415d5257e16ca8d4083abe1b487 URL: https://github.com/llvm/llvm-project/commit/b2c0c6f3f2741415d5257e16ca8d4083abe1b487 DIFF: https://github.com/llvm/llvm-project/commit/b2c0c6f3f2741415d5257e16ca8d4083abe1b487.diff

[clang] 093e6bd - [clang-format] Fix crash involving array designators (#77045)

2024-01-10 Thread via cfe-commits
Author: XDeme Date: 2024-01-10T19:46:11-08:00 New Revision: 093e6bdd4bec8ce9b3baf1e8e0a07aa6549dd5d4 URL: https://github.com/llvm/llvm-project/commit/093e6bdd4bec8ce9b3baf1e8e0a07aa6549dd5d4 DIFF: https://github.com/llvm/llvm-project/commit/093e6bdd4bec8ce9b3baf1e8e0a07aa6549dd5d4.diff LOG: [c

[clang] [clang-format] Handle possible crash `getCells` (PR #77723)

2024-01-10 Thread via cfe-commits
https://github.com/XDeme created https://github.com/llvm/llvm-project/pull/77723 Done as requested in llvm/llvm-project#77045 >From d8293dd1d933ed36e9ab6a73eeadb3cf2eaec8be Mon Sep 17 00:00:00 2001 From: XDeme Date: Thu, 11 Jan 2024 01:06:55 -0300 Subject: [PATCH] [clang-format] Handle possible

[clang] [clang-format] Handle possible crash in `getCells` (PR #77723)

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

[clang] [clang-format] Handle possible crash in `getCells` (PR #77723)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (XDeme) Changes Done as requested in llvm/llvm-project#77045 --- Full diff: https://github.com/llvm/llvm-project/pull/77723.diff 2 Files Affected: - (modified) clang/lib/Format/WhitespaceManager.cpp (+3-1) - (modified) clan

[clang] [clang-format] Fix crash involving array designators (PR #77045)

2024-01-10 Thread via cfe-commits
XDeme wrote: > > While I was trying to find a minimal reproducer to the bug, I accidentally > > found that this patch fix another crash, and doesn't fix the linked issue. > > Can you open another pull request to > [fix](https://github.com/llvm/llvm-project/pull/77045#discussion_r1442578220) >

[clang] [clang-format] Handle possible crash in `getCells` (PR #77723)

2024-01-10 Thread via cfe-commits
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/77723 >From d8293dd1d933ed36e9ab6a73eeadb3cf2eaec8be Mon Sep 17 00:00:00 2001 From: XDeme Date: Thu, 11 Jan 2024 01:06:55 -0300 Subject: [PATCH 1/2] [clang-format] Handle possible crash `getCells` Done as requested in ll

[clang] [clang-format] Handle possible crash in `getCells` (PR #77723)

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

[clang] [Clang][SemaCXX] improve sema check of clang::musttail attribute (PR #77727)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qizhi Hu (jcsxky) Changes Call function with no-return attribute generate code with unreachable instruction instead of return and if the call statement has `clang::musttail` attribute, it would crash in Verify. Check this condition in

[clang-tools-extra] [llvm] [clang] [PowerPC] Peephole address calculation in TOC memops (PR #76488)

2024-01-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff c9124adfd8291a5f5b1d23295308d8940648c596 e7001e9027b5b09d0856c67942f3437374e031c5 --

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Kishan Parmar (Long5hot) Changes Fixes : https://github.com/llvm/llvm-project/issues/56023 https://godbolt.org/z/1bsW1sKMs newFlag : -fcomplex-ppc-gn

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-01-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 164f85db876e61cf4a3c34493ed11e8f5820f968 f79b66cb6eb624c6e06c447a7f9d6824dc1628d5 --

[llvm] [clang] [X86][WIP] Use vXi1 for `k` constraint in inline asm (PR #77733)

2024-01-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff bd0dc357af453f03770c5d43c66ee5a3584abdca 72fa88d9e2277a8df60cf39d8cc96aad984dc2e9 --

[llvm] [clang] [X86][WIP] Use vXi1 for `k` constraint in inline asm (PR #77733)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Phoebe Wang (phoebewang) Changes Fixes #77172 --- Full diff: https://github.com/llvm/llvm-project/pull/77733.diff 5 Files Affected: - (modified) clang/lib/CodeGen/CGStmt.cpp (+2-2) - (modified) clang/lib/CodeGen/Targets/X86.cpp (

[compiler-rt] [lldb] [clang-tools-extra] [llvm] [clang] [libcxx] [lld] [flang] [libunwind] [Sema] Use lexical DC for friend functions when getting constraint instantiation args (PR #77552)

2024-01-10 Thread via cfe-commits
https://github.com/antangelo updated https://github.com/llvm/llvm-project/pull/77552 >From f9e35231207090afcda91d3cd3551d7d1639598b Mon Sep 17 00:00:00 2001 From: Antonio Abbatangelo Date: Tue, 9 Jan 2024 20:20:30 -0500 Subject: [PATCH] [Sema] Use lexical DC for friend functions when getting c

[compiler-rt] [lldb] [clang-tools-extra] [llvm] [clang] [libcxx] [lld] [flang] [libunwind] [Sema] Use lexical DC for friend functions when getting constraint instantiation args (PR #77552)

2024-01-10 Thread via cfe-commits
antangelo wrote: Thank you for the review! I have commit access so I'll be able to merge once the CI runs pass after fixing conflicts. https://github.com/llvm/llvm-project/pull/77552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] e3993e0 - [clang][Interp] Implement __builtin_addressof (#77303)

2024-01-11 Thread via cfe-commits
Author: Timm Baeder Date: 2024-01-11T09:02:24+01:00 New Revision: e3993e044ec5925e59c131f798f823a9f16f0433 URL: https://github.com/llvm/llvm-project/commit/e3993e044ec5925e59c131f798f823a9f16f0433 DIFF: https://github.com/llvm/llvm-project/commit/e3993e044ec5925e59c131f798f823a9f16f0433.diff L

[clang] 79889fe - [RISCV] Deduplicate version struct in RISCVISAInfo. NFC (#77645)

2024-01-11 Thread via cfe-commits
Author: Luke Lau Date: 2024-01-11T15:07:24+07:00 New Revision: 79889fedc57707e99740abc1f48e6c5601d5a3f3 URL: https://github.com/llvm/llvm-project/commit/79889fedc57707e99740abc1f48e6c5601d5a3f3 DIFF: https://github.com/llvm/llvm-project/commit/79889fedc57707e99740abc1f48e6c5601d5a3f3.diff LOG:

[clang-tools-extra] 9ef2ac3 - [clangd] Handle lambda scopes inside Node::getDeclContext() (#76329)

2024-01-11 Thread via cfe-commits
Author: Younan Zhang Date: 2024-01-11T16:59:18+08:00 New Revision: 9ef2ac3ad1bd5aa9e589f63047e8abeac11ad1b2 URL: https://github.com/llvm/llvm-project/commit/9ef2ac3ad1bd5aa9e589f63047e8abeac11ad1b2 DIFF: https://github.com/llvm/llvm-project/commit/9ef2ac3ad1bd5aa9e589f63047e8abeac11ad1b2.diff

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-11 Thread via cfe-commits
zmodem wrote: Thanks for looking into this. I wasn't aware of `-gmodules` relying on "gch probing" when I wrote the previous patch. It seems unfortunate to make `maybeHasClangPchSignature` so broad as to return true for any file format that we recognize. Would it be possible to at least tight

[clang-tools-extra] [llvm] [clang] [clang] Add test for CWG472 (PR #67948)

2024-01-11 Thread via cfe-commits
cor3ntin wrote: After additional archeology, I found the following minutes from Portland , 2012 > Core issue 472: Casting across protected inheritance > _ Would the example work if P2 derived privately from N2? > _ ... Yes.. Hm, that was a good point. > redrafting. Given that, I'd rather we do

[clang] 4b0314d - [clang][ASTImporter] Improve import of friend class templates. (#74627)

2024-01-11 Thread via cfe-commits
Author: Balázs Kéri Date: 2024-01-11T11:18:11+01:00 New Revision: 4b0314d14f888cc1916556574ecaa35cc118ee00 URL: https://github.com/llvm/llvm-project/commit/4b0314d14f888cc1916556574ecaa35cc118ee00 DIFF: https://github.com/llvm/llvm-project/commit/4b0314d14f888cc1916556574ecaa35cc118ee00.diff L

[clang-tools-extra] [lldb] [clang] [llvm] [flang] [compiler-rt] [libunwind] [openmp] [mlir] [lld] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-11 Thread via cfe-commits
@@ -1363,6 +1363,14 @@ bool BranchFolder::OptimizeBlock(MachineBasicBlock *MBB) { MachineBasicBlock *Pred = *(MBB->pred_end()-1); Pred->ReplaceUsesOfBlockWith(MBB, &*FallThrough); } + // Add rest successors of MBB to successors of FallThrough. Those

[compiler-rt] [mlir] [libunwind] [llvm] [flang] [lldb] [clang-tools-extra] [clang] [lld] [openmp] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-11 Thread via cfe-commits
@@ -1624,6 +1632,15 @@ bool BranchFolder::OptimizeBlock(MachineBasicBlock *MBB) { } else { DidChange = true; PMBB->ReplaceUsesOfBlockWith(MBB, CurTBB); + // Add rest successors of MBB to successors of CurTBB. Those +

[clang] [clang-tools-extra] [lldb] [Clang] [c++20] P1907R1: Support for generalized non-type template ar… (PR #77428)

2024-01-11 Thread via cfe-commits
cor3ntin wrote: @bolshakov-a we are going to branch LLVM 23 in about 10 days. If you can update this by early next week, we will try to finish the review so that it can land in 18. https://github.com/llvm/llvm-project/pull/77428 ___ cfe-commits maili

[clang] [clang][dataflow] Process terminator condition within `transferCFGBlock()`. (PR #77750)

2024-01-11 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/77750 In particular, it's important that we create the "fallback" atomic at this point (which we produce if the transfer function didn't produce a value for the expression) so that it is placed in the correct envir

[clang] [clang][dataflow] Process terminator condition within `transferCFGBlock()`. (PR #77750)

2024-01-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes In particular, it's important that we create the "fallback" atomic at this point (which we produce if the transfer function didn't produce a value for the expression) so that it is placed in the correct environme

[clang] bd2a6ef - [clang]not lookup name containing a dependent type (#77587)

2024-01-11 Thread via cfe-commits
Author: Congcong Cai Date: 2024-01-11T18:43:36+08:00 New Revision: bd2a6efb305bfc2a4d9b368388da3d76d1b98b34 URL: https://github.com/llvm/llvm-project/commit/bd2a6efb305bfc2a4d9b368388da3d76d1b98b34 DIFF: https://github.com/llvm/llvm-project/commit/bd2a6efb305bfc2a4d9b368388da3d76d1b98b34.diff

[clang] [clang][dataflow] Process terminator condition within `transferCFGBlock()`. (PR #77750)

2024-01-11 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 cc21aa1922b3d0c4fde52046d8d16d1048f8064e 732a0b343b24eee4bb5f17e4c2edbe7268aa8955 --

[clang] [clang][dataflow] Process terminator condition within `transferCFGBlock()`. (PR #77750)

2024-01-11 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/77750 >From 74ad27d843947e17d1cce38bee5a1bff2d9045f7 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Thu, 11 Jan 2024 10:47:41 + Subject: [PATCH] [clang][dataflow] Process terminator condition within `tra

[clang] 19081f4 - [clang][analyzer] Support 'tello' and 'fseeko' in the StreamChecker (#77580)

2024-01-11 Thread via cfe-commits
Author: Ben Shi Date: 2024-01-11T18:48:31+08:00 New Revision: 19081f4a504053f551eb88bfa8a09a075c826e64 URL: https://github.com/llvm/llvm-project/commit/19081f4a504053f551eb88bfa8a09a075c826e64 DIFF: https://github.com/llvm/llvm-project/commit/19081f4a504053f551eb88bfa8a09a075c826e64.diff LOG:

[clang] [clang-tools-extra] [llvm] [ClangFormat] Fix formatting bugs. (PR #76245)

2024-01-11 Thread via cfe-commits
https://github.com/r4nt updated https://github.com/llvm/llvm-project/pull/76245 >From 52cb11f0279dbd9f65f15e81f44869cfac00d544 Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Thu, 2 Mar 2023 14:00:35 + Subject: [PATCH 1/3] [ClangFormat] Fix formatting bugs. 1. There are multiple calls to

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes Per https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2448r2.html function/constructor/destructor can be marked `constexpr` even though it never produces a constant expression. Non-literal

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 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 dc974573a8a2364f24ce69c75ad80ab30753fe9a 699f47bba02012523e1862f9b15ce9de1d7511b5 --

[clang] [clang-format] Handle possible crash in `getCells` (PR #77723)

2024-01-11 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/77723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't confuse initializer equal signs in for loops (PR #77712)

2024-01-11 Thread via cfe-commits
https://github.com/mydeveloperday edited https://github.com/llvm/llvm-project/pull/77712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't confuse initializer equal signs in for loops (PR #77712)

2024-01-11 Thread via cfe-commits
@@ -703,7 +703,9 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, if (Current.is(tok::equal) && (State.Line->First->is(tok::kw_for) || Current.NestingLevel == 0) && - CurrentState.VariablePos == 0) { + CurrentState.VariableP

[clang] [clang-format] Don't confuse initializer equal signs in for loops (PR #77712)

2024-01-11 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. For me I'm happy if we keep it to this use case only. https://github.com/llvm/llvm-project/pull/77712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-11 Thread via cfe-commits
https://github.com/mydeveloperday commented: LGTM https://github.com/llvm/llvm-project/pull/77704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-11 Thread via cfe-commits
https://github.com/mydeveloperday edited https://github.com/llvm/llvm-project/pull/77704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-11 Thread via cfe-commits
@@ -1066,6 +1066,11 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { EXPECT_EQ(Tokens.size(), 17u) << Tokens; EXPECT_TOKEN(Tokens[4], tok::amp, TT_PointerOrReference); EXPECT_TOKEN(Tokens[5], tok::kw_requires, TT_RequiresClause); + + Tokens = annot

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

2024-01-11 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/77704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add SpaceInParensOption for __attribute__ keyword (PR #77522)

2024-01-11 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/77522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b7770be - [ClangFormat] Fix formatting bugs. (#76245)

2024-01-11 Thread via cfe-commits
Author: r4nt Date: 2024-01-11T13:28:45+01:00 New Revision: b7770befee37feca3d732d6daf9513c62f75c5f0 URL: https://github.com/llvm/llvm-project/commit/b7770befee37feca3d732d6daf9513c62f75c5f0 DIFF: https://github.com/llvm/llvm-project/commit/b7770befee37feca3d732d6daf9513c62f75c5f0.diff LOG: [Cl

[llvm] [clang-tools-extra] [clang] [ClangFormat] Fix formatting bugs. (PR #76245)

2024-01-11 Thread via cfe-commits
https://github.com/r4nt closed https://github.com/llvm/llvm-project/pull/76245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 40d5c2b - [clang][AArch64] Add a -mbranch-protection option to enable GCS (#75486)

2024-01-11 Thread via cfe-commits
Author: John Brawn Date: 2024-01-11T12:53:23Z New Revision: 40d5c2bcd41a534e6bab98fedf1a930d9bd165e7 URL: https://github.com/llvm/llvm-project/commit/40d5c2bcd41a534e6bab98fedf1a930d9bd165e7 DIFF: https://github.com/llvm/llvm-project/commit/40d5c2bcd41a534e6bab98fedf1a930d9bd165e7.diff LOG: [c

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-11 Thread via cfe-commits
zmodem wrote: > > What does the code that reads these files look like, could we leverage that > > somehow? > > You can call `clang::ObjectFilePCHContainerReader::ExtractPCH()` and then > check the magic. This lives in the CodeGen library which I don't think the > driver currently (or should)

[clang-tools-extra] [clangd] Fix qualifier not being dropped for using declaration referring to scoped enum (PR #77766)

2024-01-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Tom Praschan (tom-anders) Changes Relevant issue: https://github.com/clangd/clangd/issues/1361 The problem here was that writing something like `using ns::ScopedEnum` does not cause Sema to visit this scope, to it won't be added into `C

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-libcxx Author: Mital Ashok (MitalAshok) Changes Closes #77638, #24186 Rebased from ;, see there for more information. Implements wording change in [CWG2137](https://wg21.link/CWG2137) in the

[clang] 9edcf7a - [flang][driver] Add support for -isysroot in the frontend (#77365)

2024-01-11 Thread via cfe-commits
Author: Leandro Lupori Date: 2024-01-11T10:37:58-03:00 New Revision: 9edcf7a28eee1e3b2d22bd3aed9e405e17beacce URL: https://github.com/llvm/llvm-project/commit/9edcf7a28eee1e3b2d22bd3aed9e405e17beacce DIFF: https://github.com/llvm/llvm-project/commit/9edcf7a28eee1e3b2d22bd3aed9e405e17beacce.diff

[clang] f1c88d7 - [flang] Fix fveclib on Darwin (#77605)

2024-01-11 Thread via cfe-commits
Author: Leandro Lupori Date: 2024-01-11T10:39:53-03:00 New Revision: f1c88d7c6f7698e4c51cb34754bb3177db9dc704 URL: https://github.com/llvm/llvm-project/commit/f1c88d7c6f7698e4c51cb34754bb3177db9dc704 DIFF: https://github.com/llvm/llvm-project/commit/f1c88d7c6f7698e4c51cb34754bb3177db9dc704.diff

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-11 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. I think all the comments made on phab have been applied, and I do believe this implements the DRs (or their intent) Please give a few days for other folks to look at it before merging. @zygoloid in particular as he opened CW2311 https://g

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-11 Thread via cfe-commits
cor3ntin wrote: @mordante ping for visibility (you approved that on Phab already) https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang-tools-extra] [mlir] [compiler-rt] [llvm] [libunwind] [flang] [lld] [clang] [openmp] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-11 Thread via cfe-commits
https://github.com/HaohaiWen closed https://github.com/llvm/llvm-project/pull/77608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AMDGPU] Add global_load_tr for GFX12 (PR #77772)

2024-01-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-clang-codegen Author: Piotr Sobczak (piotrAMD) Changes Support new amdgcn_global_load_tr instructions for load with transpose. * MC layer support for GLOBAL_LOAD_TR_B64/GLOBAL_LOAD_TR_B128 * Intrinsics int_amdgcn_global_load

[clang-tools-extra] [clang] [lldb] [compiler-rt] [lld] [flang] [openmp] [mlir] [llvm] [libunwind] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-11 Thread via cfe-commits
@@ -0,0 +1,80 @@ +; RUN: llc -mtriple=x86_64-pc-windows-msvc %s dyung wrote: This RUN line seems to leave a .s file around that causes failures in subsequent runs: https://lab.llvm.org/buildbot/#/builders/139/builds/56922 ``` TEST 'LLVM :: C

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

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

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread via cfe-commits
https://github.com/cor3ntin commented: Overall, I think this looks good. Afaict the whole paper is implemented. https://github.com/llvm/llvm-project/pull/77753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread via cfe-commits
@@ -1722,12 +1722,19 @@ static bool CheckConstexprDestructorSubobjects(Sema &SemaRef, return true; if (Kind == Sema::CheckConstexprKind::Diagnose) { - SemaRef.Diag(DD->getLocation(), diag::err_constexpr_dtor_subobject) + SemaRef.Diag(DD->getLocation(), +

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread via cfe-commits
@@ -1767,10 +1780,16 @@ static bool CheckConstexprParameterTypes(Sema &SemaRef, /// true. If not, produce a suitable diagnostic and return false. static bool CheckConstexprReturnType(Sema &SemaRef, const FunctionDecl *FD, Sema::CheckConstexp

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread via cfe-commits
@@ -165,6 +165,8 @@ C++23 Feature Support - Added a separate warning to warn the use of attributes on lambdas as a C++23 extension in previous language versions: ``-Wc++23-lambda-attributes``. +- Implemented `P2448R2: Relaxing some constexpr restrictions

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread via cfe-commits
@@ -1754,11 +1761,17 @@ static bool CheckConstexprParameterTypes(Sema &SemaRef, const ParmVarDecl *PD = FD->getParamDecl(ArgIndex); assert(PD && "null in a parameter list"); SourceLocation ParamLoc = PD->getLocation(); -if (CheckLiteralType(SemaRef, Kind, ParamL

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-11 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 86ef039220de4b7d2e2f1d5e93874ae7a242730e 4c05d54e07d4f650bf5694a3ddc365078b854627 --

[openmp] [clang-tools-extra] [lldb] [lld] [flang] [mlir] [libunwind] [compiler-rt] [llvm] [clang] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-11 Thread via cfe-commits
@@ -0,0 +1,80 @@ +; RUN: llc -mtriple=x86_64-pc-windows-msvc %s dyung wrote: @HaohaiWen Could you restructure this test so that it doesn't generate the .s file (maybe redirect the output to /dev/null or something similar?) This is causing unresolved test errors

[libcxxabi] [libc] [libcxx] [clang-tools-extra] [lldb] [mlir] [flang] [lld] [libunwind] [compiler-rt] [llvm] [clang] [clang] static operators should evaluate object argument (PR #68485)

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

[mlir] [lldb] [flang] [llvm] [libunwind] [clang-tools-extra] [compiler-rt] [libcxxabi] [lld] [libcxx] [libc] [clang] [clang] static operators should evaluate object argument (PR #68485)

2024-01-11 Thread via cfe-commits
https://github.com/cor3ntin commented: Just a few nits, but I think it looks good https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [mlir] [flang] [compiler-rt] [lldb] [clang] [libunwind] [libcxx] [lld] [libcxxabi] [clang-tools-extra] [libc] [clang] static operators should evaluate object argument (PR #68485)

2024-01-11 Thread via cfe-commits
@@ -5680,8 +5680,13 @@ static ImplicitConversionSequence TryObjectArgumentInitialization( QualType ClassType = S.Context.getTypeDeclType(ActingContext); // [class.dtor]p2: A destructor can be invoked for a const, volatile or // const volatile object. + /

[compiler-rt] [libc] [clang-tools-extra] [llvm] [libunwind] [clang] [libcxxabi] [lld] [lldb] [mlir] [libcxx] [flang] [clang] static operators should evaluate object argument (PR #68485)

2024-01-11 Thread via cfe-commits
@@ -858,10 +858,14 @@ Bug Fixes to C++ Support (`#64086 `_) - Fixed a regression where clang forgets how to substitute into constraints on template-template - parameters. Fixes: + parameters. Fixes: (`#57410

[llvm] [mlir] [flang] [compiler-rt] [lldb] [libunwind] [clang] [openmp] [lld] [clang-tools-extra] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-11 Thread via cfe-commits
@@ -0,0 +1,80 @@ +; RUN: llc -mtriple=x86_64-pc-windows-msvc %s HaohaiWen wrote: Oh, sorry. I fixed it in https://github.com/llvm/llvm-project/pull/77784. It's verifying compiler not crash. https://github.com/llvm/llvm-project/pull/77608 ___

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-11 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/76361 >From e94b67e98830e7646e144d33c6b7360b93709840 Mon Sep 17 00:00:00 2001 From: yronglin Date: Thu, 11 Jan 2024 23:28:32 +0800 Subject: [PATCH] [Clang] Implement P2718R0 "Lifetime extension in range-based for loo

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-11 Thread via cfe-commits
@@ -2288,10 +2288,11 @@ StmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) { ForRangeStmt = Actions.ActOnCXXForRangeStmt( getCurScope(), ForLoc, CoawaitLoc, FirstPart.get(), ForRangeInfo.LoopVar.get(), ForRangeInfo.ColonLoc, CorrectedRan

<    51   52   53   54   55   56   57   58   59   60   >