[clang] 5b9d793 - [clang][NFC] Annotate Expr-related headers with `preferred_type`

2023-11-03 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-04T09:23:50+03:00 New Revision: 5b9d793290c187aee4e63b61d4a12c3766f7cfe6 URL: https://github.com/llvm/llvm-project/commit/5b9d793290c187aee4e63b61d4a12c3766f7cfe6 DIFF: https://github.com/llvm/llvm-project/commit/5b9d793290c187aee4e63b61d4a12c3766f7cfe6.

[clang] c4b2d33 - [clang][NFC] Annotate 2 leftover bit-fields in `Type.h` with `preferred_type`

2023-11-03 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-04T08:58:57+03:00 New Revision: c4b2d338cc450ff4499fd062cd9261bea55808a1 URL: https://github.com/llvm/llvm-project/commit/c4b2d338cc450ff4499fd062cd9261bea55808a1 DIFF: https://github.com/llvm/llvm-project/commit/c4b2d338cc450ff4499fd062cd9261bea55808a1.

[clang] 0fea0d2 - [clang][NFC] Annotate DeclBase.h with `preferred_type`

2023-11-03 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-04T08:43:59+03:00 New Revision: 0fea0d2f3b5e5be011e229cdddc7540095ff9236 URL: https://github.com/llvm/llvm-project/commit/0fea0d2f3b5e5be011e229cdddc7540095ff9236 DIFF: https://github.com/llvm/llvm-project/commit/0fea0d2f3b5e5be011e229cdddc7540095ff9236.

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

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

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

2023-11-03 Thread Lu Weining via cfe-commits
https://github.com/SixWeining closed 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] 4253fdc - [LoongArch] Fix ABI mismatch with g++ when handling empty unions (#71025)

2023-11-03 Thread via cfe-commits
Author: Lu Weining Date: 2023-11-04T10:04:37+08:00 New Revision: 4253fdc2c462da61cc0deb74a43265665720c828 URL: https://github.com/llvm/llvm-project/commit/4253fdc2c462da61cc0deb74a43265665720c828 DIFF: https://github.com/llvm/llvm-project/commit/4253fdc2c462da61cc0deb74a43265665720c828.diff LO

