[clang] [clang][Sema] Avoid assert when diagnosing address-space qualified new/delete (PR #178424)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 7 07:15:45 PST 2026
================
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -std=c++17 %s -verify -Wno-unknown-attributes
+
+typedef int LocalInt __attribute__((opencl_local));
+
+void test_new() {
+ int *p = new LocalInt[1]; // expected-error {{cannot allocate objects of type 'int' in address space}}
----------------
zwuis wrote:
Please verify the full message.
https://github.com/llvm/llvm-project/pull/178424
More information about the cfe-commits
mailing list