[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: @AaronBallman this seems to have progressed much further after your review and is currently pending on input from you. Could you please do a round of review here/in the RFC? (Or ask someone else from the community to address your concerns and be a reviewer instead, not sur

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
@@ -113,7 +113,8 @@ New check aliases Changes in existing checks ^^ -- Added `ctime` and `localtime` to clang-tidy. +- New unsafe functions checks :doc:`bugprone-unsafe-functions-check` zimirza wrote: The `:doc:` was also wrong. I have

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-rhel` running on `ppc64le-clang-rhel-test` while building `clang,llvm` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/2167 Here is the releva

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread Ilya Biryukov via cfe-commits
@@ -1682,7 +1690,7 @@ class DeclContext { /// True if a valid hash is stored in ODRHash. This should shave off some /// extra storage and prevent CXXRecordDecl to store unused bits. -uint64_t ODRHash : 26; +uint64_t ODRHash : 25; ilya-biryukov

[clang] Thread Safety Analysis: Support passing scoped locks between functions with appropriate annotations (PR #110523)

2024-09-30 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 f4042077e2e3946ee35c1df8cab8237de6086480 f669df245c2661ad502c8f4eca2bc446ebc06606 --e

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[libcxx] [libcxxabi] [libunwind] [libc++abi][libunwind] Run c++abi and unwind tests against a fake install root (PR #110171)

2024-09-30 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/110171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread Erich Keane via cfe-commits
erichkeane wrote: > @AaronBallman this seems to have progressed much further after your review > and is currently pending on input from you. Could you please do a round of > review here/in the RFC? (Or ask someone else from the community to address > your concerns and be a reviewer instead, no

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread Erich Keane via cfe-commits
erichkeane wrote: See: https://discourse.llvm.org/t/review-availability/81342 https://github.com/llvm/llvm-project/pull/102040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 From 4fb69942effb3cf34d07f33a14a95757b6ca5ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 17:05:42 +0200 Subjec

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-09-30 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov requested changes to this pull request. https://github.com/llvm/llvm-project/pull/90634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-09-30 Thread Ilya Biryukov via cfe-commits
@@ -5444,6 +5444,43 @@ AST_MATCHER(FunctionDecl, isDefaulted) { return Node.isDefaulted(); } +/// Matches trivial methods and types. ilya-biryukov wrote: I do not think is actually matches `types`, but rather `classes` or `CXXRecordDecl`. And the question

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-09-30 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: I remember back in the day that adding new matchers was a problem because it grew the size of the files beyond some supported compiler's limit. Could @AaronBallman or someone else knowledgable about this(cc @kadircet) take a look and confirm adding matchers is fine now? h

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-09-30 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/109804 From 23b27377e556085054621f27d97059618b416695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Mon, 23 Sep 2024 15:42:20 +0200 Subject: [PATCH 1/4] [analyzer] Suppress out of bounds reports a

[clang] 511439b - [clang][x86] Make sure we undef __DEFAULT_FN_ATTRS_CONSTEXPR attributes tags at the end of the bmi headers

2024-09-30 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-09-30T17:57:12+01:00 New Revision: 511439b2821de3ea34612061a57deb71a8201c7c URL: https://github.com/llvm/llvm-project/commit/511439b2821de3ea34612061a57deb71a8201c7c DIFF: https://github.com/llvm/llvm-project/commit/511439b2821de3ea34612061a57deb71a8201c7c.diff

[clang] [Clang][Driver] Add option to provide path for multilib's YAML config file (PR #109640)

2024-09-30 Thread Lucas Duarte Prates via cfe-commits
https://github.com/pratlucas updated https://github.com/llvm/llvm-project/pull/109640 >From 45a02861ec0a8e50a57a733118e037cdd0bbafbc Mon Sep 17 00:00:00 2001 From: Lucas Prates Date: Mon, 23 Sep 2024 09:25:20 +0100 Subject: [PATCH 1/3] [Clang][Driver] Add option to provide path for multilib's

[clang] [llvm] workflows/release-binaries: Use static ZSTD on macOS (PR #109909)

2024-09-30 Thread Tom Stellard via cfe-commits
tstellar wrote: You want to be downloading and testing this artifact: ![image](https://github.com/user-attachments/assets/d0e5963d-34a3-42fe-b1db-15b83750da3b) https://github.com/llvm/llvm-project/pull/109909 ___ cfe-commits mailing list cfe-commits@

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From 7ea9d3dbb6ff74ca3f7f9b9a0c589e4a0a3366f2 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH 1/2] Add Clang attribute to ensure that fields are

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread via cfe-commits
higher-performance wrote: @erichkeane I ended up just implementing a full-ish traversal since it didn't. I'm not entirely sure if it might miss any corner cases (like anonymous objects etc.), but it should handle any cases that practically come up. Please take another look. https://github.com

[clang] [flang] [Flang][Driver] Enable the -B option (PR #109965)

2024-09-30 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. LGTM, thanks! Looks like you've addressed all comments, so feel free to land it. https://github.com/llvm/llvm-project/pull/109965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-win` running on `as-worker-93` while building `clang,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/1275 Here is the releva

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: There isn't a way to remove the 'request changes' without approval, but I did some debugging and see what I was assuming was wrong. So I don't have any concerns on the approach. However, in using it for the last few hours, I REALLY dislike the diagnost

[clang] [clang] Fix the local parameter of void type inside the `Requires` expression. (PR #109831)

2024-09-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/109831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd] [AST] Handle uninitialized type constraints (PR #110496)

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

[clang] [clang-tools-extra] [clangd] [AST] Handle uninitialized type constraints (PR #110496)

2024-09-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: Thanks again for analyzing & working on this issue. Some suggestions regarding the test: 1. As this is more of a clang issue (the offending code belongs to the serialization part of clang), so it is more appropriate to write a clang test instead of a clan

[clang] [clang-tools-extra] [clangd] [AST] Handle uninitialized type constraints (PR #110496)

2024-09-30 Thread Younan Zhang via cfe-commits
@@ -1899,7 +1899,7 @@ void ASTDeclWriter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { Record.push_back(D->wasDeclaredWithTypename()); const TypeConstraint *TC = D->getTypeConstraint(); - assert((bool)TC == D->hasTypeConstraint()); + Record.push_back(TC != nullp

[clang] [llvm] [mlir] [LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (PR #110032)

2024-09-30 Thread Rahul Joshi via cfe-commits
@@ -1556,7 +1557,7 @@ class RecordVal { bool IsUsed = false; /// Reference locations to this record value. - SmallVector ReferenceLocs; + mutable SmallVector ReferenceLocs; jurahul wrote: This was needed because the Record * pointers in `RecordRecTy::ge

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [HLSL][SPIRV] Fix calling convention for call in entry function. (PR #110275)

2024-09-30 Thread Steven Perron via cfe-commits
Andrzej =?utf-8?q?Warzyński?= ,Steven Perron Message-ID: In-Reply-To: https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/110275 >From 906a7bc775f1d22b642c1157c424a55b686cb46a Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Tue, 17 Sep 2024 16:22:57 -0400 Subjec

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: I wish we had something like this. It might be possible, but really really challenging to implement. To me the problem is that the iteration or lookups are not necessarily bad. And to determine if it's bad one needs to understand how the result of the look

[clang] [Clang][Concepts] Normalize SizeOfPackExpr's pack declaration (PR #110238)

2024-09-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/110238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

2024-09-30 Thread Matt Arsenault via cfe-commits
arsenm wrote: > With the constrained intrinsics the default is safe because optimizations > don't recognize the constrained intrinsic and thus don't know how to optimize > it. If we instead rely on the strictfp attribute then we'll need possibly > thousands of checks for this attribute, we'll

[clang] [Clang] Implement CWG 2707 "Deduction guides cannot have a trailing requires-clause" (PR #110473)

2024-09-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/110473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (PR #110032)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/110032 >From 3997e8872197ac0b296ef2f22b6e6e928baa9fca Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 25 Sep 2024 09:53:45 -0700 Subject: [PATCH] [LLVM][TableGen] Change SeachableTableEmitter to use const Record

[clang] [llvm] [mlir] [LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (PR #110032)

2024-09-30 Thread Rahul Joshi via cfe-commits
@@ -1556,7 +1557,7 @@ class RecordVal { bool IsUsed = false; /// Reference locations to this record value. - SmallVector ReferenceLocs; + mutable SmallVector ReferenceLocs; jurahul wrote: Done. PTAL https://github.com/llvm/llvm-project/pull/110032

[clang] [HLSL][SPIRV] Fix calling convention for call in entry function. (PR #110275)

2024-09-30 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/110275 >From 1c2aab054266196844f3e67d4740292a2cf7 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Tue, 17 Sep 2024 16:22:57 -0400 Subject: [PATCH 1/2] [HLSL][SPIRV] Fix calling convention for call in entry fun

[clang] [llvm] [mlir] [LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (PR #110032)

2024-09-30 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/110032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

2024-09-30 Thread Rainer Orth via cfe-commits
rorth wrote: In a local `sparcv9-sun-solaris2.11` build, I get (with `-silence-passes` removed) ``` > /var/llvm/dist-sparcv9-release-stage2-A-flang-clang19/tools/clang/stage2-bins/bin/bugpoint > -load > /var/llvm/dist-sparcv9-release-stage2-A-flang-clang19/tools/clang/stage2-bins/lib/BugpointP

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `bolt-x86_64-ubuntu-shared` running on `bolt-worker` while building `clang,llvm` at step 6 "test-build-bolt-check-bolt". Full details are available at: https://lab.llvm.org/buildbot/#/builders/151/builds/2543 Here is the rel

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -50,6 +122,107 @@ class BuiltinFunctionChecker : public Checker { } // namespace +const NoteTag *BuiltinFunctionChecker::createBuiltinNoOverflowNoteTag( +CheckerContext &C, bool bothFeasible, SVal Arg1, SVal Arg2, +SVal Result) const { + return C.getNoteTag([Resul

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -50,6 +101,44 @@ class BuiltinFunctionChecker : public Checker { } // namespace +void BuiltinFunctionChecker::HandleOverflowBuiltin(const CallEvent &Call, + CheckerContext &C, +

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -50,6 +122,107 @@ class BuiltinFunctionChecker : public Checker { } // namespace +const NoteTag *BuiltinFunctionChecker::createBuiltinNoOverflowNoteTag( +CheckerContext &C, bool bothFeasible, SVal Arg1, SVal Arg2, +SVal Result) const { + return C.getNoteTag([Resul

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -50,6 +122,107 @@ class BuiltinFunctionChecker : public Checker { } // namespace +const NoteTag *BuiltinFunctionChecker::createBuiltinNoOverflowNoteTag( +CheckerContext &C, bool bothFeasible, SVal Arg1, SVal Arg2, steakhal wrote: ```suggestion Che

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,157 @@ +// RUN: %clang_analyze_cc1 -triple x86_64-unknown-unknown -verify %s \ +// RUN: -analyzer-checker=core,debug.ExprInspection + +#define __UINT_MAX__ (__INT_MAX__ * 2U + 1U) +#define __INT_MIN__ (-__INT_MAX__ - 1) + +void clang_analyzer_dump_int(int); +void cla

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -50,6 +122,107 @@ class BuiltinFunctionChecker : public Checker { } // namespace +const NoteTag *BuiltinFunctionChecker::createBuiltinNoOverflowNoteTag( +CheckerContext &C, bool bothFeasible, SVal Arg1, SVal Arg2, +SVal Result) const { + return C.getNoteTag([Resul

[clang] [analyzer] Add optin.taint.TaintedDiv checker (PR #106389)

2024-09-30 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/106389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c0e97c4 - [Clang][LLVM][AArch64] Add intrinsic for LUTI4 SME2 instruction (#97755) (#109953)

2024-09-30 Thread via cfe-commits
Author: CarolineConcatto Date: 2024-09-30T12:59:06+01:00 New Revision: c0e97c4dfc936ed13ae9696f0615d7e648268bc9 URL: https://github.com/llvm/llvm-project/commit/c0e97c4dfc936ed13ae9696f0615d7e648268bc9 DIFF: https://github.com/llvm/llvm-project/commit/c0e97c4dfc936ed13ae9696f0615d7e648268bc9.di

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-09-30 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -3776,6 +3829,11 @@ void ExprEngine::evalEagerlyAssumeBinOpBifurcation(ExplodedNodeSet &Dst, ProgramStateRef StateTrue, StateFalse; std::tie(StateTrue, StateFalse) = state->assume(*SEV); + if (StateTrue &&

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,1450 @@ +// Like the compiler, the static analyzer treats some functions differently if NagyDonat wrote: Quick nit: this comment refers to the "static analyzer", you should probably change it to a reference to "Clang Tidy". https://github.com/llvm/ll

[clang] [clang][bytecode] Implement ia32_bextr builitns (PR #110513)

2024-09-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/110513 None >From 73e8f295b39674ed300534d85872fc0ba4821a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 30 Sep 2024 16:08:07 +0200 Subject: [PATCH] [clang][bytecode] Implement ia32_bextr bu

[clang] [clang][x86] Add constexpr support for BZHI intrinsics (PR #110508)

2024-09-30 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/110508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Implement ia32_bextr builitns (PR #110513)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/110513.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+36) ``diff diff --git a/clang/lib/AST/ByteCode/Int

[clang] [HLSL][SPIRV] Fix calling convention for call in entry function. (PR #110275)

2024-09-30 Thread Steven Perron via cfe-commits
s-perron wrote: > LGTM! I think changing the mangling for Vulkan is the best solution here. > > One small comment, later on if/when you decide to use SPIRVBuiltins.cpp/.td > for lowering builtins, there might be additional changes needed. The lookup > function expects Itanium demangled strings

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 From 4fb69942effb3cf34d07f33a14a95757b6ca5ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 17:05:42 +0200 Subjec

[clang] [Clang][Driver] Add option to provide path for multilib's YAML config file (PR #109640)

2024-09-30 Thread Lucas Duarte Prates via cfe-commits
pratlucas wrote: > You need to check the command line arg inside `BareMetal::findMultilibs`, as > that function does not call `findMultilibsFromYAML` at all if the default > path does not exist. (This was picked up in CI.) Done. I also had untangle a bit the sysroot computation from the defaul

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 From 4fb69942effb3cf34d07f33a14a95757b6ca5ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 17:05:42 +0200 Subjec

[clang] [llvm] workflows/release-binaries: Use static ZSTD on macOS (PR #109909)

2024-09-30 Thread Keith Smiley via cfe-commits
keith wrote: The build got further this time, but the binaries uploaded from this step: https://github.com/user-attachments/assets/e27c3ab4-4f1f-44a1-a118-62d437084c65";> still have the issue. I expected a new binary here, the same 2 clangs existed, am I looking in the right place? https://gi

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 From 4fb69942effb3cf34d07f33a14a95757b6ca5ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 17:05:42 +0200 Subjec

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-09-30 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm edited https://github.com/llvm/llvm-project/pull/109837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][x86] Add constexpr support for PDEP/PEXT intrinsics (PR #110535)

2024-09-30 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/110535 None >From dd0a2928258eb083799dab03dff3a2f0b8a5f664 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 30 Sep 2024 17:48:46 +0100 Subject: [PATCH] [clang][x86] Add constexpr support for PDEP/PEXT intrinsic

[clang] [clang][x86] Add constexpr support for PDEP/PEXT intrinsics (PR #110535)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Simon Pilgrim (RKSimon) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/110535.diff 6 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+2) - (modified) clang/include/clang/Basic/BuiltinsX86.def (+2-2)

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 From 4fb69942effb3cf34d07f33a14a95757b6ca5ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 17:05:42 +0200 Subjec

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] Run backdeployment CI on Github hosted runners (PR #109984)

2024-09-30 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/109984 >From 8b98482170459226ddfe7ba77f6b88f20d27d319 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 25 Sep 2024 09:55:53 -0400 Subject: [PATCH] [runtimes] Run backdeployment CI on Github hosted runners This r

[clang] [clang][x86] Add constexpr support for PDEP/PEXT intrinsics (PR #110535)

2024-09-30 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 8815328b6bf0f8c5088f6df73ad853a5aba159d9 dd0a2928258eb083799dab03dff3a2f0b8a5f664 --e

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,157 @@ +// RUN: %clang_analyze_cc1 -triple x86_64-unknown-unknown -verify %s \ +// RUN: -analyzer-checker=core,debug.ExprInspection + +#define __UINT_MAX__ (__INT_MAX__ * 2U + 1U) +#define __INT_MIN__ (-__INT_MAX__ - 1) + +void clang_analyzer_dump_int(int); +void cla

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Looks fantastic! I have no functional remarks. I only sprinkled it with some nits, but other than those it's perfect. It's already good, I'll let you decide if you want to do the final touches or not as those may be more subjective suggest

[clang] [analyzer] Model overflow builtins (PR #102602)

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

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -327,6 +327,8 @@ Static Analyzer New features +- Now CSA models `__builtin_*_overflow` functions. steakhal wrote: ```suggestion - Now CSA models `__builtin_*_overflow` functions. (#GH102602) ``` https://github.com/llvm/llvm-project/pull/10260

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -16,21 +16,93 @@ #include "clang/Basic/Builtins.h" #include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h" +#include "clang/StaticAnalyzer/Checkers/Taint.h" #include "clang/StaticAnalyzer/Core/Checker.h" #include "clang/StaticAnalyzer/Core/CheckerManager.h"

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output text \ +// RUN: -verify %s + +void test_no_overflow_note(int a, int b) +{ + int res; + + if (__builtin_add_overflow(a, b, &res)) // expected-note {{Assuming overflow does not happen}} -

[clang] [clang][x86] Add constexpr support for LZCNT/TZCNT intrinsics (PR #110499)

2024-09-30 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/110499 None >From b61842abda168ea02bb6b25598ce6d08757bb4f7 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 30 Sep 2024 13:21:42 +0100 Subject: [PATCH] [clang][x86] Add constexpr support for LZCNT/TZCNT intrins

[clang] [clang] Extend lifetimebound analysis to detect within-initializer assignments between pointer-like objects. (PR #97473)

2024-09-30 Thread Haojian Wu via cfe-commits
hokein wrote: The feature has already been implemented in another pull request, so I will close this one now. https://github.com/llvm/llvm-project/pull/97473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang] Extend lifetimebound analysis to detect within-initializer assignments between pointer-like objects. (PR #97473)

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

[clang] [libcxx] [libc++][modules] Rewrite the modulemap to have fewer top-level modules (PR #110501)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) Changes This is a re-application of bc6bd3bc1e9 which was reverted in f11abac6524 because it broke the Clang pre-commit CI. Original commit message: This patch rewrites the modulemap to have fewer top-level module

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread via cfe-commits
@@ -0,0 +1,1450 @@ +// Like the compiler, the static analyzer treats some functions differently if vabridgers wrote: Will do, thanks Donat https://github.com/llvm/llvm-project/pull/110471 ___ cfe-commits mailing list c

[clang] [clang][CodeGen] Emit improved memory effects and return status for AsmStmt (PR #110510)

2024-09-30 Thread Bruno De Fraine via cfe-commits
https://github.com/brunodf-snps created https://github.com/llvm/llvm-project/pull/110510 This patch adds an appropriate LLVM memory effects attribute and `willreturn` attribute to asm call instructions for extended asm statements. The existing code of EmitAsmStmt seems to have been written bef

[clang] [clang][CodeGen] Emit improved memory effects and return status for AsmStmt (PR #110510)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Bruno De Fraine (brunodf-snps) Changes This patch adds an appropriate LLVM memory effects attribute and `willreturn` attribute to asm call instructions for extended asm statements. The existing code of EmitAsmStmt seems to have be

[clang] [Clang][CodeGen] Emit load of GEP after EmitMemberExpr (PR #110487)

2024-09-30 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: Fixes the kernel issue for me. I closed #110437 in favor of this one https://github.com/llvm/llvm-project/pull/110487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110437)

2024-09-30 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: Closing in favor of #110487 https://github.com/llvm/llvm-project/pull/110437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110437)

2024-09-30 Thread Jan Hendrik Farr via cfe-commits
https://github.com/Cydox closed https://github.com/llvm/llvm-project/pull/110437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Emit load of GEP after EmitMemberExpr (PR #110487)

2024-09-30 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: Wait, this introduces a regression when the inner struct is directly nested without using a pointer like so: Without this change the code below will return 64, with my fix it will also return 64, with this fix it will SEGFAULT. ```C #include #include #include struct variable

[clang] [analyzer] Add optin.taint.TaintedDiv checker (PR #106389)

2024-09-30 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/106389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd] [AST] Handle uninitialized type constraints (PR #110496)

2024-09-30 Thread Florian Albrechtskirchinger via cfe-commits
https://github.com/falbrechtskirchinger created https://github.com/llvm/llvm-project/pull/110496 Note: This patch is based on the assumption, that an assertion causing a crash in clangd, is incorrect. Alternatively, the true error may lie elsewhere, possibly in ´Sema::BuildTypeConstraint`/`Sem

[clang] [clang-tools-extra] [clangd] [AST] Handle uninitialized type constraints (PR #110496)

2024-09-30 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] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-30 Thread Haojian Wu via cfe-commits
@@ -1216,10 +1328,280 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-30 Thread Haojian Wu via cfe-commits
@@ -634,7 +634,7 @@ struct ConvertConstructorToDeductionGuideTransform { // Find all template parameters that appear in the given DeducedArgs. // Return the indices of the template parameters in the TemplateParams. -SmallVector TemplateParamsReferencedInTemplateArgumentList( +

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-30 Thread Haojian Wu via cfe-commits
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output text \ +// RUN: -verify %s + +void test_no_overflow_note(int a, int b) +{ + int res; + + if (__builtin_add_overflow(a, b, &res)) // expected-note {{Assuming overflow does not happen}} -

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-30 Thread Haojian Wu via cfe-commits
@@ -1216,10 +1328,280 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-30 Thread Haojian Wu via cfe-commits
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-30 Thread Haojian Wu via cfe-commits
@@ -936,19 +940,21 @@ Expr *buildIsDeducibleConstraint(Sema &SemaRef, Context.DeclarationNames.getCXXDeductionGuideName(AliasTemplate)); }; + TemplateDecl *TD = DeducingTemplate ? DeducingTemplate : AliasTemplate; + SmallVector IsDeducibleTypeTraitArgs = {

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-09-30 Thread Jan Hendrik Farr via cfe-commits
https://github.com/Cydox created https://github.com/llvm/llvm-project/pull/110497 Fixes #110385 Fix counted_by attribute for cases where the flexible array member is accessed through struct pointer inside another struct: ``` struct variable { int a; int b; int length;

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-30 Thread Haojian Wu via cfe-commits
@@ -944,12 +950,72 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +struct InheritedConstructorDeductionInfo { + // Class template for which we are declaring deduction guides + // This is `C` i

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-30 Thread Haojian Wu via cfe-commits
@@ -944,12 +950,67 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +struct InheritedConstructorDeductionInfo { + TemplateDecl *DerivedClassTemplate; hokein wrote: Thanks, it is

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/110471 >From 60c09775bdd770ebf516114a322df4ba6cbd2166 Mon Sep 17 00:00:00 2001 From: einvbri Date: Thu, 26 Sep 2024 16:24:59 +0200 Subject: [PATCH] [clang-tidy] [analyzer] Nondeterministic pointer usage improvement

[clang] [Clang] Implement CWG 2707 "Deduction guides cannot have a trailing requires-clause" (PR #110473)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes Closes https://github.com/llvm/llvm-project/issues/98595 --- Full diff: https://github.com/llvm/llvm-project/pull/110473.diff 9 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+3) - (modified) c

[clang] [Clang] Implement CWG 2707 "Deduction guides cannot have a trailing requires-clause" (PR #110473)

2024-09-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/110473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][SPIRV] Fix calling convention for call in entry function. (PR #110275)

2024-09-30 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/110275 >From 906a7bc775f1d22b642c1157c424a55b686cb46a Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Tue, 17 Sep 2024 16:22:57 -0400 Subject: [PATCH] [HLSL][SPIRV] Fix calling convention for call in entry functio

<    1   2   3   4   5   6   >