[clang] [-Wunsafe-buffer-usage] Minimize fixit range for pointer variables (PR #81935)

2024-02-16 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/81935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Minimize fixit range for pointer variables (PR #81935)

2024-02-16 Thread Ziqing Luo via cfe-commits
@@ -2326,15 +2312,21 @@ static FixItList fixLocalVarDeclWithSpan(const VarDecl *D, ASTContext &Ctx, return {}; FixIts.insert(FixIts.end(), std::make_move_iterator(InitFixIts->begin()), std::make_move_iterator(InitFixIts->end())); -// If the decl

[clang] b3050f5 - [C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros (#82037)

2024-02-16 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-02-16T17:18:27-05:00 New Revision: b3050f518cc57e064ab6b3f17fb00534bd5b85d6 URL: https://github.com/llvm/llvm-project/commit/b3050f518cc57e064ab6b3f17fb00534bd5b85d6 DIFF: https://github.com/llvm/llvm-project/commit/b3050f518cc57e064ab6b3f17fb00534bd5b85d6.diff

[clang] [C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros (PR #82037)

2024-02-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/82037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Minimize fixit range for pointer variables (PR #81935)

2024-02-16 Thread Ziqing Luo via cfe-commits
@@ -2326,15 +2312,21 @@ static FixItList fixLocalVarDeclWithSpan(const VarDecl *D, ASTContext &Ctx, return {}; FixIts.insert(FixIts.end(), std::make_move_iterator(InitFixIts->begin()), std::make_move_iterator(InitFixIts->end())); -// If the decl

[clang] [compiler-rt] [asan][windows] Eliminate the static asan runtime on windows (PR #81677)

2024-02-16 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > > Not to distract from the direction taken here (which I do agree seems > > reasonable, even if I haven't had time to look closer at the PR yet) - but, > > when using the static CRT in general, doesn't the same concern apply there > > as well? I.e. when using the static CRT,

[clang] [-Wunsafe-buffer-usage] Minimize fixit range for pointer variables (PR #81935)

2024-02-16 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/81935 >From 19a3b101b91bdae99755e4c8350c98481df92122 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Wed, 14 Feb 2024 13:23:20 -0800 Subject: [PATCH 1/2] [-Wunsafe-buffer-usage] Minimize fixit range for pointer

[clang] [-Wunsafe-buffer-usage] Minimize fixit range for pointer variables (PR #81935)

2024-02-16 Thread via cfe-commits
@@ -2326,15 +2312,21 @@ static FixItList fixLocalVarDeclWithSpan(const VarDecl *D, ASTContext &Ctx, return {}; FixIts.insert(FixIts.end(), std::make_move_iterator(InitFixIts->begin()), std::make_move_iterator(InitFixIts->end())); -// If the decl

[clang] fde4b80 - [-Wunsafe-buffer-usage] Minimize fixit range for pointer variables (#81935)

2024-02-16 Thread via cfe-commits
Author: jkorous-apple Date: 2024-02-16T14:25:21-08:00 New Revision: fde4b80cb772897a8cf0b3d022f3041e10b6e816 URL: https://github.com/llvm/llvm-project/commit/fde4b80cb772897a8cf0b3d022f3041e10b6e816 DIFF: https://github.com/llvm/llvm-project/commit/fde4b80cb772897a8cf0b3d022f3041e10b6e816.diff

[clang] [-Wunsafe-buffer-usage] Minimize fixit range for pointer variables (PR #81935)

2024-02-16 Thread via cfe-commits
https://github.com/jkorous-apple closed https://github.com/llvm/llvm-project/pull/81935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Fix operand types for `V_DOT2_F32_BF16` (PR #82044)

2024-02-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/82044 >From b964fee8219e655d3c7df34cd01e5650ae357f6b Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 16 Feb 2024 17:49:23 -0500 Subject: [PATCH] [AMDGPU] Fix operand types for `V_DOT2_F32_BF16` --- .../builtin

[clang] [-Wunsafe-buffer-usage][NFC] Reintroduce lost test cases (PR #82060)

2024-02-16 Thread via cfe-commits
https://github.com/jkorous-apple created https://github.com/llvm/llvm-project/pull/82060 We likely accidentally removed these as part of conflict resolution. >From 731fe4d78542fa72738a1f16a3ecf9fbd5c6e4d0 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Fri, 16 Feb 2024 14:49:56 -0800 Subject:

[clang] [-Wunsafe-buffer-usage][NFC] Reintroduce lost test cases (PR #82060)

2024-02-16 Thread via cfe-commits
https://github.com/jkorous-apple closed https://github.com/llvm/llvm-project/pull/82060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 979c4e9 - [-Wunsafe-buffer-usage][NFC] Reintroduce lost test cases (#82060)

2024-02-16 Thread via cfe-commits
Author: jkorous-apple Date: 2024-02-16T14:50:56-08:00 New Revision: 979c4e9a411a8c5116c859788a738cc1cd9f23f1 URL: https://github.com/llvm/llvm-project/commit/979c4e9a411a8c5116c859788a738cc1cd9f23f1 DIFF: https://github.com/llvm/llvm-project/commit/979c4e9a411a8c5116c859788a738cc1cd9f23f1.diff

[clang] [-Wunsafe-buffer-usage][NFC] Reintroduce lost test cases (PR #82060)

2024-02-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (jkorous-apple) Changes We likely accidentally removed these as part of conflict resolution. --- Full diff: https://github.com/llvm/llvm-project/pull/82060.diff 1 Files Affected: - (modified) clang/test/SemaCXX/warn-unsafe-buffer-

[clang] [clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2024-02-16 Thread Alex Hoppen via cfe-commits
https://github.com/ahoppen created https://github.com/llvm/llvm-project/pull/82061 This is a cleaner design than using identifier and an optional `Selector`. It also allows rename of Objective-C method names if no declaration is at hand and thus no `Selector` instance can be formed. For exampl

[clang] [clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2024-02-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Alex Hoppen (ahoppen) Changes This is a cleaner design than using identifier and an optional `Selector`. It also allows rename of Objective-C method names if no declaration is at hand and thus no `Selector` instance can be for

[clang] [clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2024-02-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd @llvm/pr-subscribers-clang Author: Alex Hoppen (ahoppen) Changes This is a cleaner design than using identifier and an optional `Selector`. It also allows rename of Objective-C method names if no declaration is at hand and thus no `Selector` ins

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic operations in a trivial function (PR #82063)

2024-02-16 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/82063 None >From ddaf7bf835668b761e82c25232f2e281a002ff78 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 16 Feb 2024 14:54:55 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomi

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic operations in a trivial function (PR #82063)

2024-02-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/82063.diff 6 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp (+4) - (modified) clang/lib/Static

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic operations in a trivial function (PR #82063)

2024-02-16 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82063 >From 69a593fc7a7e0c18bd2545353772d5da5588c1bb Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 16 Feb 2024 14:54:55 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic oper

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic operations in a trivial function (PR #82063)

2024-02-16 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 118a2a52fd465b7576c54bd102ee2e417a3b9a71 69a593fc7a7e0c18bd2545353772d5da5588c1bb --

[clang] [llvm] Revert "[AArch64] Add soft-float ABI (#74460)" (PR #82032)

2024-02-16 Thread via cfe-commits
Prabhuk wrote: Thanks Nathan! I'll clean up this PR to drop the `clang/test/Driver/aarch64-soft-float-abi.c` file. https://github.com/llvm/llvm-project/pull/82032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [llvm] Revert "[AArch64] Add soft-float ABI (#74460)" (PR #82032)

2024-02-16 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/82032 >From 13bf4429ba2e33f9069f632c974d8fdf121acefa Mon Sep 17 00:00:00 2001 From: prabhukr Date: Fri, 16 Feb 2024 15:17:28 -0800 Subject: [PATCH] Revert "[AArch64] Add soft-float ABI (#74460)" This reverts commit 9c

[clang] [C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros (PR #82037)

2024-02-16 Thread Nico Weber via cfe-commits
nico wrote: This seems to break check-clang: http://45.33.8.238/linux/131051/step_7.txt https://github.com/llvm/llvm-project/pull/82037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros (PR #82037)

2024-02-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Sorry, will revert shortly if nobody else gets it first! ~Aaron On Fri, Feb 16, 2024, 6:33 PM Nico Weber ***@***.***> wrote: > This seems to break check-clang: > http://45.33.8.238/linux/131051/step_7.txt > > — > Reply to this email directly, view it on GitHub >

[clang] Extend life of variables in `DiagComparison` in `ExprConstant` (PR #79522)

2024-02-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka requested changes to this pull request. As we figured out what was the issue, this patch should not be needed https://github.com/llvm/llvm-project/pull/79522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] bfbd0da - Revert "[C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros" (#82070)

2024-02-16 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-02-16T18:53:22-05:00 New Revision: bfbd0da01dcd9bc6e3d775456f79b0f0d0c521ec URL: https://github.com/llvm/llvm-project/commit/bfbd0da01dcd9bc6e3d775456f79b0f0d0c521ec DIFF: https://github.com/llvm/llvm-project/commit/bfbd0da01dcd9bc6e3d775456f79b0f0d0c521ec.diff

[clang] Revert "[C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros" (PR #82070)

2024-02-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/82070 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros" (PR #82070)

2024-02-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes Reverts llvm/llvm-project#82037 Breaks various buildbots: http://45.33.8.238/linux/131051/step_7.txt https://lab.llvm.org/buildbot/#/builders/231/builds/20751 others --- Full diff: https://github.com/l

[clang] Revert "[C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros" (PR #82070)

2024-02-16 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 35cfaeced4ced393c3738d2ff4509e5090b771a7 cecfa36eb0bac0e61ba88a96fac5b52a01c46d50 --

[clang-tools-extra] [clang-tidy] Fix handling of parentheses in bugprone-non-zero-enum-to-bool-conversion (PR #81890)

2024-02-16 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/81890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ea9ec80 - Revert "[AArch64] Add soft-float ABI (#74460)" (#82032)

2024-02-16 Thread via cfe-commits
Author: Prabhuk Date: 2024-02-16T16:43:50-08:00 New Revision: ea9ec80b7aa1bd34edd5b544cd41450573f2cbff URL: https://github.com/llvm/llvm-project/commit/ea9ec80b7aa1bd34edd5b544cd41450573f2cbff DIFF: https://github.com/llvm/llvm-project/commit/ea9ec80b7aa1bd34edd5b544cd41450573f2cbff.diff LOG:

[clang] [llvm] Revert "[AArch64] Add soft-float ABI (#74460)" (PR #82032)

2024-02-16 Thread via cfe-commits
https://github.com/Prabhuk closed https://github.com/llvm/llvm-project/pull/82032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-16 Thread Jun Wang via cfe-commits
https://github.com/jwanggit86 updated https://github.com/llvm/llvm-project/pull/79035 >From 5c088a59bd36df40bae9a3a712f3994feded359d Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Mon, 22 Jan 2024 12:43:27 -0600 Subject: [PATCH 1/5] [AMDGPU] Adding the amdgpu-num-work-groups function attribute

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-02-16 Thread Evan Wilde via cfe-commits
https://github.com/etcwilde created https://github.com/llvm/llvm-project/pull/82084 Clang supported header searchpaths of the form `-I =/path`, relative to the sysroot if one is passed, but did not implement that behavior for `-iquote`, `-isystem`, or `-idirafter`. This implements the `=` por

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-02-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Evan Wilde (etcwilde) Changes Clang supported header searchpaths of the form `-I =/path`, relative to the sysroot if one is passed, but did not implement that behavior for `-iquote`, `-isystem`, or `-idirafter`. This implements the `=` p

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-16 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 09fc333ec094c9c48f315dd322105b51b34ff2c4 8c2b9775ff89b2ea0dc619afd9397bbf7dac4ee9 --

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-02-16 Thread Evan Wilde via cfe-commits
@@ -3218,6 +3218,21 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args, bool IsIndexHeaderMap = false; bool IsSysrootSpecified = Args.hasArg(OPT__sysroot_EQ) || Args.hasArg(OPT_isysroot); + + // Expand a leading `=` to the sysroot if one w

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-16 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/81921 >From c4758c8663307708e5ac653a8692e595f4b1f4cc Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 13 Feb 2024 21:08:02 -0600 Subject: [PATCH] [libc] Rework the GPU build to be a regular target Summary: This

[clang] [llvm] [openmp] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-02-16 Thread Johannes Doerfert via cfe-commits
@@ -2067,6 +2067,10 @@ Constant *ConstantExpr::getBitCast(Constant *C, Type *DstTy, Constant *ConstantExpr::getAddrSpaceCast(Constant *C, Type *DstTy, bool OnlyIfReduced) { + // Skip cast if types are identical jdoerf

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-02-16 Thread Jan Svoboda via cfe-commits
@@ -3256,12 +3262,14 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args, } for (const auto *A : Args.filtered(OPT_idirafter)) -Opts.AddPath(A->getValue(), frontend::After, false, true); +Opts.AddPath(ConvertHeaderPath(A), frontend::After

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-02-16 Thread Jan Svoboda via cfe-commits
@@ -3229,16 +3244,7 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args, IsIndexHeaderMap ? frontend::IndexHeaderMap : frontend::Angled; bool IsFramework = A->getOption().matches(OPT_F); -std::string Path = A->getValue(); - -if (I

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-16 Thread Jun Wang via cfe-commits
https://github.com/jwanggit86 updated https://github.com/llvm/llvm-project/pull/79035 >From 5c088a59bd36df40bae9a3a712f3994feded359d Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Mon, 22 Jan 2024 12:43:27 -0600 Subject: [PATCH 1/6] [AMDGPU] Adding the amdgpu-num-work-groups function attribute

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-16 Thread Jun Wang via cfe-commits
@@ -1108,3 +1108,8 @@ void GCNUserSGPRUsageInfo::allocKernargPreloadSGPRs(unsigned NumSGPRs) { unsigned GCNUserSGPRUsageInfo::getNumFreeUserSGPRs() { return AMDGPU::getMaxNumUserSGPRs(ST) - NumUsedUserSGPRs; } + +SmallVector jwanggit86 wrote: This function

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic operations in a trivial function (PR #82063)

2024-02-16 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82063 >From 8d304967acfd0881a4844d630dab5f954772490c Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 16 Feb 2024 14:54:55 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic oper

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-16 Thread Jun Wang via cfe-commits
@@ -8069,6 +8069,25 @@ static void handleAMDGPUNumVGPRAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) AMDGPUNumVGPRAttr(S.Context, AL, NumVGPR)); } +static void handleAMDGPUNumWorkGroupsAttr(Sema &S, Decl *D, +

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-16 Thread Jun Wang via cfe-commits
@@ -2031,6 +2031,13 @@ def AMDGPUNumVGPR : InheritableAttr { let Subjects = SubjectList<[Function], ErrorDiag, "kernel functions">; } +def AMDGPUNumWorkGroups : InheritableAttr { + let Spellings = [Clang<"amdgpu_num_work_groups", 0>]; + let Args = [UnsignedArgument<"NumWor

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-16 Thread Jun Wang via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel +is dispatched. + +Clang suppor

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-16 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From c19a66ed4eadd5f16b586b349fd578d873902be2 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH 1/2] [Clang][Sema] fix crash in codegen stage when an lambda expression d

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-16 Thread Jun Wang via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel +is dispatched. + +Clang suppor

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-16 Thread Jun Wang via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel +is dispatched. + +Clang suppor

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-16 Thread Jun Wang via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel jwanggit86 wro

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-16 Thread Jun Wang via cfe-commits
@@ -0,0 +1,84 @@ +; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck %s jwanggit86 wrote: Removed. https://github.com/llvm/llvm-project/pull/79035 ___ cfe-commits mailing list cf

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-16 Thread Jun Wang via cfe-commits
@@ -356,6 +356,19 @@ void AMDGPUTargetCodeGenInfo::setFunctionDeclAttributes( if (NumVGPR != 0) F->addFnAttr("amdgpu-num-vgpr", llvm::utostr(NumVGPR)); } + + if (const auto *Attr = FD->getAttr()) { +uint32_t X = Attr->getNumWorkGroupsX(); +uint32_t Y = Attr

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-16 Thread Jun Wang via cfe-commits
@@ -2031,6 +2031,13 @@ def AMDGPUNumVGPR : InheritableAttr { let Subjects = SubjectList<[Function], ErrorDiag, "kernel functions">; } +def AMDGPUNumWorkGroups : InheritableAttr { + let Spellings = [Clang<"amdgpu_num_work_groups", 0>]; jwanggit86 wrote: Cha

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-16 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa updated https://github.com/llvm/llvm-project/pull/80939 >From ac75fc2873fc7b8eec6c24ba97f4673e94457c8e Mon Sep 17 00:00:00 2001 From: Atousa Duprat Date: Tue, 6 Feb 2024 21:02:05 -0800 Subject: [PATCH 1/5] [clang] Use separator for large numeric values in overflow dia

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-02-16 Thread Evan Wilde via cfe-commits
@@ -3256,12 +3262,14 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args, } for (const auto *A : Args.filtered(OPT_idirafter)) -Opts.AddPath(A->getValue(), frontend::After, false, true); +Opts.AddPath(ConvertHeaderPath(A), frontend::After

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-16 Thread via cfe-commits
https://github.com/huang-me created https://github.com/llvm/llvm-project/pull/82089 StaticAnalyzer didn't check if the variable is declared in `CompoundStmt` under `SwitchStmt`, which make static analyzer reach root without finding the declaration. Fixes #68819 >From a590abda0570d922eb703209

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-16 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] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (huang-me) Changes StaticAnalyzer didn't check if the variable is declared in `CompoundStmt` under `SwitchStmt`, which make static analyzer reach root without finding the declaration. Fixes #68819 --- Full diff: https://github.com/

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (huang-me) Changes StaticAnalyzer didn't check if the variable is declared in `CompoundStmt` under `SwitchStmt`, which make static analyzer reach root without finding the declaration. Fixes #68819 --- Full diff: h

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-16 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 8ba915fe1096de290f5e569d6de97a8bcc8652f7 a590abda0570d922eb7032096de6fdd8cbbe4c63 --

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-16 Thread via cfe-commits
https://github.com/huang-me updated https://github.com/llvm/llvm-project/pull/82089 >From 4ebdf475b79d059c97881ad83aeecf677fb32631 Mon Sep 17 00:00:00 2001 From: huang-me Date: Sat, 17 Feb 2024 10:43:48 +0800 Subject: [PATCH] Fix crash on StaticAnalyzer loop unrolling --- clang/lib/StaticAnal

[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

2024-02-16 Thread via cfe-commits
https://github.com/huang-me updated https://github.com/llvm/llvm-project/pull/82089 >From 2802ef4b9ed88da3cacb16ab7738907ee806 Mon Sep 17 00:00:00 2001 From: huang-me Date: Sat, 17 Feb 2024 10:43:48 +0800 Subject: [PATCH] Fix crash on StaticAnalyzer loop unrolling --- clang/lib/StaticAnal

[clang] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic operations in a trivial function (PR #82063)

2024-02-16 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82063 >From c46f11b98f8ec159a19004952fb67705eb0988dd Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 16 Feb 2024 14:54:55 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Allow ASSERT and atomic oper

[clang] [clang-format] Don't sort qualifiers across preprocessor directives (PR #81958)

2024-02-16 Thread Owen Pan via cfe-commits
owenca wrote: > LGTM, as long as someone doesn't say it should be > > ```c++ > #if FOO >constexpr > #endif >inline >int i = 0; > ``` > > but I think this change is fine..I would rather we didn't try and support > that.. thank you. Yep! Otherwise, you would have to handle the follo

[clang] ea16a3b - [clang-format] Don't sort qualifiers across preprocessor directives (#81958)

2024-02-16 Thread via cfe-commits
Author: Owen Pan Date: 2024-02-16T23:19:31-08:00 New Revision: ea16a3bb4ce4010e3e15fddaad03df66f99548c6 URL: https://github.com/llvm/llvm-project/commit/ea16a3bb4ce4010e3e15fddaad03df66f99548c6 DIFF: https://github.com/llvm/llvm-project/commit/ea16a3bb4ce4010e3e15fddaad03df66f99548c6.diff LOG:

[clang] [clang-format] Don't sort qualifiers across preprocessor directives (PR #81958)

2024-02-16 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/81958 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [polly] [clang-format] Correctly annotate block braces of empty ctors/dtors (PR #82097)

2024-02-16 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/82097 Also reformat polly. Fixes #79834. >From f02c1acefe642065cae01ced98b168ce33b98d47 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 16 Feb 2024 23:27:12 -0800 Subject: [PATCH] [clang-format] Correctly annotate

[clang] [polly] [clang-format] Correctly annotate block braces of empty ctors/dtors (PR #82097)

2024-02-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Also reformat polly. Fixes #79834. --- Full diff: https://github.com/llvm/llvm-project/pull/82097.diff 6 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+10-10) - (modified) clang/uni

[clang] [polly] [clang-format] Correctly annotate block braces of empty ctors/dtors (PR #82097)

2024-02-16 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 6087d7bc0a9d7d4ad2c94a131c2bc427b767c9d7 f02c1acefe642065cae01ced98b168ce33b98d47 --

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-16 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,132 @@ +//===--- UseDesignatedInitializersCheck.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] [polly] [clang-format] Correctly annotate block braces of empty ctors/dtors (PR #82097)

2024-02-16 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/82097 >From f02c1acefe642065cae01ced98b168ce33b98d47 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 16 Feb 2024 23:27:12 -0800 Subject: [PATCH 1/2] [clang-format] Correctly annotate block braces of empty ctors/dtor

[clang-tools-extra] 75adb12 - [clang-tidy] Fix handling of parentheses in bugprone-non-zero-enum-to-bool-conversion (#81890)

2024-02-16 Thread via cfe-commits
Author: Piotr Zegar Date: 2024-02-17T08:58:22+01:00 New Revision: 75adb1226905693ac57e563f675e282e78ac491e URL: https://github.com/llvm/llvm-project/commit/75adb1226905693ac57e563f675e282e78ac491e DIFF: https://github.com/llvm/llvm-project/commit/75adb1226905693ac57e563f675e282e78ac491e.diff L

[clang-tools-extra] [clang-tidy] Fix handling of parentheses in bugprone-non-zero-enum-to-bool-conversion (PR #81890)

2024-02-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/81890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3