mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
[Type checker] Pull the null check into swift::isSIMDOperator().
This commit is contained in:
@@ -1473,7 +1473,7 @@ static ArrayRef<OverloadChoice> partitionSIMDOperators(
|
||||
// Check whether we have any SIMD operators.
|
||||
bool foundSIMDOperator = false;
|
||||
for (const auto &choice : choices) {
|
||||
if (choice.isDecl() && isSIMDOperator(choice.getDecl())) {
|
||||
if (isSIMDOperator(choice.getDecl())) {
|
||||
foundSIMDOperator = true;
|
||||
break;
|
||||
}
|
||||
@@ -1485,8 +1485,7 @@ static ArrayRef<OverloadChoice> partitionSIMDOperators(
|
||||
scratch.assign(choices.begin(), choices.end());
|
||||
std::stable_partition(scratch.begin(), scratch.end(),
|
||||
[](const OverloadChoice &choice) {
|
||||
return !choice.isDecl() ||
|
||||
!isSIMDOperator(choice.getDecl());
|
||||
return !isSIMDOperator(choice.getDecl());
|
||||
});
|
||||
|
||||
return scratch;
|
||||
|
||||
Reference in New Issue
Block a user