Skip to content

Commit c961d3e

Browse files
author
Erich Keane
committed
[SYCL] Fix StringLiteral Ctor issue from #3504.
I'm not sure what causes this to not like this conversion, the error message seems incorrect and only on certain configs of the build, but we should fix the build anyway. This calls the StringRef pointer-size directly, rather than having the StringLiteral type do it.
1 parent c1ddf86 commit c961d3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Util {
7373
template <size_t N>
7474
static constexpr DeclContextDesc MakeDeclContextDesc(Decl::Kind K,
7575
const char (&Str)[N]) {
76-
return DeclContextDesc{K, llvm::StringLiteral{Str}};
76+
return DeclContextDesc{K, llvm::StringRef{Str, N}};
7777
}
7878

7979
static constexpr DeclContextDesc MakeDeclContextDesc(Decl::Kind K,

0 commit comments

Comments
 (0)