File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
clang/include/clang/Parse Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,14 @@ class RootSignatureParser {
134
134
// / 32-bit integer
135
135
std::optional<int32_t > handleIntLiteral (bool Negated);
136
136
// / Use NumericLiteralParser to convert CurToken.NumSpelling into a float
137
+ // /
138
+ // / This matches the behaviour of DXC, which is as follows:
139
+ // / - convert the spelling with `strtod`
140
+ // / - check for a float overflow
141
+ // / - cast the double to a float
142
+ // / The behaviour of `strtod` is replicated using:
143
+ // / Semantics: llvm::APFloat::Semantics::S_IEEEdouble
144
+ // / RoundingMode: llvm::RoundingMode::NearestTiesToEven
137
145
std::optional<float > handleFloatLiteral (bool Negated);
138
146
139
147
// / Flags may specify the value of '0' to denote that there should be no
You can’t perform that action at this time.
0 commit comments