Simplify allowing pragma float_control in a linkage specification

This amends b0ef3d8f66 based on a suggestion from James Y Knight.
This commit is contained in:
Aaron Ballman 2021-07-28 13:27:55 -04:00
parent 2b013a6c8a
commit 71f0359a9d
1 changed files with 1 additions and 2 deletions

View File

@ -475,8 +475,7 @@ void Sema::ActOnPragmaFloatControl(SourceLocation Loc,
PragmaFloatControlKind Value) {
FPOptionsOverride NewFPFeatures = CurFPFeatureOverrides();
if ((Action == PSK_Push_Set || Action == PSK_Push || Action == PSK_Pop) &&
!(CurContext->isTranslationUnit()) && !CurContext->isNamespace() &&
!isa<LinkageSpecDecl>(CurContext)) {
!CurContext->getRedeclContext()->isFileContext()) {
// Push and pop can only occur at file or namespace scope, or within a
// language linkage declaration.
Diag(Loc, diag::err_pragma_fc_pp_scope);