[clang] [clang][bytecode] Don't discard all void-types expressions (PR #105625)

2024-08-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/105625 For void-types InitListExprs, we need to diagnose them as invalid. But only if we are _not_ discarding. >From 11c6e8da7bcdb2f4ad358fc346bf603f25cc62aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-08-22 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Reverse ping :) https://github.com/llvm/llvm-project/pull/97762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Don't discard all void-types expressions (PR #105625)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes For void-types InitListExprs, we need to diagnose them as invalid. But only if we are _not_ discarding. --- Full diff: https://github.com/llvm/llvm-project/pull/105625.diff 2 Files Affected: - (modified)

[clang] [clang-format] Correctly compute SplitPenalty of TrailingReturnArrow (PR #105613)

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

[clang] [clang-format] Correctly compute SplitPenalty of TrailingReturnArrow (PR #105613)

2024-08-22 Thread via cfe-commits
@@ -4050,7 +4050,7 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) const { ChildSize + Current->SpacesRequiredBefore; } -if (Current->is(TT_CtorInitializerColon)) +if (Current->isOneOf(TT_CtorInitializerColo

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-22 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 approved this pull request. https://github.com/llvm/llvm-project/pull/104906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-22 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/104906 >From d4778d06b71b34aa178ae7482c15a8e00d9f3f19 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 20 Aug 2024 10:22:44 +0200 Subject: [PATCH 1/4] [clang] Merge the lifetimebound and GSL code paths for lifetime

[clang] [clang-format] Treat new expressions as simple functions (PR #105168)

2024-08-22 Thread via cfe-commits
@@ -848,6 +848,8 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, const auto IsSimpleFunction = [&](const FormatToken &Tok) { if (!Tok.FakeLParens.empty() && Tok.FakeLParens.back() > prec::Unknown) return false; +if (Tok.is(tok

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot2` while building `clang,llvm,offload` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/3002 Here is the relevant p

[clang] [clang][bytecode] Don't discard all void-typed expressions (PR #105625)

2024-08-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/105625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c79d1fa - [clang][bytecode] Don't discard all void-typed expressions (#105625)

2024-08-22 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-22T09:51:16+02:00 New Revision: c79d1fa540390f6e37e1ea326153559eeadd0de6 URL: https://github.com/llvm/llvm-project/commit/c79d1fa540390f6e37e1ea326153559eeadd0de6 DIFF: https://github.com/llvm/llvm-project/commit/c79d1fa540390f6e37e1ea326153559eeadd0de6.diff L

[clang] [clang][bytecode] Don't discard all void-typed expressions (PR #105625)

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

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-08-22 Thread via cfe-commits
https://github.com/mydeveloperday requested changes to this pull request. https://github.com/llvm/llvm-project/pull/105597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-08-22 Thread via cfe-commits
@@ -616,6 +625,62 @@ class LineJoiner { return 1; } + unsigned tryMergeNamespace(SmallVectorImpl::const_iterator I, + SmallVectorImpl::const_iterator E, + unsigned Limit) { +if (Limit == 0) + return 0; +

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-08-22 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/94166 >From 629683d9236c34b8e5c4bde01dcbe5a2b7c306c0 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Thu, 30 May 2024 05:05:41 + Subject: [PATCH 1/2] [clang-repl] Teach clang-repl how to load PCHs. --- cl

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-22 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/105043 >From 4aa47d190a84ecd0432dc9b6db1d38b296f4df23 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 20 Aug 2024 06:44:41 -0700 Subject: [PATCH 1/3] [clang-format] Don't insert a space between :: and * Also, don't

[clang] [clang][analyzer] Bring alpha.security.MmapWriteExec checker out of alpha package (PR #102636)

2024-08-22 Thread Balázs Kéri via cfe-commits
balazske wrote: It is not easy to find an easily compilable (and not too big) project that contains `mmap` to test the checker. I could test it with libgit2, can try to find more projects to test. https://github.com/llvm/llvm-project/pull/102636 ___

[clang] c368a72 - [clang] Merge lifetimebound and GSL code paths for lifetime analysis (#104906)

2024-08-22 Thread via cfe-commits
Author: Haojian Wu Date: 2024-08-22T10:35:49+02:00 New Revision: c368a720a0b40bb8fe4aff3971fe9a7009c85aa6 URL: https://github.com/llvm/llvm-project/commit/c368a720a0b40bb8fe4aff3971fe9a7009c85aa6 DIFF: https://github.com/llvm/llvm-project/commit/c368a720a0b40bb8fe4aff3971fe9a7009c85aa6.diff LO

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-22 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/104906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] set nonnull type for var specialized from lambda template (PR #105492)

2024-08-22 Thread Balázs Kéri via cfe-commits
balazske wrote: This fix looks good, but I can not tell now why it would not work to import the type just before construction of the `VarTemplateSpecializationDecl`. I tried it and all tests passed. Probably I can test this on a set of projects. https://github.com/llvm/llvm-project/pull/105492

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-22 Thread via cfe-commits
@@ -2142,84 +2159,44 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, -SmallVectorImpl &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHE

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-22 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/100278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sparc] Add flags to enable errata workaround pass for GR712RC and UT700 (PR #104742)

2024-08-22 Thread Daniel Cederman via cfe-commits
doac wrote: > > We have also developed some performance related patches for the Sparc > > backend, but it has been difficult to get them upstreamed as, as you say, > > few people are working on the Sparc backend. > > This is off-topic but is it possible for you to submit it (or if I can see >

[clang] 1e44e7a - [Sparc] Add flags to enable errata workaround pass for GR712RC and UT700 (#104742)

2024-08-22 Thread via cfe-commits
Author: Daniel Cederman Date: 2024-08-22T10:57:55+02:00 New Revision: 1e44e7afd799f582171a79355ce353fde134e806 URL: https://github.com/llvm/llvm-project/commit/1e44e7afd799f582171a79355ce353fde134e806 DIFF: https://github.com/llvm/llvm-project/commit/1e44e7afd799f582171a79355ce353fde134e806.dif

[clang] [Sparc] Add flags to enable errata workaround pass for GR712RC and UT700 (PR #104742)

2024-08-22 Thread Daniel Cederman via cfe-commits
https://github.com/doac closed https://github.com/llvm/llvm-project/pull/104742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Treat new expressions as simple functions (PR #105168)

2024-08-22 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet updated https://github.com/llvm/llvm-project/pull/105168 From d0f1e7032647845fbe235856998e86bfbb59e937 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Tue, 20 Aug 2024 19:40:42 +0200 Subject: [PATCH] [clang-format] Treat new expressions as simple functions ccae

[clang] [clang-format] Treat new expressions as simple functions (PR #105168)

2024-08-22 Thread kadir çetinkaya via cfe-commits
@@ -848,6 +848,8 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, const auto IsSimpleFunction = [&](const FormatToken &Tok) { if (!Tok.FakeLParens.empty() && Tok.FakeLParens.back() > prec::Unknown) return false; +if (Tok.is(tok

[clang] [Clang][AArch64] Fix typo with colon-separated syntax for system registers (PR #105608)

2024-08-22 Thread Sam Elliott via cfe-commits
lenary wrote: The existing implementation lines up with the ACLE, which specifies this colon-separated syntax: https://github.com/ARM-software/acle/blob/main/main/acle.md#aarch64-system-register - please send an update to that document before changing this behaviour. https://github.com/llvm/l

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-22 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks a lot! https://github.com/llvm/llvm-project/pull/105043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-22 Thread kadir çetinkaya via cfe-commits
@@ -4589,9 +4589,12 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (!BeforeLeft) return false; if (BeforeLeft->is(tok::coloncolon)) { - const auto *Prev = BeforeLeft->Previous; - return Left.is(tok::star) && Prev && -

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

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

[clang] [clang] Catch missing format attributes (PR #105479)

2024-08-22 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovichtec updated https://github.com/llvm/llvm-project/pull/105479 From 54e9ced2ab1a1a368046ea38b32a1f6d1ad651bc Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribute

[clang] [clang] Catch missing format attributes (PR #105479)

2024-08-22 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovichtec updated https://github.com/llvm/llvm-project/pull/105479 From dd32b036bfc9e4c0bd467a4ec6f3e27e1770e1eb Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribute

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-22 Thread Owen Pan via cfe-commits
@@ -4589,9 +4589,12 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (!BeforeLeft) return false; if (BeforeLeft->is(tok::coloncolon)) { - const auto *Prev = BeforeLeft->Previous; - return Left.is(tok::star) && Prev && -

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-22 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/105043 >From 4aa47d190a84ecd0432dc9b6db1d38b296f4df23 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 20 Aug 2024 06:44:41 -0700 Subject: [PATCH 1/4] [clang-format] Don't insert a space between :: and * Also, don't

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2024-08-22 Thread Nabeel Omer via cfe-commits
https://github.com/omern1 updated https://github.com/llvm/llvm-project/pull/101962 >From 14f3cb82f0d7e69261bd7e1317bd66392e9a2c2b Mon Sep 17 00:00:00 2001 From: Nabeel Omer Date: Mon, 5 Aug 2024 11:50:18 +0100 Subject: [PATCH 1/9] [MC] Emit a jump table size section This patch will make LLVM e

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2024-08-22 Thread Nabeel Omer via cfe-commits
@@ -2764,6 +2770,27 @@ void AsmPrinter::emitJumpTableInfo() { for (const MachineBasicBlock *MBB : JTBBs) emitJumpTableEntry(MJTI, MBB, JTI); } + + if (EmitJumpTableSizesSection && TM.getTargetTriple().isOSBinFormatELF() && omern1 wrote: I've added

[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)

2024-08-22 Thread via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + + +namespace std { + using size_t = decltype(sizeof(0)); +} + +void *operator new(std::size_t, void *p) { return p; } +void* operator new[] (std::size_t, void* p) {return p;} + + +consteval int ok() { +int i; +

[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)

2024-08-22 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/104586 >From 67201d1d2e4d092cf8712b1e1b63f2eceaf8d57c Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 9 Jul 2024 08:37:18 +0200 Subject: [PATCH 1/5] [Clang] Implement P2747 constexpr placement new In C++26 a

[clang] [clang][Bytecode] Fix void unary * operators (PR #105640)

2024-08-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/105640 Discard the subexpr. >From 811ce07c27a92a55642088f26560b4698e5bfc7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 22 Aug 2024 12:54:27 +0200 Subject: [PATCH] [clang][Bytecode] Fix voi

[clang] [clang][Bytecode] Fix void unary * operators (PR #105640)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Discard the subexpr. --- Full diff: https://github.com/llvm/llvm-project/pull/105640.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+1-1) - (modified) clang/test/AST/ByteCode/inv

[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)

2024-08-22 Thread Vlad Serebrennikov via cfe-commits
@@ -23,3 +23,29 @@ struct S { friend class C::Nested...; // expected-error {{friend declaration expands pack 'Ts' that is declared it its own template parameter list}} }; } // namespace cwg2917 + +#if __cplusplus >= 202002 + +namespace std { + using size_t = decltype(sizeof

[clang] [clang][Interp] Allow adding offsets to function pointers (PR #105641)

2024-08-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/105641 Convert them to Pointers, do the offset calculation and then convert them back to function pointers. >From af18bbdf3440b3d13077dbcfd22a04fcf0b1564b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?=

[clang] [clang][Interp] Allow adding offsets to function pointers (PR #105641)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Convert them to Pointers, do the offset calculation and then convert them back to function pointers. --- Full diff: https://github.com/llvm/llvm-project/pull/105641.diff 7 Files Affected: - (modified) cla

[clang] [clang][bytecode] Allow adding offsets to function pointers (PR #105641)

2024-08-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/105641 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix void unary * operators (PR #105640)

2024-08-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/105640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Allow adding offsets to function pointers (PR #105641)

2024-08-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/105641 >From 4285763a4138661dac7a2d4abac4e2e1cec019ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 21 Aug 2024 09:49:54 +0200 Subject: [PATCH] [clang][Interp] Allow adding offsets to functio

[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)

2024-08-22 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/104586 >From 67201d1d2e4d092cf8712b1e1b63f2eceaf8d57c Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 9 Jul 2024 08:37:18 +0200 Subject: [PATCH 1/6] [Clang] Implement P2747 constexpr placement new In C++26 a

[clang] [clang][bytecode] Allow adding offsets to function pointers (PR #105641)

2024-08-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/105641 >From 7c9321e85febf0fa177736f425fe286d24951eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 21 Aug 2024 09:49:54 +0200 Subject: [PATCH] [clang][Interp] Allow adding offsets to functio

[clang] [llvm] [NFC][SetTheory] Refactor to use const pointers and range loops (PR #105544)

2024-08-22 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov approved this pull request. https://github.com/llvm/llvm-project/pull/105544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 125aa10 - [clang][bytecode] Fix void unary * operators (#105640)

2024-08-22 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-22T14:05:17+02:00 New Revision: 125aa10b3d645bd26523a1bc321bb2e6b1cf04e1 URL: https://github.com/llvm/llvm-project/commit/125aa10b3d645bd26523a1bc321bb2e6b1cf04e1 DIFF: https://github.com/llvm/llvm-project/commit/125aa10b3d645bd26523a1bc321bb2e6b1cf04e1.diff L

[clang] [clang][bytecode] Fix void unary * operators (PR #105640)

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

[clang] [Clang] correct error message when assigning to const reference captured in lambda (PR #105647)

2024-08-22 Thread via cfe-commits
https://github.com/nfrmtk created https://github.com/llvm/llvm-project/pull/105647 Fixes:#98772 >From 4bb6969d0969ca9b4df20693107fbc1980c90f0f Mon Sep 17 00:00:00 2001 From: ivan lykov Date: Thu, 22 Aug 2024 15:10:52 +0300 Subject: [PATCH] [Clang] correct error message when assigning to const

[clang] [Clang] correct error message when assigning to const reference captured in lambda (PR #105647)

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

[clang] [Clang] correct error message when assigning to const reference captured in lambda (PR #105647)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (nfrmtk) Changes Fixes:#98772 --- Full diff: https://github.com/llvm/llvm-project/pull/105647.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaExpr.cpp (+2) - (modified) clang/test/SemaCXX/lambda-expressions.cpp (+5)

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-08-22 Thread via cfe-commits
https://github.com/DenisGZM updated https://github.com/llvm/llvm-project/pull/99646 >From 0f5f1297393e88aed06672fbc753d918a11f2b00 Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Fri, 19 Jul 2024 15:47:57 +0300 Subject: [PATCH 1/8] [NVPTX] Support __usAtomicCAS builtin --- clang/include/

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals (PR #105648)

2024-08-22 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto created https://github.com/llvm/llvm-project/pull/105648 Note, I prepared this PR to be rebased and merged with three commits that are self-sufficient and build on each other. Fix some false negatives of StackAddrEscapeChecker: - Output parameters ``` void top(int

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals (PR #105648)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Arseniy Zaostrovnykh (necto) Changes Note, I prepared this PR to be rebased and merged with three commits that are self-sufficient and build on each other. Fix some false negatives of StackAddrEscapeChecker: - Output par

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals (PR #105648)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Arseniy Zaostrovnykh (necto) Changes Note, I prepared this PR to be rebased and merged with three commits that are self-sufficient and build on each other. Fix some false negatives of StackAddrEscapeChecker: - Output parameters ``` vo

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals (PR #105648)

2024-08-22 Thread Balazs Benics via cfe-commits
steakhal wrote: Review commit by commit. https://github.com/llvm/llvm-project/pull/105648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals (PR #105648)

2024-08-22 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto edited https://github.com/llvm/llvm-project/pull/105648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals (PR #105648)

2024-08-22 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto edited https://github.com/llvm/llvm-project/pull/105648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals (PR #105648)

2024-08-22 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto converted_to_draft https://github.com/llvm/llvm-project/pull/105648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals (PR #105648)

2024-08-22 Thread Arseniy Zaostrovnykh via cfe-commits
necto wrote: It turns out that you cannot rebase&merge in llvm-project repo, so I'll create two more PRs stacked PRs - one per commit https://github.com/llvm/llvm-project/pull/105648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals (PR #105648)

2024-08-22 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/105648 >From db68dcfba96bfbf9367ba4159b6bf179c8c56f4f Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Tue, 20 Aug 2024 10:26:38 +0200 Subject: [PATCH 1/3] [analyzer] [NFC] Add tests for and refactor StackAddrE

[clang] d7da79f - [NFC][SetTheory] Refactor to use const pointers and range loops (#105544)

2024-08-22 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-08-22T05:47:31-07:00 New Revision: d7da79f2cd025ab1a526c7011aab062817a656b2 URL: https://github.com/llvm/llvm-project/commit/d7da79f2cd025ab1a526c7011aab062817a656b2 DIFF: https://github.com/llvm/llvm-project/commit/d7da79f2cd025ab1a526c7011aab062817a656b2.diff L

[clang] [llvm] [NFC][SetTheory] Refactor to use const pointers and range loops (PR #105544)

2024-08-22 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/105544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] [NFC] Add tests for and refactor StackAddrEscapeChecker (PR #105652)

2024-08-22 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto created https://github.com/llvm/llvm-project/pull/105652 These tests and refactoring are preparatory for the upcoming changes: detection of the indirect leak via global variables and output parameters. CPP-4734 --- This is 1 of three commits constituting https:/

[clang] [analyzer] [NFC] Add tests for and refactor StackAddrEscapeChecker (PR #105652)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Arseniy Zaostrovnykh (necto) Changes These tests and refactoring are preparatory for the upcoming changes: detection of the indirect leak via global variables and output parameters. CPP-4734 -

[clang] [analyzer] [NFC] Add tests for and refactor StackAddrEscapeChecker (PR #105652)

2024-08-22 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto edited https://github.com/llvm/llvm-project/pull/105652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Moving TaintPropagation checker out of alpha (PR #67352)

2024-08-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/67352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Moving TaintPropagation checker out of alpha (PR #67352)

2024-08-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: I tried to look at the mentioned 3 TPs, but the links appear to be broken. Contentwise, I assume its a pure cut-and-paste modulo replacement of `alpha` to `optin`. I have no objection from moving this checker out of alpha. https://github.com/llvm/llvm-pro

[clang] [analyzer] Moving TaintPropagation checker out of alpha (PR #67352)

2024-08-22 Thread Balazs Benics via cfe-commits
@@ -992,6 +992,241 @@ optin.portability.UnixAPI " Finds implementation-defined behavior in UNIX/Posix functions. + +optin.taint + steakhal wrote: ```suggestion optin.taint ^^^ ``` https://github.com/llvm/ll

[clang] [analyzer] Moving TaintPropagation checker out of alpha (PR #67352)

2024-08-22 Thread Balazs Benics via cfe-commits
@@ -992,6 +992,241 @@ optin.portability.UnixAPI " Finds implementation-defined behavior in UNIX/Posix functions. + +optin.taint + + +Checkers implementing +`taint analysis `_. + +.. _opti

[clang] [analyzer] Detect leak of a stack address through output arguments (PR #105653)

2024-08-22 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto created https://github.com/llvm/llvm-project/pull/105653 At this point, only functions called from other functions (i.e., not top-level) are covered. Top-level functions have a different exit sequence and will be handled by a subsequent change. CPP-4734 --- This i

[clang] [analyzer] Detect leak of a stack address through output arguments (PR #105653)

2024-08-22 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto converted_to_draft https://github.com/llvm/llvm-project/pull/105653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Detect leak of a stack address through output arguments (PR #105653)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Arseniy Zaostrovnykh (necto) Changes At this point, only functions called from other functions (i.e., not top-level) are covered. Top-level functions have a different exit sequence and will be handled by a subsequent chang

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals (PR #105648)

2024-08-22 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto edited https://github.com/llvm/llvm-project/pull/105648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Add tests for and refactor StackAddrEscapeChecker (PR #105652)

2024-08-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/105652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Add tests for and refactor StackAddrEscapeChecker 1/3 (PR #105652)

2024-08-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/105652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Detect leak of a stack address through output arguments 2/3 (PR #105653)

2024-08-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/105653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals 3/3 (PR #105648)

2024-08-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/105648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals 3/3 (PR #105648)

2024-08-22 Thread Balazs Benics via cfe-commits
steakhal wrote: I already reviewed these three. LGTM https://github.com/llvm/llvm-project/pull/105648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals 3/3 (PR #105648)

2024-08-22 Thread Arseniy Zaostrovnykh via cfe-commits
necto wrote: > It turns out that you cannot rebase&merge in llvm-project repo, so I'll > create two more PRs stacked PRs - one per commit Here are the two PRs that promote the first two commits of this branch: https://github.com/llvm/llvm-project/pull/105652 and https://github.com/llvm/llvm-p

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-22 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Note that there have been additional discussions happening on the new proposed resolution. https://lists.isocpp.org/core/2024/08/16236.php https://github.com/llvm/llvm-project/pull/101448 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [clang][analyzer] Bring alpha.security.MmapWriteExec checker out of alpha package (PR #102636)

2024-08-22 Thread Balazs Benics via cfe-commits
steakhal wrote: `nasm`, `breakpad`, `tinycbor`, `snappy`, `ffmpeg`, `libxml`, `tflite`, `tensorflow`, `abseil-cpp`, `LibreOffice`, `Redis`, `mongodb`, `PostgreSQL`, `rocksdb`, `aragondb`, `MySQL`, `HHVM`, `nginx`, `zfs`, `zstd`, `Clang/compiler-rt`, `transmission`, `OpenSSL` [and more] appears

[clang] [Clang][Sema] Rebuild template parameters for out-of-line template definitions and partial specializations (PR #104030)

2024-08-22 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/104030 >From 14db4ba124a36ea778515fe0228ae959081f6d65 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 14 Aug 2024 09:00:30 -0400 Subject: [PATCH 1/3] [Clang][Sema] Rebuild template parameters for out-o

[clang] [analyzer][NFC] Add tests for and refactor StackAddrEscapeChecker 1/3 (PR #105652)

2024-08-22 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. Nice cleanup, I especially like the through testing. https://github.com/llvm/llvm-project/pull/105652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang][AArch64] Add SME2.1 feature macros (PR #105657)

2024-08-22 Thread via cfe-commits
https://github.com/SpencerAbson created https://github.com/llvm/llvm-project/pull/105657 This patch adds the following macros to clang which are described in the alpha SME2.1 specification ([ACLE](https://github.com/ARM-software/acle/pull/309/files)). - __ARM_FEATURE_SMEB16B16 (enabled by '+s

[clang] [clang][AArch64] Add SME2.1 feature macros (PR #105657)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-clang Author: None (SpencerAbson) Changes This patch adds the following macros to clang which are described in the alpha SME2.1 specification ([ACLE](https://github.com/ARM-software/acle/pull/309/files)). - __ARM_F

[clang] c82f797 - [Clang][Sema] Rebuild template parameters for out-of-line template definitions and partial specializations (#104030)

2024-08-22 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-08-22T09:22:33-04:00 New Revision: c82f7976ae20a7c76904415eae1964bab78f1a04 URL: https://github.com/llvm/llvm-project/commit/c82f7976ae20a7c76904415eae1964bab78f1a04 DIFF: https://github.com/llvm/llvm-project/commit/c82f7976ae20a7c76904415eae1964bab78f1a04

[clang] [Clang][Sema] Rebuild template parameters for out-of-line template definitions and partial specializations (PR #104030)

2024-08-22 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/104030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] db94852 - [clang][bytecode] Allow adding offsets to function pointers (#105641)

2024-08-22 Thread via cfe-commits
Author: Timm Baeder Date: 2024-08-22T15:23:50+02:00 New Revision: db94852b9b4ca1008ef2889175fe3af51f26a5b0 URL: https://github.com/llvm/llvm-project/commit/db94852b9b4ca1008ef2889175fe3af51f26a5b0 DIFF: https://github.com/llvm/llvm-project/commit/db94852b9b4ca1008ef2889175fe3af51f26a5b0.diff L

[clang] [clang][bytecode] Allow adding offsets to function pointers (PR #105641)

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

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-08-22 Thread Sebastian Kreutzer via cfe-commits
https://github.com/sebastiankreutzer updated https://github.com/llvm/llvm-project/pull/90959 >From 5143ef41ac88d88e53ebbf7d404f5a86ccd0a5c1 Mon Sep 17 00:00:00 2001 From: Sebastian Kreutzer Date: Thu, 26 Oct 2023 15:13:05 +0200 Subject: [PATCH 1/8] [XRay] Add DSO support for XRay instrumentatio

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-08-22 Thread Sebastian Kreutzer via cfe-commits
@@ -2887,6 +2887,10 @@ def fxray_selected_function_group : HelpText<"When using -fxray-function-groups, select which group of functions to instrument. Valid range is 0 to fxray-function-groups - 1">, MarshallingInfoInt, "0">; +def fxray_enable_shared : Flag<["-"], "fxray-

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-22 Thread via cfe-commits
Sirraide wrote: > I would recommend creating an issue and see how ewg handles the new > information before reaping out a lot of code. Hmm, I mean, it looks like they’ve already thought about the consequences though, or am I missing something here, because the case that we currently support an

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-22 Thread via cfe-commits
@@ -2142,85 +2169,35 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS, OS << "#endif\n\n"; } -void NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, -SmallVectorImpl &Defs) { - OS << "#ifdef GET_NEON_IMMEDIATE_CHE

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-22 Thread via cfe-commits
@@ -1957,15 +1945,13 @@ multiclass VCMLA_ROTS { def : SOpInst<"vcmla" # ROT # "_lane", "...qI", "Q" # type, Op<(call "vcmla" # ROT, $p0, $p1, (bitcast $p0, (dup_typed laneqty , (call "vget_lane", (bitcast lanety, $p2), $p3>>; -let isLaneQ = 1 in { -

[clang] [clang][bytecode] Fix 'if consteval' in non-constant contexts (PR #104707)

2024-08-22 Thread via cfe-commits
@@ -4368,8 +4363,19 @@ template bool Compiler::visitIfStmt(const IfStmt *IS) { if (!visitDeclStmt(CondDecl)) return false; - if (!this->visitBool(IS->getCond())) -return false; + // Compile condition. + if (IS->isNonNegatedConsteval()) { +if (!this->emit

  1   2   3   4   >