summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-parser.cpp
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-10-02 18:45:44 -0700
committerGitHub <noreply@github.com>2024-10-02 18:45:44 -0700
commita11a776642ebcb69924ff79e3c5aebdf9f9e08ff (patch)
treeb4342f56a23bf8dcb0758dbebe640724ea855537 /source/slang/slang-parser.cpp
parent7ce7bb3364cf84f5a9247358dcec79ba5aef8572 (diff)
Fix the broken CI (#5216)
The type of `sizeof` has to be int not uint.
Diffstat (limited to 'source/slang/slang-parser.cpp')
-rw-r--r--source/slang/slang-parser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp
index 06d470a5f..0c65ca85e 100644
--- a/source/slang/slang-parser.cpp
+++ b/source/slang/slang-parser.cpp
@@ -6403,11 +6403,11 @@ namespace Slang
{
// We could have a type or a variable or an expression
SizeOfExpr* sizeOfExpr = parser->astBuilder->create<SizeOfExpr>();
-
+
parser->ReadMatchingToken(TokenType::LParent);
- // The return type is always a UInt
- sizeOfExpr->type = parser->astBuilder->getUIntType();
+ // The return type is always a Int
+ sizeOfExpr->type = parser->astBuilder->getIntType();
sizeOfExpr->value = parser->ParseExpression();
@@ -6423,8 +6423,8 @@ namespace Slang
parser->ReadMatchingToken(TokenType::LParent);
- // The return type is always a UInt
- alignOfExpr->type = parser->astBuilder->getUIntType();
+ // The return type is always a Int
+ alignOfExpr->type = parser->astBuilder->getIntType();
alignOfExpr->value = parser->ParseExpression();