[PATCH] D52875: Fix definitions of __builtin_(add|sub|mul)_overflow
Marco Antognini via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 4 03:43:42 PDT 2018
mantognini created this revision.
mantognini added reviewers: Anastasia, erichkeane.
Herald added subscribers: cfe-commits, kristina.
Ensure __builtin_(add|sub|mul)_overflow return bool instead of void as per specification (LanguageExtensions).
Repository:
rC Clang
https://reviews.llvm.org/D52875
Files:
include/clang/Basic/Builtins.def
Index: include/clang/Basic/Builtins.def
===================================================================
--- include/clang/Basic/Builtins.def
+++ include/clang/Basic/Builtins.def
@@ -1397,9 +1397,9 @@
BUILTIN(__builtin_subcll, "ULLiULLiCULLiCULLiCULLi*", "n")
// Checked Arithmetic Builtins for Security.
-BUILTIN(__builtin_add_overflow, "v.", "nt")
-BUILTIN(__builtin_sub_overflow, "v.", "nt")
-BUILTIN(__builtin_mul_overflow, "v.", "nt")
+BUILTIN(__builtin_add_overflow, "b.", "nt")
+BUILTIN(__builtin_sub_overflow, "b.", "nt")
+BUILTIN(__builtin_mul_overflow, "b.", "nt")
BUILTIN(__builtin_uadd_overflow, "bUiCUiCUi*", "n")
BUILTIN(__builtin_uaddl_overflow, "bULiCULiCULi*", "n")
BUILTIN(__builtin_uaddll_overflow, "bULLiCULLiCULLi*", "n")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52875.168257.patch
Type: text/x-patch
Size: 753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181004/29cbe9cd/attachment.bin>
More information about the cfe-commits
mailing list