[clang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Justin Bogner (bogner) Changes If a template is defined via an external AST source, it won't have a location. When we emit warnings about misusing such templates we shouldn't emit a "template is declared here" warning with no location, as t

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-03 Thread Dan Klishch via cfe-commits
https://github.com/DanShaders updated https://github.com/llvm/llvm-project/pull/71148 >From 19124226ee4d08a8025f1e6b61d750096e13ee75 Mon Sep 17 00:00:00 2001 From: Dan Klishch Date: Fri, 3 Nov 2023 21:18:06 -0400 Subject: [PATCH] [clang] Stub out gcc_struct attribute This commit implements gcc

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-03 Thread Dan Klishch via cfe-commits
https://github.com/DanShaders edited https://github.com/llvm/llvm-project/pull/71148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-03 Thread Dan Klishch via cfe-commits
https://github.com/DanShaders edited https://github.com/llvm/llvm-project/pull/71148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-03 Thread Dan Klishch via cfe-commits
https://github.com/DanShaders edited https://github.com/llvm/llvm-project/pull/71148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-03 Thread Dan Klishch via cfe-commits
https://github.com/DanShaders edited https://github.com/llvm/llvm-project/pull/71148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-03 Thread Dan Klishch via cfe-commits
https://github.com/DanShaders edited https://github.com/llvm/llvm-project/pull/71148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTMatcher] Add matchers for CXXFoldExpr (PR #71245)

2023-11-03 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/71245 >From ae352f244a031b587d136423e0e3ef51f522c771 Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Fri, 3 Nov 2023 21:51:57 +0100 Subject: [PATCH] [clang][ASTMatcher]

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-03 Thread Dan Klishch via cfe-commits
https://github.com/DanShaders edited https://github.com/llvm/llvm-project/pull/71148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2023-11-03 Thread Dan Klishch via cfe-commits
https://github.com/DanShaders edited https://github.com/llvm/llvm-project/pull/71148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement gcc_struct attribute (PR #71148)

2023-11-03 Thread Dan Klishch via cfe-commits
https://github.com/DanShaders updated https://github.com/llvm/llvm-project/pull/71148 >From 0d6728f06d7633b6b9ffaed45182dac0e54546ba Mon Sep 17 00:00:00 2001 From: Dan Klishch Date: Fri, 3 Nov 2023 21:18:06 -0400 Subject: [PATCH] [clang] Stub out gcc_struct attribute This commit implements gcc

[clang] [clang][ASTMatcher] Add matchers for CXXFoldExpr (PR #71245)

2023-11-03 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 9b2246d9fad9fe62be26d22e184f241304779551 bd26678cd8a444aac6c7362df7eadedbb614b7fe --

[clang] [clang][ASTMatcher] Add matchers for CXXFoldExpr (PR #71245)

2023-11-03 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/71245 >From bd26678cd8a444aac6c7362df7eadedbb614b7fe Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Fri, 3 Nov 2023 21:51:57 +0100 Subject: [PATCH] [clang][ASTMatcher]

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

2023-11-03 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: Thanks for the explanation! https://github.com/llvm/llvm-project/pull/70234 __

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

2023-11-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,28 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers fix

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

2023-11-03 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,284 @@ +//===--- UseStdNumbersCheck.cpp - clang_tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX_License_Identifier: Ap

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

2023-11-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,28 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers fix

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

2023-11-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,284 @@ +//===--- UseStdNumbersCheck.cpp - clang_tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX_License_Identifier: Ap

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

2023-11-03 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,284 @@ +//===--- UseStdNumbersCheck.cpp - clang_tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX_License_Identifier: Ap

[llvm] [clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-11-03 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 671741bb9cbf1566ddadb401b41452475031a0ee 2f57f925e81b7e5171eb8d283e3450823d6acbf1 --

[llvm] [clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-11-03 Thread Sam Tebbs via cfe-commits
https://github.com/SamTebbs33 updated https://github.com/llvm/llvm-project/pull/68565 >From de07976922782b9dcf5d13d44551b782dc8b3b94 Mon Sep 17 00:00:00 2001 From: Samuel Tebbs Date: Fri, 6 Oct 2023 17:09:36 +0100 Subject: [PATCH 1/4] [AArch64][SME] Remove immediate argument restriction for sv

[clang-tools-extra] [flang] [compiler-rt] [llvm] [clang] [Bazel][Clang Tidy] Include builtin headers with clang-tidy (PR #67626)

2023-11-03 Thread via cfe-commits
https://github.com/jathu updated https://github.com/llvm/llvm-project/pull/67626 >From 20d9ca99fbf11868a5816df217b2aad09e079fb6 Mon Sep 17 00:00:00 2001 From: jathu Date: Wed, 27 Sep 2023 18:01:19 -0700 Subject: [PATCH] [clang-tidy][bazel] Include builtin headers with clang-tidy --- .../clang-

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-03 Thread via cfe-commits
goldsteinn wrote: > LGTM > > As a possible followup, we can probably drop the alignment assumption now? I > don't think it adds additional value if we're using ptrmask... Would think thats okay. Will post that after I push this. https://github.com/llvm/llvm-project/pull/71238

[clang-tools-extra] [flang] [compiler-rt] [llvm] [clang] [Bazel][Clang Tidy] Include builtin headers with clang-tidy (PR #67626)

2023-11-03 Thread via cfe-commits
jathu wrote: @aeubanks @rnk > issues with 2: relies on bazel paths, i.e. this puts the symlink at > bazel-bin/external/llvm-project/clang-tools-extra/ which happens to be two > directories up from > bazel-bin/external/llvm-project/clang-tools-extra/clang-tidy/clang-tidy I also think this is

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

2023-11-03 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 closed https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-03 Thread via cfe-commits
Author: Mingming Liu Date: 2023-11-03T16:01:10-07:00 New Revision: 34c0d32c81bf8d7cbeadbd4e9544378d4bf85a35 URL: https://github.com/llvm/llvm-project/commit/34c0d32c81bf8d7cbeadbd4e9544378d4bf85a35 DIFF: https://github.com/llvm/llvm-project/commit/34c0d32c81bf8d7cbeadbd4e9544378d4bf85a35.diff

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

2023-11-03 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > Somehow I missed those other uses of the ITANIUM prefix. Thanks for cleaning > it up though I think the new names are more descriptive. yep! I hope the new names helps more or less going forward. Thanks for the feedbacks! https://github.com/llvm/llvm-project/pull/70841 __

[clang] [clang][ASTMatcher] Add matchers for CXXFoldExpr (PR #71245)

2023-11-03 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/71245 >From 6a0a568fe0887c9665aa78bd51610e063d022c19 Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Fri, 3 Nov 2023 21:51:57 +0100 Subject: [PATCH] [clang][ASTMatcher]

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-03 Thread Joseph Huber via cfe-commits
@@ -88,7 +88,7 @@ class TargetOptions { COV_5 = 500, }; /// \brief Code object version for AMDGPU. - CodeObjectVersionKind CodeObjectVersion = CodeObjectVersionKind::COV_None; + CodeObjectVersionKind CodeObjectVersion = CodeObjectVersionKind::COV_4; j

[clang] [clang][ASTMatcher] Add matchers for CXXFoldExpr (PR #71245)

2023-11-03 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/71245 None >From 17cec21d5a92a2f1e09f7294d7990b0b584e5ec8 Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Fri, 3 Nov 2023 21:51:57 +0100 Subject: [PATCH] [clang][ASTMat

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

2023-11-03 Thread Bill Wendling via cfe-commits
bwendling wrote: > I just wanted to call out that this case is interesting because the size > derived from malloc and __counted_by compete each other. And __counted_by > always wins. This conforms to how -fbounds-safety will see the size of > objects, so sounds like we are all happy with it.

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

2023-11-03 Thread Teresa Johnson via cfe-commits
https://github.com/teresajohnson approved this pull request. Somehow I missed those other uses of the ITANIUM prefix. Thanks for cleaning it up though I think the new names are more descriptive. https://github.com/llvm/llvm-project/pull/70841 ___ cfe-

[clang] fc55068 - [clang][MicrosoftCXXABI] Remove no-op ptr-to-ptr bitcasts (NFC)

2023-11-03 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2023-11-03T17:05:44-05:00 New Revision: fc55068c0969fa83d894d46e14d4fdec05a30b2c URL: https://github.com/llvm/llvm-project/commit/fc55068c0969fa83d894d46e14d4fdec05a30b2c DIFF: https://github.com/llvm/llvm-project/commit/fc55068c0969fa83d894d46e14d4fdec05a30b2c.diff

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-03 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM As a possible followup, we can probably drop the alignment assumption now? I don't think it adds additional value if we're using ptrmask... https://github.com/llvm/llvm-project/pull/71238 ___

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

2023-11-03 Thread via cfe-commits
https://github.com/michaelrj-google closed https://github.com/llvm/llvm-project/pull/71095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-03 Thread via cfe-commits
Author: michaelrj-google Date: 2023-11-03T14:57:03-07:00 New Revision: c92cf315c67edaffea1c4f3a914197dce2a194f3 URL: https://github.com/llvm/llvm-project/commit/c92cf315c67edaffea1c4f3a914197dce2a194f3 DIFF: https://github.com/llvm/llvm-project/commit/c92cf315c67edaffea1c4f3a914197dce2a194f3.di

[clang] [llvm] Recommit changes to global checks (PR #71171)

2023-11-03 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: > > I think if the issues with the original commit are resolved, this is good > > to go. > > Did you verify we can properly auto-generate files, e.g., in > > llvm/test/Transforms/Attributor and clang/test/OpenMP? > > Ah no I did not, I'll do that on Monday. I'd run `./llvm/ut

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-03 Thread via cfe-commits
goldsteinn wrote: If we get this in, any reason to add support for also directly canonicalizing the pattern (i.e: https://reviews.llvm.org/D154010) or is that gratuitous? https://github.com/llvm/llvm-project/pull/71238 ___ cfe-commits mailing list cfe

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (goldsteinn) Changes Since PR's #69343 and #67166 we probably have enough support for `llvm.ptrmask` to make it preferable to the GEP stategy. --- Full diff: https://github.com/llvm/llvm-project/pull/71238.diff 3 Files Affected: -

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-03 Thread via cfe-commits
https://github.com/goldsteinn created https://github.com/llvm/llvm-project/pull/71238 Since PR's #69343 and #67166 we probably have enough support for `llvm.ptrmask` to make it preferable to the GEP stategy. >From fd00614be8cbe3dceaba654a687844f85f5436b4 Mon Sep 17 00:00:00 2001 From: Noah Gol

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-03 Thread Dan Liew via cfe-commits
@@ -0,0 +1,480 @@ +== +-fbounds-safety: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +-fbounds-safety is a C extension to enforce bounds safety to prev

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-03 Thread Dan Liew via cfe-commits
@@ -0,0 +1,480 @@ +== +-fbounds-safety: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +-fbounds-safety is a C extension to enforce bounds safety to prev

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-03 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/70749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-03 Thread Dan Liew via cfe-commits
@@ -0,0 +1,480 @@ +== +-fbounds-safety: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +-fbounds-safety is a C extension to enforce bounds safety to prev

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-03 Thread Dan Liew via cfe-commits
@@ -0,0 +1,480 @@ +== +-fbounds-safety: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +-fbounds-safety is a C extension to enforce bounds safety to prev

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-03 Thread Dan Liew via cfe-commits
@@ -0,0 +1,480 @@ +== +-fbounds-safety: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +-fbounds-safety is a C extension to enforce bounds safety to prev

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-03 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/70749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-03 Thread Dan Liew via cfe-commits
@@ -0,0 +1,480 @@ +== +-fbounds-safety: Enforcing bounds safety for C +== + +.. contents:: + :local: + +Overview + + +-fbounds-safety is a C extension to enforce bounds safety to prev

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-03 Thread Dan Liew via cfe-commits
https://github.com/delcypher approved this pull request. I have a few minor nits but other than that LGTM. Please make sure this builds without errors/warnings. I think you can configure CMake with `-DLLVM_BUILD_DOCS=ON -D LLVM_ENABLE_SPHINX=ON -DSPHINX_WARNINGS_AS_ERROR=ON` to enable building

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-03 Thread Saiyedul Islam via cfe-commits
https://github.com/saiislam updated https://github.com/llvm/llvm-project/pull/71234 >From 36976c1a97518c9cdf080d80b5fab2b16837b055 Mon Sep 17 00:00:00 2001 From: Saiyedul Islam Date: Fri, 3 Nov 2023 16:16:25 -0500 Subject: [PATCH 1/2] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL Fixes

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-03 Thread Saiyedul Islam via cfe-commits
https://github.com/saiislam updated https://github.com/llvm/llvm-project/pull/71234 >From 36976c1a97518c9cdf080d80b5fab2b16837b055 Mon Sep 17 00:00:00 2001 From: Saiyedul Islam Date: Fri, 3 Nov 2023 16:16:25 -0500 Subject: [PATCH 1/2] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL Fixes

[clang] [clang][analyzer] Do not analyze opaque types in CXXDeleteChecker (PR #70638)

2023-11-03 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: In case it is not too hard to synthesize a test case, could you add a regression test as well in a follow-up commit? https://github.com/llvm/llvm-project/pull/70638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-03 Thread Saiyedul Islam via cfe-commits
@@ -3086,10 +3139,14 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy &GenericDevice, // Only COV5 implicitargs needs to be set. COV4 implicitargs are not used. if (getImplicitArgsSize() == sizeof(utils::AMDGPUImplicitArgsTy)) { ImplArgs->BlockCountX = NumBlocks; +

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-03 Thread Saiyedul Islam via cfe-commits
@@ -17468,19 +17468,19 @@ Value *EmitAMDGPUImplicitArgPtr(CodeGenFunction &CGF) { /// Emit code based on Code Object ABI version. /// COV_4: Emit code to use dispatch ptr /// COV_5: Emit code to use implicitarg ptr -/// COV_NONE : Emit code to load a global variable "l

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-03 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 3cf9bf343de5fbc0b755572c60e8ed53628ff614 36976c1a97518c9cdf080d80b5fab2b16837b055 --

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-03 Thread Joseph Huber via cfe-commits
@@ -17468,19 +17468,19 @@ Value *EmitAMDGPUImplicitArgPtr(CodeGenFunction &CGF) { /// Emit code based on Code Object ABI version. /// COV_4: Emit code to use dispatch ptr /// COV_5: Emit code to use implicitarg ptr -/// COV_NONE : Emit code to load a global variable "l

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-03 Thread Joseph Huber via cfe-commits
@@ -3086,10 +3139,14 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy &GenericDevice, // Only COV5 implicitargs needs to be set. COV4 implicitargs are not used. if (getImplicitArgsSize() == sizeof(utils::AMDGPUImplicitArgsTy)) { ImplArgs->BlockCountX = NumBlocks; +

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Saiyedul Islam (saiislam) Changes Fixes the DeviceRTL compilation to ensure it is ABI agnostic. Uses already available global variable "oclc_ABI_version" instead of "llvm.amdgcn.abi.verion". It also add

[openmp] [clang] [OpenMP] Cleanup and fixes for ABI agnostic DeviceRTL (PR #71234)

2023-11-03 Thread Saiyedul Islam via cfe-commits
https://github.com/saiislam created https://github.com/llvm/llvm-project/pull/71234 Fixes the DeviceRTL compilation to ensure it is ABI agnostic. Uses already available global variable "oclc_ABI_version" instead of "llvm.amdgcn.abi.verion". It also adds some minor fields in ImplicitArg struct

[libcxxabi] [flang] [libcxx] [llvm] [clang] [mlir] [clang-tools-extra] [lldb] [lld] [compiler-rt] Refactor ModuleToObject to offer more flexibility to subclass (NFC) (PR #71165)

2023-11-03 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph closed https://github.com/llvm/llvm-project/pull/71165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxxabi] [flang] [libcxx] [llvm] [clang] [mlir] [clang-tools-extra] [lldb] [lld] [compiler-rt] Refactor ModuleToObject to offer more flexibility to subclass (NFC) (PR #71165)

2023-11-03 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph edited https://github.com/llvm/llvm-project/pull/71165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-03 Thread Yeoul Na via cfe-commits
rapidsna wrote: > With this PR I get: > > ``` > $ clang -O2 ~/llvm/bdos.c > $ ./a.out > 400 > 400 > 404 > ``` Oh I see. > I think the first two `printf` s in your code seem correct with 40, because > they're both looking at only the FAM, not the entire struct. Interesting. So this sounds di

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

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

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

2023-11-03 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ 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-03 Thread Mingming Liu via cfe-commits
@@ -1,98 +1,116 @@ + // Tests for the cfi-vcall feature: -// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT-NO-RV --check-

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

2023-11-03 Thread Mingming Liu via cfe-commits
@@ -1312,7 +1312,7 @@ llvm::GlobalObject::VCallVisibility CodeGenModule::GetVCallVisibilityLevel( void CodeGenModule::EmitVTableTypeMetadata(const CXXRecordDecl *RD, llvm::GlobalVariable *VTable,

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

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

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

2023-11-03 Thread Bill Wendling via cfe-commits
bwendling wrote: > ``` > #include > #include > struct flex { > int c; > int fam[] __attribute__((counted_by(c))); > }; > > int main() { > struct flex *p = (struct flex *)malloc(sizeof(struct flex) + sizeof(int) > * 10); > p->c = 100; > printf("%lu\n", __builtin_dynamic_obj

[clang-tools-extra] [libc] [compiler-rt] [llvm] [flang] [clang] [libcxx] [mlir] [MLIR] SPIRV Target Attribute (PR #69949)

2023-11-03 Thread Sang Ik Lee via cfe-commits
silee2 wrote: @antiagainst I'm waiting for your approval. https://github.com/llvm/llvm-project/pull/69949 ___ 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-03 Thread Mingming Liu via cfe-commits
@@ -101,14 +119,16 @@ // ITANIUM-OPT-SAME: !type [[EF16:![0-9]+]] // ITANIUM-OPT: @llvm.compiler.used = appending global [1 x ptr] [ptr @_ZTVN5test31EE] -// MS: comdat($"??_7A@@6B@"), !type [[A8:![0-9]+]] -// MS: comdat($"??_7B@@6B0@@"), !type [[B8:![0-9]+]] -// MS: comdat($"

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

2023-11-03 Thread Mingming Liu via cfe-commits
@@ -1,98 +1,116 @@ + // Tests for the cfi-vcall feature: -// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT-NO-RV --check-

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

2023-11-03 Thread Teresa Johnson via cfe-commits
@@ -101,14 +119,16 @@ // ITANIUM-OPT-SAME: !type [[EF16:![0-9]+]] // ITANIUM-OPT: @llvm.compiler.used = appending global [1 x ptr] [ptr @_ZTVN5test31EE] -// MS: comdat($"??_7A@@6B@"), !type [[A8:![0-9]+]] -// MS: comdat($"??_7B@@6B0@@"), !type [[B8:![0-9]+]] -// MS: comdat($"

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

2023-11-03 Thread Teresa Johnson via cfe-commits
@@ -1,98 +1,116 @@ + // Tests for the cfi-vcall feature: -// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT-NO-RV --check-

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

2023-11-03 Thread Teresa Johnson via cfe-commits
@@ -1312,7 +1312,7 @@ llvm::GlobalObject::VCallVisibility CodeGenModule::GetVCallVisibilityLevel( void CodeGenModule::EmitVTableTypeMetadata(const CXXRecordDecl *RD, llvm::GlobalVariable *VTable,

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

2023-11-03 Thread Teresa Johnson via cfe-commits
@@ -1,98 +1,116 @@ + // Tests for the cfi-vcall feature: -// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT-NO-RV --check-

[clang-tools-extra] 2b76bdc - [clang-doc] Fix a warning

2023-11-03 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-11-03T11:03:15-07:00 New Revision: 2b76bdc33b555beb637c13b8bdbd8d3e935d9d56 URL: https://github.com/llvm/llvm-project/commit/2b76bdc33b555beb637c13b8bdbd8d3e935d9d56 DIFF: https://github.com/llvm/llvm-project/commit/2b76bdc33b555beb637c13b8bdbd8d3e935d9d56.diff L

[clang] 141122e - [TableGen] Use StringRef::starts_with/ends_with instead of startswith/endswith. NFC.

2023-11-03 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2023-11-03T17:53:56Z New Revision: 141122ece3c09a2f2e3c0280687633820bf632d5 URL: https://github.com/llvm/llvm-project/commit/141122ece3c09a2f2e3c0280687633820bf632d5 DIFF: https://github.com/llvm/llvm-project/commit/141122ece3c09a2f2e3c0280687633820bf632d5.diff LOG:

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

2023-11-03 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,28 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers fix

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

2023-11-03 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,284 @@ +//===--- UseStdNumbersCheck.cpp - clang_tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX_License_Identifier: Ap

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

2023-11-03 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,284 @@ +//===--- UseStdNumbersCheck.cpp - clang_tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX_License_Identifier: Ap

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

2023-11-03 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,284 @@ +//===--- UseStdNumbersCheck.cpp - clang_tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX_License_Identifier: Ap

[llvm] [flang] [compiler-rt] [openmp] [clang] [mlir] [libcxx] [lldb] [clang-tools-extra] [clang][NFC] Refactor `TagTypeKind` (PR #71160)

2023-11-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/71160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-03 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,12 @@ +// This reports a warning to follow the default behavior of ClangAs. +// RUN: %clang -fexperimental-bounds-safety -x assembler -c %s -o /dev/null 2>&1 | FileCheck -check-prefix WARN %s + + +// WARN: warning: argument unused during compilation: '-fexperimental-b

[llvm] [flang] [compiler-rt] [openmp] [clang] [mlir] [libcxx] [lldb] [clang-tools-extra] [clang][NFC] Refactor `TagTypeKind` (PR #71160)

2023-11-03 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 7ca0f4418a6d385e07d9aff42865c34d3dc2adf7 9f0245e71c92f5f613689dabe227628b624ddc2b --

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

2023-11-03 Thread Dan Liew via cfe-commits
@@ -0,0 +1,12 @@ +// This reports a warning to follow the default behavior of ClangAs. +// RUN: %clang -fexperimental-bounds-safety -x assembler -c %s -o /dev/null 2>&1 | FileCheck -check-prefix WARN %s + + +// WARN: warning: argument unused during compilation: '-fexperimental-b

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-11-03 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a updated this revision to Diff 558001. bolshakov-a added a comment. One more problem has been discovered and fixed: IR emitting didn't work when using a subobject as a template argument when the corresponding template parameter is used in an lvalue context. A test case has been added

[clang] d3e7a48 - [OpenMP][NFC] Remove a no-op function

2023-11-03 Thread Johannes Doerfert via cfe-commits
Author: Johannes Doerfert Date: 2023-11-03T10:28:36-07:00 New Revision: d3e7a48cbde060a6dbc1edcb00f375fb2f9405dc URL: https://github.com/llvm/llvm-project/commit/d3e7a48cbde060a6dbc1edcb00f375fb2f9405dc DIFF: https://github.com/llvm/llvm-project/commit/d3e7a48cbde060a6dbc1edcb00f375fb2f9405dc.d

[llvm] [clang] Recommit changes to global checks (PR #71171)

2023-11-03 Thread Henrik G. Olsson via cfe-commits
hnrklssn wrote: > I think if the issues with the original commit are resolved, this is good to > go. > > Did you verify we can properly auto-generate files, e.g., in > llvm/test/Transforms/Attributor and clang/test/OpenMP? > > Ah no I did not, I'll do that on Monday. https://github.com/ll

[clang] [Clang] Add codegen option to add passbuilder callback functions (PR #70171)

2023-11-03 Thread William Moses via cfe-commits
wsmoses wrote: bump @efriedma-quic for reviewing this PR https://github.com/llvm/llvm-project/pull/70171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang/OpenCL: set sqrt fp accuracy on call to Z4sqrt (PR #66651)

2023-11-03 Thread Romaric Jodin via cfe-commits
rjodinchr wrote: What is the next step to get this PR merged? https://github.com/llvm/llvm-project/pull/66651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-03 Thread Julian Schmidt via cfe-commits
5chmidti wrote: I found the issue, but I have not looked for a solution. See https://godbolt.org/z/or4EnMfWj and #71203. When using clang with `-target` to specify `x86_64-pc-win32` and `x86_64-linux`, the body for the function `f` is `NULL` in the AST with the windows target. This only happens

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

2023-11-03 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. If you make all of the newly added tests share a similar filename prefix, it will be easier to test via `llvm-lit -vv clang/test/Driver/bounds-safety*`. `fbounds-safety.c` seems to break that convention. https://github.com/llvm/ll

[llvm] [clang] Recommit changes to global checks (PR #71171)

2023-11-03 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert commented: I think if the issues with the original commit are resolved, this is good to go. Did you verify we can properly auto-generate files, e.g., in llvm/test/Transforms/Attributor and clang/test/OpenMP? https://github.com/llvm/llvm-project/pull/71171 _

  1   2   3   >