@@ -1,19 +1,19 @@
// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -aux-triple
x86_64-pc-windows-msvc -fsycl-is-device -disable-llvm-passes -fsycl-is-device
-emit-llvm %s -o - | FileCheck %s '-D$ADDRSPACE=addrspace(1) '
-// RUN: %clang_cc1 -triple x86_64-pc-windows-
@@ -1,19 +1,19 @@
// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -aux-triple
x86_64-pc-windows-msvc -fsycl-is-device -disable-llvm-passes -fsycl-is-device
-emit-llvm %s -o - | FileCheck %s '-D$ADDRSPACE=addrspace(1) '
tahonermann wrote:
The redun
@@ -1,19 +1,19 @@
// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -aux-triple
x86_64-pc-windows-msvc -fsycl-is-device -disable-llvm-passes -fsycl-is-device
-emit-llvm %s -o - | FileCheck %s '-D$ADDRSPACE=addrspace(1) '
-// RUN: %clang_cc1 -triple x86_64-pc-windows-
@@ -1,19 +1,19 @@
// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -aux-triple
x86_64-pc-windows-msvc -fsycl-is-device -disable-llvm-passes -fsycl-is-device
-emit-llvm %s -o - | FileCheck %s '-D$ADDRSPACE=addrspace(1) '
-// RUN: %clang_cc1 -triple x86_64-pc-windows-
https://github.com/tahonermann requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/146854
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1590,25 +1590,70 @@ namespace {
void EmitConditionalDtorDeleteCall(CodeGenFunction &CGF,
tahonermann wrote:
Thanks, the new comment looks great.
https://github.com/llvm/llvm-project/pull/139566
___
cfe-commits m
@@ -0,0 +1,54 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// Semantic tests for sycl_external attribute
+
+[[clang::sycl_external]] // expected-error {{'sycl_external' can only be
applied to functions with external linkage}}
+static void func1() {}
+
+name
@@ -208,6 +208,15 @@ void SemaSYCL::handleExternalAttr(Decl *D, const
ParsedAttr &AL) {
Diag(AL.getLoc(), diag::err_sycl_attribute_invalid_linkage);
return;
}
+ std::string FunctionName =
StringRef(FD->getNameInfo().getAsString()).lower();
+ if (FunctionName.find(
@@ -0,0 +1,54 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// Semantic tests for sycl_external attribute
+
+[[clang::sycl_external]] // expected-error {{'sycl_external' can only be
applied to functions with external linkage}}
+static void func1() {}
+
+name
@@ -12856,6 +12856,14 @@ def err_sycl_special_type_num_init_method : Error<
"types with 'sycl_special_class' attribute must have one and only one
'__init' "
"method defined">;
+// SYCL external attribute diagnostics
+def err_sycl_attribute_invalid_linkage : Error<
+ "'sy
@@ -202,6 +202,25 @@ void SemaSYCL::handleKernelAttr(Decl *D, const ParsedAttr
&AL) {
handleSimpleAttribute(*this, D, AL);
}
+void SemaSYCL::handleExternalAttr(Decl *D, const ParsedAttr &AL) {
+ auto *FD = cast(D);
+ if (!FD->isExternallyVisible()) {
+Diag(AL.getLoc()
https://github.com/tahonermann requested changes to this pull request.
Additional comments for diagnostics and tests.
https://github.com/llvm/llvm-project/pull/140282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
@@ -7206,6 +7206,9 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
const ParsedAttr &AL,
case ParsedAttr::AT_EnumExtensibility:
handleEnumExtensibilityAttr(S, D, AL);
break;
+ case ParsedAttr::AT_SYCLExternal:
+S.SYCL().handleExternalAttr(D, AL);
---
@@ -2886,6 +2887,16 @@ class CXXDestructorDecl : public CXXMethodDecl {
return getCanonicalDecl()->OperatorDelete;
}
+ const FunctionDecl *getOperatorGlobalDelete() const {
+return getCanonicalDecl()->OperatorGlobalDelete;
+ }
+
+ void setOperatorGlobalDelete(Func
@@ -0,0 +1,54 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// Semantic tests for sycl_external attribute
+
+[[clang::sycl_external]] // expected-error {{'sycl_external' can only be
applied to functions with external linkage}}
+static void func1() {}
+
+name
@@ -0,0 +1,54 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// Semantic tests for sycl_external attribute
+
+[[clang::sycl_external]] // expected-error {{'sycl_external' can only be
applied to functions with external linkage}}
+static void func1() {}
+
+name
@@ -0,0 +1,54 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// Semantic tests for sycl_external attribute
+
+[[clang::sycl_external]] // expected-error {{'sycl_external' can only be
applied to functions with external linkage}}
+static void func1() {}
+
+name
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/140282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -202,6 +202,25 @@ void SemaSYCL::handleKernelAttr(Decl *D, const ParsedAttr
&AL) {
handleSimpleAttribute(*this, D, AL);
}
+void SemaSYCL::handleExternalAttr(Decl *D, const ParsedAttr &AL) {
+ auto *FD = cast(D);
+ if (!FD->isExternallyVisible()) {
+Diag(AL.getLoc()
@@ -12856,6 +12856,14 @@ def err_sycl_special_type_num_init_method : Error<
"types with 'sycl_special_class' attribute must have one and only one
'__init' "
"method defined">;
+// SYCL external attribute diagnostics
+def err_sycl_attribute_invalid_linkage : Error<
+ "'sy
@@ -2886,6 +2887,16 @@ class CXXDestructorDecl : public CXXMethodDecl {
return getCanonicalDecl()->OperatorDelete;
}
+ const FunctionDecl *getOperatorGlobalDelete() const {
+return getCanonicalDecl()->OperatorGlobalDelete;
+ }
+
+ void setOperatorGlobalDelete(Func
@@ -2886,6 +2887,16 @@ class CXXDestructorDecl : public CXXMethodDecl {
return getCanonicalDecl()->OperatorDelete;
}
+ const FunctionDecl *getOperatorGlobalDelete() const {
+return getCanonicalDecl()->OperatorGlobalDelete;
+ }
+
+ void setOperatorGlobalDelete(Func
@@ -46,6 +46,16 @@ Potentially Breaking Changes
``endbr64`` instruction at the labels named as possible branch
destinations, so it is not safe to use a register-controlled branch
instruction to branch to one. (In line with gcc.)
+- Scalar deleting destructors emitted by c
@@ -476,6 +476,41 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLExternalDocs : Documentation {
+ let Category = DocCatFunction;
+ let Heading = "sycl_external";
+ let Content = [{
+The ``sycl_external`` attribute indicates that a
@@ -476,6 +476,41 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLExternalDocs : Documentation {
+ let Category = DocCatFunction;
+ let Heading = "sycl_external";
+ let Content = [{
+The ``sycl_external`` attribute indicates that a
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/140282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tahonermann requested changes to this pull request.
Thanks for addressing most of my earlier comments. I took another quick look
today and added a couple more comments.
https://github.com/llvm/llvm-project/pull/140282
___
cfe-commit
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// expected-warning@+1{{'sycl_external' attribute ignored}}
+[[clang::sycl_external]] void bar() {}
+
+// expected-warning@+1{{'sycl_external' attribute ignored}}
+[[clang::sycl_external]] int a;
tah
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// expected-warning@+1{{'sycl_external' attribute only applies to functions}}
+[[clang::sycl_external]] int a;
+
+
+// expected-warning@+2{{'sycl_external' attribute only applies to functions}}
+stru
https://github.com/tahonermann requested changes to this pull request.
Thanks @schittir, here are my initial review comments. I expect to review the
newly added tests more closely once these comments are all addressed.
https://github.com/llvm/llvm-project/pull/140282
___
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// expected-warning@+1{{'sycl_external' attribute ignored}}
+[[clang::sycl_external]] void bar() {}
+
+// expected-warning@+1{{'sycl_external' attribute ignored}}
+[[clang::sycl_external]] int a;
tah
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// expected-warning@+1{{'sycl_external' attribute only applies to functions}}
+[[clang::sycl_external]] int a;
+
+
+// expected-warning@+2{{'sycl_external' attribute only applies to functions}}
+stru
@@ -476,6 +476,31 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLExternalDocs : Documentation {
+ let Category = DocCatFunction;
+ let Heading = "sycl_external";
+ let Content = [{
+The ``sycl_external`` attribute can only be appl
@@ -202,6 +202,17 @@ void SemaSYCL::handleKernelAttr(Decl *D, const ParsedAttr
&AL) {
handleSimpleAttribute(*this, D, AL);
}
+void SemaSYCL::handleExternalAttr(Decl *D, const ParsedAttr &AL) {
+ auto *ND = cast(D);
+ if (!ND->isExternallyVisible()) {
taho
@@ -1,128 +1,128 @@
// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fsycl-is-device
-disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
void bar(int &Data) {}
-// CHECK: define dso_local void @[[RAW_REF:[a-zA-Z0-9_]+]](ptr noundef nonnull
align 4 dereferenceable(4) %
+// CHEC
@@ -202,6 +202,17 @@ void SemaSYCL::handleKernelAttr(Decl *D, const ParsedAttr
&AL) {
handleSimpleAttribute(*this, D, AL);
}
+void SemaSYCL::handleExternalAttr(Decl *D, const ParsedAttr &AL) {
+ auto *ND = cast(D);
+ if (!ND->isExternallyVisible()) {
+Diag(AL.getLoc()
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// Semantic tests for sycl_external attribute
+
+[[clang::sycl_external(3)]] // expected-error {{'sycl_external' attribute
takes no arguments}}
+void bar() {}
+
+[[clang::sycl_external]] // expected
@@ -12851,6 +12851,10 @@ def err_sycl_special_type_num_init_method : Error<
"types with 'sycl_special_class' attribute must have one and only one
'__init' "
"method defined">;
+//SYCL external attribute diagnostics
tahonermann wrote:
```suggestion
// SYC
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/140282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// Semantic tests for sycl_external attribute
+
+[[clang::sycl_external(3)]] // expected-error {{'sycl_external' attribute
takes no arguments}}
+void bar() {}
tahonermann wrote:
Th
@@ -476,6 +476,31 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLExternalDocs : Documentation {
+ let Category = DocCatFunction;
+ let Heading = "sycl_external";
+ let Content = [{
+The ``sycl_external`` attribute can only be appl
@@ -1621,6 +1621,13 @@ def DeviceKernel : DeclOrTypeAttr {
}];
}
+def SYCLExternal : InheritableAttr {
+ let Spellings = [Clang<"sycl_external">];
+ let Subjects = SubjectList<[Function]>;
tahonermann wrote:
Error diagnostics are explicitly requested for ma
@@ -2886,6 +2887,16 @@ class CXXDestructorDecl : public CXXMethodDecl {
return getCanonicalDecl()->OperatorDelete;
}
+ const FunctionDecl *getOperatorGlobalDelete() const {
+return getCanonicalDecl()->OperatorGlobalDelete;
+ }
+
+ void setOperatorGlobalDelete(Func
@@ -1590,25 +1590,70 @@ namespace {
void EmitConditionalDtorDeleteCall(CodeGenFunction &CGF,
tahonermann wrote:
This function is only ever called for a deleting destructor (and when
`CXXStructorImplicitParamValue` is non-null). I don't think there is a
reaso
@@ -194,9 +217,31 @@ I::~I() { call_in_dtor(); }
// CHECK-MSABI32-LABEL: define {{.*}} @"??_GI@@UAEPAXI@Z"(
// CHECK-MSABI-NOT: call{{ }}
// CHECK-MSABI: load i32
-// CHECK-MSABI: icmp eq i32 {{.*}}, 0
-// CHECK-MSABI: br i1
+// CHECK-MSABI-NEXT: and i32 %[[IMP_PARAM:.*]], 4
+/
@@ -2886,6 +2887,16 @@ class CXXDestructorDecl : public CXXMethodDecl {
return getCanonicalDecl()->OperatorDelete;
}
+ const FunctionDecl *getOperatorGlobalDelete() const {
+return getCanonicalDecl()->OperatorGlobalDelete;
+ }
+
+ void setOperatorGlobalDelete(Func
@@ -46,6 +46,16 @@ Potentially Breaking Changes
``endbr64`` instruction at the labels named as possible branch
destinations, so it is not safe to use a register-controlled branch
instruction to branch to one. (In line with gcc.)
+- Scalar deleting destructors emitted by c
@@ -2886,6 +2887,16 @@ class CXXDestructorDecl : public CXXMethodDecl {
return getCanonicalDecl()->OperatorDelete;
}
+ const FunctionDecl *getOperatorGlobalDelete() const {
+return getCanonicalDecl()->OperatorGlobalDelete;
+ }
+
+ void setOperatorGlobalDelete(Func
@@ -11139,6 +11139,21 @@ bool Sema::CheckDestructor(CXXDestructorDecl
*Destructor) {
DiagnoseUseOfDecl(OperatorDelete, Loc);
MarkFunctionReferenced(Loc, OperatorDelete);
Destructor->setOperatorDelete(OperatorDelete, ThisArg);
+
+ if (isa(OperatorDelete)
https://github.com/tahonermann requested changes to this pull request.
Thanks for working on this @Fznamznon! I added some suggestions and comments,
most of which are minor. There are two concerns that must be addressed.
- The ABI impact suggests this change should be tied to `-fclang-abi-compat
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/139566
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tahonermann wrote:
I ended up spending a lot of time barking down the wrong rabbit hole due to
these changes. @rnk, please see
https://github.com/llvm/llvm-project/issues/140799.
https://github.com/llvm/llvm-project/pull/134196
___
cfe-commits mailin
tahonermann wrote:
I ended up spending a lot of time barking down the wrong rabbit hole due to
these changes. @rnk, please see
https://github.com/llvm/llvm-project/issues/140799.
https://github.com/llvm/llvm-project/pull/133545
___
cfe-commits mailin
@@ -12926,6 +12929,10 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
// FIXME: Functions declared with SYCL_EXTERNAL are required during
// device compilation.
tahonermann wrote:
```suggestion
```
https://github.com/llvm/llvm-project/pull/140
@@ -1545,6 +1550,18 @@ def SYCLKernel : InheritableAttr {
let Documentation = [SYCLKernelDocs];
}
+def GlobalStorageNonLocalVar : SubsetSubjecthasGlobalStorage() &&
+ !S->isLocalVarDeclOrParm()}],
+
@@ -1545,6 +1550,18 @@ def SYCLKernel : InheritableAttr {
let Documentation = [SYCLKernelDocs];
}
+def GlobalStorageNonLocalVar : SubsetSubjecthasGlobalStorage() &&
+ !S->isLocalVarDeclOrParm()}],
+
@@ -408,10 +408,14 @@ class SubjectList subjects, SubjectDiag
diag = WarnDiag,
string CustomDiag = customDiag;
}
-class LangOpt {
+class LangOpt {
// The language option to test; ignored when custom code is supplied.
string Name = name;
+ // If set to 1, the attrib
@@ -0,0 +1,52 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify -DSYCL %s
+// RUN: %clang_cc1 -fsycl-is-host -fsyntax-only -verify -DHOST %s
tahonermann wrote:
Since SYCL applies to both host and device, let's differentiate by "host" and
"device" (wi
@@ -12909,6 +12909,9 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
if (D->hasAttr())
return false;
+ if (LangOpts.SYCLIsDevice && !D->hasAttr())
+return false;
tahonermann wrote:
This will also need to check for the new `SYCLExternalAttr`
@@ -0,0 +1,52 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify -DSYCL %s
+// RUN: %clang_cc1 -fsycl-is-host -fsyntax-only -verify -DHOST %s
+// RUN: %clang_cc1 -verify %s
+
+// Semantic tests for sycl_external attribute
+
+#ifdef SYCL
+
+__attribute__((sycl_external(3
https://github.com/tahonermann requested changes to this pull request.
Thanks for working on this @schittir! I completed an initial pass of all of the
code, but still need to look more closely at the documentation updates.
https://github.com/llvm/llvm-project/pull/140282
___
@@ -100,11 +100,10 @@ int main() {
// Verify that SYCL kernel caller functions are emitted for each device target.
//
-// FIXME: The following set of matches are used to skip over the declaration of
-// main(). main() shouldn't be emitted in device code, but that pruning isn't
@@ -12926,6 +12929,10 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
// FIXME: Functions declared with SYCL_EXTERNAL are required during
// device compilation.
+// Functions definitions with sycl_external attribute are required during
+// device compila
@@ -12746,6 +12746,11 @@ def err_sycl_special_type_num_init_method : Error<
"types with 'sycl_special_class' attribute must have one and only one
'__init' "
"method defined">;
+//SYCL external attribute diagnostics
+def err_sycl_attribute_internal_decl
+: Error<"%0 at
@@ -62,6 +62,7 @@ class SemaSYCL : public SemaBase {
ParsedType ParsedTy);
void handleKernelAttr(Decl *D, const ParsedAttr &AL);
+ void handleSYCLExternalAttr(Decl *D, const ParsedAttr &AL);
tahonermann wrote:
Since t
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/140282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,155 @@
+// RUN: %clang_cc1 -verify -fsyntax-only -std=c++20 -Wconversion %s
+
+void c8(char8_t);
+void c16(char16_t);
+void c32(char32_t);
+
+void test(char8_t u8, char16_t u16, char32_t u32) {
+c8(u8);
+c8(u16); // expected-warning {{implicit conversion from 'c
@@ -11810,6 +11811,46 @@ static void DiagnoseIntInBoolContext(Sema &S, Expr *E)
{
}
}
+static void DiagnoseMixedUnicodeImplicitConversion(Sema &S, const Type *Source,
+ const Type *Target, Expr *E,
+
@@ -0,0 +1,155 @@
+// RUN: %clang_cc1 -verify -fsyntax-only -std=c++20 -Wconversion %s
+
+void c8(char8_t);
+void c16(char16_t);
+void c32(char32_t);
+
+void test(char8_t u8, char16_t u16, char32_t u32) {
+c8(u8);
+c8(u16); // expected-warning {{implicit conversion from 'c
@@ -1567,15 +1568,81 @@ void Sema::checkEnumArithmeticConversions(Expr *LHS,
Expr *RHS,
}
}
+static void CheckUnicodeArithmeticConversions(Sema &SemaRef, Expr *LHS,
+ Expr *RHS, SourceLocation Loc,
+
https://github.com/tahonermann approved this pull request.
Thanks @cor3ntin, this looks good to me!
https://github.com/llvm/llvm-project/pull/138708
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/138708
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1567,15 +1568,81 @@ void Sema::checkEnumArithmeticConversions(Expr *LHS,
Expr *RHS,
}
}
+static void CheckUnicodeArithmeticConversions(Sema &SemaRef, Expr *LHS,
+ Expr *RHS, SourceLocation Loc,
+
@@ -11810,6 +11811,46 @@ static void DiagnoseIntInBoolContext(Sema &S, Expr *E)
{
}
}
+static void DiagnoseMixedUnicodeImplicitConversion(Sema &S, const Type *Source,
+ const Type *Target, Expr *E,
+
@@ -0,0 +1,155 @@
+// RUN: %clang_cc1 -verify -fsyntax-only -std=c++20 -Wconversion %s
+
+void c8(char8_t);
+void c16(char16_t);
+void c32(char32_t);
+
+void test(char8_t u8, char16_t u16, char32_t u32) {
+c8(u8);
+c8(u16); // expected-warning {{implicit conversion from 'c
https://github.com/tahonermann requested changes to this pull request.
I like this, thanks for working on it! I added a number of mostly minor
comments. I would like to see the warnings extended to `char` and `wchar_t` and
doing that in a later change is fine. Some of my comments are intended t
@@ -11810,6 +11811,46 @@ static void DiagnoseIntInBoolContext(Sema &S, Expr *E)
{
}
}
+static void DiagnoseMixedUnicodeImplicitConversion(Sema &S, const Type *Source,
+ const Type *Target, Expr *E,
+
@@ -0,0 +1,155 @@
+// RUN: %clang_cc1 -verify -fsyntax-only -std=c++20 -Wconversion %s
+
+void c8(char8_t);
+void c16(char16_t);
+void c32(char32_t);
+
+void test(char8_t u8, char16_t u16, char32_t u32) {
+c8(u8);
+c8(u16); // expected-warning {{implicit conversion from 'c
@@ -4357,6 +4357,29 @@ def warn_address_of_reference_bool_conversion : Warning<
"code; pointer may be assumed to always convert to true">,
InGroup;
+def warn_impcast_unicode_char_type
+: Warning<"implicit conversion from %0 to %1 may change the meaning of the
"
+
@@ -2190,3 +2192,30 @@ static bool FormatTemplateTypeDiff(ASTContext &Context,
QualType FromType,
TD.DiffTemplate();
return TD.Emit();
}
+
+std::string clang::FormatUTFCodeUnitAsCodepoint(unsigned Value, QualType T) {
+ auto IsSingleCodeUnitCP = [](unsigned Value, QualTyp
@@ -111,6 +111,7 @@ def EnumConversion : DiagGroup<"enum-conversion",
ImplicitEnumEnumCast,
EnumFloatConversion,
EnumCompareConditional]>;
+def ImplicitUnicodeConversion : DiagGroup<
@@ -7719,6 +7742,11 @@ def warn_comparison_of_mixed_enum_types_switch : Warning<
"%diff{ ($ and $)|}0,1">,
InGroup;
+def warn_arith_conv_mixed__unicode_types
tahonermann wrote:
```suggestion
def warn_arith_conv_mixed_unicode_types
```
https://github.com/
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/138708
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tahonermann closed
https://github.com/llvm/llvm-project/pull/133030
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tahonermann wrote:
> I can't find our conversation again and firefox crashed before I could
> submit, but PLEASE make sure the mangling tests cover the examples we put
> together.
I absolutely will.
> ALSO, we don't always mangle the types of lambdas, we sometimes do $_0 and
> $_1 (source of
@@ -14794,9 +14803,36 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
-static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType,
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+
@@ -732,6 +732,16 @@
CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType,
RequiredArgs::All);
}
+const CGFunctionInfo &
+CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType,
+
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/133030
>From 606c9f3bdd1bed9631002d2bd51ef2fc3475ecfe Mon Sep 17 00:00:00 2001
From: Elizabeth Andrews
Date: Tue, 25 Mar 2025 09:31:11 -0700
Subject: [PATCH 1/6] [SYCL] Basic code generation for SYCL kernel caller
https://github.com/tahonermann closed
https://github.com/llvm/llvm-project/pull/135861
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -199,15 +199,17 @@ static void appendParameterTypes(const CodeGenTypes &CGT,
prefix.size());
}
+using SmallExtParameterInfoList =
tahonermann wrote:
Done; I dropped the `Small` prefix.
With regard to the in-place size of 16,
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/135861
>From f413b7eeb673812fb66b1465c885a34fe21d1fc6 Mon Sep 17 00:00:00 2001
From: Tom Honermann
Date: Tue, 15 Apr 2025 14:25:06 -0700
Subject: [PATCH 1/2] [NFC][Clang] Introduce type aliases to replace use of
a
https://github.com/tahonermann updated
https://github.com/llvm/llvm-project/pull/133030
>From 2c99027df798c04d252ff8f66853888db89356f1 Mon Sep 17 00:00:00 2001
From: Elizabeth Andrews
Date: Tue, 25 Mar 2025 09:31:11 -0700
Subject: [PATCH 1/5] [SYCL] Basic code generation for SYCL kernel caller
@@ -732,6 +732,16 @@
CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType,
RequiredArgs::All);
}
+const CGFunctionInfo &
+CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType,
+
https://github.com/tahonermann created
https://github.com/llvm/llvm-project/pull/135861
`CGCall.cpp` declares several functions with a return type that is an
explicitly spelled out specialization of `SmallVector`. Previously, `auto` was
used in several places to avoid repeating the long type n
@@ -732,6 +732,16 @@
CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType,
RequiredArgs::All);
}
+const CGFunctionInfo &
+CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType,
+
@@ -732,6 +732,16 @@
CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType,
RequiredArgs::All);
}
+const CGFunctionInfo &
+CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType,
+
@@ -14794,9 +14803,36 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
-static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType,
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+
@@ -3303,6 +3303,27 @@ void CodeGenModule::EmitDeferred() {
CurDeclsToEmit.swap(DeferredDeclsToEmit);
for (GlobalDecl &D : CurDeclsToEmit) {
+// Functions declared with the sycl_kernel_entry_point attribute are
+// emitted normally during host compilation. During d
@@ -732,6 +732,16 @@
CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType,
RequiredArgs::All);
}
+const CGFunctionInfo &
+CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType,
+
@@ -14794,9 +14803,36 @@ void
ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap,
}
}
-static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType,
+static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context,
+
1 - 100 of 476 matches
Mail list logo