[PATCH] D89849: Add option 'exceptions' to pragma clang fp

Serge Pavlov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 21 06:20:14 PDT 2020


sepavloff added inline comments.


================
Comment at: clang/docs/LanguageExtensions.rst:3223
+    // Preserve floating point exceptions
+    #pragma fp exceptions(strict)
+    z = x + y;
----------------
mibintc wrote:
> do you mean pragma clang fp ... 
Sure. Thank you!


================
Comment at: clang/lib/Parse/ParsePragma.cpp:3041
+  if (AnnotValue->ExceptionsValue)
+    Actions.setExceptionMode(Tok.getLocation(), *AnnotValue->ExceptionsValue);
   ConsumeAnnotationToken();
----------------
mibintc wrote:
> Did you consider adding ActOnPragmaFPExceptions? 
The existing method `setExceptionMode` does everything that we need. Do you think it should be renamed to `ActOnPragmaFPExceptions`? Are there any advantages for this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89849



More information about the cfe-commits mailing list