[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void) __attribut

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void) __attribut

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -1980,6 +1981,36 @@ static void handleWeakRefAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) WeakRefAttr(S.Context, AL)); } +// Mark alias/ifunc target as used. Due to name mangling, we look up the +// demangled name ignoring parameters. This

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-04-05 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,562 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-04-05 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,562 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-04-05 Thread Xiang Li via cfe-commits
@@ -0,0 +1,562 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } // cxx-warning{{unused function 'f'}} +in

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-04-05 Thread Xiang Li via cfe-commits
https://github.com/python3kgae updated https://github.com/llvm/llvm-project/pull/83933 >From b134854e7e183a1113ee6ae5c5f7b7910270c987 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Mon, 4 Mar 2024 16:39:41 -0800 Subject: [PATCH 01/19] [DOC][HLSL] Add documentation for root signature This patch

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-04-05 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. There are some open comments that don't seem like they've been resolved yet (along with a couple of typos I've pointed out). With 85 comments this PR is become quite hard to follow. I wonder if we're at a point now where it's either good

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: I really appreciate the suggestions. `alias-unused.cpp` and `alias-unused-win.cpp` contain test improvement that should be pre-commited once they look good enough. Then this PR can be changed to show the difference. On a separate note, I wanted to clarify that `-Wunused-function

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } // cxx-warning{{unused function 'f'}} +in

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %ms_abi_triple -Wunused -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } // cxx-warning{{unused function 'f'}} +in

[clang] [C99] Claim conformance to WG14 N717 (PR #87228)

2024-04-05 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks Aaron for putting up with all my offline requests. LGTM https://github.com/llvm/llvm-project/pull/87228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [InstallAPI] Capture & compare load commands that may differ per arch slice (PR #87674)

2024-04-05 Thread Zixu Wang via cfe-commits
@@ -0,0 +1,111 @@ +//===- DiagnosticBuilderWrappers.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: Apac

[clang] [InstallAPI] Capture & compare load commands that may differ per arch slice (PR #87674)

2024-04-05 Thread Zixu Wang via cfe-commits
@@ -702,5 +724,179 @@ DylibVerifier::Result DylibVerifier::verifyRemainingSymbols() { return getState(); } +bool DylibVerifier::verifyBinaryAttrs(const ArrayRef ProvidedTargets, + const BinaryAttrs &ProvidedBA, +

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -673,6 +673,9 @@ option(LLVM_USE_OPROFILE option(LLVM_EXTERNALIZE_DEBUGINFO "Generate dSYM files and strip executables and libraries (Darwin Only)" OFF) +option(LLVM_ENABLE_EXPORTED_SYMBOLS danliew-apple wrote: I'm fine with that. You could also do `LLV

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Erich Keane via cfe-commits
erichkeane wrote: > I really appreciate the suggestions. `alias-unused.cpp` and > `alias-unused-win.cpp` contain test improvement that should be pre-commited > once they look good enough. Then this PR can be changed to show the > difference. > > On a separate note, I wanted to clarify that `-

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -673,6 +673,9 @@ option(LLVM_USE_OPROFILE option(LLVM_EXTERNALIZE_DEBUGINFO "Generate dSYM files and strip executables and libraries (Darwin Only)" OFF) +option(LLVM_ENABLE_EXPORTED_SYMBOLS delcypher wrote: > "tools" has a pretty specific meaning for LLV

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
https://github.com/delcypher deleted https://github.com/llvm/llvm-project/pull/87684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C99] Claim conformance to WG14 N717 (PR #87228)

2024-04-05 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Thanks Aaron for putting up with all my offline requests. LGTM Thank you for all the excellent suggestions, this was a lot harder to test correctly than I realized at first. https://github.com/llvm/llvm-project/pull/87228 ___ cf

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -673,6 +673,9 @@ option(LLVM_USE_OPROFILE option(LLVM_EXTERNALIZE_DEBUGINFO "Generate dSYM files and strip executables and libraries (Darwin Only)" OFF) +option(LLVM_ENABLE_EXPORTED_SYMBOLS delcypher wrote: @JDevlieghere > "tools" has a pretty specific

[clang] 2606c87 - [C99] Claim conformance to WG14 N717 (#87228)

2024-04-05 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-04-05T14:04:29-04:00 New Revision: 2606c87788153bf33d854fa5c3a03e16d544c5d7 URL: https://github.com/llvm/llvm-project/commit/2606c87788153bf33d854fa5c3a03e16d544c5d7 DIFF: https://github.com/llvm/llvm-project/commit/2606c87788153bf33d854fa5c3a03e16d544c5d7.diff

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -654,6 +654,11 @@ enabled sub-projects. Nearly all of these variable names begin with Generate dSYM files and strip executables and libraries (Darwin Only). Defaults to OFF. +**LLVM_ENABLE_EXPORTED_SYMBOLS**:BOOL + When building executables, preserve symbol exports. D

[clang] [C99] Claim conformance to WG14 N717 (PR #87228)

2024-04-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/87228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Remove the duplicated `DeduceTemplateArguments` for partial specialization, NFC (PR #87782)

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

[clang] 9264c85 - [Sema] Remove the duplicated `DeduceTemplateArguments` for partial specialization, NFC (#87782)

2024-04-05 Thread via cfe-commits
Author: Haojian Wu Date: 2024-04-05T20:16:54+02:00 New Revision: 9264c85b47d3866c44f916cfff533c0d9d9d7a8d URL: https://github.com/llvm/llvm-project/commit/9264c85b47d3866c44f916cfff533c0d9d9d7a8d DIFF: https://github.com/llvm/llvm-project/commit/9264c85b47d3866c44f916cfff533c0d9d9d7a8d.diff LO

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Jonas Devlieghere via cfe-commits
@@ -673,6 +673,9 @@ option(LLVM_USE_OPROFILE option(LLVM_EXTERNALIZE_DEBUGINFO "Generate dSYM files and strip executables and libraries (Darwin Only)" OFF) +option(LLVM_ENABLE_EXPORTED_SYMBOLS JDevlieghere wrote: @delcypher I was referring to the tools in `

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-05 Thread Guillot Tony via cfe-commits
to268 wrote: CC: @erichkeane, since it's a PR about attributes. I can't add the `extension::microsoft`label to the PR myself. https://github.com/llvm/llvm-project/pull/86426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/86426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -345,6 +345,9 @@ Bug Fixes to Compiler Builtins Bug Fixes to Attribute Support ^^ +- Clang now correctly matches plugin attributes with microsoft ``[attribute]`` syntax. erichkeane wrote: Should this be double-brackets? ```sugg

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This has enough to do with parsing that i think Aaron should take a look too. Also, this needs a parser test, not just the plugin test. The plugins/examples aren't built often enough, so this needs to be a full lit test. https://github.com/llvm/llvm-pr

[clang] 0a0fccf - [HLSL] Implement floating literal suffixes (#87270)

2024-04-05 Thread via cfe-commits
Author: Chris B Date: 2024-04-05T13:46:14-05:00 New Revision: 0a0fccfc6c0519402a2566e1f63440410e524d17 URL: https://github.com/llvm/llvm-project/commit/0a0fccfc6c0519402a2566e1f63440410e524d17 DIFF: https://github.com/llvm/llvm-project/commit/0a0fccfc6c0519402a2566e1f63440410e524d17.diff LOG:

[clang] [HLSL] Implement floating literal suffixes (PR #87270)

2024-04-05 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/87270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/87684 >From 3ac6872328334384fa20998541fac841add767d9 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 4 Apr 2024 12:08:28 -0700 Subject: [PATCH 1/3] [cmake] Build executables with -no_exported_symbols when b

[clang] [clang] CTAD: build aggregate deduction guides for alias templates. (PR #85904)

2024-04-05 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/85904 >From cd104cb541901ff6101a4bd471dd7f46703c3db1 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 15 Mar 2024 10:47:09 +0100 Subject: [PATCH 1/4] [clang] Move the aggreate deduction guide cache login to SemaTem

[clang] 5e77dfe - [clang] CTAD: build aggregate deduction guides for alias templates. (#85904)

2024-04-05 Thread via cfe-commits
Author: Haojian Wu Date: 2024-04-05T21:07:14+02:00 New Revision: 5e77dfecd2e274117cc0a75de69c832d00130e6a URL: https://github.com/llvm/llvm-project/commit/5e77dfecd2e274117cc0a75de69c832d00130e6a DIFF: https://github.com/llvm/llvm-project/commit/5e77dfecd2e274117cc0a75de69c832d00130e6a.diff LO

[clang] [clang] CTAD: build aggregate deduction guides for alias templates. (PR #85904)

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

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-05 Thread via cfe-commits
@@ -54,6 +54,13 @@ RecordContext *APIRecord::castToRecordContext(const APIRecord *Record) { } } +void RecordContext::stealRecordChain(RecordContext &Other) { + First = Other.First; + Last = Other.Last; + Other.First = nullptr; + Other.Last = nullptr; +}

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/87821 Now that we have AST nodes for OpenACC Clauses, this patch adds their creation to Sema and makes the Parser call all the required functions. This also redoes TreeTransform to work with the clauses/make sure t

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes Now that we have AST nodes for OpenACC Clauses, this patch adds their creation to Sema and makes the Parser call all the required functions. This also redoes TreeTransform to work with the clauses/make sur

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
@@ -396,12 +405,80 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const { return CharUnits::fromQuantity(4); } +ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t &TypeSize) const { + llvm::Type *ElemTy; + unsigned RegsNeeded; // Registers Needed f

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
@@ -0,0 +1,350 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 + +// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \ +// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU-DEF +// RUN

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
@@ -396,12 +405,80 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const { return CharUnits::fromQuantity(4); } +ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(uint64_t &TypeSize) const { + llvm::Type *ElemTy; + unsigned RegsNeeded; // Registers Needed f

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
@@ -5585,6 +5585,15 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } } + if (Arg *A = Args.getLastArg(options::OPT_fcomplex_ppc_gnu_abi)) { +if (!TC.getTriple().isPPC32() || !TC.getTriple().isOSBinFormatELF()) { + D.Diag(diag::err_drv_unsuppo

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
@@ -0,0 +1,350 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 + +// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \ +// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU-DEF +// RUN

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-05 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstallAPI] Capture & compare load commands that may differ per arch slice (PR #87674)

2024-04-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/87674 >From 7ef1a803c10cfef8f577a4e439221d778215464a Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 27 Mar 2024 12:17:01 -0400 Subject: [PATCH 1/3] [InstallAPI] Capture and compare load commands that may d

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/87821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I hope #87634 will be merged soon, so you can get rid of `SemaRef.Diag()` here. https://github.com/llvm/llvm-project/pull/87821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
@@ -12252,6 +12252,8 @@ def warn_acc_clause_unimplemented def err_acc_construct_appertainment : Error<"OpenACC construct '%0' cannot be used here; it can only " "be used in a statement context">; +def err_acc_clause_appertainment +: Error<"OpenACC '%1' claus

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Vlad Serebrennikov via cfe-commits
@@ -3594,11 +3595,26 @@ class Parser : public CodeCompletionHandler { OpenACCDirectiveKind DirKind; SourceLocation StartLoc; SourceLocation EndLoc; -// TODO OpenACC: Add Clause list here once we have a type for that. +SmallVector Clauses; // TODO OpenAC

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-04-05 Thread via cfe-commits
@@ -826,6 +842,14 @@ void CXXRecordDecl::addedMember(Decl *D) { ? !Constructor->isImplicit() : (Constructor->isUserProvided() || Constructor->isExplicit())) data().Aggregate = false; + + // A trivially relocatable class is a class: +

[clang] Fix quadratic slowdown in AST matcher parent map generation (PR #87824)

2024-04-05 Thread via cfe-commits
https://github.com/higher-performance created https://github.com/llvm/llvm-project/pull/87824 Avoids the need to linearly re-scan all seen parent nodes to check for duplicates, which previously caused a slowdown for ancestry checks in Clang AST matchers. Fixes: #86881 >From 5e2b6b996a938129c

[clang] Fix quadratic slowdown in AST matcher parent map generation (PR #87824)

2024-04-05 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] Fix quadratic slowdown in AST matcher parent map generation (PR #87824)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (higher-performance) Changes Avoids the need to linearly re-scan all seen parent nodes to check for duplicates, which previously caused a slowdown for ancestry checks in Clang AST matchers. Fixes: #86881 --- Full diff: https://gith

[clang] Fix quadratic slowdown in AST matcher parent map generation (PR #87824)

2024-04-05 Thread via cfe-commits
higher-performance wrote: @shafik @AaronBallman if you could kindly review this I'd appreciate it! https://github.com/llvm/llvm-project/pull/87824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [UBSAN] Preserve ubsan code with ubsan-unique-traps (PR #83470)

2024-04-05 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: abandoning https://github.com/llvm/llvm-project/pull/83470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [UBSAN] Preserve ubsan code with ubsan-unique-traps (PR #83470)

2024-04-05 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/83470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][CodeGen] Improved codegen for combined loop directives (PR #87278)

2024-04-05 Thread Eli Friedman via cfe-commits
@@ -6135,6 +6137,79 @@ processImplicitMapsWithDefaultMappers(Sema &S, DSAStackTy *Stack, } } +namespace { +/// A 'teams loop' with a nested 'loop bind(parallel)' or generic function +/// call in the associated loop-nest cannot be a 'parallel for'. +class TeamsLoopChecker fi

[clang] [X86_64] fix arg pass error in struct. (PR #86902)

2024-04-05 Thread Eli Friedman via cfe-commits
@@ -2100,8 +2100,12 @@ void X86_64ABIInfo::classify(QualType Ty, uint64_t OffsetBase, Class &Lo, postMerge(Size, Lo, Hi); return; } + + bool InMemory = Offset % getContext().getTypeAlign(i->getType()) || + (i->getType()->getAs()

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -1029,6 +1038,11 @@ macro(add_llvm_executable name) add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} ) endif(LLVM_EXPORTED_SYMBOL_FILE) + if (NOT LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES AND LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS)

[clang] [compiler-rt] Fix "[clang][UBSan] Add implicit conversion check for bitfields" (PR #87761)

2024-04-05 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: This is fixed version of https://github.com/llvm/llvm-project/pull/75481 ? https://github.com/llvm/llvm-project/pull/87761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Erich Keane via cfe-commits
@@ -3594,11 +3595,26 @@ class Parser : public CodeCompletionHandler { OpenACCDirectiveKind DirKind; SourceLocation StartLoc; SourceLocation EndLoc; -// TODO OpenACC: Add Clause list here once we have a type for that. +SmallVector Clauses; // TODO OpenAC

[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)

2024-04-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/87821 >From ca5f957bb002d79997e630cdf1aaad5703ea2ba4 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Fri, 5 Apr 2024 10:53:47 -0700 Subject: [PATCH 1/2] [OpenACC] Implement Sema work for OpenACC Clauses Now that we

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/87684 >From 3ac6872328334384fa20998541fac841add767d9 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 4 Apr 2024 12:08:28 -0700 Subject: [PATCH 1/4] [cmake] Build executables with -no_exported_symbols when b

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Ed Maste via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s emaste wrote: Git does not track file moves explicitly. You'll find that `git log --follow` will work equally well whether you use `git add` and `git rm` or `git mv`. It u

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -258,15 +258,24 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32) endif() endif() - # Apple's linker complains about duplicate libraries, which CMake likes to do - # to support ELF platforms. To silence that warning, we can use - # -no_warn_duplicate_libraries

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -258,15 +258,24 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32) endif() endif() - # Apple's linker complains about duplicate libraries, which CMake likes to do - # to support ELF platforms. To silence that warning, we can use - # -no_warn_duplicate_libraries

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > I really appreciate the suggestions. `alias-unused.cpp` and > > `alias-unused-win.cpp` contain test improvement that should be pre-commited > > once they look good enough. Then this PR can be changed to show the > > difference. > > On a separate note, I wanted to clarify tha

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
https://github.com/delcypher approved this pull request. LGTM. Other than the nit about not using `FORCE` to set the CMake cache variable. https://github.com/llvm/llvm-project/pull/87684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -258,15 +258,24 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32) endif() endif() - # Apple's linker complains about duplicate libraries, which CMake likes to do - # to support ELF platforms. To silence that warning, we can use - # -no_warn_duplicate_libraries

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -258,15 +258,24 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32) endif() endif() - # Apple's linker complains about duplicate libraries, which CMake likes to do - # to support ELF platforms. To silence that warning, we can use - # -no_warn_duplicate_libraries

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/87684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/87684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/87684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstallAPI] Capture & compare load commands that may differ per arch slice (PR #87674)

2024-04-05 Thread Zixu Wang via cfe-commits
https://github.com/zixu-w approved this pull request. https://github.com/llvm/llvm-project/pull/87674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -2497,7 +2501,9 @@ class Parser : public CodeCompletionHandler { void ParseStructDeclaration( ParsingDeclSpec &DS, - llvm::function_ref FieldsCallback); + llvm::function_ref delcypher wrote: Why are we adding using `Decl*&` as a parameter

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-05 Thread Ed Maste via cfe-commits
emaste wrote: Giving this extra scrutiny is certainly warranted given the context, but #63957 is a legitimate bug. https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -4872,6 +4886,79 @@ void Parser::ParseStructDeclaration( } } +// Parse all attributes in LA, and attach them to Decl D. +void Parser::ParseLexedCAttributeList(LateParsedAttrList &LA, bool EnterScope, ParsedAttributes *OutAttrs) { + assert(LA.parseSoon() && + "At

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -4872,6 +4886,79 @@ void Parser::ParseStructDeclaration( } } +// Parse all attributes in LA, and attach them to Decl D. +void Parser::ParseLexedCAttributeList(LateParsedAttrList &LA, bool EnterScope, ParsedAttributes *OutAttrs) { + assert(LA.parseSoon() && + "At

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -4997,7 +5087,11 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc, ParsedAttributes attrs(AttrFactory); // If attributes exist after struct contents, parse them. - MaybeParseGNUAttributes(attrs); + MaybeParseGNUAttributes(attrs, &LateFieldAttrs); + + as

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-05 Thread Dan Liew via cfe-commits
@@ -4872,6 +4886,79 @@ void Parser::ParseStructDeclaration( } } +// Parse all attributes in LA, and attach them to Decl D. +void Parser::ParseLexedCAttributeList(LateParsedAttrList &LA, bool EnterScope, ParsedAttributes *OutAttrs) { + assert(LA.parseSoon() && + "At

[clang] [compiler-rt] Fix "[clang][UBSan] Add implicit conversion check for bitfields" (PR #87761)

2024-04-05 Thread Axel Lundberg via cfe-commits
https://github.com/Zonotora edited https://github.com/llvm/llvm-project/pull/87761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstallAPI] Capture & compare load commands that may differ per arch slice (PR #87674)

2024-04-05 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: Thanks for reviewing @zixu-w ! https://github.com/llvm/llvm-project/pull/87674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstallAPI] Capture & compare load commands that may differ per arch slice (PR #87674)

2024-04-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/87674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 27b2d7d - [InstallAPI] Capture & compare load commands that may differ per arch slice (#87674)

2024-04-05 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-04-05T13:58:24-07:00 New Revision: 27b2d7d4bb790ec1e7430bf18b1bc2f6e0800d0d URL: https://github.com/llvm/llvm-project/commit/27b2d7d4bb790ec1e7430bf18b1bc2f6e0800d0d DIFF: https://github.com/llvm/llvm-project/commit/27b2d7d4bb790ec1e7430bf18b1bc2f6e0800d0d.diff

[clang] 25cf279 - [cmake] Build executables with -no_exported_symbols when building Apple toolchain (#87684)

2024-04-05 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-04-05T14:41:20-07:00 New Revision: 25cf27910c3a58e71e37c3d5391235730aa7c488 URL: https://github.com/llvm/llvm-project/commit/25cf27910c3a58e71e37c3d5391235730aa7c488 DIFF: https://github.com/llvm/llvm-project/commit/25cf27910c3a58e71e37c3d5391235730aa7c488.diff

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/87684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-05 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny created https://github.com/llvm/llvm-project/pull/87832 Fixes #87697. From b8662eb6681d86ac475f30a70740b6b83eda1de3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Fri, 5 Apr 2024 23:41:50 +0200 Subject: [PATCH] [clang-tidy] Ignore non-forward

[clang-tools-extra] [clang-tidy] Ignore non-forwarded arguments if they are unnamed (PR #87832)

2024-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Danny Mösch (SimplyDanny) Changes Fixes #87697. --- Full diff: https://github.com/llvm/llvm-project/pull/87832.diff 3 Files Affected: - (modified) clang-tools-extra/clang-tidy/cppcoreguidelin

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Dave Lee via cfe-commits
@@ -1029,6 +1038,16 @@ macro(add_llvm_executable name) add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} ) endif(LLVM_EXPORTED_SYMBOL_FILE) + if (NOT LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES) +if(LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS) + set_p

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Slava Zakharin via cfe-commits
vzakhari wrote: FYI, it looks like this change broke `compiler-rt` build, e.g. in https://lab.llvm.org/buildbot/#/builders/270/builds/12485 https://github.com/llvm/llvm-project/pull/87684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via cfe-commits
@@ -1029,6 +1038,16 @@ macro(add_llvm_executable name) add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} ) endif(LLVM_EXPORTED_SYMBOL_FILE) + if (NOT LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES) +if(LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS) + set_p

[clang] [lldb] [llvm] [cmake] Build executables with -no_exported_symbols when building Apple toolchain (PR #87684)

2024-04-05 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > FYI, it looks like this change broke `compiler-rt` build, e.g. in > https://lab.llvm.org/buildbot/#/builders/270/builds/12485 Should be resolved by: https://github.com/llvm/llvm-project/commit/fe45029dbdee6b3df2dbeaed17c9dd598ec511f2 I suspect compiler-rt may be relying

[clang] [compiler-rt] Fix "[clang][UBSan] Add implicit conversion check for bitfields" (PR #87761)

2024-04-05 Thread Axel Lundberg via cfe-commits
Zonotora wrote: @vitalybuka yes, seems like all testcases failed due to not explicitly setting BitfieldBits to 0 except one, LeakSanitizer-AddressSanitizer-i386 :: TestCases/leak_check_at_exit.cpp not really sure what the problem is. Also added another testcase `ubsan/TestCases/ImplicitConve

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-05 Thread Yeoul Na via cfe-commits
@@ -4997,7 +5087,11 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc, ParsedAttributes attrs(AttrFactory); // If attributes exist after struct contents, parse them. - MaybeParseGNUAttributes(attrs); + MaybeParseGNUAttributes(attrs, &LateFieldAttrs); + + as

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun commented: I did not finish reviewing this, but wanted to send a couple of questions early to parallelize the process a bit. https://github.com/llvm/llvm-project/pull/87320 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/87320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Propagate locations from result objects to initializers. (PR #87320)

2024-04-05 Thread Gábor Horváth via cfe-commits
@@ -385,6 +388,185 @@ getFieldsGlobalsAndFuncs(const Stmt &S, FieldSet &Fields, } } +namespace { + +// Visitor that builds a map from record prvalues to result objects. +// This traverses the body of the function to be analyzed; for each result +// object that it encounters,

<    1   2   3   4   >