r344891 - [OpenCL] Fix definitions of __builtin_(add|sub|mul)_overflow
Marco Antognini via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 22 03:41:07 PDT 2018
Author: mantognini
Date: Mon Oct 22 03:41:07 2018
New Revision: 344891
URL: http://llvm.org/viewvc/llvm-project?rev=344891&view=rev
Log:
[OpenCL] Fix definitions of __builtin_(add|sub|mul)_overflow
Ensure __builtin_(add|sub|mul)_overflow return bool instead of void as per
specification (LanguageExtensions).
Differential Revision: https://reviews.llvm.org/D52875
Modified:
cfe/trunk/include/clang/Basic/Builtins.def
Modified: cfe/trunk/include/clang/Basic/Builtins.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Builtins.def?rev=344891&r1=344890&r2=344891&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Builtins.def (original)
+++ cfe/trunk/include/clang/Basic/Builtins.def Mon Oct 22 03:41:07 2018
@@ -1398,9 +1398,9 @@ BUILTIN(__builtin_subcl, "ULiULiCULiCULi
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")
More information about the cfe-commits
mailing list