Skip to content

Commit 4ecf133

Browse files
committed
Round five of addressing code review feedback from Erich Keane.
Changes include: - Minor refactoring to eliminate a branch that only contained an assertion.
1 parent 8a51f1c commit 4ecf133

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

clang/lib/AST/ASTContext.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14315,13 +14315,11 @@ void ASTContext::registerSYCLEntryPointFunction(FunctionDecl *FD) {
1431514315
// conflicting kernel names prior to calling this function.
1431614316
CanQualType KernelNameType = getCanonicalType(SKEPAttr->getKernelName());
1431714317
auto IT = SYCLKernels.find(KernelNameType);
14318-
if (IT != SYCLKernels.end()) {
14319-
assert(declaresSameEntity(FD, IT->second.getKernelEntryPointDecl()) &&
14320-
"SYCL kernel name conflict");
14321-
} else {
14322-
SYCLKernels.insert(std::make_pair(KernelNameType,
14323-
BuildSYCLKernelInfo(KernelNameType, FD)));
14324-
}
14318+
assert((IT == SYCLKernels.end() ||
14319+
declaresSameEntity(FD, IT->second.getKernelEntryPointDecl())) &&
14320+
"SYCL kernel name conflict");
14321+
SYCLKernels.insert(
14322+
std::make_pair(KernelNameType, BuildSYCLKernelInfo(KernelNameType, FD)));
1432514323
}
1432614324

1432714325
OMPTraitInfo &ASTContext::getNewOMPTraitInfo() {

0 commit comments

Comments
 (0)