[clang] [llvm] [WIP][AMDGPU] Enable hostcall printf for OpenCL (PR #70932)

2023-11-01 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH updated https://github.com/llvm/llvm-project/pull/70932 >From 4c0467078b2f38e814569ad351f86129d1c1d5ee Mon Sep 17 00:00:00 2001 From: Vikram Date: Wed, 4 Oct 2023 05:41:47 -0400 Subject: [PATCH] [WIP][AMDGPU] hostcall printf support for OpenCL --- clang/include/cla

[clang] [clang][analyzer]][NFC] Simplify method 'ensureStreamNonNull' of StreamChecker (PR #70927)

2023-11-01 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/70927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e98f3bf - [clang][analyzer]][NFC] Simplify method 'ensureStreamNonNull' of StreamChecker (#70927)

2023-11-01 Thread via cfe-commits
Author: Ben Shi Date: 2023-11-02T14:41:33+08:00 New Revision: e98f3bfff2c499e76ce8784ea15cedbfb83b33bf URL: https://github.com/llvm/llvm-project/commit/e98f3bfff2c499e76ce8784ea15cedbfb83b33bf DIFF: https://github.com/llvm/llvm-project/commit/e98f3bfff2c499e76ce8784ea15cedbfb83b33bf.diff LOG:

[clang] [llvm] [WIP][AMDGPU] Enable hostcall printf for OpenCL (PR #70932)

2023-11-01 Thread Vikram Hegde via cfe-commits
vikramRH wrote: @arsenm, The choice of defaults is based on current state of printf. HIP uses hostcalls and OpenCL uses buffered variant by default. However I'm willing to make one of the two variants consistent (preferably hostcalls for me). Do note that this would make all OpenCL printf to

[clang] [LoongArch] Fix ABI mismatch with g++ when handling empty unions (PR #71025)

2023-11-01 Thread Lu Weining via cfe-commits
SixWeining wrote: Hi @xen0n @xry111, please help to review this. Thanks. https://github.com/llvm/llvm-project/pull/71025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread Freddy Ye via cfe-commits
@@ -7416,3 +7416,46 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CodeAlignAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "clang::code_align"; + let Content = [{ +The ``clang::code_align(N)``

[clang] [LoongArch] Fix ABI mismatch with g++ when handling empty unions (PR #71025)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Lu Weining (SixWeining) Changes In g++, empty unions are not ignored like empty structs when flattening structs to examine whether the structs can be passed via FARs in C++. This patch aligns clang++ with g++. Fix https://github.com/llvm

[clang] [LoongArch] Fix ABI mismatch with g++ when handling empty unions (PR #71025)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-loongarch Author: Lu Weining (SixWeining) Changes In g++, empty unions are not ignored like empty structs when flattening structs to examine whether the structs can be passed via FARs in C++. This patch aligns clang++ with g++. Fix https://git

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that all exception objects' destructors are non-throwing

2023-11-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 557976. MaskRay marked an inline comment as done. MaskRay added a comment. remove unused err_ arguments. fix and test `throw new B` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108905/new/ https://reviews.llvm

[clang] [LoongArch] Fix ABI mismatch with g++ when handling empty unions (PR #71025)

2023-11-01 Thread Lu Weining via cfe-commits
https://github.com/SixWeining created https://github.com/llvm/llvm-project/pull/71025 In g++, empty unions are not ignored like empty structs when flattening structs to examine whether the structs can be passed via FARs in C++. This patch aligns clang++ with g++. Fix https://github.com/llvm/l

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

2023-11-01 Thread David Tellenbach via cfe-commits
dtellenbach wrote: @ZequanWu this seems to cause issues on macOS: https://green.lab.llvm.org/green/job/clang-stage1-RA/36184/console ``` Profile-x86_64 :: Darwin/instrprof-debug-info-correlate.c Profile-x86_64 :: instrprof-darwin- Profile-x86_64h :: Darwin/instrprof-debug-info-correlate.c Profil

[clang] 749083b - [LoongArch] Pre-commit test for issue #70890

2023-11-01 Thread Weining Lu via cfe-commits
Author: Weining Lu Date: 2023-11-02T14:18:19+08:00 New Revision: 749083b91f31f370cf64831d3e7e6215b6d51442 URL: https://github.com/llvm/llvm-project/commit/749083b91f31f370cf64831d3e7e6215b6d51442 DIFF: https://github.com/llvm/llvm-project/commit/749083b91f31f370cf64831d3e7e6215b6d51442.diff LO

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

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

[clang] 858b56e - [Clang] Preserve coroutine parameter referenced state (#70973)

2023-11-01 Thread via cfe-commits
Author: Yuxuan Chen Date: 2023-11-02T14:03:47+08:00 New Revision: 858b56e4962749013ded409ff43370b542c8b6cb URL: https://github.com/llvm/llvm-project/commit/858b56e4962749013ded409ff43370b542c8b6cb DIFF: https://github.com/llvm/llvm-project/commit/858b56e4962749013ded409ff43370b542c8b6cb.diff L

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Chuanqi Xu via cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; +// Preserve the referenced state for unused parameter diagnostics. +bool DeclReferenced = PD->isReferenced(); --

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

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

[clang] d76b56f - [NFC] Eliminate warnings in SourceLocationEncodingTest.cpp

2023-11-01 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-11-02T14:01:17+08:00 New Revision: d76b56fd28582c1cc6663cefa5ae2f8a23492d0a URL: https://github.com/llvm/llvm-project/commit/d76b56fd28582c1cc6663cefa5ae2f8a23492d0a DIFF: https://github.com/llvm/llvm-project/commit/d76b56fd28582c1cc6663cefa5ae2f8a23492d0a.diff LO

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Yuxuan Chen via cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; +// Preserve the referenced state for unused parameter diagnostics. +bool DeclReferenced = PD->isReferenced(); --

[clang] [llvm] [PowerPC] Add an alias for -mregnames so that full register names used in assembly. (PR #70255)

2023-11-01 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. LGTM; might be nice if it's possible to set this for `opt`/`llc` invocations, but for now I'm just happy to have this in clang. https://github.com/llvm/llvm-project/pull/70255 ___ cfe-comm

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that all exception objects' destructors are non-throwing

2023-11-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. LGTM. Thanks. Comment at: clang/lib/Sema/SemaExprCXX.cpp:1110 +!FT->isNothrow()) + Diag(ThrowLoc, diag::err_throw_object_throwing_dtor) << Ty << 1 << 1; + } It looks like err

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that all exception objects' destructors are non-throwing

2023-11-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 557975. MaskRay marked an inline comment as done. MaskRay retitled this revision from "[ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow" to "[ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to as

[llvm] [clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-11-01 Thread via cfe-commits
https://github.com/goldsteinn closed https://github.com/llvm/llvm-project/pull/67166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 51abbf9 - [InstCombine] Deduce `align` and `nonnull` return attributes for `llvm.ptrmask`

2023-11-01 Thread Noah Goldstein via cfe-commits
Author: Noah Goldstein Date: 2023-11-01T23:50:35-05:00 New Revision: 51abbf98d19cb1b89c6938811f2805bafe4b336e URL: https://github.com/llvm/llvm-project/commit/51abbf98d19cb1b89c6938811f2805bafe4b336e DIFF: https://github.com/llvm/llvm-project/commit/51abbf98d19cb1b89c6938811f2805bafe4b336e.diff

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

2023-11-01 Thread Wenju He via cfe-commits
@@ -334,6 +335,15 @@ template<> struct simplify_type { } }; +template <> struct GraphTraits { wenju-he wrote: I measured llvm-project compile time impact of this change to llvm/IR/User.h on intel icx 8358 cpu. Build command: ` cmake -GNinja -DLLVM_ENABLE_

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-01 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 4fed3d374dfca82d0cb32bb444985ece04438376 c9e4d58d1c2ecdbbbc4a518ee1698901d0b74e0d --

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-01 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,53 @@ +//===-- ProjectModules.h -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-11-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/66462 >From 190e160868080f7d64c0c05de0fd4315a3ff2b93 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 15 Sep 2023 11:33:53 +0800 Subject: [PATCH 1/2] [clangd] [C++20] [Modules] Introduce initial support for C++

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread David Truby via cfe-commits
@@ -976,12 +976,46 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread David Truby via cfe-commits
https://github.com/DavidTruby edited https://github.com/llvm/llvm-project/pull/70833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/70762 >From 93d46d40f46663cfa30fc01da965887508684e25 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Mon, 30 Oct 2023 21:41:00 -0700 Subject: [PATCH 1/3] [clang] Add support for new loop attribute [[clang::code_a

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
smanna12 wrote: Thank you @erichkeane and @AaronBallman for reviews and feedbacks. >>Please be sure to add a reasonable description to the patch summary so that >>reviewers know more about what's going on, but thank you for already having >>written docs (that helps give context). I have added

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 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 ae7f7f2ef2033a48fb9db3cb70b88ad62019f40b d049dc9997bdb78ff7e7cbf9b04aa42b9274cfd9 --

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/70762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -0,0 +1,124 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s + +// Add diagnostics tests for Loop attribute: [[clang::code_align()]]. smanna12 wrote:

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -0,0 +1,124 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local %s smanna12 wrote: Done https://github.com/llvm/llvm-project/pull/70762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -0,0 +1,124 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c-local %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cpp-local -pedantic -x c++ -std=c++11 %s + +// Add diagnostics tests for Loop attribute: [[clang::code_align()]]. + +void foo() { + int i; + int a

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -7416,3 +7416,46 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CodeAlignAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "clang::code_align"; + let Content = [{ +The ``clang::code_align(N)``

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -7416,3 +7416,46 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CodeAlignAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "clang::code_align"; + let Content = [{ +The ``clang::code_align(N)``

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -4280,3 +4280,12 @@ def PreferredType: InheritableAttr { let Args = [TypeArgument<"Type", 1>]; let Documentation = [PreferredTypeDocumentation]; } + +def CodeAlign: StmtAttr { + let Spellings = [CXX11<"clang", "code_align">, + C23<"clang", "code_align"

[llvm] [clang] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines Author: Chuanqi Xu (ChuanqiXu9) Changes Close https://github.com/llvm/llvm-project/issues/56980. This patch tries to introduce a light-weight optimization attribute for coroutines which are guaranteed to only be destroyed after it reached th

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -7416,3 +7416,46 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CodeAlignAttrDocs : Documentation { + let Category = DocCatVariable; + let Heading = "clang::code_align"; + let Content = [{ +The ``clang::code_align(N)``

[llvm] [clang] [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (PR #71014)

2023-11-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/71014 Close https://github.com/llvm/llvm-project/issues/56980. This patch tries to introduce a light-weight optimization attribute for coroutines which are guaranteed to only be destroyed after it reached the final

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -4280,3 +4280,12 @@ def PreferredType: InheritableAttr { let Args = [TypeArgument<"Type", 1>]; let Documentation = [PreferredTypeDocumentation]; } + +def CodeAlign: StmtAttr { + let Spellings = [CXX11<"clang", "code_align">, + C23<"clang", "code_align"

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -788,6 +797,20 @@ void LoopInfoStack::push(BasicBlock *Header, clang::ASTContext &Ctx, } } + // Translate 'loop attributes' arguments to equivalent Attr enums. + // It's being handled separately from LoopHintAttrs not to support + // legacy GNU attributes and prag

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -10026,6 +10026,10 @@ def err_duplicate_case_differing_expr : Error< def warn_case_empty_range : Warning<"empty case range specified">; def warn_missing_case_for_condition : Warning<"no case matching constant switch condition '%0'">; +def err_loop_attr_duplication : Error<

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
@@ -322,6 +322,56 @@ static Attr *handleUnlikely(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) UnlikelyAttr(S.Context, A); } +CodeAlignAttr *Sema::BuildCodeAlignAttr(const AttributeCommonInfo &CI, +Expr *E) { + if

[clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-01 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/70762 >From 93d46d40f46663cfa30fc01da965887508684e25 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Mon, 30 Oct 2023 21:41:00 -0700 Subject: [PATCH 1/2] [clang] Add support for new loop attribute [[clang::code_a

[clang] [clang][analyzer]][NFC] Simplify method 'ensureStreamNonNull' of StreamChecker (PR #70927)

2023-11-01 Thread Ben Shi via cfe-commits
benshi001 wrote: > much, and I wonder if you have further ideas refactoring the checker; if so > we could probably bundle up similar changes into this one. Thanks for your reply. Actually I have no plan about improving this checker. Currently I am just reading its code and trying to understand

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-11-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D108905#4655907 , @MaskRay wrote: > In D108905#4655694 , @ChuanqiXu > wrote: > >> Oh, I am not saying the legacy and old comment. I mean you need to touch >> ReleaseNotes.rst and Us

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-11-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D108905#4655694 , @ChuanqiXu wrote: > Oh, I am not saying the legacy and old comment. I mean you need to touch > ReleaseNotes.rst and UserManual.rst since we add a new flag. Also we need > either add a TODO/FIXME saying we ne

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-11-01 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/UsersManual.rst:2145-2147 + ``catch (...) { ... }``. This option tells Clang that an exception object's + destructor does not throw, even if the destructor is annotated as + ``noexcept(false)``. I thin

[PATCH] D108905: [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that an exception object' destructor is nothrow

2023-11-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 557968. MaskRay marked an inline comment as done. MaskRay edited the summary of this revision. MaskRay added a comment. Update clang/docs/UsersManual.rst and clang/docs/ReleaseNotes.rst Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[clang] [clang] Separate bit-field padding diagnostics into -Wpadded-bitfield (PR #70978)

2023-11-01 Thread via cfe-commits
https://github.com/DanShaders updated https://github.com/llvm/llvm-project/pull/70978 >From 7906a4689d44a64ead5259f947049c862f6bf7e6 Mon Sep 17 00:00:00 2001 From: Dan Klishch Date: Wed, 1 Nov 2023 21:59:21 -0400 Subject: [PATCH] [clang] Separate bit-field padding diagnostics into -Wpadded-bit

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-01 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > Can you clearly state why you are against this PR? You don't consider the > current behaviour of silently using the wrong headers a bug, or the proposed > solution is not correct? >> Don't consider this an objection I am not against it; I just wanted to talk through all the

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

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

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Chuanqi Xu via cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; +// Preserve the referenced state for unused parameter diagnostics. +bool DeclReferenced = PD->isReferenced(); --

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Chuanqi Xu via cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; +// Preserve the referenced state for unused parameter diagnostics. ChuanqiXu9 wrote: Readers can understand wh

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: It looks much better now. Let's try to optimize it a bit futher. https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

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

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-11-01 Thread Jerin Philip via cfe-commits
https://github.com/jerinphilip updated https://github.com/llvm/llvm-project/pull/65638 >From 947d4b418eb5b30f76ff262b1a19150aac10b9cc Mon Sep 17 00:00:00 2001 From: Jerin Philip Date: Sat, 19 Aug 2023 16:43:53 +0530 Subject: [PATCH] [clang] Improve _Alignas on declaration diagnostic Adds `isAl

[clang] [llvm] [PowerPC] Add an alias for -mregnames so that full register names used in assembly. (PR #70255)

2023-11-01 Thread Stefan Pintilie via cfe-commits
https://github.com/stefanp-ibm updated https://github.com/llvm/llvm-project/pull/70255 >From c57979d3d86362df239d3d3ff8cda124d40bb79d Mon Sep 17 00:00:00 2001 From: Stefan Pintilie Date: Wed, 25 Oct 2023 15:21:11 -0500 Subject: [PATCH 1/5] [PowerPC] Add an alias for -mregnames so that full reg

[clang-tools-extra] [NFC][clang-tidy]refactor isAssignmentToMemberOf in PreferMemberInitializerCheck (PR #71006)

2023-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes isAssignmentToMemberOf will return `std::make_pair(nullptr, nullptr)` when failed. Using `std::optional` can describe failed case clearly. --- Full diff: https://github.com/llvm/llvm-project/pull/71

[clang-tools-extra] [NFC][clang-tidy]refactor isAssignmentToMemberOf in PreferMemberInitializerCheck (PR #71006)

2023-11-01 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/71006 isAssignmentToMemberOf will return `std::make_pair(nullptr, nullptr)` when failed. Using `std::optional` can describe failed case clearly. >From 69b7688f56f7fe96031201eef1c3804f391c5abe Mon Sep 17 00:00:00 2

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread via cfe-commits
@@ -976,12 +976,46 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, return true; } -void tools::addFortranRuntimeLibs(const ToolChain &TC, +void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,

[clang] [clang-tools-extra] [llvm] [RFC] Perform lifetime bound checks for arguments to coroutine (PR #69360)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -7584,11 +7584,22 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) VisitLifetimeBoundArg(Callee, ObjectArg); - + bool checkCoroCall = false; + if (const auto *RD = Callee->g

[clang] [flang] [flang][windows] Add option to link against specific MSVC CRT (PR #70833)

2023-11-01 Thread David Truby via cfe-commits
DavidTruby wrote: > > Do we really need to have all 4 variants of the 3 fortran runtime > > libraries? That's a lot of complexity. Can we pare it down to just > > static/dynamic? It's also sometimes possible to generate code that works in > > both the static and dynamic context, depending on w

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-01 Thread Liviu Ionescu via cfe-commits
ilg-ul wrote: Can you clearly state why you are against this PR? You don't consider the current behaviour of silently using the wrong headers a bug, or the proposed solution is not correct? https://github.com/llvm/llvm-project/pull/70817 ___ cfe-comm

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-01 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > changing the structure of the symlinks is not possible, it is done > automatically by a tool. To be fair: tools can be changed, and in fact you're proposing to change one ;) But that said, now I see what you're up against. https://github.com/llvm/llvm-project/pull/70817

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-01 Thread Liviu Ionescu via cfe-commits
ilg-ul wrote: > for your use case, can you stick symlinks in to preserve that toolchain > folder structure relative to the ~/tmp/clang++ symlink? i.e. make that > ~/tmp/bin/clang++ -> > /Users/ilg/Library/xPacks/@xpack-dev-tools/clang/15.0.7-3.1/.content/bin/clang-15 > and add ~/tmp/lib -> >

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

2023-11-01 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM 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] [libc] [flang] [lldb] [libcxx] [llvm] [lld] [clang-tools-extra] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -605,6 +605,17 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI, Builder.defineMacro("HIP_API_PER_THREAD_DEFAULT_STREAM"); } } + + if (LangOpts.OpenACC) { +// FIXME: When we have full support for OpenACC, we should set this to the +

[flang] [clang] [llvm] [libc] [lld] [libcxx] [clang-tools-extra] [lldb] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: %clang -S -### -fopenacc %s 2>&1 | FileCheck %s --check-prefix=CHECK-DRIVER +// CHECK-DRIVER: "-cc1" {{.*}} "-fopenacc" bcardosolopes wrote: How does the interaction between using both `-fopenmp` and `-fopenacc` at the same time should

[libcxx] [lld] [flang] [clang] [llvm] [lldb] [clang-tools-extra] [libc] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: The changes in this patch looks pretty straightforward! Left some inline comments. https://github.com/llvm/llvm-project/pull/70234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[libcxx] [llvm] [lld] [clang] [libc] [flang] [lldb] [clang-tools-extra] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/70234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [clang] [lld] [llvm] [lldb] [libcxx] [clang-tools-extra] [flang] [OpenACC] Initial commits to support OpenACC (PR #70234)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1342,6 +1342,15 @@ def err_opencl_logical_exclusive_or : Error< def err_openclcxx_virtual_function : Error< "virtual functions are not supported in C++ for OpenCL">; +// OpenACC Support. +def warn_pragma_acc_ignored : Warning< + "unexpected '#pragma acc ...' in program"

[flang] [clang] WIP: [flang] Enable fir alias tags pass by default when optimizing for speed (PR #68597)

2023-11-01 Thread Slava Zakharin via cfe-commits
vzakhari wrote: Hi @tblah, is this ready for a merge? Let me know if you are just waiting for a review. https://github.com/llvm/llvm-project/pull/68597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

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

2023-11-01 Thread Bill Wendling via cfe-commits
bwendling 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))); }; int main() {

[libcxx] [llvm] [clang] [clang-tools-extra] [libc++] Allow running the test suite with optimizations (PR #68753)

2023-11-01 Thread Alexander Richardson via cfe-commits
@@ -87,6 +87,21 @@ def getStdFlag(cfg, std): return "-std=" + fallbacks[std] return None +def getSpeedOptimizationFlag(cfg): +if _isClang(cfg) or _isAppleClang(cfg) or _isGCC(cfg): +return "-O3" +elif _isMSVC(cfg): +return "/O2" +else: +

[libcxx] [llvm] [clang] [clang-tools-extra] [libc++] Allow running the test suite with optimizations (PR #68753)

2023-11-01 Thread Alexander Richardson via cfe-commits
@@ -121,6 +136,17 @@ def getStdFlag(cfg, std): AddCompileFlag(lambda cfg: getStdFlag(cfg, std)), ], ), +Parameter( +name="optimization", +choices=["none", "speed", "size"], +type=str, +help="The version of the standard

[llvm] [compiler-rt] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-11-01 Thread Mingming Liu via cfe-commits
@@ -1,7 +1,7 @@ RUN: %clang_pgogen -O2 -fuse-ld=bfd -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -DSTRESS=1 -o %t.ir.warn %S/../Inputs/instrprof-value-prof-real.c RUN: env LLVM_PROFILE_FILE=%t.ir.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t.ir.warn 2>&1 |FileC

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

2023-11-01 Thread David Blaikie via cfe-commits
dwblaikie 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 produce the w

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Yuxuan Chen via cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; +// Preserve the referenced state for unused parameter diagnostics. +bool DeclReferenced = PD->isReferenced(); + ExprRes

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM. @ChuanqiXu9 should give the final blessing though. https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; +// Preserve the referenced state for unused parameter diagnostics. +bool DeclReferenced = PD->isReferenced(); + ExprRes

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1965,9 +1965,15 @@ bool Sema::buildCoroutineParameterMoves(SourceLocation Loc) { if (PD->getType()->isDependentType()) continue; +// Preserve the referenced state for unused parameter diagnostics. +bool DeclReferenced = PD->isReferenced(); + ExprRes

[clang] [Clang] Preserve coroutine parameter referenced state (PR #70973)

2023-11-01 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Thanks for improving this! I haven't looked at your previous review of this PR, but I like the simplicity of this one. https://github.com/llvm/llvm-project/pull/70973 ___ cfe-commits mailing list cfe-commit

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-01 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > In my use case, and probably in most use cases, the location where the link > comes from is a plain folder, not a hierarchy specific to a toolchain. I would have expected the opposite. Most non-windows clang toolchains that I know of typically ship `clang` and `clang++` as sy

[clang] Reland "[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes" (PR #69676)

2023-11-01 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: thanks! I appreciate the quick response https://github.com/llvm/llvm-project/pull/69676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-01 Thread Teresa Johnson via cfe-commits
@@ -0,0 +1,145 @@ +// Test that type metadata are emitted with -fprofile-generate +// +// RUN: %clang -fprofile-generate -fno-lto -target x86_64-unknown-linux -emit-llvm -S %s -o - | FileCheck %s --check-prefix=ITANIUM +// RUN: %clang -fprofile-generate -fno-lto -target x86_64-pc

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

2023-11-01 Thread Derek Schuff via Phabricator via cfe-commits
dschuff accepted this revision. dschuff added a comment. otherwise LGTM Comment at: lld/wasm/Options.td:196 +defm keep_section: Eq<"keep-section", + "Preserve a section even when --strip-all is given. This is useful for compiler drivers such as clang or emcc that, for e

[clang] Reland "[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes" (PR #69676)

2023-11-01 Thread via cfe-commits
antangelo wrote: Apologies for the delay, I haven't been able to look into this until now. The patch has been reverted in https://github.com/llvm/llvm-project/commit/801c78d5b474c2319aa8ead44db7ba8cacac4714 https://github.com/llvm/llvm-project/pull/69676 ___

[clang] 801c78d - Revert "Reland "[clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes" (#69676)"

2023-11-01 Thread Antonio Abbatangelo via cfe-commits
Author: Antonio Abbatangelo Date: 2023-11-01T18:10:02-04:00 New Revision: 801c78d5b474c2319aa8ead44db7ba8cacac4714 URL: https://github.com/llvm/llvm-project/commit/801c78d5b474c2319aa8ead44db7ba8cacac4714 DIFF: https://github.com/llvm/llvm-project/commit/801c78d5b474c2319aa8ead44db7ba8cacac4714

[flang] [compiler-rt] [llvm] [openmp] [clang] [libcxx] [lldb] [lld] [mlir] [clang-tools-extra] [AMDGPU] GCNRegPressure printing pass for testing. (PR #70031)

2023-11-01 Thread Valery Pykhtin via cfe-commits
vpykhtin wrote: I've removed live-through registers printing from this PR and will submit it separately. https://github.com/llvm/llvm-project/pull/70031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[flang] [compiler-rt] [llvm] [openmp] [clang] [libcxx] [lldb] [lld] [mlir] [clang-tools-extra] [AMDGPU] GCNRegPressure printing pass for testing. (PR #70031)

2023-11-01 Thread Valery Pykhtin via cfe-commits
https://github.com/vpykhtin closed https://github.com/llvm/llvm-project/pull/70031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Separate bit-field padding diagnostics into -Wpadded-bitfield (PR #70978)

2023-11-01 Thread via cfe-commits
https://github.com/DanShaders updated https://github.com/llvm/llvm-project/pull/70978 >From 5446542556971dfcfed097ad92925712cbe3a7a8 Mon Sep 17 00:00:00 2001 From: Dan Klishch Date: Wed, 1 Nov 2023 15:31:49 -0400 Subject: [PATCH 1/2] [clang] Separate bit-field padding diagnostics into -Wpadded

  1   2   3   4   5   >