[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v4 (PR #108636)

2024-10-24 Thread via cfe-commits
@@ -48,6 +48,13 @@ def BPF_END : BPFArithOp<0xd>; def BPF_XCHG: BPFArithOp<0xe>; def BPF_CMPXCHG : BPFArithOp<0xf>; +class BPFAtomicLoadStoreOp val> { + bits<4> Value = val; +} + +def BPF_LOAD_ACQ : BPFAtomicLoadStoreOp<0x1>; +def BPF_STORE_REL : BPFAtomicLoadStoreOp<0xb

[clang] Emit constrained atan2 intrinsic for clang builtin (PR #113636)

2024-10-24 Thread Tex Riddell via cfe-commits
https://github.com/tex3d created https://github.com/llvm/llvm-project/pull/113636 This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `Builtins.td` - Add f16 support for libm atan2 builtin - `CGBuiltin.cpp` - Emit constraint atan2 intrinsic fo

[clang] Emit constrained atan2 intrinsic for clang builtin (PR #113636)

2024-10-24 Thread Tex Riddell via cfe-commits
https://github.com/tex3d updated https://github.com/llvm/llvm-project/pull/113636 >From 0c9dfb67a7371b9c4087d7b54e6f93e780038117 Mon Sep 17 00:00:00 2001 From: Tex Riddell Date: Tue, 15 Oct 2024 16:18:44 -0700 Subject: [PATCH 1/3] Emit constrained atan2 intrinsic for clang builtin This change

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v4 (PR #108636)

2024-10-24 Thread via cfe-commits
yonghong-song wrote: @peilin-ye Thanks for trying getExtendForAtomicOps(). I just did some experiments and indeed looks like backend has to pick one default extend, sign, unsigned, or any. My previous suggestion to match atomic_load_zext_{8,16} and atomic_load_sext_{8,16} separately won't work

[clang] [clang-tools-extra] [llvm] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-10-24 Thread via cfe-commits
MichelleCDjunaidi wrote: ...oops, I don't think that was supposed to happen. https://github.com/llvm/llvm-project/pull/102299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Emit constrained atan2 intrinsic for clang builtin (PR #113636)

2024-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Tex Riddell (tex3d) Changes This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `Builtins.td` - Add f16 support for libm atan2 builtin - `CGBuiltin.cpp` - Emit constraint atan2 intr

[clang] 8aa69a0 - [clang][dataflow] Disambiguate a ref to "internal" in CachedConstAccessorsLattice (#113601)

2024-10-24 Thread via cfe-commits
Author: Jan Voung Date: 2024-10-24T15:23:40-04:00 New Revision: 8aa69a0d02e99e50db0242f75a192b1c2d826528 URL: https://github.com/llvm/llvm-project/commit/8aa69a0d02e99e50db0242f75a192b1c2d826528 DIFF: https://github.com/llvm/llvm-project/commit/8aa69a0d02e99e50db0242f75a192b1c2d826528.diff LOG

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-24 Thread Tex Riddell via cfe-commits
https://github.com/tex3d approved this pull request. https://github.com/llvm/llvm-project/pull/109331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v4 (PR #108636)

2024-10-24 Thread via cfe-commits
@@ -67,6 +67,8 @@ void BPFTargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__BPF_FEATURE_SDIV_SMOD"); Builder.defineMacro("__BPF_FEATURE_GOTOL"); Builder.defineMacro("__BPF_FEATURE_ST"); +Builder.defineMacro("__BPF_FEATURE_LOAD_ACQUIRE"

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-10-24 Thread via cfe-commits
MichelleCDjunaidi wrote: For context: force-push is to undo merge-squash. Didn't know that pinged everyone else, real sorry! https://github.com/llvm/llvm-project/pull/102299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang-tools-extra] [clang-tidy] fix false positive for implicit conversion of comparison result in C23 (PR #113639)

2024-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes Fixed #111013 bool will be builtin type in C23 but comparison result in C is still int. It is no need to change this kind of implicit cast to explicit cast. --- Full diff: https://github.com/llvm/ll

[clang] [clang-format] Print the names of unfound files in error messages (PR #113640)

2024-10-24 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/113640 Fixes #113631. >From 274b7cbdd8989c9f34c3df4041fa9098857bcc89 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 24 Oct 2024 20:05:52 -0700 Subject: [PATCH] [clang-format] Print the names of unfound files in err

[clang-tools-extra] [clang-tidy] fix false positive for implicit conversion of comparison result in C23 (PR #113639)

2024-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes Fixed #111013 bool will be builtin type in C23 but comparison result in C is still int. It is no need to change this kind of implicit cast to explicit cast. --- Full diff: https://github.com/

[clang-tools-extra] [clang-tidy] fix false positive for implicit conversion of comparison result in C23 (PR #113639)

2024-10-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/113639 Fixed #111013 bool will be builtin type in C23 but comparison result in C is still int. It is no need to change this kind of implicit cast to explicit cast. >From 53ff1325281e37b164abc8705f2d75d7caeec3a4 Mo

[clang] [clang-format] Print the names of unfound files in error messages (PR #113640)

2024-10-24 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/113640 >From 274b7cbdd8989c9f34c3df4041fa9098857bcc89 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 24 Oct 2024 20:05:52 -0700 Subject: [PATCH 1/2] [clang-format] Print the names of unfound files in error messages

[clang] [llvm] [DXIL][SPIRV] Lower WaveActiveCountBits intrinsic (PR #113382)

2024-10-24 Thread Greg Roth via cfe-commits
@@ -1762,6 +1765,36 @@ bool SPIRVInstructionSelector::selectSign(Register ResVReg, return Result; } +bool SPIRVInstructionSelector::selectWaveActiveCountBits( +Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { + assert(I.getNumOperands() == 3); + as

[clang] [clang-format] Print the names of unfound files in error messages (PR #113640)

2024-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #113631. --- Full diff: https://github.com/llvm/llvm-project/pull/113640.diff 2 Files Affected: - (added) clang/test/Format/error-unfound-files.cpp (+7) - (modified) clang/tools/clang-format/Clang

[clang] [flang] [flang] Add UNSIGNED (PR #113504)

2024-10-24 Thread Peter Klausler via cfe-commits
@@ -0,0 +1,116 @@ + + +# Fortran Extensions supported by Flang + +```{contents} +--- +local: +--- +``` + +For better compatibility with GNU Fortran and Sun Fortran, +this compiler supports an option (`-funsigned`) that enables +the `UNSIGNED` data type, constants, intrinsic functi

[clang] [llvm] [LoongArch] Support LoongArch-specific amswap[_db].{b/h} and amadd[_db].{b/h} instructions (PR #113255)

2024-10-24 Thread Lu Weining via cfe-commits
SixWeining wrote: > Just a heads up, I think this broke documentation builds. After bisecting it > points to this commit. Thanks. Fixed by #113632. https://github.com/llvm/llvm-project/pull/113255 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

2024-10-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/113643 >From 497d0f2c2d0c84603f3b3434aaee0e23722cd701 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 24 Oct 2024 20:32:28 -0700 Subject: [PATCH 1/2] [HLSL] Add AppendStructuredBuffer and ConsumeStructuredBuffer

[clang] [analyzer] Fix a crash from element region construction during `ArrayInitLoopExpr` analysis (PR #113570)

2024-10-24 Thread Balazs Benics via cfe-commits
@@ -513,70 +513,25 @@ ProgramStateRef ExprEngine::updateObjectsUnderConstruction( static ProgramStateRef bindRequiredArrayElementToEnvironment(ProgramStateRef State, const ArrayInitLoopExpr *AILE, - con

[clang] [analyzer] Fix a crash from element region construction during `ArrayInitLoopExpr` analysis (PR #113570)

2024-10-24 Thread Balazs Benics via cfe-commits
@@ -330,3 +330,47 @@ void no_crash() { } } // namespace crash + +namespace array_subscript_initializer { steakhal wrote: Could you please put these braces on the same line of the namespace/struct declarations? That way its slightly more compact. https://git

[clang] [analyzer] Fix a crash from element region construction during `ArrayInitLoopExpr` analysis (PR #113570)

2024-10-24 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/113570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [flang] [libc] [llvm] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-10-24 Thread via cfe-commits
MichelleCDjunaidi wrote: that's strange, I invoked git rebase with origin/main though. but will redo. https://github.com/llvm/llvm-project/pull/102299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [clang-format] add MaxSingleLinesInBracedList style option (PR #112482)

2024-10-24 Thread Owen Pan via cfe-commits
owenca wrote: > There will be bugs if/when people use this option with small values for the > limit, as it will interact weirdly with both the braced list initializer > formatting rules, and also with the `AvoidBinPacking` logic of the > continuation indenter. Can you give some examples? h

[clang] [LoongArch] fix description of clang option -m[no-]lam-bh (PR #113632)

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

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-10-24 Thread via cfe-commits
MichelleCDjunaidi wrote: @EugeneZelenko thanks for the pointers; didn't realize git fetch did not update local main. does this look fine now? https://github.com/llvm/llvm-project/pull/102299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [LoongArch] fix description of clang option -m[no-]lam-bh (PR #113632)

2024-10-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/7080 Here is the relevant piece of the b

[clang] Emit constrained atan2 intrinsic for clang builtin (PR #113636)

2024-10-24 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 c03d09ce3eed336fea4d9283232383f6d4d4057d b5a4c777280873e9827bb812b95cad32fbf6b7f4 --e

[clang] [WebKit Checkers] Allow a guardian CheckedPtr/CheckedRef (PR #110222)

2024-10-24 Thread Rashmi Mudduluru via cfe-commits
@@ -56,7 +60,8 @@ bool tryToFindPtrOrigin( if (StopAtFirstRefCountedObj) { if (auto *ConversionFunc = dyn_cast_or_null(cast->getConversionFunction())) { - if (isCtorOfRefCounted(ConversionFunc)) + if (isCtorOfRefCounted(Conversio

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-10-24 Thread via cfe-commits
EugeneZelenko wrote: As far as I see from branch's history, it's still outdated `main` (as of September 9). https://github.com/llvm/llvm-project/pull/102299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [HLSL] Add RasterizerOrderedStructuredBuffer definition to HLSLExternalSemaSource (PR #113648)

2024-10-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/113648 Adds `RasterizerOrderedStructuredBuffer` definition to HLSLExternalSemaSource. Adds separate tests for the AST shape and element types. Adds constructor/handle.fromBinding and subscript test cases to shared test

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v4 (PR #108636)

2024-10-24 Thread Peilin Ye via cfe-commits
@@ -48,6 +48,13 @@ def BPF_END : BPFArithOp<0xd>; def BPF_XCHG: BPFArithOp<0xe>; def BPF_CMPXCHG : BPFArithOp<0xf>; +class BPFAtomicLoadStoreOp val> { + bits<4> Value = val; +} + +def BPF_LOAD_ACQ : BPFAtomicLoadStoreOp<0x1>; +def BPF_STORE_REL : BPFAtomicLoadStoreOp<0xb

[clang] [WebKit Checkers] Allow a guardian CheckedPtr/CheckedRef (PR #110222)

2024-10-24 Thread Ryosuke Niwa via cfe-commits
@@ -63,18 +63,29 @@ std::optional isUncounted(const clang::CXXRecordDecl* Class); /// class, false if not, std::nullopt if inconclusive. std::optional isUncountedPtr(const clang::QualType T); -/// \returns true if Name is a RefPtr, Ref, or its variant, false if not. -bool isR

[clang] [llvm] [RISCV] Mark pointer masking extensions as non-experimental (PR #113618)

2024-10-24 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/113618 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Mark pointer masking extensions as non-experimental (PR #113618)

2024-10-24 Thread Pengcheng Wang via cfe-commits
@@ -26,5 +26,5 @@ entry: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(read) declare @llvm.masked.gather.nxv4i32.nxv4p0(, i32 immarg, , ) #1 -attributes #0 = { "target-features"="+64bit,+d,+f,+relax,+v,+xsifivecdiscarddlone,+zicsr,+zve32f,+zve32x,+zve

[clang] [llvm] [RISCV] Mark pointer masking extensions as non-experimental (PR #113618)

2024-10-24 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/113618 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add RasterizerOrderedStructuredBuffer definition to HLSLExternalSemaSource (PR #113648)

2024-10-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/113648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

2024-10-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/113643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add RasterizerOrderedStructuredBuffer definition to HLSLExternalSemaSource (PR #113648)

2024-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes Adds `RasterizerOrderedStructuredBuffer` definition to HLSLExternalSemaSource. Adds separate tests for the AST shape and element types. Adds constructor/handle.fromBinding and subscript test cases to shared t

[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

2024-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes Adds `AppendStructuredBuffer` and `ConsumeStructuredBuffer` definition to HLSLExternalSemaSource. Adds separate tests for the AST shape and element types, and adds constructor/handle.fromBinding test case to s

[clang] [HLSL][NFC] Cleanup - removed unused includes and param, fix typos (PR #113649)

2024-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/113649.diff 4 Files Affected: - (modified) clang/lib/Sema/HLSLExternalSemaSource.cpp (+2-13) - (modified) clang/test/AST/HLSL/RWBuffer-AST.hlsl (+1-

[clang] [HLSL][NFC] Cleanup - removed unused includes and param, fix typos (PR #113649)

2024-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/113649.diff 4 Files Affected: - (modified) clang/lib/Sema/HLSLExternalSemaSource.cpp (+2-13) - (modified) clang/test/AST/HLSL/RWBuffer-AST.hlsl (+1

[clang] [llvm] [RISCV] Add Supm extension to RVA23 profiles (PR #113619)

2024-10-24 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. LGTM. (And it's time to mask RV[A|B|M]23 as non-experimental now?) https://github.com/llvm/llvm-project/pull/113619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [HLSL][NFC] Cleanup - removed unused includes and param, fix typos (PR #113649)

2024-10-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/113649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Supm extension to RVA23 profiles (PR #113619)

2024-10-24 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/113619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] clang-format-ignore: Add support for double asterisk patterns (PR #110560)

2024-10-24 Thread Owen Pan via cfe-commits
@@ -164,6 +164,40 @@ TEST_F(MatchFilePathTest, Path) { EXPECT_FALSE(match("foo\\", R"(foo*\)")); } +TEST_F(MatchFilePathTest, DoubleAsterisk) { + EXPECT_TRUE(match("a/b/c/d.cpp", "**b**")); + EXPECT_TRUE(match("a/b/c/d.cpp", "**/b/**")); + EXPECT_TRUE(match("a/b/c/d_e.cpp

[clang] [Driver] Use != instead of compare to compare strings (NFC) (PR #113651)

2024-10-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/113651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebKit Checkers] Allow a guardian CheckedPtr/CheckedRef (PR #110222)

2024-10-24 Thread Rashmi Mudduluru via cfe-commits
@@ -63,18 +63,29 @@ std::optional isUncounted(const clang::CXXRecordDecl* Class); /// class, false if not, std::nullopt if inconclusive. std::optional isUncountedPtr(const clang::QualType T); -/// \returns true if Name is a RefPtr, Ref, or its variant, false if not. -bool isR

[libcxx] [libcxxabi] [libunwind] [llvm] Revert "[runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler" (PR #113653)

2024-10-24 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: Sure, if this is the one that is breaking things. Thanks for looking into it, and sorry for the breakage! https://github.com/llvm/llvm-project/pull/113653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-10-24 Thread Jun Wang via cfe-commits
@@ -683,6 +706,59 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { return !A.checkForAllCallLikeInstructions(DoesNotRetrieve, *this, UsedAssumedInformation); } + + // Returns true if FlatScratchInit is needed, i.e

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler (PR #108357)

2024-10-24 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Actually this PR is the case of > https://lab.llvm.org/buildbot/#/builders/164/builds/3908, not #113491 Sorry about that. Are you able to dig up any of the cmake configure logs from these builds, so that we can figure out how this ends up breaking things? Because as in most

[clang] [analyzer] Untangle subcheckers of CStringChecker (PR #113312)

2024-10-24 Thread Balazs Benics via cfe-commits
@@ -579,8 +579,14 @@ ProgramStateRef CStringChecker::CheckLocation(CheckerContext &C, // These checks are either enabled by the CString out-of-bounds checker // explicitly or implicitly by the Malloc checker. // In the latter case we only do modeling but do not emi

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread Dan Liew via cfe-commits
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // Note: This implementation relies on `CountAttributedType` being uniqu

[clang] [llvm] [DXIL][SPIRV] Lower WaveActiveCountBits intrinsic (PR #113382)

2024-10-24 Thread Greg Roth via cfe-commits
@@ -1762,6 +1765,36 @@ bool SPIRVInstructionSelector::selectSign(Register ResVReg, return Result; } +bool SPIRVInstructionSelector::selectWaveActiveCountBits( +Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { + assert(I.getNumOperands() == 3); + as

[clang] Fix amdgpu-arch for dll name on Windows (PR #101350)

2024-10-24 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: ping https://github.com/llvm/llvm-project/pull/101350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Use != instead of compare to compare strings (NFC) (PR #113651)

2024-10-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/113651 None >From 0e6ea5f32dc77ba2c81f45d6530e301da85e6e91 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 24 Oct 2024 15:59:14 -0700 Subject: [PATCH] [Driver] Use != instead of compare to compare strings

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler (PR #108357)

2024-10-24 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Actually this PR is the case of https://lab.llvm.org/buildbot/#/builders/164/builds/3908, not https://github.com/llvm/llvm-project/pull/113491 https://github.com/llvm/llvm-project/pull/108357 ___ cfe-commits mailing list cfe-commits

[clang] [WebKit Checkers] Make TrivialFunctionAnalysis recognize std::array::operator[] as trivial (PR #113377)

2024-10-24 Thread Ryosuke Niwa via cfe-commits
@@ -452,6 +454,10 @@ class RefCounted { unsigned nonTrivial23() { return DerivedNumber("123").value(); } SomeType nonTrivial24() { return SomeType("123"); } + void call_libcpp_verbose_abort() { + __libcpp_verbose_abort("%s", "aborting"); rniwa wrote:

[clang] [Driver] Use != instead of compare to compare strings (NFC) (PR #113651)

2024-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/113651.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Clang.cpp (+5-5) ``diff diff --git a/clang/lib/Drive

[clang] [analyzer] Fix a crash from element region construction during `ArrayInitLoopExpr` analysis (PR #113570)

2024-10-24 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Could you please add `no-crash` comment in the test code where we would have crashed? Other than this, this looks good to me. Thabks for the prompt fix! https://github.com/llvm/llvm-project/pull/113570

[libcxx] [libcxxabi] [libunwind] [llvm] Revert "[runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler" (PR #113653)

2024-10-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/113653 Reverts llvm/llvm-project#108357 Breaks https://lab.llvm.org/buildbot/#/builders/164/builds/3908 and similar bots >From bcc6c988acdd2e6fba38f373abc3e090b3b70581 Mon Sep 17 00:00:00 2001 From: Vitaly Buka

[libcxx] [libcxxabi] [libunwind] [llvm] Revert "[runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler" (PR #113653)

2024-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Vitaly Buka (vitalybuka) Changes Reverts llvm/llvm-project#108357 Breaks https://lab.llvm.org/buildbot/#/builders/164/builds/3908 and similar bots --- Full diff: https://github.com/llvm/llvm-project/pull/113653.diff 6 Files Affect

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2024-10-24 Thread via cfe-commits
MichelleCDjunaidi wrote: Main history should be resolved now. https://github.com/llvm/llvm-project/pull/102299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [libcxxabi] [libunwind] [llvm] Revert "[runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler" (PR #113653)

2024-10-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/113653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add a type for the named barrier (PR #113614)

2024-10-24 Thread Gang Chen via cfe-commits
https://github.com/cmc-rep updated https://github.com/llvm/llvm-project/pull/113614 >From 166a4aec8a8ee813be0ee3045563cd45efd944c0 Mon Sep 17 00:00:00 2001 From: gangc Date: Thu, 24 Oct 2024 11:18:22 -0700 Subject: [PATCH 1/3] [AMDGPU] Add a type for the named barrier --- clang/include/clang/

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-10-24 Thread Adam Yang via cfe-commits
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/113394 >From 8cf5032a5580b97c4c4965e577374f627fbe0643 Mon Sep 17 00:00:00 2001 From: Adam Yang <31109344+adam-y...@users.noreply.github.com> Date: Mon, 14 Oct 2024 16:35:45 -0700 Subject: [PATCH 1/5] Added the intrins

[clang] [clang-linker-wrapper] Add error handling for missing linker path (PR #113613)

2024-10-24 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: @jhuber6 Can you please take a look and comment if this change looks ok. Thanks https://github.com/llvm/llvm-project/pull/113613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Move nondeterministic pointer usage check to tidy (PR #110471)

2024-10-24 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/110471 >From 5be6cce0cd2cbc41f92b1f67516e38c30c1aa4ed Mon Sep 17 00:00:00 2001 From: Vince Bridgers Date: Thu, 26 Sep 2024 16:24:59 +0200 Subject: [PATCH] [clang-tidy] [analyzer] Move nondeterministic pointer usage

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Move nondeterministic pointer usage check to tidy (PR #110471)

2024-10-24 Thread via cfe-commits
@@ -49,6 +49,7 @@ #include "MultipleStatementMacroCheck.h" #include "NoEscapeCheck.h" #include "NonZeroEnumToBoolConversionCheck.h" vabridgers wrote: I checked the order, clang-format did not complain. Z comes before d (case matters it seems). So this begets

[clang] Remove Linux search paths on Windows (PR #113628)

2024-10-24 Thread David Salinas via cfe-commits
https://github.com/david-salinas created https://github.com/llvm/llvm-project/pull/113628 Change-Id: Ia0b44eb1069fa631a6d5156cf5881c978e23b62d >From 2bcd8608ca1e00893692f1d1f8b1734204abbd15 Mon Sep 17 00:00:00 2001 From: David Salinas Date: Tue, 22 Oct 2024 18:58:47 + Subject: [PATCH] Remo

[clang] Remove Linux search paths on Windows (PR #113628)

2024-10-24 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-tools-extra] RFC: [clang-tidy] [analyzer] Move nondeterministic pointer usage check to tidy (PR #110471)

2024-10-24 Thread via cfe-commits
@@ -49,6 +49,7 @@ #include "MultipleStatementMacroCheck.h" #include "NoEscapeCheck.h" #include "NonZeroEnumToBoolConversionCheck.h" EugeneZelenko wrote: My mistake. Sorry for noise. https://github.com/llvm/llvm-project/pull/110471

[clang] Remove Linux search paths on Windows (PR #113628)

2024-10-24 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 7b9f988a535c3549b71025e951e3a36a2bf0fa03 2bcd8608ca1e00893692f1d1f8b1734204abbd15 --e

[clang] c4248fa - [X86] Support MOVRS and AVX10.2 instructions. (#113274)

2024-10-24 Thread via cfe-commits
Author: Freddy Ye Date: 2024-10-25T09:00:19+08:00 New Revision: c4248fa3edd3e2e18219b4fb46561ca1bfd65728 URL: https://github.com/llvm/llvm-project/commit/c4248fa3edd3e2e18219b4fb46561ca1bfd65728 DIFF: https://github.com/llvm/llvm-project/commit/c4248fa3edd3e2e18219b4fb46561ca1bfd65728.diff LOG

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

2024-10-24 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/113623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -0,0 +1,584 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fexperimental-late-parse-attributes -fsyntax-only -verify %s + +#define __counted_by(f) __attribute__((counted_by(f))) + +// =

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -186,4 +218,216 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // This is an approximation that's not quite right. This points to the +

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -186,4 +218,216 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // This is an approximation that's not quite right. This points to the +

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { Sirraide wrote: > [#108631](https://github.com/llvm/llvm-

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -186,4 +218,216 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // This is an approximation that's not quite right. This points to the +

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -0,0 +1,584 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fexperimental-late-parse-attributes -fsyntax-only -verify %s + +#define __counted_by(f) __attribute__((counted_by(f))) + +// =

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -186,4 +218,216 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // This is an approximation that's not quite right. This points to the +

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { Sirraide wrote: I think this function can just be inlined

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -186,4 +218,216 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // This is an approximation that's not quite right. This points to the +

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -186,4 +218,216 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // This is an approximation that's not quite right. This points to the +

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -186,4 +218,216 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { + // This is an approximation that's not quite right. This points to the +

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -2440,6 +2440,26 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { return !isFunctionType(); } + /// \returns True if the type is incomplete and it is also a type that + /// cannot be completed by a later type definition. + /// + /// E.g. For

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -0,0 +1,584 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fexperimental-late-parse-attributes -fsyntax-only -verify %s + +#define __counted_by(f) __attribute__((counted_by(f))) + +// =

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
@@ -8207,6 +8207,14 @@ ExprResult InitializationSequence::Perform(Sema &S, Kind.getRange().getEnd()); } else { CurInit = new (S.Context) ImplicitValueInitExpr(Step->Type); +// Note the return value isn't used to return early +// to pres

[clang] [clang-format] Add an option to control indentation of `export { ... }` (PR #110381)

2024-10-24 Thread via cfe-commits
@@ -26588,10 +26613,7 @@ TEST_F(FormatTest, Cpp20ModulesSupport) { " int foo;\n" "};", Style); - verifyFormat("export {\n" - " int foo;\n" - "};", - Style); + verifyFormat("export { int f

[clang] [clang-repl] Fix undefined lld::wasm::link symbol while building clangInterpreter for wasm (PR #113446)

2024-10-24 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. Unfortunately this feature is only tested externally... LGTM! https://github.com/llvm/llvm-project/pull/113446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/106321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix undefined lld::wasm::link symbol while building clangInterpreter for wasm (PR #113446)

2024-10-24 Thread via cfe-commits
github-actions[bot] wrote: @anutosh491 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a bui

[clang] 075581f - [clang-repl] Fix undefined lld::wasm::link symbol while building clangInterpreter for wasm (#113446)

2024-10-24 Thread via cfe-commits
Author: Anutosh Bhat Date: 2024-10-25T09:09:14+03:00 New Revision: 075581f34035c01659cc883d0d69336c279ef0d5 URL: https://github.com/llvm/llvm-project/commit/075581f34035c01659cc883d0d69336c279ef0d5 DIFF: https://github.com/llvm/llvm-project/commit/075581f34035c01659cc883d0d69336c279ef0d5.diff

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-10-24 Thread Adam Yang via cfe-commits
@@ -0,0 +1,130 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} adam-yang wrote: I'm just following what was do

[clang] [llvm] [ci] New script to generate test reports as Buildkite Annotations (PR #113447)

2024-10-24 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: > I'd rather not do that. Commenting on the PR should be done very rarely, > especially for CI failures, since it clutters the PR and Github already has a > builtin system for presenting CI failures. I think this is something that needs to be discussed further when we act

[clang] [llvm] [RISCV] Add Supm extension to RVA23 profiles (PR #113619)

2024-10-24 Thread Alex Bradbury via cfe-commits
https://github.com/asb created https://github.com/llvm/llvm-project/pull/113619 This is mandatory for both RVA23U64 and RVA23S64 in the ratified version of the specification . >From 32239ed67654c71f04dd66ccd602e8d9641330a

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-24 Thread Dan Liew via cfe-commits
@@ -186,4 +218,370 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +SourceRange Sema::BoundsSafetySourceRangeFor(const CountAttributedType *CATy) { delcypher wrote: I've dropped the hacky implementation in

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-10-24 Thread Adam Yang via cfe-commits
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/113394 >From 8cf5032a5580b97c4c4965e577374f627fbe0643 Mon Sep 17 00:00:00 2001 From: Adam Yang <31109344+adam-y...@users.noreply.github.com> Date: Mon, 14 Oct 2024 16:35:45 -0700 Subject: [PATCH 1/6] Added the intrins

  1   2   3   4   5   >