================ @@ -1495,6 +1495,10 @@ Decl *Parser::ParseFunctionDefinition(ParsingDeclarator &D, return Actions.ActOnFinishFunctionBody(Res, nullptr, false); } + // Some function attributes (like OptimizeNoneAttr) affect FP options. + Sema::FPFeaturesStateRAII SaveFPFeatures(Actions); + Actions.applyFunctionAttributesBeforeParsingBody(Res); ---------------- rjmccall wrote:
Hmm. There are actually a lot of paths that call into `ParseFunctionStatementBody` like this. Rather than changing all of them, can we just do this in `ActOnStartOfFunctionDef` / `ActOnFinishFunctionBody`? We do a lot of similar context push/pop operations there already. Please test an inline C++ method (which are delayed and use a different path) and ObjC method parsing (which also use a different path). https://github.com/llvm/llvm-project/pull/85605 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits