diff options
Diffstat (limited to 'lib/Sema/SemaAttr.cpp')
-rw-r--r-- | lib/Sema/SemaAttr.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp index 992eac9019..34744cbdd9 100644 --- a/lib/Sema/SemaAttr.cpp +++ b/lib/Sema/SemaAttr.cpp @@ -450,13 +450,16 @@ void Sema::ActOnPragmaVisibility(const IdentifierInfo* VisType, void Sema::ActOnPragmaFPContract(tok::OnOffSwitch OOS) { switch (OOS) { case tok::OOS_ON: - FPFeatures.setFPContractable(true); + FPFeatures.setAllowFPContractWithinStatement(); break; case tok::OOS_OFF: - FPFeatures.setFPContractable(false); + FPFeatures.setDisallowFPContract(); break; case tok::OOS_DEFAULT: - FPFeatures.setFPContractable(getLangOpts().DefaultFPContract); + if (getLangOpts().getDefaultFPContractMode() == LangOptions::FPC_On) + FPFeatures.setAllowFPContractWithinStatement(); + else + FPFeatures.setDisallowFPContract(); break; } } |