Author: Aaron Ballman Date: 2021-07-28T13:29:41-04:00 New Revision: 71f0359a9defbf3e35828189629f166508390d5d
URL: https://github.com/llvm/llvm-project/commit/71f0359a9defbf3e35828189629f166508390d5d DIFF: https://github.com/llvm/llvm-project/commit/71f0359a9defbf3e35828189629f166508390d5d.diff LOG: Simplify allowing pragma float_control in a linkage specification This amends b0ef3d8f666fa6008abb09340b73d9340d442569 based on a suggestion from James Y Knight. Added: Modified: clang/lib/Sema/SemaAttr.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaAttr.cpp b/clang/lib/Sema/SemaAttr.cpp index b58c092f21e0..c19b44989b5f 100644 --- a/clang/lib/Sema/SemaAttr.cpp +++ b/clang/lib/Sema/SemaAttr.cpp @@ -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); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits