Skip to content

Commit 109a796

Browse files
[SYCL][NFC] Drop unnecessary nullptr check (#18917)
This resolves Coverity issue `440250` (https://scan.coverity.com/projects/intel-llvm?tab=overview). We know that `ND` cannot be `nullptr`, but presence of the check makes Coverity think that earlier accesses (within the `while` loop condition) are potentially unsafe.
1 parent 4f6a246 commit 109a796

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
@@ -846,7 +846,7 @@ static bool isDeclaredInSYCLNamespace(const Decl *D) {
846846
ND = cast<NamespaceDecl>(Parent);
847847
}
848848

849-
return ND && ND->getName() == "sycl";
849+
return ND->getName() == "sycl";
850850
}
851851

852852
static bool isSYCLPrivateMemoryVar(VarDecl *VD) {

0 commit comments

Comments
 (0)