================
@@ -1117,6 +1118,31 @@ NumericLiteralParser::NumericLiteralParser(StringRef 
TokSpelling,
       if (isImaginary) break;   // Cannot be repeated.
       isImaginary = true;
       continue;  // Success.
+    case '_':
+      if (isFPConstant)
+        break; // Invalid for floats
+      if (HasSize)
+        break;
+      if (DoubleUnderscore)
+        break; // Cannot be repeated.
----------------
Sirraide wrote:

This is presumably because there currently is only one suffix that uses the 
`DoubleUnderscore` flag, so the other flags that also get set when `__wb` is 
parsed (e.g. `HasSize`) would be enough to disallow repetition here, from what 
I can tell. I’d still keep `DoubleUnderscore` in case we decide to add more 
literal suffixes that contain double underscores.

https://github.com/llvm/llvm-project/pull/86586
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to