[PATCH] D141929: Add support for clang-cl's option /fexcess-precision.
Zahira Ammarguellat via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 17 08:21:35 PST 2023
zahiraam updated this revision to Diff 489833.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141929/new/
https://reviews.llvm.org/D141929
Files:
clang/include/clang/Driver/Options.td
clang/test/Driver/cl-options.c
Index: clang/test/Driver/cl-options.c
===================================================================
--- clang/test/Driver/cl-options.c
+++ clang/test/Driver/cl-options.c
@@ -233,6 +233,14 @@
// RUN: %clang_cl /EP /P /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes_E %s
// showIncludes_E-NOT: warning: argument unused during compilation: '--show-includes'
+// Floating point excess precision
+// RUN: %clang_cl /fexcess-precision=fast -### -- %s 2>&1 | FileCheck -check-prefix=f16-prec-fast %s
+// f16-prec-fast: -ffloat16-excess-precision=fast
+// RUN: %clang_cl /fexcess-precision=standard -### -- %s 2>&1 | FileCheck -check-prefix=f16-prec-std %s
+// f16-prec-std: -ffloat16-excess-precision=standard
+// RUN: %clang_cl /fexcess-precision=16 -### -- %s 2>&1 | FileCheck -check-prefix=f16-prec-none %s
+// f16-prec-none: -ffloat16-excess-precision=none
+
// /source-charset: should warn on everything except UTF-8.
// RUN: %clang_cl /source-charset:utf-16 -### -- %s 2>&1 | FileCheck -check-prefix=source-charset-utf-16 %s
// source-charset-utf-16: invalid value 'utf-16' in '/source-charset:utf-16'
Index: clang/include/clang/Driver/Options.td
===================================================================
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -6650,6 +6650,9 @@
def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">,
Alias<funsigned_char>;
+def _SLASH_fexcess_precision_EQ : CLJoined<"fexcess-precision=">,
+ Alias<fexcess_precision_EQ>;
+
// The _SLASH_O option handles all the /O flags, but we also provide separate
// aliased options to provide separate help messages.
def _SLASH_O : CLDXCJoined<"O">,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141929.489833.patch
Type: text/x-patch
Size: 1717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230117/9cb54a83/attachment.bin>
More information about the cfe-commits
mailing list