@@ -2855,7 +2855,7 @@ long long simplecpp::characterLiteralToLL(const std::string& str)
28552855 // UTF-8 encodes code points above 0x7f in multiple code units
28562856 // code points above 0x10ffff are not allowed
28572857 if (((narrow || utf8) && value > 0x7f ) || (utf16 && value > 0xffff ) || value > 0x10ffff )
2858- throw std::runtime_error (" code point too large" );
2858+ throw std::runtime_error (" code point too large" ); // TODO: make unique
28592859
28602860 if (value >= 0xd800 && value <= 0xdfff )
28612861 throw std::runtime_error (" surrogate code points not allowed in universal character names" );
@@ -2876,15 +2876,15 @@ long long simplecpp::characterLiteralToLL(const std::string& str)
28762876
28772877 int additional_bytes;
28782878 if (value >= 0xf5 ) // higher values would result in code points above 0x10ffff
2879- throw std::runtime_error (" assumed UTF-8 encoded source, but sequence is invalid" );
2879+ throw std::runtime_error (" assumed UTF-8 encoded source, but sequence is invalid" ); // TODO: make unique
28802880 if (value >= 0xf0 )
28812881 additional_bytes = 3 ;
28822882 else if (value >= 0xe0 )
28832883 additional_bytes = 2 ;
28842884 else if (value >= 0xc2 ) // 0xc0 and 0xc1 are always overlong 2-bytes encodings
28852885 additional_bytes = 1 ;
28862886 else
2887- throw std::runtime_error (" assumed UTF-8 encoded source, but sequence is invalid" );
2887+ throw std::runtime_error (" assumed UTF-8 encoded source, but sequence is invalid" ); // TODO: make unique
28882888
28892889 value &= (1 << (6 - additional_bytes)) - 1 ;
28902890
@@ -2897,16 +2897,16 @@ long long simplecpp::characterLiteralToLL(const std::string& str)
28972897 if (((c >> 6 ) != 2 ) // ensure c has form 0xb10xxxxxx
28982898 || (!value && additional_bytes == 1 && c < 0xa0 ) // overlong 3-bytes encoding
28992899 || (!value && additional_bytes == 2 && c < 0x90 )) // overlong 4-bytes encoding
2900- throw std::runtime_error (" assumed UTF-8 encoded source, but sequence is invalid" );
2900+ throw std::runtime_error (" assumed UTF-8 encoded source, but sequence is invalid" ); // TODO: make unique
29012901
29022902 value = (value << 6 ) | (c & ((1 << 7 ) - 1 ));
29032903 }
29042904
29052905 if (value >= 0xd800 && value <= 0xdfff )
2906- throw std::runtime_error (" assumed UTF-8 encoded source, but sequence is invalid" );
2906+ throw std::runtime_error (" assumed UTF-8 encoded source, but sequence is invalid" ); // TODO: make unique
29072907
29082908 if ((utf8 && value > 0x7f ) || (utf16 && value > 0xffff ) || value > 0x10ffff )
2909- throw std::runtime_error (" code point too large" );
2909+ throw std::runtime_error (" code point too large" ); // TODO: make unique
29102910 }
29112911 }
29122912
0 commit comments