[llvm] [lldb] [mlir] [flang] [clang-tools-extra] [clang] [compiler-rt] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-02 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/69493 >From 3a394ce5d4d7d91251337bd0a2c1c1a074eb37e6 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 17 Oct 2023 19:24:12 -0400 Subject: [PATCH 1/6] [Profile] Add binary profile correlation. --- clang/lib/CodeGe

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-11-02 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 e6c0e8565cb05d5884de294b546dac85bc11b497 b46d376e803bae29231e313a623f508e22e6c9d6 --

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-11-02 Thread via cfe-commits
https://github.com/wheatman updated https://github.com/llvm/llvm-project/pull/69061 >From 20e471721bbb17701954c3c6bf7f4342dd9bc3e2 Mon Sep 17 00:00:00 2001 From: Brian Wheatman Date: Sat, 14 Oct 2023 12:02:19 -0400 Subject: [PATCH] Remove warnings from -Wchar-subscripts for known positive cons

[clang] [clang] Do not pass -canonical-system-headers on Windows by default (PR #71097)

2023-11-02 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/71097 Canonicalizing paths on Windows leads to unexpected things like changing drive letters. As a short term fix, do not canonicalize system headers on Windows by default. Fixes #70011 >From 3d519b42c350417727570ad

[clang] [HLSL] Vector vector standard conversions (PR #71098)

2023-11-02 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/71098 HLSL supports vector truncation and element conversions as part of standard conversion sequences. The vector truncation conversion is a C++ second conversion in the conversion sequence. If a vector truncation

[clang] [HLSL] Vector vector standard conversions (PR #71098)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Chris B (llvm-beanz) Changes HLSL supports vector truncation and element conversions as part of standard conversion sequences. The vector truncation conversion is a C++ second conversion in the conversion sequence. If a vector truncation i

[clang] [clang] Do not pass -canonical-system-headers on Windows by default (PR #71097)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Arthur Eubanks (aeubanks) Changes Canonicalizing paths on Windows leads to unexpected things like changing drive letters. As a short term fix, do not canonicalize system headers on Windows by default. Fixes #70011 --- Full diff: h

[llvm] [clang] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Petr Hosek via cfe-commits
petrhosek wrote: I'm a bit concerned about the use of `hasCorrelation`. We require the runtime to check the flag and omit the data and names section if set which introduces a potential issue: since we emit the version in every TU and u se COMDAT to deduplicate them, but that means that if you

[llvm] [clang] [clang-tools-extra] [Clang][Sema] Skip RecordDecl when checking scope of declarations (PR #69432)

2023-11-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/69432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [libc] [libcxx] [lldb] [flang] [clang-tools-extra] [lld] [libunwind] [clang] [compiler-rt] Test pr (PR #71086)

2023-11-02 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/71086 >From 340e3777509f70b5b300adcb181261e84247cf1a Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 23 Oct 2023 12:51:21 -0700 Subject: [PATCH 1/5] Revert "[clang] Support fixed point types in C++ (#67750)"

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-11-02 Thread Gábor Spaits via cfe-commits
@@ -0,0 +1,327 @@ +//===- StdVariantChecker.cpp -*- 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: Ap

[clang] [HLSL] Vector vector standard conversions (PR #71098)

2023-11-02 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 0e6c679c1a5c0d3f101335c904583b5d62cb51d3 73c0b9f0bdf44710a290a17c8d87bc0e3db393ef --

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2023-11-02 Thread Zaara Syeda via cfe-commits
@@ -421,13 +421,102 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm_unreachable("Unexpected C++ library type; only libc++ is supported."); } +// This function processes all the mtocdata options to build the final +// simplified toc data options to pass

[compiler-rt] [llvm] [clang] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > I'm a bit concerned about the use of hasCorrelation. We require the runtime > to check the flag and omit the data and names section if set which introduces > a potential issue: since we emit the version in every TU and u se COMDAT to > deduplicate them, but that means that if

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread Piotr Zegar via cfe-commits
@@ -79,6 +79,10 @@ void InlineFunctionDeclCheck::check(const MatchFinder::MatchResult &Result) { if (MethodDecl->getParent()->isLambda()) return; + // Ignore implicit functions (e.g. implicit constructors or destructors) + if (FuncDecl->isImplicit()) -

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, Consider also adding tests for default and deleted constructors or assign operators, I think that they also could generate false-positive. https://github.com/llvm/llvm-project/pull/71095 _

[PATCH] D151730: [RISCV] Support target attribute for function

2023-11-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:229 +resolveTargetAttrOverride(const std::vector &FeaturesVec) { + if (!llvm::is_contained(FeaturesVec, "__RISCV_TargetAttrNeedOverride")) +return FeaturesVec; Can we use somet

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread Piotr Zegar via cfe-commits
@@ -3,6 +3,7 @@ llvmlibc-inline-function-decl = -Checks that all implicit and explicit inline functions in header files are -tagged with the ``LIBC_INLINE`` macro. See the `libc style guide -`_ for more inf

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-11-02 Thread David Blaikie via cfe-commits
dwblaikie wrote: FWIW, we saw failures at Google (where, to the best of my knowledge, we aren't using named modules at all) that look like this: ``` error: '#include ' attaches the declarations to the named module '.get', which is not usually intended; consider moving that directive before the

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread via cfe-commits
@@ -79,6 +79,10 @@ void InlineFunctionDeclCheck::check(const MatchFinder::MatchResult &Result) { if (MethodDecl->getParent()->isLambda()) return; + // Ignore implicit functions (e.g. implicit constructors or destructors) + if (FuncDecl->isImplicit()) -

[clang] 2c2fb8e - [clang-format] Treat empty for/while loops as short loops (#70768)

2023-11-02 Thread via cfe-commits
Author: Owen Pan Date: 2023-11-02T14:09:00-07:00 New Revision: 2c2fb8e10a12774bae86a5ff60fd67c5dc5e220f URL: https://github.com/llvm/llvm-project/commit/2c2fb8e10a12774bae86a5ff60fd67c5dc5e220f DIFF: https://github.com/llvm/llvm-project/commit/2c2fb8e10a12774bae86a5ff60fd67c5dc5e220f.diff LOG:

[clang] [clang-format] Treat empty for/while loops as short loops (PR #70768)

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

[clang] 89d5635 - [lld][WebAssembly] Add --keep-section flag

2023-11-02 Thread Sam Clegg via cfe-commits
Author: Sam Clegg Date: 2023-11-02T14:23:45-07:00 New Revision: 89d5635f0a834e53ac5446c6d6ea38d9166b2a55 URL: https://github.com/llvm/llvm-project/commit/89d5635f0a834e53ac5446c6d6ea38d9166b2a55 DIFF: https://github.com/llvm/llvm-project/commit/89d5635f0a834e53ac5446c6d6ea38d9166b2a55.diff LOG

[PATCH] D149917: [lld][WebAssembly] Add --keep-section flag

2023-11-02 Thread Sam Clegg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG89d5635f0a83: [lld][WebAssembly] Add --keep-section flag (authored by sbc100). Changed prior to commit: https://reviews.llvm.org/D149917?vs=557960&id=557993#toc Repository: rG LLVM Github Monorepo C

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread via cfe-commits
https://github.com/michaelrj-google updated https://github.com/llvm/llvm-project/pull/71095 >From 0ca1191c2235881493a82f040c437d8da8a82862 Mon Sep 17 00:00:00 2001 From: Michael Jones Date: Thu, 2 Nov 2023 12:23:34 -0700 Subject: [PATCH 1/2] [clang-tidy][libc] Ignore implicit function inline T

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread via cfe-commits
@@ -3,6 +3,7 @@ llvmlibc-inline-function-decl = -Checks that all implicit and explicit inline functions in header files are -tagged with the ``LIBC_INLINE`` macro. See the `libc style guide -`_ for more inf

[clang] [clang][modules] Track included files per submodule (PR #71117)

2023-11-02 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/71117 None >From 9debc58d5135fbde51967dfb076d0ec5d954df38 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 2 Nov 2023 14:35:30 -0700 Subject: [PATCH] [clang][modules] Track included files per submodule ---

[clang] [clang][modules] Track included files per submodule (PR #71117)

2023-11-02 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 89d5635f0a834e53ac5446c6d6ea38d9166b2a55 9debc58d5135fbde51967dfb076d0ec5d954df38 --

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread Piotr Zegar via cfe-commits
@@ -79,6 +79,10 @@ void InlineFunctionDeclCheck::check(const MatchFinder::MatchResult &Result) { if (MethodDecl->getParent()->isLambda()) return; + // Ignore functions that have been deleted. + if (FuncDecl->isDeleted()) PiotrZSL wrote: Instead o

[mlir] [lldb] [libcxxabi] [clang] [compiler-rt] [llvm] [libcxx] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-11-02 Thread Anton Rydahl via cfe-commits
@@ -466,6 +466,114 @@ Unpoisoning may not be an option, if (for example) you are not maintaining the a * You are using allocator, which does not call destructor during deallocation. * You are aware that memory allocated with an allocator may be accessed, even when unused by co

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread Piotr Zegar via cfe-commits
@@ -304,6 +304,10 @@ Changes in existing checks customizable namespace. This further allows for testing the libc when the system-libc is also LLVM's libc. +- Improved :doc:`llvmlibc-inline-function-decl + ` to properly ignore implicit PiotrZSL wrote: im

[clang] [clang-repl] [test] Make an XFAIL more precise (PR #70991)

2023-11-02 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > FTR, the "Worker" tab on that buildbot page will point you to the maintainer. Ah, there it is, I tried looking around, but overlooked that one... > But tagging me is also fine in general. Ok, thanks! > I'm unable to repro the problem locally because my local build doesn't se

[clang] [clang-repl] [test] Make an XFAIL more precise (PR #70991)

2023-11-02 Thread via cfe-commits
dyung wrote: If you still need help reproducing or debugging the issue on our bot, please let me know. https://github.com/llvm/llvm-project/pull/70991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (PR #69975)

2023-11-02 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/69975 >From 5dd9d64726dba95f71dfb276dd1be4d386313a99 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 10 Oct 2023 14:16:13 -0700 Subject: [PATCH 1/6] [clang][modules] Make `DIAGNOSTIC_OPTIONS` skippable ---

[clang] 6c465a2 - [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (#69975)

2023-11-02 Thread via cfe-commits
Author: Jan Svoboda Date: 2023-11-02T15:07:58-07:00 New Revision: 6c465a201b02f3316efc55eef6909080866f6fb0 URL: https://github.com/llvm/llvm-project/commit/6c465a201b02f3316efc55eef6909080866f6fb0 DIFF: https://github.com/llvm/llvm-project/commit/6c465a201b02f3316efc55eef6909080866f6fb0.diff L

[clang] [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (PR #69975)

2023-11-02 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/69975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][libc] Ignore implicit function inline (PR #71095)

2023-11-02 Thread via cfe-commits
https://github.com/michaelrj-google updated https://github.com/llvm/llvm-project/pull/71095 >From 0ca1191c2235881493a82f040c437d8da8a82862 Mon Sep 17 00:00:00 2001 From: Michael Jones Date: Thu, 2 Nov 2023 12:23:34 -0700 Subject: [PATCH 1/3] [clang-tidy][libc] Ignore implicit function inline T

[clang] [clang-repl] [test] Make an XFAIL more precise (PR #70991)

2023-11-02 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > If you still need help reproducing or debugging the issue on our bot, please > let me know. Thanks, much appreciated. Can you test if https://github.com/mstorsjo/llvm-project/commit/clang-repl-xfail seems to run correctly in this environment? Otherwise I'll try to push it to

[compiler-rt] [clang-tools-extra] [llvm] [clang] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)

2023-11-02 Thread Wenju He via cfe-commits
https://github.com/wenju-he edited https://github.com/llvm/llvm-project/pull/70611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang] [clang][DebugInfo] Emit global variable definitions for static data members with constant initializers (PR #70639)

2023-11-02 Thread via cfe-commits
avl-llvm wrote: > > 2. always put DW_AT_const_value in DW_TAG_member. > > My understanding is that this is not possible. Dependent initializer > expressions can't be evaluated in all cases - we're only allowed to evaluate > them in the places the language allows us to, otherwise we might produ

[clang] 14f2025 - [clang][CGExpr] Remove no-op ptr-to-ptr bitcasts (NFC)

2023-11-02 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2023-11-02T17:50:46-05:00 New Revision: 14f2025671f82192d38e1db9bc185790e1221cd3 URL: https://github.com/llvm/llvm-project/commit/14f2025671f82192d38e1db9bc185790e1221cd3 DIFF: https://github.com/llvm/llvm-project/commit/14f2025671f82192d38e1db9bc185790e1221cd3.diff

[clang-tools-extra] [clang] [clang][AST] Fix crash in MatchChildASTVisitor::TraverseLambdaExpr (PR #70962)

2023-11-02 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/70962 >From 3e37e7e4afe806993acbba3d7663fdbfe80120c7 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Wed, 1 Nov 2023 17:01:25 + Subject: [PATCH 1/2] [clang][AST] Fix crash in MatchChildASTVisitor::TraverseLambda

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/70480 >From 99ec6e055dd32a86bf6d589a6895658dcbe1d7bd Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Fri, 27 Oct 2023 08:34:37 -0700 Subject: [PATCH 1/6] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag -f

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Kai Luo via cfe-commits
https://github.com/bzEq updated https://github.com/llvm/llvm-project/pull/70480 >From 99ec6e055dd32a86bf6d589a6895658dcbe1d7bd Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Fri, 27 Oct 2023 08:34:37 -0700 Subject: [PATCH 1/6] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag -fbound

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Dan Liew via cfe-commits
@@ -0,0 +1,12 @@ +// This reports a warning to follow the default behavior of ClangAs. +// RUN: %clang -fexperimental-bounds-safety -x assembler -c %s -o /dev/null 2>&1 | FileCheck -check-prefix WARN %s delcypher wrote: @rapidsna Maybe there should be a version

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-11-02 Thread Yeoul Na via cfe-commits
rapidsna wrote: > @kees, @nickdesaulniers, @rapidsna, and @apple-fcloutier Should this feature > support a `__bdos` to an address inside the FAM? > > ``` > #include > #include > > struct flex { > double dummy; > char count; > char fam[] __attribute__((counted_by(count

[clang-tools-extra] [clang] [llvm] [compiler-rt] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)

2023-11-02 Thread Wenju He via cfe-commits
https://github.com/wenju-he edited https://github.com/llvm/llvm-project/pull/70611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,12 @@ +// This reports a warning to follow the default behavior of ClangAs. +// RUN: %clang -fexperimental-bounds-safety -x assembler -c %s -o /dev/null 2>&1 | FileCheck -check-prefix WARN %s rapidsna wrote: I think `-x assembler` and `-x assembler-wi

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[openmp] [clang] [OpenMP] Add support for Solaris/x86_64 (PR #70593)

2023-11-02 Thread Brad Smith via cfe-commits
brad0 wrote: I'd like to get this in. https://github.com/llvm/llvm-project/pull/70593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang-tools-extra] [clang] [llvm] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)

2023-11-02 Thread Wenju He via cfe-commits
@@ -334,6 +335,15 @@ template<> struct simplify_type { } }; +template <> struct GraphTraits { wenju-he wrote: added 3 more runs on RHEL9 today, the compile time diff is very small. https://github.com/llvm/llvm-project/pull/70611 ___

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-11-02 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D148474: [Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision

2023-11-02 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. ping @dim @rsmith @aaron.ballman CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148474/new/ https://reviews.llvm.org/D148474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-11-02 Thread Yeoul Na via cfe-commits
rapidsna wrote: ``` #include #include struct flex { int c; int fam[] __attribute__((counted_by(c))); }; int main() { struct flex *p = (struct flex *)malloc(sizeof(struct flex) + sizeof(int) * 10); p->c = 100; printf("%lu\n", __builtin_dynamic_object_size(&p->fam[0], 0)); /

[llvm] [clang] [RISCV] Fix wrong implication for zvknhb. (PR #66860)

2023-11-02 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/66860 >From a43d20450eef2d41e88ab867de2656e2fd9631b7 Mon Sep 17 00:00:00 2001 From: 4vtomat Date: Tue, 19 Sep 2023 23:06:01 -0700 Subject: [PATCH 1/3] [RISCV] Fix wrong implication for zvknhb. --- clang/include/clang

[clang] 65dc96c - [RISCV] Fix wrong implication for zvknhb. (#66860)

2023-11-02 Thread via cfe-commits
Author: Brandon Wu Date: 2023-11-03T09:32:21+08:00 New Revision: 65dc96c2cfa480b070c7913ac5e313c98ca96520 URL: https://github.com/llvm/llvm-project/commit/65dc96c2cfa480b070c7913ac5e313c98ca96520 DIFF: https://github.com/llvm/llvm-project/commit/65dc96c2cfa480b070c7913ac5e313c98ca96520.diff LO

[llvm] [clang] [RISCV] Fix wrong implication for zvknhb. (PR #66860)

2023-11-02 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat closed https://github.com/llvm/llvm-project/pull/66860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-11-02 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > FWIW, we saw failures at Google (where, to the best of my knowledge, we > aren't using named modules at all) that look like this: > > ``` > error: '#include ' attaches the declarations to the named module > '.get', which is not usually intended; consider moving that directi

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-11-02 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/66583 >From 8b8acedc0e6c432545744a113128cfcb4f2da7e5 Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 16 Sep 2023 16:24:13 +0200 Subject: [PATCH 01/20] [clang-tidy]

[clang] [clang-tools-extra] [llvm] [SimplifyCFG] Prevent merging cbranch to cbranch if the branch probability from the first to second is too low. (PR #69375)

2023-11-02 Thread Nicolai Hähnle via cfe-commits
nhaehnle wrote: I've been puzzling over the rationale for looking at `MD_unpredictable`. How can a branch that is heavily biased to one side be unpredictable? https://github.com/llvm/llvm-project/pull/69375 ___ cfe-commits mailing list cfe-commits@lis

[llvm] [clang] [flang] [clang-tools-extra] [lldb] [IndVars] Add check of loop invariant for trunc instructions (PR #71072)

2023-11-02 Thread via cfe-commits
@@ -0,0 +1,28 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; RUN: opt < %s -passes=indvars -S | FileCheck %s + +declare void @foo(i16 noundef) + +; Function Attrs: mustprogress noreturn uwtable +define void @bar(i64 noundef %ptr) { +; CHECK-LABEL:

[llvm] [clang] [clang-tools-extra] Improve selection of conditional branch on amdgcn.ballot!=0 condition in SelectionDAG. (PR #68714)

2023-11-02 Thread Nicolai Hähnle via cfe-commits
https://github.com/nhaehnle approved this pull request. https://github.com/llvm/llvm-project/pull/68714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] Improve selection of conditional branch on amdgcn.ballot!=0 condition in SelectionDAG. (PR #68714)

2023-11-02 Thread Nicolai Hähnle via cfe-commits
nhaehnle wrote: Though, on second thought, shouldn't there be some wave64 tests? https://github.com/llvm/llvm-project/pull/68714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[openmp] [clang] [OpenMP] Add support for Solaris/x86_64 (PR #70593)

2023-11-02 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. LG https://github.com/llvm/llvm-project/pull/70593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Support Xsfvfwmaccqqq extensions (PR #68296)

2023-11-02 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/68296 >From 625c45da9928c3da295bba28708c992a42f3cd52 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Wed, 4 Oct 2023 10:23:52 -0700 Subject: [PATCH] [RISCV][SiFive] Support Xsfvfwmaccqqq extensions Bfloat16 Matrix Mul

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

2023-11-02 Thread Owen Pan via cfe-commits
owenca wrote: @rymiel can we merge this? https://github.com/llvm/llvm-project/pull/69473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 945d2e6 - [RISCV] Support Xsfvfwmaccqqq extensions (#68296)

2023-11-02 Thread via cfe-commits
Author: Brandon Wu Date: 2023-11-03T10:08:26+08:00 New Revision: 945d2e6e603dd9cc5d155a3a34b67ecf17b91b68 URL: https://github.com/llvm/llvm-project/commit/945d2e6e603dd9cc5d155a3a34b67ecf17b91b68 DIFF: https://github.com/llvm/llvm-project/commit/945d2e6e603dd9cc5d155a3a34b67ecf17b91b68.diff LO

[llvm] [clang] [RISCV] Support Xsfvfwmaccqqq extensions (PR #68296)

2023-11-02 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat closed https://github.com/llvm/llvm-project/pull/68296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] [test] Make an XFAIL more precise (PR #70991)

2023-11-02 Thread via cfe-commits
dyung wrote: > > If you still need help reproducing or debugging the issue on our bot, > > please let me know. > > Thanks, much appreciated. Can you test if > [mstorsjo@clang-repl-xfail](https://github.com/mstorsjo/llvm-project/commit/clang-repl-xfail) > seems to run correctly in this environ

[clang] [llvm] [RISCV] Support Xsfvfnrclipxfqf extensions (PR #68297)

2023-11-02 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat closed https://github.com/llvm/llvm-project/pull/68297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Fix ModuleDeclState transition when module is used as a regular identifier (PR #71134)

2023-11-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/71134 `ModuleDeclState` is incorrectly changed to `NamedModuleImplementation` for `struct module {}; void foo(module a);`. This is mostly benign but leads to a spurious warning after #69555. A real world example is: ``

[clang] [Modules] Fix ModuleDeclState transition when module is used as a regular identifier (PR #71134)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes `ModuleDeclState` is incorrectly changed to `NamedModuleImplementation` for `struct module {}; void foo(module a);`. This is mostly benign but leads to a spurious warning after #69555. A real world example is

[clang] [C++20] [Modules] Warn if we found #include in module purview (PR #69555)

2023-11-02 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > FWIW, we saw failures at Google (where, to the best of my knowledge, we > > aren't using named modules at all) that look like this: > > ``` > > error: '#include ' attaches the declarations to the named module > > '.get', which is not usually intended; consider moving that dir

[PATCH] D154396: [clang] Add support for SerenityOS

2023-11-02 Thread Brad Smith via Phabricator via cfe-commits
brad added inline comments. Comment at: clang/lib/Driver/ToolChains/Serenity.cpp:147 + } + + if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs, Add in here.. ``` // Silence warnings when linking C code with a C++ '-stdlib' argument. Ar

[clang] b5b251a - [OpenMP] Add support for Solaris/x86_64 (#70593)

2023-11-02 Thread via cfe-commits
Author: Brad Smith Date: 2023-11-02T23:29:02-04:00 New Revision: b5b251aac80fbcfa224b0a83efa0a12bd747fafe URL: https://github.com/llvm/llvm-project/commit/b5b251aac80fbcfa224b0a83efa0a12bd747fafe DIFF: https://github.com/llvm/llvm-project/commit/b5b251aac80fbcfa224b0a83efa0a12bd747fafe.diff LO

[openmp] [clang] [OpenMP] Add support for Solaris/x86_64 (PR #70593)

2023-11-02 Thread Brad Smith via cfe-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/70593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][Solaris][NFC] A little bit of clean up (PR #69867)

2023-11-02 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/69867 >From 1aa7e406378adb1b7c3ba79b10d2dcb0a48c4ce6 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 22 Oct 2023 00:55:07 -0400 Subject: [PATCH] [Driver][Solaris][NFC] A little bit of clean up --- clang/lib/Driver/

[clang] 063e3fe - [clang-format] Skip PP directives when determining brace kind (#69473)

2023-11-02 Thread via cfe-commits
Author: Emilia Kond Date: 2023-11-03T05:51:20+02:00 New Revision: 063e3fe648533004e6970ab767ece845e3c0afb1 URL: https://github.com/llvm/llvm-project/commit/063e3fe648533004e6970ab767ece845e3c0afb1 DIFF: https://github.com/llvm/llvm-project/commit/063e3fe648533004e6970ab767ece845e3c0afb1.diff L

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

2023-11-02 Thread Emilia Kond via cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/69473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

2023-11-02 Thread Emilia Kond via cfe-commits
rymiel wrote: Thank you for reminding me, I may have forgotten this was here! https://github.com/llvm/llvm-project/pull/69473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Fix ModuleDeclState transition when module is used as a regular identifier (PR #71134)

2023-11-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/71134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Fix ModuleDeclState transition when module is used as a regular identifier (PR #71134)

2023-11-02 Thread Chuanqi Xu via cfe-commits
@@ -957,26 +957,27 @@ void Preprocessor::Lex(Token &Result) { ModuleDeclState.handlePeriod(); break; case tok::identifier: - if (Result.getIdentifierInfo()->isModulesImport()) { -TrackGMFState.handleImport(StdCXXImportSeqState.afterTopLevelSeq()); -

[clang] [Modules] Fix ModuleDeclState transition when module is used as a regular identifier (PR #71134)

2023-11-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Thanks for looking into this. LGTM. https://github.com/llvm/llvm-project/pull/71134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[llvm] [clang] [RISCV] Support Xsfvfwmaccqqq extensions (PR #68296)

2023-11-02 Thread Shao-Ce SUN via cfe-commits
@@ -103,3 +103,15 @@ let SupportOverloading = false in { defm sf_vc_v_fvw : RVVVCIXBuiltinSet<["si"], "UwKzUwUvFe", [-1, 0, 2, 3], UseGPR=0>; } } + +multiclass RVVVFWMACCBuiltinSet> suffixes_prototypes> { + let OverloadedName = NAME, + Name = NAME, + HasMaske

[clang] [llvm] [RISCV] Support Xsfvfwmaccqqq extensions (PR #68296)

2023-11-02 Thread Shao-Ce SUN via cfe-commits
@@ -813,6 +813,14 @@ def HasVendorXSfcie : Predicate<"Subtarget->hasVendorXSfcie()">, AssemblerPredicate<(all_of FeatureVendorXSfcie), "'XSfcie' (SiFive Custom Instruction Extension SCIE.)">; +def FeatureVendorXSfvfwmaccqqq +

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-11-02 Thread Shafik Yaghmour via cfe-commits
@@ -966,9 +962,65 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -FieldDecl *CodeGenFunction::FindCountedByField( -const Expr *Base, -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) { +const Expr * +CodeGenFunction

[clang] [CodeGen] Revamp counted_by calculations (PR #70606)

2023-11-02 Thread Shafik Yaghmour via cfe-commits
@@ -966,9 +962,65 @@ static llvm::Value *getArrayIndexingBound(CodeGenFunction &CGF, return nullptr; } -FieldDecl *CodeGenFunction::FindCountedByField( -const Expr *Base, -LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel) { +const Expr * +CodeGenFunction

[clang] [AMDGPU] const-fold imm operands of amdgcn_update_dpp intrinsic (PR #71139)

2023-11-02 Thread Pravin Jagtap via cfe-commits
https://github.com/pravinjagtap created https://github.com/llvm/llvm-project/pull/71139 Operands of `__builtin_amdgcn_update_dpp` need to evaluate to constant to match the intrinsic requirements. >From c28e9f9fb753e41bc539fa4c45bd7896d7c5d04d Mon Sep 17 00:00:00 2001 From: Pravin Jagtap Date:

[clang] [AMDGPU] const-fold imm operands of amdgcn_update_dpp intrinsic (PR #71139)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Pravin Jagtap (pravinjagtap) Changes Operands of `__builtin_amdgcn_update_dpp` need to evaluate to constant to match the intrinsic requirements. --- Full diff: https://github.com/llvm/llvm-project/pull/71139.diff 2 Files Affected: - (m

[PATCH] D151730: [RISCV] Support target attribute for function

2023-11-02 Thread Piyou Chen via Phabricator via cfe-commits
BeMg added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:434 +if (MarchFromCPU != "") { + Ret.Features.clear(); + handleFullArchString(MarchFromCPU, Ret.Features); craig.topper wrote: > Why does this clear Ret.Features,

[llvm] [clang] [RISCV] Use BF16 in Xsfvfwmaccqqq intrinsics (PR #71140)

2023-11-02 Thread Shao-Ce SUN via cfe-commits
https://github.com/sunshaoce created https://github.com/llvm/llvm-project/pull/71140 BF16 implementation based on @joshua-arch1's https://reviews.llvm.org/D152498 Fixed the incorrect f16 type introduced in https://github.com/llvm/llvm-project/pull/68296 - Co-authored-by: Jun Sha (Josh

[clang] [llvm] [RISCV] Use BF16 in Xsfvfwmaccqqq intrinsics (PR #71140)

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shao-Ce SUN (sunshaoce) Changes BF16 implementation based on @joshua-arch1's https://reviews.llvm.org/D152498 Fixed the incorrect f16 type introduced in https://github.com/llvm/llvm-project/pull/68296 - Co-authored-by: Jun Sha (

[PATCH] D151730: [RISCV] Support target attribute for function

2023-11-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:370 + std::vector &Features) { + Features.push_back("__RISCV_TargetAttrNeedOverride"); + auto RII = llvm::RISCVISAInfo::parseArchString( Why do we

[clang] [AMDGPU] const-fold imm operands of amdgcn_update_dpp intrinsic (PR #71139)

2023-11-02 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 063e3fe648533004e6970ab767ece845e3c0afb1 c28e9f9fb753e41bc539fa4c45bd7896d7c5d04d --

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-02 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/70841 >From 99abebc88c09346bd4a70bbf39df13b249116c09 Mon Sep 17 00:00:00 2001 From: Mingming Liu Date: Tue, 31 Oct 2023 01:17:03 -0700 Subject: [PATCH 1/4] [Clang]Emit type metadata when -fprofile-generate is on -

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-02 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/70841 >From 99abebc88c09346bd4a70bbf39df13b249116c09 Mon Sep 17 00:00:00 2001 From: Mingming Liu Date: Tue, 31 Oct 2023 01:17:03 -0700 Subject: [PATCH 1/5] [Clang]Emit type metadata when -fprofile-generate is on -

[clang] [Modules] Fix ModuleDeclState transition when module is used as a regular identifier (PR #71134)

2023-11-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/71134 >From 92cfc6e1306321ae8beb05775e2c7f8ac720f5e6 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 2 Nov 2023 19:42:09 -0700 Subject: [PATCH 1/2] [Modules] Fix ModuleDeclState transition when module is used a

[clang] Fix to attribute plugins reaching an unreachable (PR #70877)

2023-11-02 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Can you please add a more detailed description of the problem and what the fix actually is. The description is what ends up in the git log and it is important that we have enough details there to understand the PR and what changes it makes. I do not see a test, can this fix be t

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-11-02 Thread Maksim Levental via cfe-commits
https://github.com/makslevental closed https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >