[clang] [clang-tools-extra] [clangd] Update clangDaemonTweaks to set symbol visibility macros (PR #112304)

2024-11-17 Thread Thomas Fransham via cfe-commits
@@ -47,7 +47,7 @@ endmacro() macro(add_clang_library name) cmake_parse_arguments(ARG -"SHARED;STATIC;INSTALL_WITH_TOOLCHAIN" +"SHARED;STATIC;INSTALL_WITH_TOOLCHAIN;CLANG_IMPORT" fsfod wrote: Its not possible to infer if a OBJECT target should be imp

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-asan` running on `sanitizer-buildbot8` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/24/builds/2686 Here is the r

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-17 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert created https://github.com/llvm/llvm-project/pull/116556 The situation that required symbol versions on the LLVM shared library can also happen for clang-cpp, although it is less common: different tools require different versions of the library, and through tran

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Puchert (aaronpuchert) Changes The situation that required symbol versions on the LLVM shared library can also happen for clang-cpp, although it is less common: different tools require different versions of the library, and through

[clang-tools-extra] [clangd] Check for other clangd extension capabilities under 'experimental' (PR #116531)

2024-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Nathan Ridge (HighCommander4) Changes This is a follow-up to PR114699, with the same motivation: to support clients which only support adding custom (language-specific or server-specific) capabilities under 'experimental'. --- Full diff

[clang-tools-extra] [clangd] Check for other clangd extension capabilities under 'experimental' (PR #116531)

2024-11-17 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/116531 This is a follow-up to PR114699, with the same motivation: to support clients which only support adding custom (language-specific or server-specific) capabilities under 'experimental'. >From bdc4d0a15a8

[clang] [Clang] Fix name lookup for dependent bases (PR #114978)

2024-11-17 Thread Vladislav Belov via cfe-commits
https://github.com/vbe-sc updated https://github.com/llvm/llvm-project/pull/114978 >From f3b8ee95f1b3759f7d0dbc12f856a13ca9f01e0f Mon Sep 17 00:00:00 2001 From: vb-sc Date: Tue, 5 Nov 2024 15:46:57 +0300 Subject: [PATCH] [clang] Fix name lookup for dependent bases --- clang/lib/AST/CXXInherit

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-17 Thread Utkarsh Saxena via cfe-commits
@@ -3229,6 +3230,52 @@ void Sema::CheckArgAlignment(SourceLocation Loc, NamedDecl *FDecl, << ParamName << (FDecl != nullptr) << FDecl; } +void Sema::checkLifetimeCaptureBy(FunctionDecl *FD, bool IsMemberFunction, + const Expr *ThisArg,

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread Freddy Ye via cfe-commits
FreddyLeaf wrote: > Looks like this breaks tests: http://45.33.8.238/linux/153081/step_6.txt > > Please take a look and revert for now if it takes a while to fix. Thanks reminding. Revert first. https://github.com/llvm/llvm-project/pull/113881 ___ cf

[clang] [clang] Set FPOptions at the beginning of CompoundStmt (PR #111654)

2024-11-17 Thread John McCall via cfe-commits
rjmccall wrote: I'm sorry if you've explained this before, but I thought our general approach was to just store the options in individual expressions, and CodeGen should in general already be paying attention to those options. Is there a specific reason we also need to honor these at the comp

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-17 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,220 @@ +// RUN: %clang_cc1 --std=c++20 -fsyntax-only -Wdangling -Wdangling-field -Wreturn-stack-address -verify %s + +#include "Inputs/lifetime-analysis.h" + +struct X { + const int *x; + void captureInt(const int& x [[clang::lifetime_capture_by(this)]]) { this->x =

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-17 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,220 @@ +// RUN: %clang_cc1 --std=c++20 -fsyntax-only -Wdangling -Wdangling-field -Wreturn-stack-address -verify %s + +#include "Inputs/lifetime-analysis.h" + +struct X { + const int *x; + void captureInt(const int& x [[clang::lifetime_capture_by(this)]]) { this->x =

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/115921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-17 Thread Campbell Barton via cfe-commits
@@ -206,20 +191,30 @@ which can be passed directly to ‘clang-format’." ((= status 0) nil) ;; Return of 1 indicates found diffs and no error. ((= status 1) -;; Iterate through all lines in diff buffer and collect all -;; lines in current buff

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-17 Thread Campbell Barton via cfe-commits
https://github.com/ideasman42 edited https://github.com/llvm/llvm-project/pull/112792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 97836be - Reland "[X86] Support -march=diamondrapids (#113881)" (#116564)

2024-11-17 Thread via cfe-commits
Author: Freddy Ye Date: 2024-11-18T10:40:32+08:00 New Revision: 97836bed6357664f9b2fb87cfe10656b08309bac URL: https://github.com/llvm/llvm-project/commit/97836bed6357664f9b2fb87cfe10656b08309bac DIFF: https://github.com/llvm/llvm-project/commit/97836bed6357664f9b2fb87cfe10656b08309bac.diff LOG

[clang] [compiler-rt] [llvm] Reland "[X86] Support -march=diamondrapids (#113881)" (PR #116564)

2024-11-17 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf closed https://github.com/llvm/llvm-project/pull/116564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TargetVersion] Only enable on RISC-V and AArch64 (PR #115991)

2024-11-17 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/115991 >From 28f7a2adc055ec6f30790e1e9535c71241a08e29 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Tue, 12 Nov 2024 20:56:47 -0800 Subject: [PATCH 1/7] [TargetVersion] Only enable on RISC-V and AArch64 --- clang/inclu

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-17 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/112792 >From 802764e879862541e205ba1a070824b71d2fef9a Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Thu, 17 Oct 2024 17:31:24 -0500 Subject: [PATCH 01/15] [emacs][clang-format] Add elisp API for clang-format o

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-17 Thread via cfe-commits
@@ -206,20 +191,30 @@ which can be passed directly to ‘clang-format’." ((= status 0) nil) ;; Return of 1 indicates found diffs and no error. ((= status 1) -;; Iterate through all lines in diff buffer and collect all -;; lines in current buff

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-17 Thread Campbell Barton via cfe-commits
@@ -146,18 +146,124 @@ is a zero-based file offset, assuming ‘utf-8-unix’ coding." (lambda (byte &optional _quality _coding-system) (byte-to-position (1+ byte) -;;;###autoload -(defun clang-format-region (start end &optional style assume-file-name) - "Use clang

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-17 Thread Campbell Barton via cfe-commits
https://github.com/ideasman42 edited https://github.com/llvm/llvm-project/pull/112792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 63aa8cf - [NFC][Clang][TableGen] Fix file header comments (#116491)

2024-11-17 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-11-17T07:54:10-08:00 New Revision: 63aa8cf6becbeb4983e3d1a7fa3cd8a7c7147118 URL: https://github.com/llvm/llvm-project/commit/63aa8cf6becbeb4983e3d1a7fa3cd8a7c7147118 DIFF: https://github.com/llvm/llvm-project/commit/63aa8cf6becbeb4983e3d1a7fa3cd8a7c7147118.diff L

[clang] [NFC][Clang][TableGen] Fix file header comments (PR #116491)

2024-11-17 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/116491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-17 Thread Campbell Barton via cfe-commits
@@ -146,18 +146,124 @@ is a zero-based file offset, assuming ‘utf-8-unix’ coding." (lambda (byte &optional _quality _coding-system) (byte-to-position (1+ byte) -;;;###autoload -(defun clang-format-region (start end &optional style assume-file-name) - "Use clang

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-17 Thread Campbell Barton via cfe-commits
https://github.com/ideasman42 edited https://github.com/llvm/llvm-project/pull/112792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-11-17 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/112345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-11-17 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. LGTM with minor comments addressed https://github.com/llvm/llvm-project/pull/112345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-11-17 Thread Nathan Ridge via cfe-commits
@@ -202,7 +218,8 @@ deleteTokensWithKind(const syntax::TokenBuffer &TokBuf, tok::TokenKind Kind, llvm::Expected getFunctionSourceCode(const FunctionDecl *FD, const DeclContext *TargetContext, const syntax::TokenBuffer &TokBuf, - const

[clang] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/115921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-17 Thread Utkarsh Saxena via cfe-commits
@@ -249,7 +254,7 @@ static void visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path, LocalVisitor Visit); template static bool isRecordWithAttr(QualType Type) { - if (auto *RD = Type->getAsCXXRecordDecl()) + if (a

[clang] [compiler-rt] [llvm] Revert "[X86] Support -march=diamondrapids (#113881)" (PR #116563)

2024-11-17 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf created https://github.com/llvm/llvm-project/pull/116563 This reverts commit 826b845c9e97448395431be3e4e5da585bd98c5e. >From e349e24b3e10a44414593252d117bf2936b4bc91 Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Mon, 18 Nov 2024 08:43:26 +0800 Subject: [PATCH] R

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu` running on `sie-linux-worker3` while building `clang,compiler-rt,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/b

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-win` running on `sie-win-worker` while building `clang,compiler-rt,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/8

[clang] [lld] [llvm] Add _Coroutine unit tests (PR #116561)

2024-11-17 Thread Abdur Javaid via cfe-commits
https://github.com/abdurj created https://github.com/llvm/llvm-project/pull/116561 Adds a simple FileCheck test for _Coroutine. For some reason, we broke a previous test but we can figure this out later. ## Testing: `ninja -C build check-clang` >From ec2e4574378f4b248277789c4951781a7244be6e M

[clang] [lld] [llvm] Add _Coroutine unit tests (PR #116561)

2024-11-17 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [lld] [llvm] Add _Coroutine unit tests (PR #116561)

2024-11-17 Thread Abdur Javaid via cfe-commits
https://github.com/abdurj closed https://github.com/llvm/llvm-project/pull/116561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 90e9223 - Revert "[X86] Support -march=diamondrapids (#113881)" (#116563)

2024-11-17 Thread via cfe-commits
Author: Freddy Ye Date: 2024-11-18T08:45:28+08:00 New Revision: 90e92239bd0706c44ef4add018c702e53101b253 URL: https://github.com/llvm/llvm-project/commit/90e92239bd0706c44ef4add018c702e53101b253 DIFF: https://github.com/llvm/llvm-project/commit/90e92239bd0706c44ef4add018c702e53101b253.diff LOG

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang,compiler-rt,llvm` at step 6 "test-build-unified-tree-check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/1296

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `clang,compiler-rt,llvm` at step 6 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-x86_64-debian-fast` running on `gribozavr4` while building `clang,compiler-rt,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/12415

[clang] [compiler-rt] [llvm] Reland "[X86] Support -march=diamondrapids (#113881)" (PR #116564)

2024-11-17 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf created https://github.com/llvm/llvm-project/pull/116564 Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368 >From 043c82617a6b1aec08915f294b8ede449705b09d Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Mon, 18 Nov 2024 08:47:24 +0800 Subject: [PATCH] Reland "

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 Thread Nicolas van Kempen via cfe-commits
@@ -36,221 +36,224 @@ void test(std::string s, std::string_view sv, sub_string ss, sub_sub_string sss, string_like sl, string_like_camel slc, prefer_underscore_version puv, prefer_underscore_version_flip puvf) { s.find("a") == 0; - // CHECK-MESSAGES: :[[

[clang] [compiler-rt] [llvm] Reland "[X86] Support -march=diamondrapids (#113881)" (PR #116564)

2024-11-17 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. https://github.com/llvm/llvm-project/pull/116564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-11-17 Thread Nathan Ridge via cfe-commits
@@ -130,23 +129,40 @@ getFunctionSourceAfterReplacements(const FunctionDecl *FD, return QualifiedFunc.takeError(); std::string TemplatePrefix; + auto AddToTemplatePrefixIfApplicable = [&](const Decl *D, bool append) { +const TemplateParameterList *Params = D->getDes

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-11-17 Thread Nathan Ridge via cfe-commits
@@ -130,23 +129,40 @@ getFunctionSourceAfterReplacements(const FunctionDecl *FD, return QualifiedFunc.takeError(); std::string TemplatePrefix; + auto AddToTemplatePrefixIfApplicable = [&](const Decl *D, bool append) { HighCommander4 wrote: nit: UpperCa

[clang] [compiler-rt] [llvm] Revert "[X86] Support -march=diamondrapids (#113881)" (PR #116563)

2024-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Freddy Ye (FreddyLeaf) Changes This reverts commit 826b845c9e97448395431be3e4e5da585bd98c5e. --- Patch is 20.48 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/116563.diff 16 Files Affe

[clang] [compiler-rt] [llvm] Revert "[X86] Support -march=diamondrapids (#113881)" (PR #116563)

2024-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Freddy Ye (FreddyLeaf) Changes This reverts commit 826b845c9e97448395431be3e4e5da585bd98c5e. --- Patch is 20.48 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/116563.diff 16 Files Aff

[clang] [compiler-rt] [llvm] Revert "[X86] Support -march=diamondrapids (#113881)" (PR #116563)

2024-11-17 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf closed https://github.com/llvm/llvm-project/pull/116563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang,compiler-rt,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/9

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang,compiler-rt,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/build

[clang] [compiler-rt] [llvm] Reland "[X86] Support -march=diamondrapids (#113881)" (PR #116564)

2024-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Freddy Ye (FreddyLeaf) Changes Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368 --- Patch is 20.50 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/116564.diff 16 Files Affected:

[clang] [compiler-rt] [llvm] Reland "[X86] Support -march=diamondrapids (#113881)" (PR #116564)

2024-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Freddy Ye (FreddyLeaf) Changes Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368 --- Patch is 20.50 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/116564.diff 16 Files Affected: - (mod

[clang] [compiler-rt] [llvm] Revert "[X86] Support -march=diamondrapids (#113881)" (PR #116563)

2024-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Freddy Ye (FreddyLeaf) Changes This reverts commit 826b845c9e97448395431be3e4e5da585bd98c5e. --- Patch is 20.48 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/116563.diff 16 Files Affected:

[clang] [lld] [llvm] Add _Coroutine unit tests (PR #116561)

2024-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lld-macho @llvm/pr-subscribers-clang Author: Abdur Javaid (abdurj) Changes Adds a simple FileCheck test for _Coroutine. For some reason, we broke a previous test but we can figure this out later. ## Testing: `ninja -C build check-clang` --- Patch is

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf closed https://github.com/llvm/llvm-project/pull/113881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang,compiler-rt,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/1

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 Thread Congcong Cai via cfe-commits
@@ -30,6 +30,17 @@ struct NotLengthExprForStringNode { IntegerLiteralSizeNode->getValue().getZExtValue(); } + if (const auto *DeclRefNode = Node.get()) { HerrCai0907 wrote: llvm code guideline wants to ignore `{}` for `if` / `for` wi

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 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 5845688e91d85d46c0f47daaf4edfdfc772853cf 23b4bcdf52041aad1c5581e0f7dc01028770a154 --e

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 Thread Congcong Cai via cfe-commits
@@ -171,10 +182,64 @@ void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) { hasRHS(lengthExprForStringNode("needle") .bind("expr"), this); + + Finder->addMatcher( + cxxOperatorCallExpr( + hasAnyOper

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 Thread Congcong Cai via cfe-commits
@@ -266,3 +269,53 @@ void test(std::string s, std::string_view sv, sub_string ss, sub_sub_string sss, s.compare(0, 1, "ab") == 0; s.rfind(suffix, 1) == s.size() - suffix.size(); } + +void test_substr() { +std::string str("hello world"); +std::string prefix = "hello

[clang] [TargetVersion] Only enable on RISC-V and AArch64 (PR #115991)

2024-11-17 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/115991 >From 28f7a2adc055ec6f30790e1e9535c71241a08e29 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Tue, 12 Nov 2024 20:56:47 -0800 Subject: [PATCH 1/6] [TargetVersion] Only enable on RISC-V and AArch64 --- clang/inclu

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 Thread Nicolas van Kempen via cfe-commits
@@ -171,10 +182,64 @@ void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) { hasRHS(lengthExprForStringNode("needle") .bind("expr"), this); + + Finder->addMatcher( + cxxOperatorCallExpr( + hasAnyOper

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank requested changes to this pull request. https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 Thread Nicolas van Kempen via cfe-commits
@@ -25,6 +25,7 @@ class UseStartsEndsWithCheck : public ClangTidyCheck { UseStartsEndsWithCheck(StringRef Name, ClangTidyContext *Context); void registerMatchers(ast_matchers::MatchFinder *Finder) override; void check(const ast_matchers::MatchFinder::MatchResult &Result)

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 Thread Nicolas van Kempen via cfe-commits
@@ -171,10 +182,64 @@ void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) { hasRHS(lengthExprForStringNode("needle") .bind("expr"), this); + + Finder->addMatcher( + cxxOperatorCallExpr( + hasAnyOper

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 Thread Nicolas van Kempen via cfe-commits
@@ -171,10 +182,64 @@ void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) { hasRHS(lengthExprForStringNode("needle") .bind("expr"), this); + + Finder->addMatcher( + cxxOperatorCallExpr( + hasAnyOper

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 Thread Nicolas van Kempen via cfe-commits
@@ -171,10 +182,64 @@ void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) { hasRHS(lengthExprForStringNode("needle") .bind("expr"), this); + + Finder->addMatcher( + cxxOperatorCallExpr( + hasAnyOper

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 Thread Nicolas van Kempen via cfe-commits
@@ -30,6 +30,17 @@ struct NotLengthExprForStringNode { IntegerLiteralSizeNode->getValue().getZExtValue(); } + if (const auto *DeclRefNode = Node.get()) { +if (const auto *VD = dyn_cast(DeclRefNode->getDecl())) { + if (VD->hasInit() &&

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-17 Thread Congcong Cai via cfe-commits
@@ -266,3 +269,53 @@ void test(std::string s, std::string_view sv, sub_string ss, sub_sub_string sss, s.compare(0, 1, "ab") == 0; s.rfind(suffix, 1) == s.size() - suffix.size(); } + +void test_substr() { +std::string str("hello world"); +std::string prefix = "hello

[clang-tools-extra] [clang-tidy] Fix false positive in cppcoreguidelines-avoid-const-or-ref-data-members when detecting templated classes with inheritance (PR #115180)

2024-11-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/115180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix false positive in cppcoreguidelines-avoid-const-or-ref-data-members when detecting templated classes with inheritance (PR #115180)

2024-11-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/115180 >From 428283c7b61ca50d40ffd3ddc5c08aca39f39533 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 7 Nov 2024 00:35:47 +0800 Subject: [PATCH 1/3] [clang-tidy] fix false positive when detecting templated

[clang] [AArch64][ARM] Treat __bf16 as vendor extension type for C++ name mangling substitution (PR #115956)

2024-11-17 Thread John McCall via cfe-commits
rjmccall wrote: The ABI spec is pretty clear about this, and demangling is likely to get very screwed up because of the inconsistency. I think should do the following: - We should file a bug with GCC pointing out the problem. - We should fix the bug under new `-fclang-abi-compat=` versions, bu

[clang-tools-extra] [clangd] Support symbolTags for document symbol (PR #113669)

2024-11-17 Thread via cfe-commits
https://github.com/chouzz updated https://github.com/llvm/llvm-project/pull/113669 >From 02124e4cfd7dbc395d4974c7561d5f110980aaa5 Mon Sep 17 00:00:00 2001 From: chouzz Date: Fri, 25 Oct 2024 17:42:04 +0800 Subject: [PATCH 1/4] [clangd] Support symbolTags for document symbol --- clang-tools-ex

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-17 Thread Piyou Chen via cfe-commits
@@ -4216,22 +4216,11 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, llvm::Function *NewFn); static unsigned -TargetMVPriority(const TargetInfo &TI, - const CodeGenFunction:

[clang] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-17 Thread Utkarsh Saxena via cfe-commits
@@ -249,7 +254,7 @@ static void visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path, LocalVisitor Visit); template static bool isRecordWithAttr(QualType Type) { - if (auto *RD = Type->getAsCXXRecordDecl()) + if (a

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-17 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,220 @@ +// RUN: %clang_cc1 --std=c++20 -fsyntax-only -Wdangling -Wdangling-field -Wreturn-stack-address -verify %s + +#include "Inputs/lifetime-analysis.h" usx95 wrote: I don't think that would be useful. Both lifetimebound and lifetime_capture share

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/115921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-17 Thread Utkarsh Saxena via cfe-commits
@@ -1460,7 +1502,15 @@ void checkExprLifetime(Sema &SemaRef, const AssignedEntity &Entity, checkExprLifetimeImpl(SemaRef, /*InitEntity=*/nullptr, /*ExtendingEntity=*/nullptr, LK_Assignment, &Entity, -Init); +

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-17 Thread Utkarsh Saxena via cfe-commits
@@ -1110,13 +1117,14 @@ static bool shouldRunGSLAssignmentAnalysis(const Sema &SemaRef, isAssignmentOperatorLifetimeBound(Entity.AssignmentOperator))); } -static void checkExprLifetimeImpl(Sema &SemaRef, - const InitializedEntity *I

[clang] [ARM] Fix NaN behaviour for MVE compare intrinsics (PR #116371)

2024-11-17 Thread David Green via cfe-commits
https://github.com/davemgreen commented: This seems to match what we do in the backend. LGTM > The MVE intrinsics are defined as having the same behaviour as the > instructions which they correspond to. (They are defined to match the instructions they correspond to inside the current fp envir

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-11-17 Thread Younan Zhang via cfe-commits
@@ -13044,6 +13045,17 @@ class Sema final : public SemaBase { bool SkipForSpecialization = false, bool ForDefaultArgumentSubstitution = false); + /// Apart from storing the result to \p Result, this behaves the same as + /// another overload. + void getTemplateI

[clang-tools-extra] [clangd] Check for editsNearCursor client capability under experimental capabilities (PR #114699)

2024-11-17 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > > (No action required) – we have other extensions in clangd e.g. > > `references.container` `offsetEncoding`. Do we plan to do the same thing > > for them? > > Good question; I was initially thinking of doing it as needed / when someone > asks for it. But maybe it woul

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #116549)

2024-11-17 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/116549 Identified with misc-include-cleaner. >From a11ea3a089d42b2e11d5a32cc490665f7fd4efbd Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 17 Nov 2024 09:04:05 -0800 Subject: [PATCH] [AST] Avoid repeate

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #116549)

2024-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Identified with misc-include-cleaner. --- Patch is 27.08 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/116549.diff 52 Files Affected: - (modified) clan

[clang] [AST] Remove unused includes (NFC) (PR #116549)

2024-11-17 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata edited https://github.com/llvm/llvm-project/pull/116549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #116549)

2024-11-17 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/116549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-17 Thread Nikita Popov via cfe-commits
nikic wrote: There's an existing PR for this here: https://github.com/llvm/llvm-project/pull/110758 https://github.com/llvm/llvm-project/pull/116556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] 3155199 - Thread safety analysis: Eliminate unneeded const_cast, NFC

2024-11-17 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2024-11-17T22:40:09+01:00 New Revision: 315519917368dce841f1cb1e7b296846d13497c3 URL: https://github.com/llvm/llvm-project/commit/315519917368dce841f1cb1e7b296846d13497c3 DIFF: https://github.com/llvm/llvm-project/commit/315519917368dce841f1cb1e7b296846d13497c3.diff

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-17 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: @nikic, thanks for letting me know! That is indeed pretty much the same change. @tstellar, maybe you want to copy the change to `llvm/CMakeLists.txt`, otherwise I'd close this. https://github.com/llvm/llvm-project/pull/116556 ___

[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)

2024-11-17 Thread via cfe-commits
AreaZR wrote: Going to ping @rjmccall https://github.com/llvm/llvm-project/pull/85465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Remove unused includes (NFC) (PR #116549)

2024-11-17 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/116549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-17 Thread via cfe-commits
vabridgers wrote: Thanks @HerrCai0907 and @5chmidti for the constructive comments. I believe all have been addressed and a way forward has been described. Please let me know how we can move this forward. Thank you! https://github.com/llvm/llvm-project/pull/114715 _

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-17 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/114715 >From 6bcbe9f09060dc2bdcdb9a9c6e576466e24e08cb Mon Sep 17 00:00:00 2001 From: Vince Bridgers Date: Thu, 7 Nov 2024 01:58:21 +0100 Subject: [PATCH] [analyzer] Port alpha.core.IdenticalExpr to Tidy checks and

[clang] dec6324 - [AST] Remove unused includes (NFC) (#116549)

2024-11-17 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-11-17T09:36:48-08:00 New Revision: dec6324cb05ac1d339c1b2bd43add968f2931c62 URL: https://github.com/llvm/llvm-project/commit/dec6324cb05ac1d339c1b2bd43add968f2931c62 DIFF: https://github.com/llvm/llvm-project/commit/dec6324cb05ac1d339c1b2bd43add968f2931c62.diff L

[libcxx] [libunwind] [llvm] [libc++] Enable -Wmissing-prototypes (PR #116261)

2024-11-17 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116261 >From 811186764d1add4d83972db3ad0d2e7c96bb15a7 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 16 Nov 2024 19:23:20 +0100 Subject: [PATCH 1/2] [libc++] Fix a few problems found by clang-tidy --- l

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-11-17 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @cor3ntin Not much, we just need to move the handling of the friend declaration outside of `getTemplateInstantiationArgs()` :) Do you see any other outstanding issues? If not, can we go ahead with the status quo so we have sufficient timeframe in clang 20 cycle in case something

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2024-11-17 Thread Michael Jabbour via cfe-commits
michael-jabbour-sonarsource wrote: Gentle ping :smile: The aim of the PR is to fix an ASTWriter crash that currently happens when serializing merged enums. Such a case was encountered while parsing Objective-C code that uses the XCode 16 SDK. If any of the changes look risky, I am happy to re

[clang] c4eeef3 - [TBAA] Add test for generating pointer-tbaa for unnamed structs.

2024-11-17 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-11-17T20:04:36Z New Revision: c4eeef32d5dc8ec7560edabf18ac29416a7551e5 URL: https://github.com/llvm/llvm-project/commit/c4eeef32d5dc8ec7560edabf18ac29416a7551e5 DIFF: https://github.com/llvm/llvm-project/commit/c4eeef32d5dc8ec7560edabf18ac29416a7551e5.diff LOG:

  1   2   >