[clang] [X86][vectorcall] Do not consume register for indirect return value (PR #97939)

2024-07-07 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM I meant, at the beginning of X86_32ABIInfo::computeInfo there's a chain of if statements that set up the properties of different calling conventions, and maybe some bits could be set there. If you don't think that makes sense,

[clang] [llvm] [SanitizerBinaryMetadata] Fix multi-version sanitizer metadata (PR #97848)

2024-07-07 Thread Dmitry Vyukov via cfe-commits
https://github.com/dvyukov approved this pull request. https://github.com/llvm/llvm-project/pull/97848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-07-07 Thread Kefu Chai via cfe-commits
tchaikov wrote: @HerrCai0907 Hello Congcong, thank you for your message. I appreciate your willingness to help. As I don't have write access to the repository, I would be grateful if you could review and merge this pull request for me. Please let me know if you need any additional information

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-07-07 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: Normally PR can be merged if someone approved PR. You can merge it by yourself. If you don't have access, I'm glad to help you. https://github.com/llvm/llvm-project/pull/93623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[libunwind] [libunwind] fix unwinding from signal handler (PR #92291)

2024-07-07 Thread Azat Khuzhin via cfe-commits
@@ -365,7 +365,12 @@ int DwarfInstructions::stepWithDwarf(A &addressSpace, pint_t pc, // Return address is address after call site instruction, so setting IP to // that does simulates a return. - newRegisters.setIP(returnAddress); + // + // In case

[clang] [LoongArch][clang] Add support for option `-msimd=` and macro `__loongarch_simd_width`. (PR #97984)

2024-07-07 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/97984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LoongArch][clang] Add support for option `-msimd=` and macro `__loongarch_simd_width`. (PR #97984)

2024-07-07 Thread Lu Weining via cfe-commits
https://github.com/SixWeining edited https://github.com/llvm/llvm-project/pull/97984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. re-think about this case. LGTM https://github.com/llvm/llvm-project/pull/97969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 requested changes to this pull request. There are some other limitation for const variable to be internal linkage. Please follow standard to exclude this case https://eel.is/c++draft/basic.link#3.2. https://github.com/llvm/llvm-project/pull/97969 __

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-07-07 Thread via cfe-commits
@@ -5805,6 +5805,37 @@ void computeKnownFPClass(const Value *V, const APInt &DemandedElts, break; } + case Instruction::BitCast: { +const Value *Src; +if (!match(Op, m_ElementWiseBitCast(m_Value(Src))) || +!Src->getType()->isIntOrIntVectorTy()) + b

[clang] [llvm] [X86] Support branch hint (PR #97721)

2024-07-07 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert closed https://github.com/llvm/llvm-project/pull/97721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e603451 - [X86] Support branch hint (#97721)

2024-07-07 Thread via cfe-commits
Author: Feng Zou Date: 2024-07-08T13:12:50+08:00 New Revision: e603451f3cb16792fb46ab5f2fa50b05f3e5d935 URL: https://github.com/llvm/llvm-project/commit/e603451f3cb16792fb46ab5f2fa50b05f3e5d935 DIFF: https://github.com/llvm/llvm-project/commit/e603451f3cb16792fb46ab5f2fa50b05f3e5d935.diff LOG:

[clang] [LoongArch][clang] Add support for option `-msimd` and macro `__loongarch_simd_width`. (PR #97984)

2024-07-07 Thread Zhaoxin Yang via cfe-commits
https://github.com/ylzsx edited https://github.com/llvm/llvm-project/pull/97984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LoongArch][clang] Add support for option `-msimd` and macro `__loongarch_simd_width`. (PR #97984)

2024-07-07 Thread Zhaoxin Yang via cfe-commits
https://github.com/ylzsx edited https://github.com/llvm/llvm-project/pull/97984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LoongArch][clang] Add support for option `-msimd` and macro ` loonga… (PR #97984)

2024-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Zhaoxin Yang (ylzsx) Changes …rch_simd_width`. --- Full diff: https://github.com/llvm/llvm-project/pull/97984.diff 6 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticDriverKinds.td (+2) - (modified) clang/include

[clang] [LoongArch][clang] Add support for option `-msimd` and macro ` loonga… (PR #97984)

2024-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Zhaoxin Yang (ylzsx) Changes …rch_simd_width`. --- Full diff: https://github.com/llvm/llvm-project/pull/97984.diff 6 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticDriverKinds.td (+2) - (modified) clang/include/clang/

[clang] [LoongArch][clang] Add support for option `-msimd` and macro ` loonga… (PR #97984)

2024-07-07 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] [LoongArch][clang] Add support for option `-msimd` and macro ` loonga… (PR #97984)

2024-07-07 Thread Zhaoxin Yang via cfe-commits
https://github.com/ylzsx created https://github.com/llvm/llvm-project/pull/97984 …rch_simd_width`. >From bd70e74419947c32265d698163722552e80df12f Mon Sep 17 00:00:00 2001 From: yangzhaoxin Date: Fri, 5 Jul 2024 10:40:07 +0800 Subject: [PATCH] [LoongArch][clang] Add support for option `-msimd` a

[clang] [RISCV] Handle empty structs/unions passing in C++ (PR #97315)

2024-07-07 Thread Sudharsan Veeravalli via cfe-commits
svs-quic wrote: > Thanks @efriedma-quic. I tried adding a test case for it locally and see that > the code produced is different for llvm and gcc: > https://godbolt.org/z/vdhGbvj6W > > Test case: > > ``` > struct s12 {int x[0];}; > struct s12 test_s12(struct s12 a) { > return a; > } > ``` >

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-07 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/91990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-07 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 approved this pull request. LGTM. @MitalAshok I noticed in your commit messages you mentioned reworking -fcomplete-member-pointers. Will that include fixing clang incorrectly warning when an inheritance model is explicitly specified. Godbolt for reference: https://

[clang] [llvm] [PowerPC] Diagnose musttail instead of crash inside backend (PR #93267)

2024-07-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vls-2stage` running on `linaro-g3-04` while building `clang` at step 11 "build stage 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/4/builds/623 Here is the relevant piece of th

[clang] [llvm] [PowerPC] Diagnose musttail instead of crash inside backend (PR #93267)

2024-07-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot2` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/1134 Here is the relevant piece of the bu

[clang] [X86][vectorcall] Do not consume register for indirect return value (PR #97939)

2024-07-07 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > It looks like MSVC also applies this rule to fastcall. Good catch, done! > Maybe put a boolean in the "state" to try to group together the code for > specific conventions, instead of directly checking the CC. There are 3 special conventions here: vectorcall, fastcall and

[clang] [X86][vectorcall] Do not consume register for indirect return value (PR #97939)

2024-07-07 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/97939 >From cf19ec8d705434ca6d989a72069dba1040c360ca Mon Sep 17 00:00:00 2001 From: Phoebe Wang Date: Sun, 7 Jul 2024 13:14:59 +0800 Subject: [PATCH 1/2] [X86][vectorcall] Do not consume register for indirect retur

[clang] [Doc] Update documentation for no-transitive-change (PR #96453)

2024-07-07 Thread Chuanqi Xu via cfe-commits
@@ -652,6 +652,141 @@ in the future. The expected roadmap for Reduced BMIs as of Clang 19.x is: comes, the term BMI will refer to the Reduced BMI and the Full BMI will only be meaningful to build systems which elect to support two-phase compilation. +Experimental No Tra

[clang] [Doc] Update documentation for no-transitive-change (PR #96453)

2024-07-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/96453 >From a035ae25314f3168f73108988f2bb7671e7d9e7f Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 24 Jun 2024 11:41:23 +0800 Subject: [PATCH 1/5] [Doc] Update documentation for no-transitive-change --- cla

[clang] afd0e6d - [PowerPC] Diagnose musttail instead of crash inside backend (#93267)

2024-07-07 Thread via cfe-commits
Author: Chen Zheng Date: 2024-07-08T09:30:01+08:00 New Revision: afd0e6d06ba05cf3cd8b0bb91b6506242de78a4d URL: https://github.com/llvm/llvm-project/commit/afd0e6d06ba05cf3cd8b0bb91b6506242de78a4d DIFF: https://github.com/llvm/llvm-project/commit/afd0e6d06ba05cf3cd8b0bb91b6506242de78a4d.diff LO

[clang] [llvm] [PowerPC] Diagnose musttail instead of crash inside backend (PR #93267)

2024-07-07 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 closed https://github.com/llvm/llvm-project/pull/93267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][C23] N3006 Underspecified object declarations (PR #79845)

2024-07-07 Thread Guillot Tony via cfe-commits
https://github.com/to268 updated https://github.com/llvm/llvm-project/pull/79845 >From 5cd7ca393c35ea31f76ceae522d9cd480f9381f1 Mon Sep 17 00:00:00 2001 From: Guillot Tony Date: Mon, 29 Jan 2024 15:14:32 +0100 Subject: [PATCH 1/5] Implementation base of N3006 Underspecified object declarations

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-07 Thread Chris B via cfe-commits
@@ -0,0 +1,33 @@ +//===-- HLSLIntangibleTypes.def - HLSL standard intangible types *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-07 Thread Chris B via cfe-commits
@@ -12335,6 +12335,10 @@ def warn_hlsl_availability_unavailable : Warning, InGroup, DefaultError; +def err_hlsl_intangible_type_cannot_be_declared : Error< +"HLSL intangible type cannot be declared here">; +def err_hlsl_intangible_type_as_function_arg_or_return : Error< +"

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-07 Thread Chris B via cfe-commits
@@ -8001,6 +8001,12 @@ NamedDecl *Sema::ActOnVariableDeclarator( } } + if (getLangOpts().HLSL) { +if (R->isHLSLSpecificType() && !NewVD->isImplicit()) { + Diag(D.getBeginLoc(), diag::err_hlsl_intangible_type_cannot_be_declared); llvm-beanz wrot

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-07 Thread Chris B via cfe-commits
@@ -3428,6 +3428,12 @@ void CXXNameMangler::mangleType(const BuiltinType *T) { Out << 'u' << type_name.size() << type_name; \ break; #include "clang/Basic/AMDGPUTypes.def" +#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId)

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

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

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-07-07 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: Few comments, but mostly I really like this direction! https://github.com/llvm/llvm-project/pull/97362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[libunwind] [libunwind] fix unwinding from signal handler (PR #92291)

2024-07-07 Thread Saleem Abdulrasool via cfe-commits
@@ -365,7 +365,12 @@ int DwarfInstructions::stepWithDwarf(A &addressSpace, pint_t pc, // Return address is address after call site instruction, so setting IP to // that does simulates a return. - newRegisters.setIP(returnAddress); + // + // In case

[clang] [libcxx] [Clang] Implement CWG2137 (list-initialization from objects of the same type) (PR #94355)

2024-07-07 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/94355 >From ac803f979f2779da35a006988d2d42cdabbad252 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 22 Jul 2023 20:07:00 +0100 Subject: [PATCH 1/6] [SemaCXX] Implement CWG2137 (list-initialization from objec

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-07-07 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: If I'm understanding correctly, the way this currently works is that you do normal field layout, then if you discover that the actual offset of a field is less than the offset normal field layout would produce, you assume the struct is packed. This

[clang] [llvm] [Clang][OpenMP] This is addition fix for #92210. (PR #94802)

2024-07-07 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > Hi Alexey, > > Thank you take look! > > > > > Missed one thing, the assignments for boolean flags must be |=, otherwise > > we may miss some combinations. > > > > Are you talking about assignment of following? > > HasMapBasePtr = any_of(M, [](c.. > > > > Do I ne

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Carlos Galvez (carlosgalvezp) Changes Since in C++ they already have implicit internal linkage. Fixes #97947 --- Full diff: https://github.com/llvm/llvm-project/pull/97969.diff 2 Files Affected: - (modified) clang-tools-extra/clan

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-07 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/97969 Since in C++ they already have implicit internal linkage. Fixes #97947 >From 07bd62f97d203bbdb865cd4b1e14cef3ead70c80 Mon Sep 17 00:00:00 2001 From: Carlos Galvez Date: Sun, 7 Jul 2024 21:11:54 +0200 Subj

[clang] [llvm] [PowerPC] Diagnose musttail instead of crash inside backend (PR #93267)

2024-07-07 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/93267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Emit int TBAA metadata on FP math libcall expf (PR #96025)

2024-07-07 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,43 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// The test may fail as time out on windows +// REQUIRES: system-linux + +// RUN: %clang -S -O3 -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefixes=CHECK,

[clang] [RISCV] Handle empty structs/unions passing in C++ (PR #97315)

2024-07-07 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > gcc does ignore the empty array case for assigning argument registers in C++. > Compare the two cases here https://godbolt.org/z/j4WP89rE8 Oh, you're right, I didn't actually do any testing myself, I was just assuming @svs-quic did the right test. So I guess the previou

[clang] [X86][vectorcall] Do not consume register for indirect return value (PR #97939)

2024-07-07 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: It looks like MSVC also applies this rule to fastcall. Maybe put a boolean in the "state" to try to group together the code for specific conventions, instead of directly checking the CC. https://github.com/llvm/llvm-project/pull/97939 ___

[clang] [RISCV][Driver] Refactor `riscv::getRISCVArch` to return `std::string`. NFC. (PR #97965)

2024-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Yingwei Zheng (dtcxzyw) Changes See the discussion in https://github.com/llvm/llvm-project/pull/94352#discussion_r1657074801 --- Full diff: https://github.com/llvm/llvm-project/pull/97965.diff 7 Files Affected: - (modified) clan

[clang] [RISCV][Driver] Refactor `riscv::getRISCVArch` to return `std::string`. NFC. (PR #97965)

2024-07-07 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw created https://github.com/llvm/llvm-project/pull/97965 See the discussion in https://github.com/llvm/llvm-project/pull/94352#discussion_r1657074801 >From 21a8c00e8276f0ea4fa5c52296b257b8d113b947 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Mon, 8 Jul 2024 02:

[clang] [llvm] [Clang][OpenMP] This is addition fix for #92210. (PR #94802)

2024-07-07 Thread via cfe-commits
jyu2-git wrote: Hi Alexey, Thank you take look! > Missed one thing, the assignments for boolean flags must be |=, otherwise we > may miss some combinations. Are you talking about assignment of following? HasMapBasePtr = any_of(M, [](c.. Do I need to change to: HasMapBasePtr |= any_of(M, [](c

[clang] [llvm] [RISCV] Add support for getHostCPUFeatures using hwprobe (PR #94352)

2024-07-07 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 902fb1b4653d5a23613492406cd5693446f06ab6 6be7eea2a193ca3d92141f62286f779124647acd --

[clang] [llvm] [RISCV] Add support for getHostCPUFeatures using hwprobe (PR #94352)

2024-07-07 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/94352 >From ff839bef048a65760f4cd0e9abafe11cfebd9362 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 4 Jun 2024 21:08:27 +0800 Subject: [PATCH 01/14] [RISCV] Add support for getHostCPUFeatures using hwprobe C

[clang] [clang][C23] N3006 Underspecified object declarations (PR #79845)

2024-07-07 Thread Guillot Tony via cfe-commits
https://github.com/to268 edited https://github.com/llvm/llvm-project/pull/79845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][C23] N3006 Underspecified object declarations (PR #79845)

2024-07-07 Thread Guillot Tony via cfe-commits
@@ -7813,6 +7813,32 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, diag::err_variable_object_no_init)) return ExprError(); } + } else if (LangOpts.C23 && to268 wrote:

[clang] [clang][C23] N3006 Underspecified object declarations (PR #79845)

2024-07-07 Thread Guillot Tony via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -std=c2x -verify %s + +/* WG14 N3006: Full + * Underspecified object declarations + */ + +struct S1 { int x, y; };// expected-note {{previous definition is here}} +union U1 { int a; double b; }; // expected-note {{previous definition

[clang] [Coverage] Suppress covmap and profdata for system headers. (PR #97952)

2024-07-07 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/97952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-07-07 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/86629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-07-07 Thread Younan Zhang via cfe-commits
@@ -1005,14 +1332,22 @@ class InlayHintVisitor : public RecursiveASTVisitor { // The sugared type is more useful in some cases, and the canonical // type in other cases. auto Desugared = maybeDesugar(AST, T); -std::string TypeName = Desugared.getAsString(TypeHi

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-07-07 Thread Younan Zhang via cfe-commits
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) { return Params; } +class TypeInlayHintLabelPartBuilder +: public TypeVisitor { + QualType CurrentType; + NestedNameSpecifier *CurrentNestedNameSpecifier; + ASTContext &Context; + StringRef M

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-07 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe edited https://github.com/llvm/llvm-project/pull/97911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-07 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/97911 >From f6c1a231681092189a621e2bc6af97300b2a7bfa Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Wed, 12 Jun 2024 21:06:26 +0100 Subject: [PATCH 1/3] [clang-tidy] Only expand macros in modernize-use-std-format/

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-07 Thread Mike Crowe via cfe-commits
mikecrowe wrote: It looks like the tests are failing on Windows because the `%s` in the command line ``` // RUN: %check_clang_tidy \ // RUN: -std=c++20 %s modernize-use-std-format %t -- \ // RUN: -config="{CheckOptions: {StrictMode: true}}" \ // RUN: -- -isystem %clang_tidy_headers \ // RU

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-07-07 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > This patch is motivated by an internal benchmark where there were some cases > where this helped, though even that case is in some sense artificial. It is ok to optimize some pattern in proxy apps/benchmarks :) > Is this a necessary criteria for landing this change? As recurs

[libunwind] [libunwind] fix unwinding from signal handler (PR #92291)

2024-07-07 Thread Azat Khuzhin via cfe-commits
@@ -365,7 +365,12 @@ int DwarfInstructions::stepWithDwarf(A &addressSpace, pint_t pc, // Return address is address after call site instruction, so setting IP to // that does simulates a return. - newRegisters.setIP(returnAddress); + // + // In case

[clang] [Coverage] Suppress covmap and profdata for system headers. (PR #97952)

2024-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: NAKAMURA Takumi (chapuni) Changes With `system-headers-coverage=false`, functions defined in system headers was not instrumented but corresponding covmap was emitted. It caused wasting covmap and profraw

[clang] [Coverage] Suppress covmap and profdata for system headers. (PR #97952)

2024-07-07 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/97952 With `system-headers-coverage=false`, functions defined in system headers was not instrumented but corresponding covmap was emitted. It caused wasting covmap and profraw. This change improves: - Reduce object

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-07 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/97911 >From f6c1a231681092189a621e2bc6af97300b2a7bfa Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Wed, 12 Jun 2024 21:06:26 +0100 Subject: [PATCH 1/2] [clang-tidy] Only expand macros in modernize-use-std-format/

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-07 Thread Nathan James via cfe-commits
https://github.com/njames93 updated https://github.com/llvm/llvm-project/pull/97764 >From 4bb4d8258c7d68864b4c01c8f982fa1339e5006b Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 2 Jul 2024 14:25:44 +0100 Subject: [PATCH 1/2] Add a modernize-use-ranges check --- .../clang-tidy/moderniz

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-07 Thread Nathan James via cfe-commits
https://github.com/njames93 updated https://github.com/llvm/llvm-project/pull/97764 >From 7bb1c44fb23a1ec0c90c5ce694cbd7d2245a00a6 Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 2 Jul 2024 14:25:44 +0100 Subject: [PATCH 1/2] Add a modernize-use-ranges check --- .../clang-tidy/moderniz

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-07 Thread via cfe-commits
@@ -208,11 +208,22 @@ FormatStringConverter::FormatStringConverter(ASTContext *ContextIn, assert(ArgsOffset <= NumArgs); FormatExpr = llvm::dyn_cast( Args[FormatArgOffset]->IgnoreImplicitAsWritten()); + if (!FormatExpr || !FormatExpr->isOrdinary()) { // Funct

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-07 Thread Nathan James via cfe-commits
njames93 wrote: - Added some more functions for boost/range/numeric - Added support for Reverse range iteration https://github.com/llvm/llvm-project/pull/97764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-07 Thread Nathan James via cfe-commits
https://github.com/njames93 updated https://github.com/llvm/llvm-project/pull/97764 >From ecde6109c040741f6425d3c42464ffaa02f237f9 Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 2 Jul 2024 14:25:44 +0100 Subject: [PATCH 1/2] Add a modernize-use-ranges check --- .../clang-tidy/moderniz

[clang] [clang-format][NFC] Annotate function decl l_paren (PR #97938)

2024-07-07 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/97938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-07 Thread via cfe-commits
@@ -0,0 +1,54 @@ +.. title:: clang-tidy - boost-use-ranges + +boost-use-ranges + + +Detects calls to standard library iterator algorithms that could be replaced +with a boost ranges version instead. + +Example +--- + +.. code-block:: c++ + + auto Iter1 = std::

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-07 Thread via cfe-commits
@@ -0,0 +1,54 @@ +.. title:: clang-tidy - boost-use-ranges + +boost-use-ranges + + +Detects calls to standard library iterator algorithms that could be replaced +with a boost ranges version instead. EugeneZelenko wrote: ```suggestion with a Boost

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-07 Thread via cfe-commits
@@ -169,6 +175,12 @@ New checks Finds initializer lists for aggregate types that could be written as designated initializers instead. +- New :doc:`modernize-use-ranges + ` check. + + Detects calls to standard library iterator algorithms that could be replaced + with a r

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-07 Thread via cfe-commits
@@ -131,6 +131,12 @@ Improvements to clang-tidy New checks ^^ +- New :doc:`boost-use-ranges + ` check. + + Detects calls to standard library iterator algorithms that could be replaced + with a boost ranges version instead EugeneZelenko wrote: ```su

[clang] [Clang][Sema] Add a test for move ctor calling for a base class. NFC (PR #97164)

2024-07-07 Thread Pavel Samolysov via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -ast-dump -fblocks %s | FileCheck -strict-whitespace %s samolisov wrote: @vitalybuka Thank you for the suggestion. I've regenerated the test using the tool and cut the dump to make it a bit shorter. https://github.com/llvm/l

[clang] [Clang][Sema] Add a test for move ctor calling for a base class. NFC (PR #97164)

2024-07-07 Thread Pavel Samolysov via cfe-commits
https://github.com/samolisov updated https://github.com/llvm/llvm-project/pull/97164 >From edf0d10b41099068ef49a2d2fe0ce60356d2f2fd Mon Sep 17 00:00:00 2001 From: Pavel Samolysov Date: Sat, 29 Jun 2024 15:18:11 +0300 Subject: [PATCH 1/2] [Clang][Sema] Add a test for move ctor calling for a base

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-07 Thread Nathan James via cfe-commits
https://github.com/njames93 updated https://github.com/llvm/llvm-project/pull/97764 >From 56d452478fb2b002898e6b3dfc5e251b42894ca3 Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 2 Jul 2024 14:25:44 +0100 Subject: [PATCH 1/2] Add a modernize-use-ranges check --- .../clang-tidy/moderniz

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-07 Thread Nathan James via cfe-commits
https://github.com/njames93 updated https://github.com/llvm/llvm-project/pull/97764 >From 065d343d5ab1706475fe5a1bc3a43e5368d1142b Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 2 Jul 2024 14:25:44 +0100 Subject: [PATCH 1/2] Add a modernize-use-ranges check --- .../clang-tidy/moderniz

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-07 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97103 >From c784272b3f66ca06be4ab8e72a0963e5ebb6a869 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 28 Jun 2024 12:40:56 -0700 Subject: [PATCH 01/13] update tests, update code --- clang/include/clang/Basic