[clang] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p2 requirements (PR #101853)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 5 02:56:21 PDT 2024
================
@@ -3585,8 +3585,9 @@ class Sema final : public SemaBase {
/// \param OldT The portion of the type of the old declaration to check.
bool canFullyTypeCheckRedeclaration(ValueDecl *NewD, ValueDecl *OldD,
QualType NewT, QualType OldT);
- void CheckMain(FunctionDecl *FD, const DeclSpec &D);
+ void CheckMain(FunctionDecl *FD, DeclContext *DC, const DeclSpec &D);
----------------
Sirraide wrote:
You can get the decl context from the function decl, so I don’t think this change is necessary.
https://github.com/llvm/llvm-project/pull/101853
More information about the cfe-commits
mailing list