Done and done.

Attachment: 128-bit-literals.patch
Description: Binary data


On May 3, 2012, at 6:05 PM, Chandler Carruth wrote:

On Thu, May 3, 2012 at 3:02 PM, David Blaikie <[email protected]> wrote:
On Thu, May 3, 2012 at 2:56 PM, Stephen Canon <[email protected]> wrote:
> Clang already supports the microsoft suffixes for integer literals "i128" and "Ui128" with -fms-extensions.  However, these literals are currently truncated to 64 bits with a warning.
>
> This patch adds support for full-width 128-bit integer literals with the ms suffixes.

Could you include some test cases (& verify that the existing cases
(the truncation warnings when the suffix isn't used, for example) are
appropriately tested so that you're not regressing them)?

Also, a style nit in the patch:

+    unsigned maxWidth = Context.getTargetInfo().getIntMaxTWidth();

The LLVM coding conventions suggest 'MaxWidth' for the variable name.

+    // The microsoft literal suffix extensions support 128-bit literals, which
+    // may be wider than [u]intmax_t.
+    if (Literal.isMicrosoftInteger && maxWidth < 128)
+      maxWidth = 128;
+    llvm::APInt ResultVal(maxWidth, 0);


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to