Skip to content

[clang][SYCL] Skip allocation diagnostic in unevaluated contexts#21614

Open
schittir wants to merge 5 commits intointel:syclfrom
schittir:unevaluated_context
Open

[clang][SYCL] Skip allocation diagnostic in unevaluated contexts#21614
schittir wants to merge 5 commits intointel:syclfrom
schittir:unevaluated_context

Conversation

@schittir
Copy link
Copy Markdown
Contributor

This patch adds a check to avoid emitting "SYCL kernel cannot allocate storage" diagnostic in unevaluated contexts, such as for operator new expressions in C++20 concepts and requires clauses.

This fixes false positive errors with GCC 13's standard library which uses concepts with ::new expressions.

This patch adds a check to avoid emitting "SYCL kernel cannot
allocate storage" diagnostic in unevaluated contexts, such as for
operator new expressions in C++20 concepts and requires clauses.

This fixes false positive errors with GCC 13's standard library
which uses concepts with ::new expressions.
@schittir schittir requested a review from a team as a code owner March 24, 2026 18:16
@schittir schittir marked this pull request as draft March 24, 2026 18:17
@schittir schittir marked this pull request as ready for review April 2, 2026 15:17
@schittir
Copy link
Copy Markdown
Contributor Author

schittir commented Apr 2, 2026

@intel/dpcpp-cfe-reviewers Could you please review this? Thank you!

@schittir
Copy link
Copy Markdown
Contributor Author

schittir commented Apr 2, 2026

I see that buildbot shows a precommit failure but I am unable to view the exact test that fails! Are any @intel/dpcpp-cfe-reviewers able to see it?

@schittir schittir requested review from Fznamznon April 3, 2026 14:30
@elizabethandrews
Copy link
Copy Markdown
Contributor

I see that buildbot shows a precommit failure but I am unable to view the exact test that fails! Are any @intel/dpcpp-cfe-reviewers able to see it?

I see this -
Failed Tests (24):
SYCL :: Graph/Explicit/buffer_copy_offsets.cpp
SYCL :: Graph/Explicit/buffer_interleave_eager.cpp
SYCL :: Graph/Explicit/empty_node.cpp
SYCL :: Graph/Explicit/host_task.cpp
SYCL :: Graph/Explicit/host_task_last.cpp
SYCL :: Graph/Explicit/host_task_multiple_roots.cpp
SYCL :: Graph/Explicit/spec_constants_handler_api.cpp
SYCL :: Graph/Explicit/spec_constants_kernel_bundle_api.cpp
SYCL :: Graph/RecordReplay/basic_usm_shared.cpp
SYCL :: Graph/RecordReplay/kernel_bundle_spirv.cpp
SYCL :: Graph/RecordReplay/opencl_local_acc.cpp
SYCL :: Graph/RecordReplay/work_group_scratch_memory.cpp
SYCL :: Graph/Update/RecordReplay/whole_update_raw_arg.cpp
SYCL :: Graph/Update/update_with_raw_kernel_arg.cpp
SYCL :: InorderQueue/in_order_ext_oneapi_submit_barrier.cpp
SYCL :: KernelAndProgram/trace_kernel_program_cache.cpp
SYCL :: KernelCompiler/opencl_capabilities.cpp
SYCL :: Matrix/SG32/element_wise_all_sizes.cpp
SYCL :: Matrix/joint_matrix_half_accumulator.cpp
SYCL :: Matrix/joint_matrix_out_bounds_colmajor.cpp
SYCL :: SubGroup/vote.cpp
SYCL :: WorkGroupMemory/basic_usage.cpp
SYCL :: bindless_images/read_sampled.cpp
SYCL :: bindless_images/vulkan_interop/vulkan_sycl_image_interop_read_1d.cpp

Comment thread clang/test/SemaSYCL/new-operator-unevaluated-context.cpp
@schittir schittir requested a review from premanandrao April 7, 2026 18:07
Comment thread clang/test/SemaSYCL/new-operator-unevaluated-context.cpp Outdated
@schittir
Copy link
Copy Markdown
Contributor Author

The failing tests are unrelated to my changes.

@schittir
Copy link
Copy Markdown
Contributor Author

llvm> llvm-lit -v clang/test/Preprocessor/init.c
-- Testing: 1 tests, 1 workers --
PASS: Clang :: Preprocessor/init.c (1 of 1)

Testing Time: 1.95s

Total Discovered Tests: 1
Passed: 1 (100.00%)

@schittir
Copy link
Copy Markdown
Contributor Author

@elizabethandrews @premanandrao Thank you for your review! Do you have any other comments?

Comment thread clang/test/SemaSYCL/new-operator-unevaluated-context.cpp Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants