Skip to content

Commit 626431c

Browse files
author
Erich Keane
committed
[SYCL] Revert inadvertant change in test from previous commit
@premanandrao saw that I had accidentially left a line in the test commented out while debugging. Revert the commented out line to still be testing what it is supposed to be testing. Signed-off-by: Erich Keane <[email protected]>
1 parent 4de5690 commit 626431c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ Sema::DeviceDiagBuilder Sema::SYCLDiagIfDeviceCode(SourceLocation Loc,
14071407
unsigned DiagID) {
14081408
assert(getLangOpts().SYCLIsDevice &&
14091409
"Should only be called during SYCL compilation");
1410-
FunctionDecl *FD = dyn_cast<FunctionDecl>(CurContext);
1410+
FunctionDecl *FD = dyn_cast<FunctionDecl>(getCurLexicalContext());
14111411
DeviceDiagBuilder::Kind DiagKind = [this, FD] {
14121412
if (ConstructingOpenCLKernel || (FD && FD->isDependentContext()))
14131413
return DeviceDiagBuilder::K_Nop;

clang/test/SemaSYCL/sycl-cconv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ __inline __cdecl __attribute__((sycl_device)) int foo() { return 0; }
88
__inline __cdecl int moo() { return 0; }
99

1010
void bar() {
11-
//printf("hello\n"); // expected-no-error
11+
printf("hello\n"); // expected-no-error
1212
}
1313

1414
template <typename name, typename Func>

0 commit comments

Comments
 (0)