Skip to content

Commit d5fbc7c

Browse files
committed
review: don't use else after return
1 parent ba4e2ae commit d5fbc7c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

clang/lib/Parse/ParseHLSLRootSignature.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,12 +744,16 @@ std::optional<float> RootSignatureParser::parseFloatParam() {
744744
if (!UInt.has_value())
745745
return std::nullopt;
746746
return (float)UInt.value();
747-
} else if (tryConsumeExpectedToken(TokenKind::int_literal)) {
747+
}
748+
749+
if (Negated && tryConsumeExpectedToken(TokenKind::int_literal)) {
748750
std::optional<int32_t> = handleIntLiteral(Negated);
749751
if (!Int.has_value())
750752
return std::nullopt;
751753
return (float)Int.value();
752-
} else if (tryConsumeExpectedToken(TokenKind::float_literal)) {
754+
}
755+
756+
if (tryConsumeExpectedToken(TokenKind::float_literal)) {
753757
std::optional<float> Float = handleFloatLiteral(Negated);
754758
if (!Float.has_value())
755759
return std::nullopt;

0 commit comments

Comments
 (0)