forked from OSchip/llvm-project
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:
parent
2b013a6c8a
commit
71f0359a9d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue