Skip to content

Commit

Permalink
Merge pull request #7 from slangbot/format-5887-gh-5681
Browse files Browse the repository at this point in the history
Format code for PR shader-slang#5887
  • Loading branch information
csyonghe authored Dec 16, 2024
2 parents 00d1035 + 9218bdb commit fa6de32
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/slang/slang-check-decl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11726,8 +11726,7 @@ void SemanticsDeclAttributesVisitor::checkVarDeclCommon(VarDeclBase* varDecl)
{
// Specialization constant.
// Check that type is basic type.
if (!as<BasicExpressionType>(varDecl->getType()) &&
!as<ErrorType>(varDecl->getType()))
if (!as<BasicExpressionType>(varDecl->getType()) && !as<ErrorType>(varDecl->getType()))
{
getSink()->diagnose(modifier, Diagnostics::specializationConstantMustBeScalar);
}
Expand All @@ -11740,7 +11739,10 @@ void SemanticsDeclAttributesVisitor::checkVarDeclCommon(VarDeclBase* varDecl)
}
if (hasSpecConstAttr && hasPushConstAttr)
{
getSink()->diagnose(varDecl, Diagnostics::variableCannotBePushAndSpecializationConstant, varDecl->getName());
getSink()->diagnose(
varDecl,
Diagnostics::variableCannotBePushAndSpecializationConstant,
varDecl->getName());
}
if (hasSpecConstAttr || hasPushConstAttr)
{
Expand Down

0 comments on commit fa6de32

Please sign in to comment.