[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

Mike Rice via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 7 16:11:03 PDT 2024


================
@@ -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.
----------------
mikerice1969 wrote:

Hi @js324. our static verifier is reporting this 'break' as dead code saying that it will always be false. I removed all references to DoubleUnderscore and ran the lit tests and there are no fails. Do you have a test case in mind that exercises this condition? If so we should add a test for it. If not we can simplify this code and remove DoubleUnderscore. What do you think?

https://github.com/llvm/llvm-project/pull/86586


More information about the cfe-commits mailing list