aaron.ballman added inline comments.
================ Comment at: clang/lib/Sema/SemaDecl.cpp:9835-9839 + if (D.isFunctionDefinition()) { + NewFD->setWillHaveBody(); + ProcessDeclAttributes(S, NewFD, D); + NewFD->setWillHaveBody(false); + } else ---------------- This seems like a hack to work around what feels like a bug -- if the declarator knows the function is a definition, then why does the `FunctionDecl` AST node claim the function won't have a body? It seems strange to me that we don't set that bit when acting on the function declarator but instead wait until we're acting on the start of the function definition to set it; does anything break if you start setting that flag earlier? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128256/new/ https://reviews.llvm.org/D128256 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits