[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Björn Schäpers via cfe-commits
@@ -1316,6 +1316,8 @@ void WhitespaceManager::alignArrayInitializersRightJustified( auto Offset = std::distance(Cells.begin(), CellIter); for (const auto *Next = CellIter->NextColumnElement; Next; Next = Next->NextColumnElement) { + if (Ro

[clang] [clang][Interp] Implement builtin_expect (PR #69713)

2023-11-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69713 >From e11a956d0389b1c0ed4ed54a908c3498dba2aba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 20 Oct 2023 14:16:22 +0200 Subject: [PATCH] [clang][Interp] Implement builtin_expect --- c

[clang] [clang] Reapply Handle templated operators with reversed arguments (PR #72213)

2023-11-17 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: This PR is not related to [cwg2804](https://wg21.link/cwg2804). We are already aware of the mentioned issue and are tracking it in https://github.com/llvm/llvm-project/issues/70210. This PR is different and it fixes an implementation bug in rewriting template non-member operators

[libcxx] [llvm] [clang-tools-extra] [flang] [lldb] [lld] [clang] [compiler-rt] [libunwind] [AMDGPU] - Add constant folding for s_quadmask (PR #72381)

2023-11-17 Thread Matt Arsenault via cfe-commits
@@ -50,13 +49,10 @@ define i64 @test_quadmask_constant_i64() { ; GFX11-LABEL: test_quadmask_constant_i64: ; GFX11: ; %bb.0: ; %entry ; GFX11-NEXT:s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -; GFX11-NEXT:s_mov_b32 s0, 0x85fe3a92 -; GFX11-NEXT:s_mov_b32 s1, 0x67de4

[clang] [AArch64][SME2] Add FCLAMP, CNTP builtins for SME2 (PR #72487)

2023-11-17 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/72487 >From dc691934814029de64494272697d562ddb86dfee Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Thu, 16 Nov 2023 07:21:17 + Subject: [PATCH 1/4] [AArch64][SME2] Add FCLAMP, CNTP builtins for SME2

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Owen Pan via cfe-commits
@@ -1316,6 +1316,8 @@ void WhitespaceManager::alignArrayInitializersRightJustified( auto Offset = std::distance(Cells.begin(), CellIter); for (const auto *Next = CellIter->NextColumnElement; Next; Next = Next->NextColumnElement) { + if (Ro

[clang] [AMDGPU] Treat printf as builtin for OpenCL (PR #72554)

2023-11-17 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH edited https://github.com/llvm/llvm-project/pull/72554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix emitvaarg when struct is null (PR #72624)

2023-11-17 Thread via cfe-commits
https://github.com/Jolyon0202 created https://github.com/llvm/llvm-project/pull/72624 Fix bug when emit null struct with attribute aligned(16) and ICE of debugbuild. >From f0245b42534f423edaba45c2b3b2dffeb86e3074 Mon Sep 17 00:00:00 2001 From: Jian Yang Date: Wed, 15 Nov 2023 15:44:35 +0800 Su

[clang] [clang] fix emitvaarg when struct is null (PR #72624)

2023-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Jolyon (Jolyon0202) Changes Fix bug when emit null struct with attribute aligned(16) and ICE of debugbuild. --- Full diff: https://github.com/llvm/llvm-project/pull/72624.diff 1 Files Affected: - (modi

[clang-tools-extra] [include-cleaner] Make sure exports of stdlib also works for physical files (PR #72246)

2023-11-17 Thread kadir çetinkaya via cfe-commits
@@ -232,6 +232,17 @@ class PragmaIncludes::RecordPragma : public PPCallbacks, public CommentHandler { void checkForExport(FileID IncludingFile, int HashLine, std::optional IncludedHeader, OptionalFileEntryRef IncludedFile) { +a

[clang-tools-extra] [include-cleaner] Make sure exports of stdlib also works for physical files (PR #72246)

2023-11-17 Thread kadir çetinkaya via cfe-commits
@@ -232,6 +232,17 @@ class PragmaIncludes::RecordPragma : public PPCallbacks, public CommentHandler { void checkForExport(FileID IncludingFile, int HashLine, std::optional IncludedHeader, OptionalFileEntryRef IncludedFile) { +a

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-17 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: Thanks, the change looks good from my side. I will leave the final stamp to @ChuanqiXu9 and @ilya-biryukov. https://github.com/llvm/llvm-project/pull/71945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang-tools-extra] [include-cleaner] Make sure exports of stdlib also works for physical files (PR #72246)

2023-11-17 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/72246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix emitvaarg when struct is null (PR #72624)

2023-11-17 Thread via cfe-commits
Jolyon0202 wrote: demo: ``` #include extern void *memset (void *__s, int __c, size_t __n); typedef __builtin_va_list va_list; struct S94 { struct __attribute__((aligned(16))) { } a; }; struct S94 s94; void check94va(int z, ...) { va_list ap; __builtin_va_start(ap, z); struct S94 arg

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-17 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Please wait for 3~5 days in case @ilya-biryukov has more comments. https://github.com/llvm/llvm-project/pull/71945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [clang] Reapply Handle templated operators with reversed arguments (PR #72213)

2023-11-17 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: I wanted to note down the challenges of landing this and the strategy to move forward. Challenges * Landing this would make old code ambiguous ([example](https://godbolt.org/z/11331KW6e)). This is not unexpected, and it is ambiguous in C++20. * This would break LLVM in C++20

[clang-tools-extra] [include-cleaner] Make sure exports of stdlib also works for physical files (PR #72246)

2023-11-17 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/72246 From 84f320a1c746eddea3171bd984613464a5872cbb Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 14 Nov 2023 13:08:52 +0100 Subject: [PATCH] [include-cleaner] Make sure exports of stdlib also works for p

[clang-tools-extra] fd2d5ad - [include-cleaner] Make sure exports of stdlib also works for physical files (#72246)

2023-11-17 Thread via cfe-commits
Author: kadir çetinkaya Date: 2023-11-17T10:11:21+01:00 New Revision: fd2d5add437b2b324492b1bc29374699fe7b614b URL: https://github.com/llvm/llvm-project/commit/fd2d5add437b2b324492b1bc29374699fe7b614b DIFF: https://github.com/llvm/llvm-project/commit/fd2d5add437b2b324492b1bc29374699fe7b614b.dif

[clang-tools-extra] [include-cleaner] Make sure exports of stdlib also works for physical files (PR #72246)

2023-11-17 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/72246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 76a441a - [MC] Fix compression header size check in ELF writer

2023-11-17 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-11-17T01:13:38-08:00 New Revision: 76a441a6efa5b7e73d96a3d67512493f3873b1cb URL: https://github.com/llvm/llvm-project/commit/76a441a6efa5b7e73d96a3d67512493f3873b1cb DIFF: https://github.com/llvm/llvm-project/commit/76a441a6efa5b7e73d96a3d67512493f3873b1cb.diff

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-17 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 558120. koops added a comment. Moving the declaration and definition of checkFailClauseParameter to include/clang/Basic/OpenMPKinds.h & lib/Basic/OpenMPKinds.cpp respectively. 2 other minor changes suggested by Alexey. CHANGES SINCE LAST ACTION https://revi

[clang] [clang][analyzer] Support `fgetc` in StreamChecker (PR #72627)

2023-11-17 Thread Ben Shi via cfe-commits
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/72627 None >From 87563994d96519bef69cb14c284a9a1273ab343c Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Fri, 17 Nov 2023 17:22:10 +0800 Subject: [PATCH] [clang][analyzer] Support `fgetc` in StreamChecker --- .../St

[clang] [clang][analyzer] Support `fgetc` in StreamChecker (PR #72627)

2023-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ben Shi (benshi001) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/72627.diff 4 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp (+52-18) -

[clang] [clang][analyzer] Support `fgetc` in StreamChecker (PR #72627)

2023-11-17 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/72627 >From d3ce61fecbe922f09ad1228a3305f484e8e1dcfc Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Fri, 17 Nov 2023 17:22:10 +0800 Subject: [PATCH] [clang][analyzer] Support `fgetc` in StreamChecker --- .../StaticAn

[clang-tools-extra] [clang-tidy][NFC][DOC] Add missing HICPP rule id's (PR #72553)

2023-11-17 Thread Björn Svensson via cfe-commits
https://github.com/bjosv updated https://github.com/llvm/llvm-project/pull/72553 From 2644f2a71fb144190f67dfd515746f9d185496c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Svensson?= Date: Thu, 16 Nov 2023 18:36:34 +0100 Subject: [PATCH 1/2] [clang-tidy][NFC][DOC] Add missing HICPP rule

[libcxxabi] [libcxx] [lld] [clang-tools-extra] [lldb] [compiler-rt] [mlir] [libunwind] [clang] [libc] [llvm] [flang] [lldb][test] Add the ability to extract the variable value out of the summary. (PR

2023-11-17 Thread via cfe-commits
https://github.com/santhoshe447 created https://github.com/llvm/llvm-project/pull/72631 When it comes to test infrastructure the test (TestDAP_variables.py: test_scopes_variables_setVariable_evaluate_with_descriptive_summaries) will fail if the variable has a summary along with value. I just

[libcxxabi] [libcxx] [lld] [clang-tools-extra] [lldb] [compiler-rt] [mlir] [libunwind] [clang] [libc] [llvm] [flang] [lldb][test] Add the ability to extract the variable value out of the summary. (PR

2023-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (santhoshe447) Changes When it comes to test infrastructure the test (TestDAP_variables.py: test_scopes_variables_setVariable_evaluate_with_descriptive_summaries) will fail if the variable has a summary along with value. I just tried

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/72520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC][DOC] Add missing HICPP rule id's (PR #72553)

2023-11-17 Thread Congcong Cai via cfe-commits
=?utf-8?q?Bj=C3=B6rn?= Svensson Message-ID: In-Reply-To: https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/72553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[compiler-rt] [lldb] [clang-tools-extra] [llvm] [libc] [libcxx] [clang] [libcxxabi] [libunwind] [lld] [flang] [mlir] [lldb][test] Add the ability to extract the variable value out of the summary. (PR

2023-11-17 Thread via cfe-commits
https://github.com/santhoshe447 edited https://github.com/llvm/llvm-project/pull/72631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Invalidate DecompositionDecl if it has invalid initializer. (PR #72428)

2023-11-17 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/72428 >From ac06843b97cb93d476f0bf8e0474fa270d80631f Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 15 Nov 2023 20:31:12 +0100 Subject: [PATCH 1/2] [clang][AST] Invalidate DecompositionDecl if it has invalid init

[clang] [clang][AST] Invalidate DecompositionDecl if it has invalid initializer. (PR #72428)

2023-11-17 Thread Haojian Wu via cfe-commits
@@ -13540,6 +13540,15 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { CreateRecoveryExpr(Init->getBeginLoc(), Init->getEndLoc(), Args); if (RecoveryExpr.get()) VDecl->setInit(RecoveryExpr.get()); + // In general, f

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/71709 >From 2823d38544d18213b5bf48c67e4eedd52acce850 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 8 Nov 2023 20:30:37 +0300 Subject: [PATCH 1/3] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` This

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/72520 >From efdf321e9447e8b3f1c27ccdf6da842107deb6dd Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 16 Nov 2023 06:36:41 -0800 Subject: [PATCH 1/3] [clang-format] Fix crashes in AlignArrayOfStructures Fixed #55493.

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2023-11-17 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Aaron suggested to me offline that `IsInterestingIdentifier` that I recently changed could be implemented in a simpler way retaining the intent. That's what the latest update about. https://github.com/llvm/llvm-project/pull/71709 ___ c

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Owen Pan via cfe-commits
owenca wrote: We probably should backport it to 17.0.6. What do you all think? @tru https://github.com/llvm/llvm-project/pull/72520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Invalidate DecompositionDecl if it has invalid initializer. (PR #72428)

2023-11-17 Thread Haojian Wu via cfe-commits
hokein wrote: > What differentiates the DecompositionDecl such that we need to mark the decl > invalid when there's an error in the RHS, while for other decls we don't? It > seems inconsistent. DecompositionDecl (aka structure binding) is special here, a legal DecompositionDecl must be declar

[clang] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

2023-11-17 Thread Balazs Benics via cfe-commits
@@ -492,11 +492,13 @@ void check_required_cast() { void check_cast_behavior(OSObject *obj) { OSArray *arr1 = OSDynamicCast(OSArray, obj); - clang_analyzer_eval(arr1 == obj); // expected-warning{{TRUE}} -// expected-note@-1{{TRUE}} -

[clang] [llvm] [WebAssembly] Refactor Wasm Reference Types as TargetExtType (PR #71540)

2023-11-17 Thread Paulo Matos via cfe-commits
https://github.com/pmatos updated https://github.com/llvm/llvm-project/pull/71540 >From 31adeded0d1767e1ce43fbfcba5fe72c4e34121d Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Tue, 7 Nov 2023 08:28:36 +0100 Subject: [PATCH 1/4] [WebAssembly] Refactor Wasm Reference Types as TargetExtType Or

[clang-tools-extra] 7aaa86b - [include-cleaner] Add regression tests for outliving File&Source Manager

2023-11-17 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2023-11-17T11:32:51+01:00 New Revision: 7aaa86b28ddc3deded6e357b27f2bbebb97a3864 URL: https://github.com/llvm/llvm-project/commit/7aaa86b28ddc3deded6e357b27f2bbebb97a3864 DIFF: https://github.com/llvm/llvm-project/commit/7aaa86b28ddc3deded6e357b27f2bbebb97a3864.dif

[clang-tools-extra] [clangd] Add way to remove file from CDB via LSP (PR #72635)

2023-11-17 Thread via cfe-commits
https://github.com/sr-tream created https://github.com/llvm/llvm-project/pull/72635 Currently, impossible to remove irrelevant files from CDB via LSP notification `workspace/didChangeConfiguration`. This PR change clangd behavior to remove file from CDB, when LSP pass empty parameters for them

[clang-tools-extra] [clangd] Add way to remove file from CDB via LSP (PR #72635)

2023-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: SR_team (sr-tream) Changes Currently, impossible to remove irrelevant files from CDB via LSP notification `workspace/didChangeConfiguration`. This PR change clangd behavior to remove file from CDB, when LSP pass empty parameters for them

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Tobias Hieta via cfe-commits
tru wrote: > We probably should backport it to 17.0.6. What do you all think? @tru Yep - seems like a good and small fix to have in 17.x https://github.com/llvm/llvm-project/pull/72520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [clang][AST] Invalidate DecompositionDecl if it has invalid initializer. (PR #72428)

2023-11-17 Thread Henrik G. Olsson via cfe-commits
hnrklssn wrote: > > What differentiates the DecompositionDecl such that we need to mark the > > decl invalid when there's an error in the RHS, while for other decls we > > don't? It seems inconsistent. > > > > DecompositionDecl (aka structure binding) is special here, a legal > Decompositio

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Tobias Hieta via cfe-commits
tru wrote: @owenca I picked da1b1fba5cfd41521a840202d8cf4c3796c5e10b on top of the 17.x branch and my test case was not fixed, it still crashes in the same way as described in #72628 https://github.com/llvm/llvm-project/pull/72520 ___ cfe-commits ma

[clang] [clang][Interp] Handle std::move etc. builtins (PR #70772)

2023-11-17 Thread Henrik G. Olsson via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: hnrklssn wrote: LGTM, but someone else should approve also. https://github.com/llvm/llvm-project/pull/70772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[libunwind] [clang-tools-extra] [clang] [llvm] [lldb] [libcxx] [compiler-rt] [flang] [lld] [AMDGPU] - Add constant folding for s_quadmask (PR #72381)

2023-11-17 Thread Jessica Del via cfe-commits
https://github.com/OutOfCache updated https://github.com/llvm/llvm-project/pull/72381 >From 00d0f99207242befc8022031ccd8faf573cbf014 Mon Sep 17 00:00:00 2001 From: Jessica Del Date: Tue, 14 Nov 2023 22:17:26 +0100 Subject: [PATCH 1/4] [AMDGPU] - Add constant folding for s_quadmask If the input

[llvm] [clang] Fix python escapes (PR #71170)

2023-11-17 Thread Zufu Liu via cfe-commits
zufuliu wrote: Duplicate of #72538. https://github.com/llvm/llvm-project/pull/71170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang] Add code-object-version option (PR #72638)

2023-11-17 Thread Dominik Adamski via cfe-commits
https://github.com/DominikAdamski created https://github.com/llvm/llvm-project/pull/72638 Information about code object version can be configured by the user for AMD GPU target and it needs to be placed in LLVM IR generated by Flang. Information about code object version in MLIR generated by t

[flang] [clang] [Flang] Add code-object-version option (PR #72638)

2023-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-flang-driver Author: Dominik Adamski (DominikAdamski) Changes Information about code object version can be configured by the user for AMD GPU target and it needs to be placed in LLVM IR generated by Flang. Information

[flang] [clang] [Flang] Add code-object-version option (PR #72638)

2023-11-17 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 a67b85ef63c7ec29c2076294e3f7c7f923144a53 eb2710b0f736860dac62cc2ff8907fcefc64a8d6 --

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123235/new/ https://reviews.llvm.org/D123235 ___ cfe-commits mailing list cfe-commits@l

[lld] [libunwind] [libcxx] [compiler-rt] [llvm] [flang] [clang-tools-extra] [lldb] [clang] [AMDGPU] - Add constant folding for s_quadmask (PR #72381)

2023-11-17 Thread Jessica Del via cfe-commits
https://github.com/OutOfCache updated https://github.com/llvm/llvm-project/pull/72381 >From 00d0f99207242befc8022031ccd8faf573cbf014 Mon Sep 17 00:00:00 2001 From: Jessica Del Date: Tue, 14 Nov 2023 22:17:26 +0100 Subject: [PATCH 1/5] [AMDGPU] - Add constant folding for s_quadmask If the input

[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)

2023-11-17 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/72385 >From ddac6dc91c443bf81d4b6cc3f75686ea56801094 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Wed, 15 Nov 2023 01:13:10 -0800 Subject: [PATCH] [clang-tidy] Add new performance-use-starts-ends-with check

[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)

2023-11-17 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Major changes: - Now matching on any class that has a `starts_with`, `startsWith`, or `startswith` function. This is done in order (prioritising functions in subclasses, but this could be changed). Experimenting on making this an option, not sure it's worth it without control

[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)

2023-11-17 Thread Nicolas van Kempen via cfe-commits
@@ -12,4 +12,4 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; typedef __SIZE_TYPE__ size_t; -#endif _STDDEF_H_ +#endif // _STDDEF_H_ nicovank wrote: This was just issuing a warning in some tests. https://github.com/llvm/llvm-project/pull/72385 __

[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)

2023-11-17 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,109 @@ +//===--- UseStartsEndsWithCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] b2d62c9 - [clang] Ensure fixed point conversions work in C++ (#68344)

2023-11-17 Thread via cfe-commits
Author: PiJoules Date: 2023-11-16T13:11:15-08:00 New Revision: b2d62c9a58433e2a2ca8d2c9cd6b0b612dca2e76 URL: https://github.com/llvm/llvm-project/commit/b2d62c9a58433e2a2ca8d2c9cd6b0b612dca2e76 DIFF: https://github.com/llvm/llvm-project/commit/b2d62c9a58433e2a2ca8d2c9cd6b0b612dca2e76.diff LOG:

[clang] ae623d1 - [Driver,Gnu] Simplify -static -static-pie -shared -pie handling and suppress -shared -rdynamic warning

2023-11-17 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-11-16T13:48:04-08:00 New Revision: ae623d16d50c9f12de7ae7ac1aa11c9d6857e081 URL: https://github.com/llvm/llvm-project/commit/ae623d16d50c9f12de7ae7ac1aa11c9d6857e081 DIFF: https://github.com/llvm/llvm-project/commit/ae623d16d50c9f12de7ae7ac1aa11c9d6857e081.diff

[clang] 066c452 - [AArch64] Add support for Cortex-A520, Cortex-A720 and Cortex-X4 CPUs (#72395)

2023-11-17 Thread via cfe-commits
Author: Jonathan Thackray Date: 2023-11-16T22:08:58Z New Revision: 066c4524bc1d91b49048e7f05dc6e045bb3c9eef URL: https://github.com/llvm/llvm-project/commit/066c4524bc1d91b49048e7f05dc6e045bb3c9eef DIFF: https://github.com/llvm/llvm-project/commit/066c4524bc1d91b49048e7f05dc6e045bb3c9eef.diff

[clang] f0ad9ea - [clang-format] Handle lambdas in QualifierAlignment (#72456)

2023-11-17 Thread via cfe-commits
Author: Owen Pan Date: 2023-11-16T15:00:09-08:00 New Revision: f0ad9ea36ad65cec8c5e5d1d59c00192b87f287d URL: https://github.com/llvm/llvm-project/commit/f0ad9ea36ad65cec8c5e5d1d59c00192b87f287d DIFF: https://github.com/llvm/llvm-project/commit/f0ad9ea36ad65cec8c5e5d1d59c00192b87f287d.diff LOG:

[lld] [libunwind] [libcxxabi] [libcxx] [compiler-rt] [llvm] [flang] [mlir] [clang-tools-extra] [lldb] [clang] [Passes] Disable code sinking in InstCombine early on. (PR #72567)

2023-11-17 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/72567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)

2023-11-17 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/72385 >From 7a9703f27897af0846d272ca7393bc72eff11e55 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Wed, 15 Nov 2023 01:13:10 -0800 Subject: [PATCH] [clang-tidy] Add new performance-use-starts-ends-with check

[flang] [clang] [Flang] Add code-object-version option (PR #72638)

2023-11-17 Thread Dominik Adamski via cfe-commits
https://github.com/DominikAdamski updated https://github.com/llvm/llvm-project/pull/72638 >From e5d339c24193e4e37013b3b25460009418d6ce6d Mon Sep 17 00:00:00 2001 From: Dominik Adamski Date: Fri, 17 Nov 2023 03:02:49 -0600 Subject: [PATCH] [Flang] Add code-object-version option Information abou

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Owen Pan via cfe-commits
owenca wrote: > @owenca I picked da1b1fba5cfd41521a840202d8cf4c3796c5e10b on top of the 17.x > branch and my test case was not fixed, it still crashes in the same way as > described in #72628 Thanks for trying it on 17.x. We can't backport it then. https://github.com/llvm/llvm-project/pull/72

[clang] [clang][AArch64] Pass down stack clash protection options to LLVM/Backend (PR #68993)

2023-11-17 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/68993 >From b42de31d5584cddb90c22c94e9d971feaaf0b624 Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Wed, 11 Oct 2023 17:22:51 +0100 Subject: [PATCH] [clang][AArch64] Pass down stack clash protection optio

[lld] [mlir] [llvm] [clang-tools-extra] [flang] [compiler-rt] [libc] [libcxx] [lldb] [clang] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-11-17 Thread Fabian Mora via cfe-commits
@@ -61,6 +63,7 @@ registerAllGPUToLLVMIRTranslations(DialectRegistry ®istry) { registerLLVMDialectTranslation(registry); registerNVVMDialectTranslation(registry); registerROCDLDialectTranslation(registry); + registerSPIRVDialectTranslation(registry); fa

Can't assign an issue - Add me collaborator/contributor list

2023-11-17 Thread Shahid Iqbal via cfe-commits
Hi Please add me to a collaborator list , since I cannot assign an issue to myself. I just want to ensure that no one works that particular issue. My github handle is : * shahidiqbal13* Regards Shahid Iqbal ___ cfe-commits mailing list cfe-commits@list

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-17 Thread kadir çetinkaya via cfe-commits
kadircet wrote: Thanks! I believe the idea is great, but I am not really sure if this is useful enough without handling anon namespaces properly. It's very rare that someone has a class/struct in a cc file, that isn't in an anon-namespace. Would you mind evolving the patch (and the infra) to w

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2023-11-17 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/72644 https://isocpp.org/files/papers/P2662R3.pdf Because there is a slight chance the syntax might change slightly (see https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2994r0.html), the feature is not exp

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2023-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang-modules Author: cor3ntin (cor3ntin) Changes https://isocpp.org/files/papers/P2662R3.pdf Because there is a slight chance the syntax might change slightly (see https://www.open-std.org/jtc1/sc22/wg21/docs/papers/

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2023-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo Author: cor3ntin (cor3ntin) Changes https://isocpp.org/files/papers/P2662R3.pdf Because there is a slight chance the syntax might change slightly (see https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2994r0.html), the feature is not

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2023-11-17 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 ec42d547eba5c0ad0bddbecc8902d35383968e78 ac0f8313637763fe0ffcaf7f45cf803babe1b65b --

[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)

2023-11-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,109 @@ +//===--- UseStartsEndsWithCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)

2023-11-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,151 @@ +// RUN: %check_clang_tidy -std=c++20 %s performance-use-starts-ends-with %t -- \ +// RUN: -- -isystem %clang_tidy_headers + +#include + +std::string foo(std::string); +std::string bar(); + +#define A_MACRO(x, y) ((x) == (y)) +#define STR(x) std::string(x) +

[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)

2023-11-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,37 @@ +//===--- UseStartsEndsWithCheck.h - clang-tidy --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)

2023-11-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,37 @@ +//===--- UseStartsEndsWithCheck.h - clang-tidy --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)

2023-11-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Looks good. Minor cleanup and could land. https://github.com/llvm/llvm-project/pull/72385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)

2023-11-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,109 @@ +//===--- UseStartsEndsWithCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)

2023-11-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,109 @@ +//===--- UseStartsEndsWithCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-17 Thread via cfe-commits
ckandeler wrote: > Would you mind evolving the patch (and the infra) to work for > method-definitions inside anon namespaces? Of course not; I didn't even now it wasn't working. I suppose the main point is to determine the insertion location such that it is still within the original namespace

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-17 Thread Ilya Biryukov via cfe-commits
@@ -11591,6 +11591,10 @@ def err_conflicting_aligned_options : Error < def err_coro_invalid_addr_of_label : Error< "the GNU address of label extension is not allowed in coroutines." >; +def err_coroutine_return_type : Error< ilya-biryukov wrote: This makes s

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Tobias Hieta via cfe-commits
tru wrote: > Thanks for trying it on 17.x. We can't backport it then. Any idea if there is another workaround or fix that we could do to target 17.x? 18 is still pretty far off and clang-format for 17 will soon be included in a lot of downstream tools. Happy to help out fixing it if you have a

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-17 Thread kadir çetinkaya via cfe-commits
kadircet wrote: Yes, the current logic that finds insertion point wont work in presence of anon namespaces. We normally do some pseudo parsing to find a location to insert the definiton, but because these are happening inside the main-file now, you can directly make use of sourcelocations ins

[flang] [clang] [Flang] Add code-object-version option (PR #72638)

2023-11-17 Thread Sergio Afonso via cfe-commits
https://github.com/skatrak commented: Thanks for this work, Dominik. It LGTM, but please wait for another review before merging. I have a couple of suggestions for small improvements, but let me know if they would take significant effort to address, as I'm not completely familiar with that par

[clang] [flang] [Flang] Add code-object-version option (PR #72638)

2023-11-17 Thread Sergio Afonso via cfe-commits
https://github.com/skatrak edited https://github.com/llvm/llvm-project/pull/72638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [Flang] Add code-object-version option (PR #72638)

2023-11-17 Thread Sergio Afonso via cfe-commits
@@ -264,6 +263,37 @@ static void addDepdendentLibs(mlir::ModuleOp &mlirModule, } } +// Add to MLIR code target specific items which are dependent on target +// configuration specified by the user +static void addTargetSpecificMLIRItems(mlir::ModuleOp &mlirModule, +

[flang] [clang] [Flang] Add code-object-version option (PR #72638)

2023-11-17 Thread Sergio Afonso via cfe-commits
@@ -264,6 +263,37 @@ static void addDepdendentLibs(mlir::ModuleOp &mlirModule, } } +// Add to MLIR code target specific items which are dependent on target +// configuration specified by the user +static void addTargetSpecificMLIRItems(mlir::ModuleOp &mlirModule, +

[clang] [AVR] make the AVR ABI Swift compatible (PR #72298)

2023-11-17 Thread Carl Peto via cfe-commits
carlos4242 wrote: @efriedma-quic Cool. So it sounds like it's worth parking this for now, until Kuba's work #71986 is merged? @rjmccall I'm not 100% sure I understand? The existing code in AVR.cpp handles the standard AVR ABI, which has a few simple rules based on GCC behaviour. Here we are

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-17 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/71945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-17 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: Thanks, I have a few small NIT (but feel free to ignore any number of them). I do have a major question about the use of `getCurFunction()->isCoroutine()`, see the corresponding comment. https://github.com/llvm/llvm-project/pull/71945 ___

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-17 Thread Ilya Biryukov via cfe-commits
@@ -15811,6 +15813,20 @@ static void diagnoseImplicitlyRetainedSelf(Sema &S) { << FixItHint::CreateInsertion(P.first, "self->"); } +void Sema::CheckCoroutineWrapper(FunctionDecl *FD) { + if (!FD || getCurFunction()->isCoroutine()) +return; + RecordDecl *RD = FD

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-17 Thread Ilya Biryukov via cfe-commits
@@ -0,0 +1,117 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -std=c++20 -fsyntax-only -verify -Wall -Wextra +#include "Inputs/std-coroutine.h" + +using std::suspend_always; +using std::suspend_never; + + +template struct [[clang::coro_return_type]] Gen { + struct promi

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-17 Thread Ilya Biryukov via cfe-commits
@@ -15811,6 +15813,20 @@ static void diagnoseImplicitlyRetainedSelf(Sema &S) { << FixItHint::CreateInsertion(P.first, "self->"); } +void Sema::CheckCoroutineWrapper(FunctionDecl *FD) { + if (!FD || getCurFunction()->isCoroutine()) ilya-biryukov wrot

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-17 Thread Ilya Biryukov via cfe-commits
@@ -0,0 +1,117 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -std=c++20 -fsyntax-only -verify -Wall -Wextra +#include "Inputs/std-coroutine.h" + +using std::suspend_always; +using std::suspend_never; + + +template struct [[clang::coro_return_type]] Gen { + struct promi

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-17 Thread Ilya Biryukov via cfe-commits
@@ -300,6 +300,11 @@ Attribute Changes in Clang to reduce the size of the destroy functions for coroutines which are known to be destroyed after having reached the final suspend point. +- Clang now introduced ``[[clang::coro_return_type]]`` and ``[[clang::coro_wrapper]]``

[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

2023-11-17 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/71945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++26] Implement Pack Indexing (P2662R3). (PR #72644)

2023-11-17 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/72644 >From d3be2f228ce9d395e539a8827192da3f9b1be676 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 13 Sep 2022 18:29:34 +0200 Subject: [PATCH] [Clang][C++26] Implement Pack Indexing (P2662R3). https://isoc

[clang] f049395 - [APINotes] Upstream APINotesManager

2023-11-17 Thread via cfe-commits
Author: Egor Zhdan Date: 2023-11-17T13:28:51Z New Revision: f049395fc8d6d8bbbc711c7a2ce293210c580240 URL: https://github.com/llvm/llvm-project/commit/f049395fc8d6d8bbbc711c7a2ce293210c580240 DIFF: https://github.com/llvm/llvm-project/commit/f049395fc8d6d8bbbc711c7a2ce293210c580240.diff LOG: [A

[clang] [APINotes] Upstream APINotesManager (PR #72389)

2023-11-17 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan closed https://github.com/llvm/llvm-project/pull/72389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   >