[PATCH] D88664: [AST] do not error on APFloat invalidOp in default mode

Sanjay Patel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 1 10:47:10 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG686eb0d8ded9: [AST] do not error on APFloat invalidOp in default mode (authored by spatel).
Herald added a project: clang.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88664/new/

https://reviews.llvm.org/D88664

Files:
  clang/lib/AST/ExprConstant.cpp


Index: clang/lib/AST/ExprConstant.cpp
===================================================================
--- clang/lib/AST/ExprConstant.cpp
+++ clang/lib/AST/ExprConstant.cpp
@@ -2439,7 +2439,8 @@
     return false;
   }
 
-  if (St & APFloat::opStatus::opInvalidOp) {
+  if ((St & APFloat::opStatus::opInvalidOp) &&
+      FPO.getFPExceptionMode() != LangOptions::FPE_Ignore) {
     // There is no usefully definable result.
     Info.FFDiag(E);
     return false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88664.295624.patch
Type: text/x-patch
Size: 467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201001/11fee0cd/attachment.bin>


More information about the cfe-commits mailing list