File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -28,19 +28,18 @@ bool RootSignatureLexer::LexNumber(RootSignatureToken &Result) {
2828 if (Literal.hadError )
2929 return true ; // Error has already been reported so just return
3030
31+ if (!Literal.isIntegerLiteral ())
32+ return true ; // TODO: report unsupported number literal specification
33+
3134 // Retrieve the number value to store into the token
32- if (Literal.isIntegerLiteral ()) {
33- Result.Kind = TokenKind::int_literal;
35+ Result.Kind = TokenKind::int_literal;
3436
35- APSInt X = APSInt (32 , Result.Signed );
36- if (Literal.GetIntegerValue (X))
37- return true ; // TODO: Report overflow error
37+ APSInt X = APSInt (32 , Result.Signed );
38+ if (Literal.GetIntegerValue (X))
39+ return true ; // TODO: Report overflow error
3840
39- X = Negative ? -X : X;
40- Result.IntLiteral = (uint32_t )X.getZExtValue ();
41- } else {
42- return true ; // TODO: report unsupported number literal specification
43- }
41+ X = Negative ? -X : X;
42+ Result.IntLiteral = (uint32_t )X.getZExtValue ();
4443
4544 AdvanceBuffer (NumSpelling.size ());
4645 return false ;
You can’t perform that action at this time.
0 commit comments