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 {
134134  // / 32-bit integer
135135  std::optional<int32_t > handleIntLiteral (bool  Negated);
136136  // / 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
137145  std::optional<float > handleFloatLiteral (bool  Negated);
138146
139147  // / 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