[clang] [analyzer] Fix assertion failure in `CXXInstanceCall::getCXXThisVal` (PR #70837)

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

[clang] [clang][analyzer] Add a test case to PR-70792 for Issue-59493 (PR #71073)

2023-11-02 Thread Ella Ma via cfe-commits
https://github.com/Snape3058 created https://github.com/llvm/llvm-project/pull/71073 Following PR #70792 for issue #70464 Add a test case for issue #59493 >From 90d72a1f1036d2486e66c5ec16c3a8dc4241fc00 Mon Sep 17 00:00:00 2001 From: Ella Ma Date: Thu, 2 Nov 2023 23:14:15 +0800 Subject:

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

2023-11-02 Thread Markos Horro via cfe-commits
https://github.com/markoshorro created https://github.com/llvm/llvm-project/pull/71072 The same idea as in 34d380e1f63a7e2cdb9ab1e6498f727fcd710a14, but for truncation instructions. Improvement for #59633. >From 0c5299adb30888aa0dfd7c3106547a69606d5ab1 Mon Sep 17 00:00:00 2001 From: Marcos

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

2023-11-02 Thread David Truby via cfe-commits
https://github.com/DavidTruby updated https://github.com/llvm/llvm-project/pull/70833 >From 9e84729cada6c032c64934ee519e605407aab049 Mon Sep 17 00:00:00 2001 From: David Truby Date: Tue, 31 Oct 2023 15:07:13 + Subject: [PATCH 1/4] [flang][windows] Add option to link against specific MSVC

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

2023-11-02 Thread Paul T Robinson via cfe-commits
pogo59 wrote: If you want to XFAIL specifically for the Sony targets, what you suggested would work. I'm unclear about the "MSVC C++ ABI" aspect, but if that gets the test to work, go for it. https://github.com/llvm/llvm-project/pull/70991 ___

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

2023-11-02 Thread via cfe-commits
Author: Dan Klishch Date: 2023-11-02T11:52:57-04:00 New Revision: 43feb3eeb1ba4de920d6eaa12b7a5c21f6dd6229 URL: https://github.com/llvm/llvm-project/commit/43feb3eeb1ba4de920d6eaa12b7a5c21f6dd6229 DIFF: https://github.com/llvm/llvm-project/commit/43feb3eeb1ba4de920d6eaa12b7a5c21f6dd6229.diff

[llvm] [clang] [WebAssembly] Mark externref as not being valid vector elements (PR #71069)

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 3aad77ebc37532a6a3836d902d0014391ed0a0eb d93ec3a6ba414483efd6126fc7a953228b5e4150 --

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

2023-11-02 Thread Nico Weber via cfe-commits
https://github.com/nico closed https://github.com/llvm/llvm-project/pull/70978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [WebAssembly] Mark externref as not being valid vector elements (PR #71069)

2023-11-02 Thread Nikita Popov via cfe-commits
nikic wrote: @pmatos If you don't want to go all the way to target extension types, is it possible to gracefully handle this in wasm's TTI cost model? Return an invalid or very high cost in this case? https://github.com/llvm/llvm-project/pull/71069

[clang] [llvm] [WebAssembly] Mark externref as not being valid vector elements (PR #71069)

2023-11-02 Thread Paulo Matos via cfe-commits
https://github.com/pmatos created https://github.com/llvm/llvm-project/pull/71069 Fixes #69894 . >From deb62d806b4bba983d771eb87c3188a3fc3d56d5 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Tue, 31 Oct 2023 09:01:25 +0100 Subject: [PATCH 1/2] [WebAssembly] Reftypes are not valid element

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

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Markos Horro (markoshorro) Changes The same idea as in 34d380e1f63a7e2cdb9ab1e6498f727fcd710a14, but for truncation instructions. Improvement for #59633. --- Full diff: https://github.com/llvm/llvm-project/pull/71072.diff 2

[clang] [analyzer] Fix assertion failure in `CXXInstanceCall::getCXXThisVal` (PR #70837)

2023-11-02 Thread via cfe-commits
@@ -30,3 +30,24 @@ void test(int i) { clang_analyzer_dump(g4); // expected-warning@-1 {{ [as 64 bit integer]}} } + +struct A { + int n; + void set(int x) { +n = x; + } +}; +using ptr_size = decltype(sizeof(void *)); DonatNagyE wrote: Do I see it

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-11-02 Thread Ella Ma via cfe-commits
Snape3058 wrote: OK, thanks~ https://github.com/llvm/llvm-project/pull/70792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-02 Thread Chuanqi Xu via cfe-commits
@@ -7416,3 +7416,69 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CoroOnlyDestroyWhenCompleteDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The `coro_only_destroy_when_complete` attribute should

[llvm] [clang] [WebAssembly] Mark externref as not being valid vector elements (PR #71069)

2023-11-02 Thread Paulo Matos via cfe-commits
pmatos wrote: cc: @nikic @jcranmer-intel @tlively @asb I am looking for suggestions for a way forward on this. Issue #69894 triggers the SLPVectorizer that tries to create a vector of 2 externref and calculate its cost. Externref is a WebAssembly type currently represented as a pointer to a

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

2023-11-02 Thread Chuanqi Xu via cfe-commits
@@ -7416,3 +7416,69 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CoroOnlyDestroyWhenCompleteDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The `coro_only_destroy_when_complete` attribute should

[clang] [AArch64][Clang] Refactor code to emit SVE & SME builtins (PR #70959)

2023-11-02 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm closed https://github.com/llvm/llvm-project/pull/70959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-11-02 Thread Balazs Benics via cfe-commits
steakhal wrote: > Do I need to > > * create a new PR? > > * push directly to this PR on the original branch `Snape3058:issue-70464`? > > * commit directly without revision? > > > Which operation is correct? > > (Sorry for not familiar with GitHub) -( I'd prefer a new PR, and

[llvm] [clang] [AMDGPU] Add code model (#70760) test for amdgpu target. (PR #71019)

2023-11-02 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,9 @@ +; RUN: not llc -verify-machineinstrs -o - -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -code-model=tiny < %s 2>&1 | FileCheck %s --check-prefix=TINY +; RUN: not llc -verify-machineinstrs -o - -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -code-model=kernel < %s

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

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

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

2023-11-02 Thread kadir çetinkaya via cfe-commits
kadircet wrote: thanks for the revert! I also encountered certain crashes bisecting back to this patch, with a similar reproducer: ``` template struct Module { template struct Baz { template explicit Baz(X); }; Baz(int) -> Baz; }; struct Bar {}; void foo() { Module::Baz

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

2023-11-02 Thread Nico Weber via cfe-commits
https://github.com/nico approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/70978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-02 Thread via cfe-commits
@@ -421,13 +421,102 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList , 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 to

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-11-02 Thread Ella Ma via cfe-commits
Snape3058 wrote: Do I need to * create a new PR? * push directly to this PR on the original branch `Snape3058:issue-70464`? * commit directly without revision? Which operation is correct? (Sorry for not familiar with GitHub) -( https://github.com/llvm/llvm-project/pull/70792

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

2023-11-02 Thread David Truby via cfe-commits
https://github.com/DavidTruby updated https://github.com/llvm/llvm-project/pull/70833 >From 9e84729cada6c032c64934ee519e605407aab049 Mon Sep 17 00:00:00 2001 From: David Truby Date: Tue, 31 Oct 2023 15:07:13 + Subject: [PATCH 1/5] [flang][windows] Add option to link against specific MSVC

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

2023-11-02 Thread Zequan Wu via cfe-commits
ZequanWu 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 ::

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

2023-11-02 Thread via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 %s -triple powerpc-unknown-aix -S -mtocdata=g1,g2,g3 -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-MIX --match-full-lines diggerlin wrote: I am not sure the purpose of the test case, I think all the test scenario have

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

2023-11-02 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/6] [PowerPC] Add an alias for -mregnames so that full

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

2023-11-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/71014 >From a2dae250abf20d47a7db4da65e25ff33bca28e67 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 2 Nov 2023 11:11:59 +0800 Subject: [PATCH 1/3] [Coroutines] Introduce

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

2023-11-02 Thread Paul T Robinson via cfe-commits
pogo59 wrote: FTR, the "Worker" tab on that buildbot page will point you to the maintainer. But tagging me is also fine in general. I'm unable to repro the problem locally because my local build doesn't seem to include clang-repl.exe, so the whole clang/test/Interpreter directory is

[flang] [clang] [libcxx] [mlir] [lldb] [llvm] [Flang][OpenMP] Port openmp threadprivate-use-association.f90 test to HLFIR flow (PR #71043)

2023-11-02 Thread chandan singh via cfe-commits
https://github.com/chandankds closed https://github.com/llvm/llvm-project/pull/71043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-11-02 Thread Ella Ma via cfe-commits
Snape3058 wrote: As #59493 is an array, which is different from the test case I provided and the ones in #61919 and #54533, although this pr can correctly handle the array case, do I still need to add the array one to the test case? ```cpp // Additional test case from issue #59493 namespace

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

2023-11-02 Thread via cfe-commits
@@ -0,0 +1,16 @@ +; RUN: not --crash llc -mtriple powerpc-ibm-aix-xcoff < %s 2>&1 | FileCheck %s --check-prefix CHECK-ERROR +; RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff < %s 2>&1 | FileCheck %s --check-prefix CHECK-ERROR + +@a = global [5 x i16] zeroinitializer,

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

2023-11-02 Thread Erich Keane via cfe-commits
@@ -7416,3 +7416,69 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CoroOnlyDestroyWhenCompleteDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The `coro_only_destroy_when_complete` attribute should

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-11-02 Thread Balazs Benics via cfe-commits
steakhal wrote: > As #59493 is an array, which is different from the test case I provided and > the ones in #61919 and #54533, although this pr can correctly handle the > array case, do I still need to add the array one to the test case? It would be really nice if you could. Thanks!

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

2023-11-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. CFE + Release note LGTM. Again, please wait on someone to be review the LLVM changes. https://github.com/llvm/llvm-project/pull/71014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang]get non-injected-class before finding instantiated decl (PR #70886)

2023-11-02 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn commented: LGTM, but I'm not very familiar with the C++ specific parts of clang, so someone else ought to take a look also https://github.com/llvm/llvm-project/pull/70886 ___ cfe-commits mailing list

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

2023-11-02 Thread Chuanqi Xu via cfe-commits
@@ -7416,3 +7416,69 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CoroOnlyDestroyWhenCompleteDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The `coro_only_destroy_when_complete` attribute should

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

2023-11-02 Thread Chuanqi Xu via cfe-commits
@@ -7416,3 +7416,69 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CoroOnlyDestroyWhenCompleteDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The `coro_only_destroy_when_complete` attribute should

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

2023-11-02 Thread Erich Keane via cfe-commits
@@ -7416,3 +7416,69 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CoroOnlyDestroyWhenCompleteDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The `coro_only_destroy_when_complete` attribute should

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

2023-11-02 Thread Erich Keane via cfe-commits
erichkeane wrote: Also note: This needs a Release Note in ReleaseNotes.rst. https://github.com/llvm/llvm-project/pull/71014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-02 Thread Chuanqi Xu via cfe-commits
@@ -7416,3 +7416,69 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CoroOnlyDestroyWhenCompleteDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The `coro_only_destroy_when_complete` attribute should

[clang] [analyzer] Improve diagnostics from ArrayBoundCheckerV2 (PR #70056)

2023-11-02 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -217,80 +326,71 @@ void ArrayBoundCheckerV2::checkLocation(SVal location, bool isLoad, // MallocChecker that call SValBuilder::getConjuredHeapSymbolVal()) and // non-symbolic regions (e.g. a

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

2023-11-02 Thread via cfe-commits
@@ -0,0 +1,69 @@ +// REQUIRES: powerpc-registered-target +// RUN: %clang_cc1 %s -triple=powerpc-ibm-aix-xcoff -S -mtocdata=h,g,f,e,d,c,b,a,globalOneWithAlias,globalTwoWithAlias,ll,t3 -verify -emit-llvm -o - | FileCheck %s -check-prefix=CHECK --match-full-lines +// RUN:

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

2023-11-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. CFE stuff looks good, but someone more familiar with the LLVM changes needs to do final approval. https://github.com/llvm/llvm-project/pull/71014 ___ cfe-commits mailing list

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

2023-11-02 Thread via cfe-commits
@@ -0,0 +1,64 @@ +// RUN: %clang_cc1 %s -triple powerpc-ibm-aix-xcoff -S -mtocdata=a4,a5,a8,a9,b,c,d,e,v -emit-llvm -o - 2>&1 \ +// RUN: | FileCheck %s -check-prefixes=CHECK32 --match-full-lines +// RUN: %clang_cc1 %s -triple powerpc-ibm-aix-xcoff -S -mtocdata

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

2023-11-02 Thread Chuanqi Xu via cfe-commits
@@ -7416,3 +7416,69 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CoroOnlyDestroyWhenCompleteDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The `coro_only_destroy_when_complete` attribute should

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

2023-11-02 Thread via cfe-commits
@@ -265,6 +269,61 @@ bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable( return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true); } +void AIXTargetCodeGenInfo::setTargetAttributes( +const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule ) const {

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

2023-11-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/71014 >From a2dae250abf20d47a7db4da65e25ff33bca28e67 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 2 Nov 2023 11:11:59 +0800 Subject: [PATCH 1/2] [Coroutines] Introduce

[clang] [llvm] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-02 Thread Paulo Matos via cfe-commits
https://github.com/pmatos edited https://github.com/llvm/llvm-project/pull/71029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle std::move etc. builtins (PR #70772)

2023-11-02 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: > Nice. I realise you're following the convention already established in the > test file, but have you considered compiling with `-verify=new,both` and > `-verify=ref,both`, respectively, and combining the shared diagnostics

[clang] [analyzer] Improve diagnostics from ArrayBoundCheckerV2 (PR #70056)

2023-11-02 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -0,0 +1,149 @@ +// RUN: %clang_analyze_cc1 -Wno-array-bounds -analyzer-output=text\ +// RUN: -analyzer-checker=core,alpha.security.ArrayBoundV2,unix.Malloc,alpha.security.taint -verify %s

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

2023-11-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/70234 >From b3d64b3f744ccb37e334e3aae8d6874cd8391c56 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Mon, 23 Oct 2023 11:09:11 -0700 Subject: [PATCH 1/6] [OpenACC] Initial commit for OpenACC Support This is the

[clang] [llvm] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-02 Thread Paulo Matos via cfe-commits
pmatos wrote: > Nit: can you add in the description that this is a follow-up from the opaque > pointer transition (having an explicit motivation helps read a patch). Thanks! you're right. done. https://github.com/llvm/llvm-project/pull/71029 ___

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

2023-11-02 Thread Erich Keane via cfe-commits
@@ -7416,3 +7416,69 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CoroOnlyDestroyWhenCompleteDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The `coro_only_destroy_when_complete` attribute should

[clang] [AArch64][Clang] Refactor code to emit SVE & SME builtins (PR #70959)

2023-11-02 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. This patch was reviewed as part of PR #70662, so I'm happy for this patch to reland. https://github.com/llvm/llvm-project/pull/70959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-11-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/71014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-02 Thread Erich Keane via cfe-commits
@@ -7416,3 +7416,69 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CoroOnlyDestroyWhenCompleteDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The `coro_only_destroy_when_complete` attribute should

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

2023-11-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Didn't dig into the LLVM section of this, but the CFE section looks good delta some small documentation changes. https://github.com/llvm/llvm-project/pull/71014 ___ cfe-commits mailing list

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

2023-11-02 Thread Erich Keane via cfe-commits
@@ -7416,3 +7416,69 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CoroOnlyDestroyWhenCompleteDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The `coro_only_destroy_when_complete` attribute should

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

2023-11-02 Thread Erich Keane via cfe-commits
@@ -7416,3 +7416,69 @@ that ``p->array`` must have at least ``p->count`` number of elements available: }]; } + +def CoroOnlyDestroyWhenCompleteDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The `coro_only_destroy_when_complete` attribute should

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

2023-11-02 Thread Erich Keane via cfe-commits
@@ -605,6 +605,17 @@ static void InitializeStandardPredefinedMacros(const TargetInfo , 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 +

[clang] [analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class (#70464) (PR #70792)

2023-11-02 Thread Balazs Benics via cfe-commits
steakhal wrote: I wanted to highlight that this PR resolved a bunch of open issues, namely: #61919, #59493, #54533 Thank you! So I think we should mention this in the release notes for clang-18 in some way. I'll keep this in mind. https://github.com/llvm/llvm-project/pull/70792

[llvm] [clang] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-02 Thread Mircea Trofin via cfe-commits
mtrofin wrote: Nit: can you add in the description that this is a follow-up from the opaque pointer transition (having an explicit motivation helps read a patch). Thanks! https://github.com/llvm/llvm-project/pull/71029 ___ cfe-commits mailing list

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

2023-11-02 Thread Brad King via cfe-commits
@@ -1,3 +1,21 @@ add_flang_library(Fortran_main STATIC INSTALL_WITH_TOOLCHAIN Fortran_main.c ) +if (DEFINED MSVC) +add_flang_library(Fortran_main.static STATIC INSTALL_WITH_TOOLCHAIN +Fortran_main.c +) bradking wrote: The style elsewhere

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

2023-11-02 Thread Brad King via cfe-commits
@@ -976,12 +976,46 @@ bool tools::addOpenMPRuntime(ArgStringList , const ToolChain , return true; } -void tools::addFortranRuntimeLibs(const ToolChain , +void tools::addFortranRuntimeLibs(const ToolChain , const ArgList ,

[llvm] [compiler-rt] [libcxx] [libc] [flang] [clang] [lldb] [clang-tools-extra] [lld] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/70349 >From 7329f68092d5f8f5a5978e5a6cbad6ada87d4fe8 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 26 Oct 2023 16:09:25 +0300 Subject: [PATCH 1/7] [clang][NFC] Annotate `Type` bit-fields with

[clang-tools-extra] [clang-tidy] Improve modernize-make-shared check (PR #70600)

2023-11-02 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/70600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-02 Thread Brad King via cfe-commits
@@ -281,3 +281,26 @@ add_flang_library(FortranRuntime INSTALL_WITH_TOOLCHAIN ) + +if (DEFINED MSVC) + add_flang_library(FortranRuntime.static ${sources} +LINK_LIBS +FortranDecimal.static +INSTALL_WITH_TOOLCHAIN) + set_property(TARGET FortranRuntime.static

[clang] [AArch64][Clang] Refactor code to emit SVE & SME builtins (PR #70959)

2023-11-02 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm ready_for_review https://github.com/llvm/llvm-project/pull/70959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-02 Thread Erich Keane 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

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

2023-11-02 Thread Erich Keane via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: %clang -S -### -fopenacc %s 2>&1 | FileCheck %s --check-prefix=CHECK-DRIVER +// CHECK-DRIVER: "-cc1" {{.*}} "-fopenacc" erichkeane wrote: At the moment, there should be no problem with them co-existing. Kernels can be separately

[clang] [AArch64][Clang] Refactor code to emit SVE & SME builtins (PR #70959)

2023-11-02 Thread David Sherwood via cfe-commits
https://github.com/david-arm approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/70959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-02 Thread Peter Waller via cfe-commits
https://github.com/peterwaller-arm approved this pull request. https://github.com/llvm/llvm-project/pull/70970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-11-02 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153701/new/ https://reviews.llvm.org/D153701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
@@ -1996,7 +1996,7 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { TypeBits.Dependence = static_cast(Dependence); TypeBits.CacheValid = false; TypeBits.CachedLocalOrUnnamed = false; -TypeBits.CachedLinkage = NoLinkage; +

[clang] [clang-tools-extra] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
@@ -2214,7 +2214,7 @@ void ASTWriter::WriteDeclAbbrevs() { Abv->Add(BitCodeAbbrevOp(0)); // TSCSpec Abv->Add(BitCodeAbbrevOp(0)); // InitStyle Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong -

[clang] [clang-tools-extra] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/71049 >From 05089e60021c321b4113db7e4bdf59bdaaa19de7 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 2 Nov 2023 14:40:12 +0300 Subject: [PATCH 1/4] [clang][NFC] Refactor `clang::Linkage` This patch

[clang] [clang-tools-extra] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from the comment nit from @ChuanqiXu9 https://github.com/llvm/llvm-project/pull/71049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -2214,7 +2214,7 @@ void ASTWriter::WriteDeclAbbrevs() { Abv->Add(BitCodeAbbrevOp(0)); // TSCSpec Abv->Add(BitCodeAbbrevOp(0)); // InitStyle Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong -

[libcxx] [flang] [compiler-rt] [clang] [lld] [lldb] [llvm] [libc] [clang-tools-extra] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-11-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [compiler-rt] [flang] [libcxx] [llvm] [libc] [clang] [clang-tools-extra] [lldb] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -569,4 +569,12 @@ void AnnotateIgnoreWritesEnd(const char *file, int line); #define LLVM_NO_PROFILE_INSTRUMENT_FUNCTION #endif +/// \macro LLVM_PREFERRED_TYPE +/// Adjust type of bit-field in debug info. +#if __has_attribute(preferred_type) AaronBallman

[llvm] [clang-tools-extra] [lld] [libc] [clang] [libcxx] [lldb] [compiler-rt] [flang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-11-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from a nit with the new macro (feel free to fix when landing). https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
@@ -2214,7 +2214,7 @@ void ASTWriter::WriteDeclAbbrevs() { Abv->Add(BitCodeAbbrevOp(0)); // TSCSpec Abv->Add(BitCodeAbbrevOp(0)); // InitStyle Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong -

[clang] [clang-tools-extra] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -2214,7 +2214,7 @@ void ASTWriter::WriteDeclAbbrevs() { Abv->Add(BitCodeAbbrevOp(0)); // TSCSpec Abv->Add(BitCodeAbbrevOp(0)); // InitStyle Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong -

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

2023-11-02 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/4] [clang] Add support for new loop attribute

[llvm] [mlir] [libcxx] [clang] [lldb] [flang] [Flang][OpenMP] Port openmp threadprivate-use-association.f90 test to HLFIR flow (PR #71043)

2023-11-02 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LG. Thanks. https://github.com/llvm/llvm-project/pull/71043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Chuanqi Xu via cfe-commits
@@ -2214,7 +2214,7 @@ void ASTWriter::WriteDeclAbbrevs() { Abv->Add(BitCodeAbbrevOp(0)); // TSCSpec Abv->Add(BitCodeAbbrevOp(0)); // InitStyle Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong -

[clang] [clang-tools-extra] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Chuanqi Xu via cfe-commits
@@ -2214,7 +2214,7 @@ void ASTWriter::WriteDeclAbbrevs() { Abv->Add(BitCodeAbbrevOp(0)); // TSCSpec Abv->Add(BitCodeAbbrevOp(0)); // InitStyle Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isARCPseudoStrong -

[clang] [clang-tools-extra] [clang] Refactor `clang::Linkage` (PR #71049)

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

[clang] [clang-tools-extra] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. I didn't understand the full context in the private chat. https://github.com/llvm/llvm-project/pull/71049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Improve diagnostics from ArrayBoundCheckerV2 (PR #70056)

2023-11-02 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: DonatNagyE wrote: Thanks for the suggestions; I'll probably upload the next revision tomorrow. > One remark about the review workflow, I'd prefer if the conversation starter > would resolve the conversations. Let me

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

2023-11-02 Thread via cfe-commits
@@ -440,6 +440,14 @@ MDNode *LoopInfo::createMetadata( Ctx, {MDString::get(Ctx, "llvm.loop.parallel_accesses"), AccGroup})); } + // Setting clang::code_align attribute. + if (Attrs.CodeAlign > 0) { smanna12 wrote: Added consumption on this IR in

[clang] [analyzer] Improve diagnostics from ArrayBoundCheckerV2 (PR #70056)

2023-11-02 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -0,0 +1,149 @@ +// RUN: %clang_analyze_cc1 -Wno-array-bounds -analyzer-output=text\ +// RUN: -analyzer-checker=core,alpha.security.ArrayBoundV2,unix.Malloc,alpha.security.taint -verify %s

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

2023-11-02 Thread Chuanqi Xu via cfe-commits
@@ -777,6 +777,12 @@ void CodeGenFunction::EmitCoroutineBody(const CoroutineBodyStmt ) { // LLVM require the frontend to mark the coroutine. CurFn->setPresplitCoroutine(); + + { +CXXRecordDecl *RD = FnRetTy->getAsCXXRecordDecl(); +if (RD && RD->hasAttr()) +

[clang-tools-extra] [clang] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/71049 >From 05089e60021c321b4113db7e4bdf59bdaaa19de7 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 2 Nov 2023 14:40:12 +0300 Subject: [PATCH 1/2] [clang][NFC] Refactor `clang::Linkage` This patch

[clang] [analyzer] Improve diagnostics from ArrayBoundCheckerV2 (PR #70056)

2023-11-02 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -217,80 +326,71 @@ void ArrayBoundCheckerV2::checkLocation(SVal location, bool isLoad, // MallocChecker that call SValBuilder::getConjuredHeapSymbolVal()) and // non-symbolic regions (e.g. a

[clang] [clang-tools-extra] [clang] Refactor `clang::Linkage` (PR #71049)

2023-11-02 Thread Aaron Ballman via cfe-commits
@@ -1921,7 +1920,20 @@ bool NamedDecl::declarationReplaces(NamedDecl *OldD, bool IsKnownNewer) const { } bool NamedDecl::hasLinkage() const { - return getFormalLinkage() != NoLinkage; + switch (getFormalLinkage()) { + case Linkage::Invalid: +llvm_unreachable("Linkage

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

2023-11-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Budimir Aranđelović (budimirarandjelovicsyrmia) Changes Enable flag -Wmissing-format-attribute to catch missing attributes. --- Full diff: https://github.com/llvm/llvm-project/pull/70024.diff 6 Files Affected: - (modified)

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

2023-11-02 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70024 From 36477198e67e225e6fc686cf08c194438e65d39c Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 13 Oct 2023 14:45:15 +0200 Subject: [PATCH] [clang] Catch missing format

<    1   2   3   4   5   >