3 Commits

Author SHA1 Message Date
antoine moynault
5fdb70be7b
[clang] fix test PR69717.cpp (#72134)
Test still fail on ARM machine (no float_control support)
2023-11-13 18:39:25 +01:00
Serge Pavlov
93ae263315 [clang] Run test on x86 only
The test Sema/PR69717.cpp fails on platforms that do not support
pragma float_control. So run this test on x86 only.
2023-11-13 19:20:34 +07:00
Serge Pavlov
f6f625f4c6
[clang] Do not clear FP pragma stack when instantiating functions (#70646)
When instantiation function, a call to Sema::resetFPOption was used to
set the FP options associated with AST node. However this function also
cleared FP pragma stack, and it is incorrect. Template instantiation
takes place on AST representation and semantic information like the FP
pragma stack should not affect it. This was a reason for miscompilation
in some cases.

To make the Sema interface more consistent, now `resetFPOptions` does
not clear FP pragma stack anymore. It is cleared in
`FpPragmaStackSaveRAII`, which is used in parsing only.

This change must fix https://github.com/llvm/llvm-project/issues/69717
(Problems with float_control pragma stack in Clang 17.x).
2023-11-13 17:24:46 +07:00