[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-11-04 Thread Tom Honermann via cfe-commits
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute facilitates the generation of a

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2024-11-04 Thread Craig Topper via cfe-commits
@@ -350,9 +350,24 @@ ABIArgInfo RISCVABIInfo::coerceVLSVector(QualType Ty, //* (RVVBitsPerBlock / EltSize) ResType = llvm::ScalableVectorType::get(EltType, NumElts / VScale->first); } else { +// If the corresponding extension is not supported, just make it an

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
ojhunt wrote: also sorry for cycling to and from "review" the GH interface is still not obvious to me https://github.com/llvm/llvm-project/pull/113510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [AArch64] Implement FP8 floating-point mode helper intrinsics (PR #100608)

2024-11-04 Thread Momchil Velikov via cfe-commits
momchil-velikov wrote: > Are you also planning to do the feature test macros, e.g. `__ARM_FEATURE_FP8`? In principle, yes, but once the ACLE intrinsics are implemented, since the presence of the macro indicates that both target feature *and* the intrinsics are available. https://github.com/llv

[clang] Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (PR #114221)

2024-11-04 Thread via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/114221 >From 4e6d8c1edb73fe08659519d8798cab162875ebc0 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Wed, 30 Oct 2024 07:18:06 -0500 Subject: [PATCH 1/2] Fix for codegen Crash in Clang when using locator omp_

[clang] [clang] Don't consider the lifetimeboundCall when analyzing the gsl pointer construction. (PR #114044)

2024-11-04 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/114044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Don't consider the lifetimeboundCall when analyzing the gsl pointer construction. (PR #114044)

2024-11-04 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/114044 >From fcd963645ee7f3f9c794160fca63d0bef292baf1 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 1 Nov 2024 16:51:03 +0100 Subject: [PATCH] [clang] Fix the post-filtering heuristics for GSLPointer case. ---

[clang] [clang] Fix the post-filtering heuristic for GSLPointer. (PR #114044)

2024-11-04 Thread Haojian Wu via cfe-commits
hokein wrote: Figured out a way to fix the false positives while not introducing many false negatives. I think it is ready for review, and please take a look on the new version. https://github.com/llvm/llvm-project/pull/114044 ___ cfe-commits mailing

[clang] [clang] Fix the post-filtering heuristic for GSLPointer. (PR #114044)

2024-11-04 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 fcd51dee42792bf264d26ab4978eb0a3a3001728 fcd963645ee7f3f9c794160fca63d0bef292baf1 --e

[clang] [clang] Fix the post-filtering heuristic for GSLPointer. (PR #114044)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes The lifetime analyzer processes GSL pointers: - when encountering a constructor for a `gsl::pointer`, the analyzer continues traversing the constructor argument, regardless of whether the parameter has a `life

[clang] [Clang] Consider outer instantiation scopes for constraint normalization (PR #114749)

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

[clang] [clang] Fix the post-filtering heuristic for GSLPointer. (PR #114044)

2024-11-04 Thread Haojian Wu via cfe-commits
https://github.com/hokein ready_for_review https://github.com/llvm/llvm-project/pull/114044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Suppression by type for `-fsanitize=enum` (PR #114754)

2024-11-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/114754 Similar to #107332. >From 87b84e1b1bb7115594e10fcea69db76ac5bcc050 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 4 Nov 2024 00:22:52 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=

[clang] [Clang] Consider outer instantiation scopes for constraint normalization (PR #114749)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes We need to compare constraint expressions when instantiating a friend declaration that is lexically defined within a class template. Since the evaluation is deferred, the expression might refer to untransfor

[clang] [ubsan] Suppression by type for `-fsanitize=enum` (PR #114754)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Vitaly Buka (vitalybuka) Changes Similar to #107332. --- Full diff: https://github.com/llvm/llvm-project/pull/114754.diff 4 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+3-4) - (modified) clang/docs/SanitizerSpeci

[clang] [ubsan] Suppression by type for `-fsanitize=enum` (PR #114754)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vitaly Buka (vitalybuka) Changes Similar to #107332. --- Full diff: https://github.com/llvm/llvm-project/pull/114754.diff 4 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+3-4) - (modified) clang/docs/SanitizerSpecialCaseLi

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-04 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: @JustinStitt Can't assign you as reviewer, but please take a look https://github.com/llvm/llvm-project/pull/114754 https://github.com/llvm/llvm-project/pull/107332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang] Fix the post-filtering heuristic for GSLPointer. (PR #114044)

2024-11-04 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/114044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Suppression by type for `-fsanitize=enum` (PR #114754)

2024-11-04 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/114754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-remote-linux-ubuntu` running on `as-builder-9` while building `clang` at step 16 "test-check-lldb-api". Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/556 Here is the relevant piece

[clang] 7ceb19e - [PowerPC] Support set_flt_rounds builtin (#73750)

2024-11-04 Thread via cfe-commits
Author: Qiu Chaofan Date: 2024-11-04T16:45:05+08:00 New Revision: 7ceb19e599fb42aeb103261425077dd10acbeae4 URL: https://github.com/llvm/llvm-project/commit/7ceb19e599fb42aeb103261425077dd10acbeae4 DIFF: https://github.com/llvm/llvm-project/commit/7ceb19e599fb42aeb103261425077dd10acbeae4.diff L

[clang] [PowerPC] Support set_flt_rounds builtin (PR #73750)

2024-11-04 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises closed https://github.com/llvm/llvm-project/pull/73750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [XRay][AArch64] Support -fxray-shared (PR #114431)

2024-11-04 Thread Sebastian Kreutzer via cfe-commits
https://github.com/sebastiankreutzer updated https://github.com/llvm/llvm-project/pull/114431 >From 63760cffc53815f3c8398bd3351486b658d0a1a8 Mon Sep 17 00:00:00 2001 From: Sebastian Kreutzer Date: Thu, 31 Oct 2024 16:01:29 +0100 Subject: [PATCH 1/2] [XRay][AArch64] Support -fxray-shared --- c

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

2024-11-04 Thread Tex Riddell via cfe-commits
https://github.com/tex3d approved this pull request. 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] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

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

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

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

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

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

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

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

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

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

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

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

[clang] [ItaniumMangle] Fix `cp` versus `cl` call expression mangling for block scope (PR #114884)

2024-11-04 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > Is it worth adding `ClangABICompat` support for this? (Do we think this will > affect any real code, or is this more just formal correctness?) The change was motivated by formal correctness (and the work led to the discovery of CWG 2946). I have some doubts that

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

2024-11-04 Thread Campbell Barton via cfe-commits
@@ -312,15 +335,35 @@ diffs from HEAD in the buffer. If no STYLE is given uses file. If no ASSUME-FILE-NAME is given uses the function ‘buffer-file-name’." (interactive) - (let ((diff-lines (clang-format--vc-diff-get-diff-lines))) -;; If we have any diffs, format them. -

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

2024-11-04 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. 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] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

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

[clang] [analyzer] Refine LCV handling in Store for better taint propagation (PR #114835)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Review commit by commit, but I'm presenting here a stacked PR to let you know of the motivation, and more importantly how the pieces would fit together. Each commit has it's own descripti

[clang] [llvm] [HLSL][DXIL] Implement `asdouble` intrinsic (PR #114847)

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

[clang-tools-extra] [clangd] Fix use-after-free issues in TidyProvider.cpp (PR #114808)

2024-11-04 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/114808 >From 0d9ff0bff259c7ee626f7aa1c02000899bdfaa70 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 4 Nov 2024 19:34:17 +0100 Subject: [PATCH] [clangd] Fix use-after-free issues in TidyProvider.cpp --- clang-to

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Stanislav Mekhanoshin via cfe-commits
@@ -1024,6 +1024,16 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-11-04 Thread Keith Packard via cfe-commits
@@ -238,7 +236,8 @@ END_COMPILERRT_OUTLINE_FUNCTION(__arm_sc_memcpy) DEFINE_COMPILERRT_FUNCTION_ALIAS(__arm_sc_memmove, __arm_sc_memcpy) - +// This version uses FP registers. Use this only on targets with them +#if defined(__aarch64__) && __ARM_FP != 0 keith-

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-11-04 Thread Keith Packard via cfe-commits
https://github.com/keith-packard updated https://github.com/llvm/llvm-project/pull/111235 >From 7002f226e15145c3791cc5587f2397bed8f362a4 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 4 Oct 2024 21:06:37 -0700 Subject: [PATCH 1/2] [libunwind] Support aarch64 without FPU Skip save/rest

[clang] Revert add builtin line vector compatible (PR #114852)

2024-11-04 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/114852 Reverts https://github.com/llvm/llvm-project/pull/113730 >From a31199224c19c1087b114de29d864125b720e6d8 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 25 Oct 2024 12:33:05 -0700 Subject: [PATCH 1/7]

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-11-04 Thread Nikita Popov via cfe-commits
nikic wrote: > @nikic I mean not in theory but currently. I don't see those (except allocas) > handled anywhere unless I'm missing something? The `I &&` part handles those. If it's a global or argument (thus not an instruction) we'll fall through to the return true. https://github.com/llvm/ll

[clang] [CUDA/HIP] fix propagate -cuid to a host-only compilation. (PR #111650)

2024-11-04 Thread Artem Belevich via cfe-commits
Artem-B wrote: I'm saying is that whatever refers to the fatbin handle has to have the same idea about the name of that handle as the object file that provides that handle. For that both have to be compiled with the same `cuid`. Normally, it's clang driver that does that all under the hood. If

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Bill Wendling via cfe-commits
bwendling wrote: -ast-print testcase added. https://github.com/llvm/llvm-project/pull/114495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-11-04 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114062 >From d2d2d3d5db3f639aab178f9ca9a20db2842d2b65 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 29 Oct 2024 14:20:44 + Subject: [PATCH 1/5] `sret` args should always point to the `alloca` AS, so we can

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread via cfe-commits
@@ -99,6 +99,42 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslClip(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); + + Const

[clang] [CUDA] Add support for __grid_constant__ attribute (PR #114589)

2024-11-04 Thread Akshay Deodhar via cfe-commits
https://github.com/akshayrdeodhar approved this pull request. https://github.com/llvm/llvm-project/pull/114589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [TLI] Add support for reallocarray (PR #114818)

2024-11-04 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/114818 >From e7d67f36df2424e78b1cc3ad19d6c3a6e5553dec Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Mon, 4 Nov 2024 16:50:45 +0100 Subject: [PATCH] [TLI] Add support for reallocarray reallocarray is

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Bill Wendling via cfe-commits
@@ -4914,3 +4914,9 @@ def ArithmeticFence : LangBuiltin<"ALL_LANGUAGES"> { let Attributes = [CustomTypeChecking, Constexpr]; let Prototype = "void(...)"; } + +def CountedByRef : Builtin { + let Spellings = ["__builtin_counted_by_ref"]; + let Attributes = [NoThrow, CustomT

[clang] [ItaniumMangle] Fix `cp` versus `cl` call expression mangling for block scope (PR #114884)

2024-11-04 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > Can we find a way to re-use the code between this and the actual lookup code? > Feels like we could have some sort of predicate like > `doesLookupResultSuppressADL(NamedDecl*)`. Or are we forced to use slightly > different predicates for some compatibility reaso

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Bill Wendling via cfe-commits
@@ -16,6 +16,8 @@ void test1(struct fam_struct *ptr, int size, int idx) { *__builtin_counted_by_ref(ptr->array) = size; // ok *__builtin_counted_by_ref(&ptr->array[idx]) = size; // ok + *__builtin_counted_by_ref(&ptr->array) = size;// ok

[clang] d6344c1 - [HLSL][SPIRV] Add HLSL type translation for spirv. (#114273)

2024-11-04 Thread via cfe-commits
Author: Steven Perron Date: 2024-11-04T12:32:23-05:00 New Revision: d6344c1cd0d099f8d99ee320f33fc9254dbe8288 URL: https://github.com/llvm/llvm-project/commit/d6344c1cd0d099f8d99ee320f33fc9254dbe8288 DIFF: https://github.com/llvm/llvm-project/commit/d6344c1cd0d099f8d99ee320f33fc9254dbe8288.diff

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

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

[clang] [LinkerWrapper] Remove special handling for archives (PR #114843)

2024-11-04 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/114843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Alex Voicu via cfe-commits
@@ -1024,6 +1024,16 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [analyzer] Refine LCV handling in Store for better taint propagation (PR #114835)

2024-11-04 Thread Balazs Benics via cfe-commits
@@ -15,20 +19,103 @@ struct empty { void test_copy_return() { aggr s1 = {1, 2}; aggr const& cr1 = aggr(s1); - clang_analyzer_dump(cr1); // expected-warning-re {{&lifetime_extended_object{aggr, cr1, S{{[0-9]+}}} }} + clang_analyzer_dump_lref(cr1); // expected-warning-re

[clang] Don't redundantly specify the default template argument to `BumpPtrAllocatorImpl` (PR #114857)

2024-11-04 Thread Dana Jansens via cfe-commits
https://github.com/danakj approved this pull request. https://github.com/llvm/llvm-project/pull/114857 ___ 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-11-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! Please add a note to the PR description about why is are you changing atan2 to erff in clang/test/CodeGenCXX/builtin-calling-conv.cpp. https://github.com/llvm/llvm-project/pull/113636 ___ cfe

[clang] [clang][UBSan] Make sure that the implicit-conversion group is compatible with minimal runtime (PR #114865)

2024-11-04 Thread Axel Lundberg via cfe-commits
https://github.com/Zonotora created https://github.com/llvm/llvm-project/pull/114865 We are currently getting: `clang: error: invalid argument '-fsanitize-minimal-runtime' not allowed with '-fsanitize=implicit-conversion'` when running `-fsanitize=implicit-conversion -fsanitize-minimal-runti

[clang] [HLSL] add IsTypedResourceElementCompatible type trait (PR #114864)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Joshua Batista (bob80905) Changes This PR implements a new type trait as a builtin, __builtin_hlsl_is_typed_resource_element_compatible This type traits verifies that the given input type is suitable as a typed resource element type. It ch

[clang] 7ac78f1 - [clang] Add preliminary lifetimebound support to APINotes (#114830)

2024-11-04 Thread via cfe-commits
Author: Gábor Horváth Date: 2024-11-04T20:29:56Z New Revision: 7ac78f13421c6e5dee4655211fc35225bb8812bc URL: https://github.com/llvm/llvm-project/commit/7ac78f13421c6e5dee4655211fc35225bb8812bc DIFF: https://github.com/llvm/llvm-project/commit/7ac78f13421c6e5dee4655211fc35225bb8812bc.diff LOG:

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

2024-11-04 Thread Tex Riddell via cfe-commits
https://github.com/tex3d edited https://github.com/llvm/llvm-project/pull/113636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add preliminary lifetimebound support to APINotes (PR #114830)

2024-11-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun closed https://github.com/llvm/llvm-project/pull/114830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] add IsTypedResourceElementCompatible type trait (PR #114864)

2024-11-04 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/114864 This PR implements a new type trait as a builtin, __builtin_hlsl_is_typed_resource_element_compatible This type traits verifies that the given input type is suitable as a typed resource element type. It checks

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

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

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: This is really cool, thank you! Can you also add a release note to `clang-tools-extra/docs/ReleaseNotes.rst` so users know about the new functionality? Changes generally look good, I just had a few questions. https://github.com/llvm/llvm-project/pull

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,35 @@ +//===- QueryProfile.h - clang-query -*- 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: Apa

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,35 @@ +//===- QueryProfile.h - clang-query -*- 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: Apa

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

2024-11-04 Thread Tex Riddell via cfe-commits
https://github.com/tex3d edited https://github.com/llvm/llvm-project/pull/113636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-04 Thread David Olsen via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-04 Thread Justin Stitt via cfe-commits
JustinStitt wrote: @vitalybuka any idea how lldb-server is failing with `UNRESOLVED`? How in the world are any of the changes here affecting lldb-server? https://github.com/llvm/llvm-project/pull/107332 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [clang][UBSan] Make sure that the implicit-conversion group is compatible with minimal runtime (PR #114865)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Axel Lundberg (Zonotora) Changes We are currently getting: `clang: error: invalid argument '-fsanitize-minimal-runtime' not allowed with '-fsanitize=implicit-conversion'` when running `-fsanitize=implicit-conversion -fsanitize-minimal-r

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/114806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] add IsTypedResourceElementCompatible type trait (PR #114864)

2024-11-04 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/114864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

2024-11-04 Thread Mikołaj Piróg via cfe-commits
@@ -0,0 +1,13 @@ +// This test checks if Window PE file compiled with -flto option contains a magic +// string "LTCG" to indicate LTO compilation. + +// REQUIRES: system-windows + +// RUN: %clang --target=x86_64-pc-windows-msvc -flto -fuse-ld=lld %s -o %t.exe mi

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #114897)

2024-11-04 Thread Artem Dergachev via cfe-commits
@@ -45,32 +52,119 @@ class UncountedLambdaCapturesChecker bool shouldVisitTemplateInstantiations() const { return true; } bool shouldVisitImplicitCode() const { return false; } - bool VisitLambdaExpr(LambdaExpr *L) { -Checker->visitLambdaExpr(L); +

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #114897)

2024-11-04 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/114897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #114897)

2024-11-04 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ commented: The attribute gets some action! Nice!! I noticed that currently the attribute's documentation doesn't say it can be placed on lambdas. But it doesn't look like it's actively rejected either. So it might be a good idea to update the documentation as part of

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #114897)

2024-11-04 Thread Artem Dergachev via cfe-commits
@@ -45,32 +52,119 @@ class UncountedLambdaCapturesChecker bool shouldVisitTemplateInstantiations() const { return true; } bool shouldVisitImplicitCode() const { return false; } - bool VisitLambdaExpr(LambdaExpr *L) { -Checker->visitLambdaExpr(L); +

[clang] [llvm] [HLSL][DXIL] Implement `asdouble` intrinsic (PR #114847)

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

[clang] [llvm] [HLSL][DXIL] Implement `asdouble` intrinsic (PR #114847)

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

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-04 Thread Chris B via cfe-commits
@@ -483,10 +581,102 @@ static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema &S, .addDefaultHandleConstructor(S, RC); } +BinaryOperator *constructSizeOfLEQ16Expr(ASTContext &Context, + SourceLocation NameLoc, +

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-04 Thread Chris B via cfe-commits
@@ -483,10 +581,102 @@ static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema &S, .addDefaultHandleConstructor(S, RC); } +BinaryOperator *constructSizeOfLEQ16Expr(ASTContext &Context, + SourceLocation NameLoc, +

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

2024-11-04 Thread Peilin Ye via cfe-commits
@@ -0,0 +1,142 @@ +; RUN: llc < %s -march=bpfel -mcpu=v4 -verify-machineinstrs -show-mc-encoding \ +; RUN: | FileCheck -check-prefixes=CHECK-LE %s +; RUN: llc < %s -march=bpfeb -mcpu=v4 -verify-machineinstrs -show-mc-encoding \ peilin-ye wrote: (replied above)

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-04 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: Mostly looking good to me. A few small comments. https://github.com/llvm/llvm-project/pull/112600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

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

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-04 Thread Chris B via cfe-commits
@@ -483,10 +581,102 @@ static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema &S, .addDefaultHandleConstructor(S, RC); } +BinaryOperator *constructSizeOfLEQ16Expr(ASTContext &Context, + SourceLocation NameLoc, +

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

2024-11-04 Thread Peilin Ye via cfe-commits
@@ -0,0 +1,142 @@ +; RUN: llc < %s -march=bpfel -mcpu=v4 -verify-machineinstrs -show-mc-encoding \ peilin-ye wrote: > again Thanks for pointing this out, but I do want to test the MC encoding. It looks like at the moment a lot of tests under `llvm/test/CodeGen

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/114588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add preliminary lifetimebound support to APINotes (PR #114830)

2024-11-04 Thread Gábor Horváth via cfe-commits
@@ -444,6 +454,16 @@ class ParamInfo : public VariableInfo { NoEscape = Value.value_or(false); } + std::optional isLifetimebound() const { +if (!LifetimeboundSpecified) + return std::nullopt; +return Lifetimebound; Xazax-hun wrote: Ugh, so

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread via cfe-commits
@@ -99,6 +99,42 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslClip(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); + + Const

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread Farzon Lotfi via cfe-commits
@@ -99,6 +99,42 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslClip(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); + + Const

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

2024-11-04 Thread Mikołaj Piróg via cfe-commits
https://github.com/mikolaj-pirog edited https://github.com/llvm/llvm-project/pull/114260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

2024-11-04 Thread Mikołaj Piróg via cfe-commits
https://github.com/mikolaj-pirog updated https://github.com/llvm/llvm-project/pull/114260 From f903e7e2effbd9675d0977dc1fd176ce97f11778 Mon Sep 17 00:00:00 2001 From: "Pirog, Mikolaj Maciej" Date: Wed, 30 Oct 2024 16:30:39 +0100 Subject: [PATCH 1/5] Correct test --- clang/test/CodeGen/debug-d

[clang] [CUDA] Add support for __grid_constant__ attribute (PR #114589)

2024-11-04 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B updated https://github.com/llvm/llvm-project/pull/114589 >From ac0790a431d94f78ee73e96fd97f9263192c3153 Mon Sep 17 00:00:00 2001 From: Artem Belevich Date: Tue, 27 Aug 2024 16:16:14 -0700 Subject: [PATCH 1/2] [CUDA] Add support for __grid_constant__ attribute --- cl

[clang] [CUDA] Add support for __grid_constant__ attribute (PR #114589)

2024-11-04 Thread Artem Belevich via cfe-commits
@@ -1450,6 +1450,13 @@ def CUDAHost : InheritableAttr { } def : MutualExclusions<[CUDAGlobal, CUDAHost]>; +def CUDAGridConstant : InheritableAttr { + let Spellings = [GNU<"grid_constant">, Declspec<"__grid_constant__">]; + let Subjects = SubjectList<[ParmVar]>; + let LangOp

[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

2024-11-04 Thread Mikołaj Piróg via cfe-commits
@@ -0,0 +1,13 @@ +// This test checks if Window PE file compiled with -flto option contains a magic +// string "LTCG" to indicate LTO compilation. + +// REQUIRES: system-windows + +// RUN: %clang --target=x86_64-pc-windows-msvc -flto -fuse-ld=lld %s -o %t.exe +// RUN: dumpbin /H

[clang] [HLSL] get inout/out ABI for array parameters working (PR #111047)

2024-11-04 Thread Chris B via cfe-commits
@@ -0,0 +1,134 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -disable-llvm-passes -emit-llvm -finclude-default-header -o - %s | FileCheck %s + +// CHECK-LABEL: increment +void increment(inout int Arr[2]) { + for (int I = 0; I < 2; I++) +Arr[0] += 2; +} + +//

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread Farzon Lotfi via cfe-commits
@@ -99,6 +99,42 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslClip(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); + + Const

<    1   2   3   4   5   6   >