[clang] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic operations in a trivial function (PR #82063)

2024-02-19 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82063 >From c46f11b98f8ec159a19004952fb67705eb0988dd Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 16 Feb 2024 14:54:55 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic oper

[clang] [clang][Interp] Emit const references for Float arguments (PR #79753)

2024-02-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/79753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-02-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/79452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fcf3ca9 - [clang][Interp][NFC] Split emitRecordDestruction

2024-02-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-19T09:23:31+01:00 New Revision: fcf3ca9a5e50f32edcfe68c291edd1ecab7009a7 URL: https://github.com/llvm/llvm-project/commit/fcf3ca9a5e50f32edcfe68c291edd1ecab7009a7 DIFF: https://github.com/llvm/llvm-project/commit/fcf3ca9a5e50f32edcfe68c291edd1ecab7009a7.diff LO

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-19 Thread Bhuminjay Soni via cfe-commits
11happy wrote: what would be the reason for windows build failing , is it a CI issue or specific to this PR & what can I do to resolve that. Thank you https://github.com/llvm/llvm-project/pull/80040 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] d61864f - [clang][Interp] Don't create Records for incomplete decls

2024-02-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-19T09:23:53+01:00 New Revision: d61864f813e33b4228e56f391ec53566aab9efda URL: https://github.com/llvm/llvm-project/commit/d61864f813e33b4228e56f391ec53566aab9efda DIFF: https://github.com/llvm/llvm-project/commit/d61864f813e33b4228e56f391ec53566aab9efda.diff LO

[clang] [clang][analyzer] Simplify code of StreamChecker (NFC). (PR #82228)

2024-02-19 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/82228 Continuation of commit 42b5037, apply changes to the remaining functions. Code for function `fflush` was not changed, because it is more special compared to the others. From 0c93cbe17010dfd1382486952d80898ba136

[clang] e98abc3 - [clang][Interp] Emit dtors when ignoring CXXConstructExprs

2024-02-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-19T09:48:50+01:00 New Revision: e98abc3ea0796a5d78eb48f2ee9b3019e8133562 URL: https://github.com/llvm/llvm-project/commit/e98abc3ea0796a5d78eb48f2ee9b3019e8133562 DIFF: https://github.com/llvm/llvm-project/commit/e98abc3ea0796a5d78eb48f2ee9b3019e8133562.diff LO

[clang-tools-extra] Fix 'newline in constant' encoding issue in clangd sources (PR #78085)

2024-02-19 Thread via cfe-commits
atomictoquark wrote: > I am not sure if this is a viable solution in the long term as LLVM don't > really use BOMs in the sources (a quick scan shows only 4 files with BOMs), > hence these changes can easily be overridden without someone noticing. > > Any reason you can't configure MSVC to tre

[clang] [clang][analyzer] Simplify code of StreamChecker (NFC). (PR #82228)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Kéri (balazske) Changes Continuation of commit 42b5037, apply changes to the remaining functions. Code for function `fflush` was not changed, because it is more special compared to the others. --- Patch is 22.38

[clang] [clang][analyzer] Simplify code of StreamChecker (NFC). (PR #82228)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes Continuation of commit 42b5037, apply changes to the remaining functions. Code for function `fflush` was not changed, because it is more special compared to the others. --- Patch is 22.38 KiB, truncated to

[clang] 6d7de46 - [clang][Interp][NFC] Make Record field pointers const

2024-02-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-19T09:58:52+01:00 New Revision: 6d7de46155fece05ab5a44aedd573a811f4b208a URL: https://github.com/llvm/llvm-project/commit/6d7de46155fece05ab5a44aedd573a811f4b208a DIFF: https://github.com/llvm/llvm-project/commit/6d7de46155fece05ab5a44aedd573a811f4b208a.diff LO

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

2024-02-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: > 11,427 additions, 11,178 deletions not shown because the diff is too large. > Please use a local Git client to view these changes. Never seen that before, haha. https://github.com/llvm/llvm-project/pull/82217 ___ cfe-commits mailing

[clang] [alpha.webkit.UncountedCallArgsChecker] Ignore calls to WTF's container methods (PR #82156)

2024-02-19 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82156 >From d169fddf3896bd334bc4776059258116ac08096a Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 18 Feb 2024 01:32:00 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Ignore calls to WTF's contai

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-19 Thread via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/82089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-19 Thread via cfe-commits
@@ -226,6 +226,17 @@ static bool isPossiblyEscaped(ExplodedNode *N, const DeclRefExpr *DR) { return false; } } + +if (const SwitchStmt *SS = dyn_cast(S)) { + for (const Stmt *CB : dyn_cast(SS->getBody())->body()) { NagyDonat wrote:

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-19 Thread via cfe-commits
https://github.com/NagyDonat requested changes to this pull request. https://github.com/llvm/llvm-project/pull/82089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-19 Thread via cfe-commits
@@ -226,6 +226,17 @@ static bool isPossiblyEscaped(ExplodedNode *N, const DeclRefExpr *DR) { return false; } } + +if (const SwitchStmt *SS = dyn_cast(S)) { + for (const Stmt *CB : dyn_cast(SS->getBody())->body()) { +for (const Decl *D : dyn

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-19 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,43 @@ +//===--- DesignatedInitializers.h ---*- 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] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-19 Thread kadir çetinkaya via cfe-commits
@@ -490,6 +491,13 @@ bool eligibleForExtraction(const SelectionTree::Node *N) { BO->getRHS() == OuterImplicit.ASTNode.get()) return false; } + if (const auto *Decl = Parent->ASTNode.get()) { +if (!Decl->isInitCapture() && kadircet wrote: t

[clang] [OpenMP][Clang] Handle unsupported inscan modifier for generic types (PR #79431)

2024-02-19 Thread Animesh Kumar via cfe-commits
https://github.com/animeshk-amd closed https://github.com/llvm/llvm-project/pull/79431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][Clang] Handle unsupported inscan modifier for generic types (PR #79431)

2024-02-19 Thread Animesh Kumar via cfe-commits
animeshk-amd wrote: Closing this PR because https://github.com/llvm/llvm-project/pull/82220 is fixing the issue #67002 https://github.com/llvm/llvm-project/pull/79431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

2024-02-19 Thread via cfe-commits
cor3ntin wrote: This is going to be rather disruptive on downstream projects. At least we should wait until after the release of clang 18 to merge it, to avoid endless merge conflicts https://github.com/llvm/llvm-project/pull/82217 ___ cfe-commits mai

[clang] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object references within trivial statements (PR #82229)

2024-02-19 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/82229 This PR makes alpha.webkit.UncountedLocalVarsChecker ignore raw references and pointers to a ref counted type which appears within "trival" statements. To do this, this PR extends TrivialFunctionAnalysis so that it

[clang] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object references within trivial statements (PR #82229)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes This PR makes alpha.webkit.UncountedLocalVarsChecker ignore raw references and pointers to a ref counted type which appears within "trival" statements. To do this, this PR extends TrivialFunc

[clang] 0b34d7e - [clang][Interp] Fix calling static operators

2024-02-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-19T10:34:18+01:00 New Revision: 0b34d7e9e2915510088aeee5592a845edd62b8ba URL: https://github.com/llvm/llvm-project/commit/0b34d7e9e2915510088aeee5592a845edd62b8ba DIFF: https://github.com/llvm/llvm-project/commit/0b34d7e9e2915510088aeee5592a845edd62b8ba.diff LO

[clang] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object references within trivial statements (PR #82229)

2024-02-19 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 ead0a9777f8ccb5c26d50d96bade6cd5b47f496b 32d0e658edee46f99f8b9c9f09945079df8862df --

[clang] [Analyzer] Support RefAllowingPartiallyDestroyed and RefPtrAllowingPartiallyDestroyed (PR #82209)

2024-02-19 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82209 >From d132b98b04d0cfb925f453f99a53f357d95c8e08 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 18 Feb 2024 21:47:48 -0800 Subject: [PATCH] [Analyzer] Support RefAllowingPartiallyDestroyed and RefPtrAllowingP

[clang] [Analyzer] Support RefAllowingPartiallyDestroyed and RefPtrAllowingPartiallyDestroyed (PR #82209)

2024-02-19 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82209 >From 5e365d2a873aafc17d4b03eb7fee10029ff2bea1 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 18 Feb 2024 21:47:48 -0800 Subject: [PATCH] [Analyzer] Support RefAllowingPartiallyDestroyed and RefPtrAllowingP

[clang] [clang][analyzer] Simplify code of StreamChecker (NFC). (PR #82228)

2024-02-19 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. Seems to be a nice improvement, I'm happy to see this boilerplate removal and reducing the code length by 120 lines is impressive. (Disclaimer: I didn't do a line-by-line review of the changes, but I hope that testing etc. validates that

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

2024-02-19 Thread Sébastien Stormacq via cfe-commits
https://github.com/sebsto created https://github.com/llvm/llvm-project/pull/82231 Add aarch64-amazon-linux triplet to allow compilation for Amazon Linux 2023 on Graviton CPU This should address https://github.com/apple/llvm-project/issues/8227 Also submitted to downstream `apple/llvm-project`

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

2024-02-19 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] [lldb] Enable aarch64-amazon-linux triple (PR #82231)

2024-02-19 Thread Sébastien Stormacq via cfe-commits
https://github.com/sebsto closed https://github.com/llvm/llvm-project/pull/82231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] c310782 - [clang-tidy][readability-identifier-naming] Resolve symlinks for checking style for file (#81985)

2024-02-19 Thread via cfe-commits
Author: Dmitry Polukhin Date: 2024-02-19T10:02:24Z New Revision: c3107821aeeeb12a13e7a85f0e23b884c2881417 URL: https://github.com/llvm/llvm-project/commit/c3107821aeeeb12a13e7a85f0e23b884c2881417 DIFF: https://github.com/llvm/llvm-project/commit/c3107821aeeeb12a13e7a85f0e23b884c2881417.diff LO

[clang-tools-extra] [clang-tidy][readability-identifier-naming] Resolve symlinks for checking style for file (PR #81985)

2024-02-19 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin closed https://github.com/llvm/llvm-project/pull/81985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-19 Thread via cfe-commits
@@ -226,6 +226,17 @@ static bool isPossiblyEscaped(ExplodedNode *N, const DeclRefExpr *DR) { return false; } } + +if (const SwitchStmt *SS = dyn_cast(S)) { + for (const Stmt *CB : dyn_cast(SS->getBody())->body()) { huang-me wrote:

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-19 Thread via cfe-commits
@@ -226,6 +226,17 @@ static bool isPossiblyEscaped(ExplodedNode *N, const DeclRefExpr *DR) { return false; } } + +if (const SwitchStmt *SS = dyn_cast(S)) { + for (const Stmt *CB : dyn_cast(SS->getBody())->body()) { +for (const Decl *D : dyn

[clang] a2535a5 - [clang][Interp] Remove assertion to fix comma operators...

2024-02-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-19T11:16:35+01:00 New Revision: a2535a5786894c54fb657f3b142ce88e8810e1ea URL: https://github.com/llvm/llvm-project/commit/a2535a5786894c54fb657f3b142ce88e8810e1ea DIFF: https://github.com/llvm/llvm-project/commit/a2535a5786894c54fb657f3b142ce88e8810e1ea.diff LO

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 01/12] Initial implementation --- clang/include/clang/Basic

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-19 Thread via cfe-commits
https://github.com/huang-me updated https://github.com/llvm/llvm-project/pull/82089 >From 2802ef4b9ed88da3cacb16ab7738907ee806 Mon Sep 17 00:00:00 2001 From: huang-me Date: Sat, 17 Feb 2024 10:43:48 +0800 Subject: [PATCH 1/2] Fix crash on StaticAnalyzer loop unrolling --- clang/lib/Static

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

2024-02-19 Thread Sébastien Stormacq via cfe-commits
https://github.com/sebsto created https://github.com/llvm/llvm-project/pull/82232 Add aarch64-amazon-linux triplet to allow compilation for Amazon Linux 2023 on Graviton CPU This should address https://github.com/apple/llvm-project/issues/8227 Also submitted to Apple's repo https://github.com

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

2024-02-19 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] Enable aarch64-amazon-linux triple (PR #82232)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Sébastien Stormacq (sebsto) Changes Add aarch64-amazon-linux triplet to allow compilation for Amazon Linux 2023 on Graviton CPU This should address https://github.com/apple/llvm-project/issues/8227 Also submitted to Apple's repo h

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-19 Thread A. Jiang via cfe-commits
@@ -1558,6 +1558,89 @@ void is_standard_layout() int t71[F(__is_standard_layout(HasEmptyIndirectBaseAsSecondUnionMember))]; } +struct CStruct2 { + int one; + int two; +}; + +struct CEmptyStruct2 {}; + +struct CppEmptyStruct2 : CStruct2 {}; +struct CppStructStandard2 : CEmp

[clang] [Clang] Fix assert when transforming a pack indexing type. (PR #82234)

2024-02-19 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/82234 When a pack in a pack indexing specifier cannot be immediately expanded, we were creating an incomplete TypeLoc (causing assertion failure). As we do not keep track of typelocs of expanded elements, we create a

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-19 Thread Jan Patrick Lehr via cfe-commits
@@ -102,6 +80,121 @@ function(add_entrypoint_library target_name) list(APPEND all_deps ${entrypoint_target}) endforeach(dep) list(REMOVE_DUPLICATES all_deps) + set(${result} ${all_deps} PARENT_SCOPE) +endfunction() + +# A rule to build a library from a collection of en

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-19 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr edited https://github.com/llvm/llvm-project/pull/81921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix assert when transforming a pack indexing type. (PR #82234)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes When a pack in a pack indexing specifier cannot be immediately expanded, we were creating an incomplete TypeLoc (causing assertion failure). As we do not keep track of typelocs of expanded elements, we create a

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-19 Thread Jan Patrick Lehr via cfe-commits
https://github.com/jplehr commented: I looked at the changes and from the little I understand CMake they seem ok. I added one nit. Maybe @saiislam can have a look as well. https://github.com/llvm/llvm-project/pull/81921 ___ cfe-commits mailing list cf

[clang] [Clang] Fix assert when transforming a pack indexing type. (PR #82234)

2024-02-19 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 3496927edcd0685807351ba88a7e2cfb006e1c0d 55eb380c43740d3ce6843f2ea5b4055b38104124 --

[clang] [Clang] Fix assert when transforming a pack indexing type. (PR #82234)

2024-02-19 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/82234 >From 55eb380c43740d3ce6843f2ea5b4055b38104124 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 19 Feb 2024 11:36:00 +0100 Subject: [PATCH 1/2] [Clang] Fix assert when transforming a pack indexing type.

[clang] 6b32ba6 - [clang][Interp][NFC] Make Record::BaseMap use const pointers

2024-02-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-19T11:52:13+01:00 New Revision: 6b32ba6129941b42d929366eb0477696d53ceb2b URL: https://github.com/llvm/llvm-project/commit/6b32ba6129941b42d929366eb0477696d53ceb2b DIFF: https://github.com/llvm/llvm-project/commit/6b32ba6129941b42d929366eb0477696d53ceb2b.diff LO

[clang] eddf9cf - [clang][Interp] Fix failure to allocate local variables

2024-02-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-19T11:52:13+01:00 New Revision: eddf9cf38a116bcce016f147cab216fef98721ab URL: https://github.com/llvm/llvm-project/commit/eddf9cf38a116bcce016f147cab216fef98721ab DIFF: https://github.com/llvm/llvm-project/commit/eddf9cf38a116bcce016f147cab216fef98721ab.diff LO

[clang] e488fe5 - [clang][Interp] Fix non-initializing MemberExprs

2024-02-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-19T11:57:01+01:00 New Revision: e488fe5a97ba8da9be31926c219932db92298f21 URL: https://github.com/llvm/llvm-project/commit/e488fe5a97ba8da9be31926c219932db92298f21 DIFF: https://github.com/llvm/llvm-project/commit/e488fe5a97ba8da9be31926c219932db92298f21.diff LO

[clang] [clang] support Wold-style-declaration (PR #78837)

2024-02-19 Thread via cfe-commits
SihangZhu wrote: > ping repeat:) https://github.com/llvm/llvm-project/pull/78837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 21431e0 - [clang][Interp] Remove questionable initializer special case

2024-02-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-19T12:18:49+01:00 New Revision: 21431e0f94c95703bd76e9ec5d2f0b39b8509680 URL: https://github.com/llvm/llvm-project/commit/21431e0f94c95703bd76e9ec5d2f0b39b8509680 DIFF: https://github.com/llvm/llvm-project/commit/21431e0f94c95703bd76e9ec5d2f0b39b8509680.diff LO

[clang-tools-extra] [clangd] SelectionTree marks nodes as complete only if children are complete (PR #82237)

2024-02-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall created https://github.com/llvm/llvm-project/pull/82237 This seems to be the semantics expected by ~all callers, and simplifies upcoming patches extending extract-variable. >From 517d60a66ecae616e7c4037980b61fb4162b0c29 Mon Sep 17 00:00:00 2001 From: Sam McCall D

[clang-tools-extra] [clangd] SelectionTree marks nodes as complete only if children are complete (PR #82237)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clangd Author: Sam McCall (sam-mccall) Changes This seems to be the semantics expected by ~all callers, and simplifies upcoming patches extending extract-variable. --- Full diff: https://github.com/llvm/llvm-proje

[clang] [clang][dataflow][NFC] Add a FIXME to handling of union initialization. (PR #82239)

2024-02-19 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/82239 We want to make it clear that the current behavior doesn't yet handle unions properly. >From eb81951622c11c2f23c8dde61eac6ad79fdd67cb Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Mon, 19 Feb 2024 11:

[clang] [clang][dataflow][NFC] Add a FIXME to handling of union initialization. (PR #82239)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes We want to make it clear that the current behavior doesn't yet handle unions properly. --- Full diff: https://github.com/llvm/llvm-project/pull/82239.diff 1 Files Affected: - (modified) clang/lib/Ana

[clang] [OpenMP][Clang] Enable inscan modifier for generic datatypes (PR #82220)

2024-02-19 Thread Animesh Kumar via cfe-commits
animeshk-amd wrote: The older PR didn't need to be merged. I've closed that one. This PR is independent. https://github.com/llvm/llvm-project/pull/82220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] 19f6689 - [clang] Remove unused variable [NFC]

2024-02-19 Thread Mikael Holmen via cfe-commits
Author: Mikael Holmen Date: 2024-02-19T13:03:17+01:00 New Revision: 19f6689f3bd330c631525a7409bc824d8dc95303 URL: https://github.com/llvm/llvm-project/commit/19f6689f3bd330c631525a7409bc824d8dc95303 DIFF: https://github.com/llvm/llvm-project/commit/19f6689f3bd330c631525a7409bc824d8dc95303.diff

[clang] 48439bd - [clang][Interp] Handle rewritten binary operators

2024-02-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-19T13:05:56+01:00 New Revision: 48439bd7a79b117b3072f422fdf7e5599925ec72 URL: https://github.com/llvm/llvm-project/commit/48439bd7a79b117b3072f422fdf7e5599925ec72 DIFF: https://github.com/llvm/llvm-project/commit/48439bd7a79b117b3072f422fdf7e5599925ec72.diff LO

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 01/13] Initial implementation --- clang/include/clang/Basic

[clang] d022f32 - Revert "[ARM] __ARM_ARCH macro definition fix (#81493)"

2024-02-19 Thread Tomas Matheson via cfe-commits
Author: Tomas Matheson Date: 2024-02-19T12:19:16Z New Revision: d022f32c73c57b59a9121eba909f5034e89c628e URL: https://github.com/llvm/llvm-project/commit/d022f32c73c57b59a9121eba909f5034e89c628e DIFF: https://github.com/llvm/llvm-project/commit/d022f32c73c57b59a9121eba909f5034e89c628e.diff LOG

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-19 Thread Vlad Serebrennikov via cfe-commits
@@ -1558,6 +1558,89 @@ void is_standard_layout() int t71[F(__is_standard_layout(HasEmptyIndirectBaseAsSecondUnionMember))]; } +struct CStruct2 { + int one; + int two; +}; + +struct CEmptyStruct2 {}; + +struct CppEmptyStruct2 : CStruct2 {}; +struct CppStructStandard2 : CEmp

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 01/14] Initial implementation --- clang/include/clang/Basic

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-19 Thread Vlad Serebrennikov via cfe-commits
@@ -90,6 +90,12 @@ C++20 Feature Support behavior can use the flag '-Xclang -fno-skip-odr-check-in-gmf'. (`#79240 `_). +- Implemented `__is_layout_compatible` intrinsic, which backs up + `P0466R5: Layout-compatibility and

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-19 Thread via cfe-commits
NagyDonat wrote: If I understand it correctly, your change doesn't handle declarations that are in inner statements, e.g. the variable "x" in the following code: ```cpp switch (get_value()) { case 42: do { int x; // ... } while (running); //... } ``` Is this compatible with the goals

[clang] [OpenMP][Clang] Enable inscan modifier for generic datatypes (PR #82220)

2024-02-19 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: Add a test https://github.com/llvm/llvm-project/pull/82220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 01/15] Initial implementation --- clang/include/clang/Basic

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-02-19 Thread via cfe-commits
https://github.com/mmoadeli updated https://github.com/llvm/llvm-project/pull/78759 >From 717ad72ef5f1f318ef707cc829df8d4a9b46b131 Mon Sep 17 00:00:00 2001 From: m moadeli Date: Fri, 19 Jan 2024 18:42:24 + Subject: [PATCH 1/2] - Address space cast of a `local_space` specialized `nullptr` i

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-19 Thread Christian Kandeler via cfe-commits
@@ -490,6 +491,13 @@ bool eligibleForExtraction(const SelectionTree::Node *N) { BO->getRHS() == OuterImplicit.ASTNode.get()) return false; } + if (const auto *Decl = Parent->ASTNode.get()) { +if (!Decl->isInitCapture() && ckandeler wrote:

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-19 Thread kadir çetinkaya via cfe-commits
@@ -490,6 +491,13 @@ bool eligibleForExtraction(const SelectionTree::Node *N) { BO->getRHS() == OuterImplicit.ASTNode.get()) return false; } + if (const auto *Decl = Parent->ASTNode.get()) { +if (!Decl->isInitCapture() && kadircet wrote: s

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-19 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/69477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-19 Thread via cfe-commits
huang-me wrote: > If I understand it correctly, your change doesn't handle declarations that > are in inner statements, e.g. the variable "x" in the following code: > > ```c++ > switch (get_value()) { > case 42: > do { > int x; > // ... > } while (running); > //... > } > ``` > > Is

[clang] [clang] [SemaCXX] Disallow deducing "this" on operator `new` and `delete` (PR #82251)

2024-02-19 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 created https://github.com/llvm/llvm-project/pull/82251 Resolves Issue #82249 As described in the issue, any deallocation function for a `class X` is a static member (even if not explicitly declared static). >From 3ad4e85144739e16be13a4d5641b24d1a7e5b00b Mon Sep

[clang] [clang] [SemaCXX] Disallow deducing "this" on operator `new` and `delete` (PR #82251)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rajveer Singh Bharadwaj (Rajveer100) Changes Resolves Issue #82249 As described in the issue, any deallocation function for a `class X` is a static member (even if not explicitly declared static). --- Full diff: https://github.com/llvm/l

[clang] [clang] [SemaCXX] Disallow deducing "this" on operator `new` and `delete` (PR #82251)

2024-02-19 Thread via cfe-commits
cor3ntin wrote: This change needs a release note. Please add an entry to `clang/docs/ReleaseNotes.rst` in the section the most adapted to the change, and referencing any Github issue this change fixes. Thanks! Besides that, I think the change makes sense, thanks! https://github.com/llvm/llvm-

[clang] [analyzer] Improve handling of unsigned values in ArrayBoundCheckerV2 (PR #81034)

2024-02-19 Thread via cfe-commits
NagyDonat wrote: I did an open source evaluation of this commit and there are surprisingly many changes: | Project | With this commit | Without this commit | |-|-|--| | memcached | [View](https://codechecker-demo.eastus.cloudapp.azure.com/Default/reports?run

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-19 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/81921 >From 85f7218baa72307699b48bffa3da4005597ec719 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 13 Feb 2024 21:08:02 -0600 Subject: [PATCH] [libc] Rework the GPU build to be a regular target Summary: This

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-19 Thread Christian Kandeler via cfe-commits
@@ -490,6 +491,13 @@ bool eligibleForExtraction(const SelectionTree::Node *N) { BO->getRHS() == OuterImplicit.ASTNode.get()) return false; } + if (const auto *Decl = Parent->ASTNode.get()) { +if (!Decl->isInitCapture() && ckandeler wrote:

[clang] [Driver] Remove dead -freroll-loops flag (PR #82254)

2024-02-19 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/82254 Remove the `-freroll-loops` flag, which has not had any effect since the migration to the new pass manager. The underlying pass has been removed entirely in #80972 due to lack of maintenance and known bugs. >From

[clang] [Driver] Remove dead -freroll-loops flag (PR #82254)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Nikita Popov (nikic) Changes Remove the `-freroll-loops` flag, which has not had any effect since the migration to the new pass manager. The underlying pass has been removed entirely in #80972 due to lack of maintenance and known b

[clang] [clang][AArch64] multilib: fix deduction of "-march=" option (PR #81474)

2024-02-19 Thread Dominik Wójt via cfe-commits
https://github.com/domin144 updated https://github.com/llvm/llvm-project/pull/81474 From 4eda12594dbc07e3d3509a309d6691dcc983e5cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20W=C3=B3jt?= Date: Mon, 12 Feb 2024 13:38:14 +0100 Subject: [PATCH 1/3] [clang][AArch64] multilib: fix deduction of

[clang] [analyzer] UnixAPIMisuseChecker Get O_CREAT from preprocessor (PR #81855)

2024-02-19 Thread Balázs Kéri via cfe-commits
https://github.com/balazske commented: Code change looks good, but I could not verify the new test. Probably it is not tested if it works with a non-usual O_CREAT value (that is parsed by the checker). https://github.com/llvm/llvm-project/pull/81855

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-19 Thread via cfe-commits
NagyDonat wrote: That sounds reasonable. Unfortunately I don't know much about the context of this change, so let's wait for a review from @danix800 (or somebody else who's knows enough) before merging this change. Also, perhaps it would be a good idea to add a testcase (or a few of them) in

[clang] 17a1b8f - [clang][Interp] Fix `nullptr - nullptr` expressions

2024-02-19 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-19T16:30:57+01:00 New Revision: 17a1b8f8481783ca9c318db6b6133631015726e9 URL: https://github.com/llvm/llvm-project/commit/17a1b8f8481783ca9c318db6b6133631015726e9 DIFF: https://github.com/llvm/llvm-project/commit/17a1b8f8481783ca9c318db6b6133631015726e9.diff LO

[clang] [analyzer] UnixAPIMisuseChecker Get O_CREAT from preprocessor (PR #81855)

2024-02-19 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/81855 From 702ab6679c3b030c42e8d18acd10f438b4880eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Thu, 15 Feb 2024 13:22:40 +0100 Subject: [PATCH 1/2] [a

[clang] [analyzer] UnixAPIMisuseChecker Get O_CREAT from preprocessor (PR #81855)

2024-02-19 Thread Alejandro Álvarez Ayllón via cfe-commits
alejandro-alvarez-sonarsource wrote: Thanks! I have added a new test file where the values are those of [FreeRTOS](https://www.freertos.org/Documentation/api-ref/POSIX/fcntl_8h.html) https://github.com/llvm/llvm-project/pull/81855 ___ cfe-commits mail

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-02-19 Thread via cfe-commits
https://github.com/sethp edited https://github.com/llvm/llvm-project/pull/79452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-02-19 Thread via cfe-commits
https://github.com/sethp approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/79452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-02-19 Thread via cfe-commits
@@ -2120,8 +2074,15 @@ bool ByteCodeExprGen::visitInitializer(const Expr *E) { template bool ByteCodeExprGen::visitBool(const Expr *E) { std::optional T = classify(E->getType()); - if (!T) + if (!T) { +// Convert complex values to bool. +if (E->getType()->isAnyCom

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-02-19 Thread via cfe-commits
@@ -125,3 +125,7 @@ struct XY { int before; struct XX xx, *xp; float* after; } xy[] = { 0, // all-warning {{initializer overrides prior initialization of this subobject}} &xy[2].xx.a, &xy[2].xx, &global_float }; + +const int A = ((_Complex double)1.0 ? 21 :

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-02-19 Thread Timm Baeder via cfe-commits
@@ -125,3 +125,7 @@ struct XY { int before; struct XX xx, *xp; float* after; } xy[] = { 0, // all-warning {{initializer overrides prior initialization of this subobject}} &xy[2].xx.a, &xy[2].xx, &global_float }; + +const int A = ((_Complex double)1.0 ? 21 :

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-02-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/79452 >From 720f2f869a11dd7c905f8d91180f3eb517ab9279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 25 Jan 2024 15:20:52 +0100 Subject: [PATCH] [clang][Interp] Handle complex values in visitBo

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-02-19 Thread Timm Baeder via cfe-commits
@@ -2120,8 +2074,15 @@ bool ByteCodeExprGen::visitInitializer(const Expr *E) { template bool ByteCodeExprGen::visitBool(const Expr *E) { std::optional T = classify(E->getType()); - if (!T) + if (!T) { +// Convert complex values to bool. +if (E->getType()->isAnyCom

[clang] [clang][AArch64] multilib: fix deduction of "-march=" option (PR #81474)

2024-02-19 Thread Dominik Wójt via cfe-commits
domin144 wrote: @mplatings Can you merge for me? I don't have needed rights. I rebased hoping the check will pass now, but there are still some unrelated failures on windows. https://github.com/llvm/llvm-project/pull/81474 ___ cfe-commits mailing list

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-19 Thread Christian Kandeler via cfe-commits
@@ -490,6 +491,13 @@ bool eligibleForExtraction(const SelectionTree::Node *N) { BO->getRHS() == OuterImplicit.ASTNode.get()) return false; } + if (const auto *Decl = Parent->ASTNode.get()) { +if (!Decl->isInitCapture() && ckandeler wrote:

[clang] [clang] Preserve found-decl when constructing VarTemplateIds (PR #82265)

2024-02-19 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/82265 None From 05e1d91361b4ce4226d21b00a312eb7642057c8f Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Mon, 19 Feb 2024 17:42:34 +0100 Subject: [PATCH] [clang] Preserve found-decl when constructing VarTemplate

  1   2   3   >