[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-10-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 298375. sepavloff added a comment. Remade the patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88498/new/ https://reviews.llvm.org/D88498 Files: clang/include/clang/Basic/LangOptions.h

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-10-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. In D88498#2329845 , @sepavloff wrote: > - Reverted check to the previous version, in which it applied to C++ file > level variables also.

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-10-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 298119. sepavloff added a comment. Updated patch - Reverted check to the previous version, in which it applied to C++ file level variables also. - Added workaround for constexpr functions. Now they are parsed with constant rounding mode, which allows to

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-10-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:2290 + // rounding mode. + if (VD->isFileVarDecl() || VD->isConstexpr() || + (!getLangOpts().CPlusPlus && VD->isStaticLocal())) { mibintc wrote: > sepavloff

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-10-07 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. ping! Comment at: clang/lib/Parse/ParseDecl.cpp:2290 + // rounding mode. + if (VD->isFileVarDecl() || VD->isConstexpr() || + (!getLangOpts().CPlusPlus && VD->isStaticLocal())) { sepavloff wrote: >

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-09-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:2290 + // rounding mode. + if (VD->isFileVarDecl() || VD->isConstexpr() || + (!getLangOpts().CPlusPlus && VD->isStaticLocal())) { sepavloff wrote: > rsmith

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-09-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/test/AST/const-fpfeatures-strict.c:39 + +// CHECK: @var_04 = {{.*}} %struct.S { float 0x3FF02000 } +// CHECK: @var_05 = {{.*}} %struct.S { float 0x3FF02000 } mibintc wrote: > I think the

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-09-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:2290 + // rounding mode. + if (VD->isFileVarDecl() || VD->isConstexpr() || + (!getLangOpts().CPlusPlus && VD->isStaticLocal())) { rsmith wrote: > It's far

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-09-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 295194. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88498/new/ https://reviews.llvm.org/D88498 Files: clang/include/clang/Basic/LangOptions.h

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-09-29 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added inline comments. Comment at: clang/test/AST/const-fpfeatures-strict.c:39 + +// CHECK: @var_04 = {{.*}} %struct.S { float 0x3FF02000 } +// CHECK: @var_05 = {{.*}} %struct.S { float 0x3FF02000 } I think the initializer for var_04 is

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-09-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith requested changes to this revision. rsmith added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Parse/ParseDecl.cpp:2290 + // rounding mode. + if (VD->isFileVarDecl() || VD->isConstexpr() || +

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-09-29 Thread Melanie Blower via Phabricator via cfe-commits
mibintc accepted this revision. mibintc added a comment. This revision is now accepted and ready to land. thanks for this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88498/new/ https://reviews.llvm.org/D88498

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-09-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, mibintc. Herald added a project: clang. sepavloff requested review of this revision. Previously initializers were evaluated using rounding mode currently specified by Sema. If at the same time FP exception behavior was