diff options
Diffstat (limited to 'lib/Sema/SemaAttr.cpp')
-rw-r--r-- | lib/Sema/SemaAttr.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp index bad9e7024267..c6e3cc886316 100644 --- a/lib/Sema/SemaAttr.cpp +++ b/lib/Sema/SemaAttr.cpp @@ -215,6 +215,7 @@ void Sema::PragmaStack<ValueType>::Act(SourceLocation PragmaLocation, ValueType Value) { if (Action == PSK_Reset) { CurrentValue = DefaultValue; + CurrentPragmaLocation = PragmaLocation; return; } if (Action & PSK_Push) @@ -447,16 +448,16 @@ void Sema::ActOnPragmaVisibility(const IdentifierInfo* VisType, } } -void Sema::ActOnPragmaFPContract(tok::OnOffSwitch OOS) { - switch (OOS) { - case tok::OOS_ON: - FPFeatures.fp_contract = 1; +void Sema::ActOnPragmaFPContract(LangOptions::FPContractModeKind FPC) { + switch (FPC) { + case LangOptions::FPC_On: + FPFeatures.setAllowFPContractWithinStatement(); break; - case tok::OOS_OFF: - FPFeatures.fp_contract = 0; + case LangOptions::FPC_Fast: + FPFeatures.setAllowFPContractAcrossStatement(); break; - case tok::OOS_DEFAULT: - FPFeatures.fp_contract = getLangOpts().DefaultFPContract; + case LangOptions::FPC_Off: + FPFeatures.setDisallowFPContract(); break; } } |