[clang] [Clang] strengthen checks for 'main' function to meet [basic.start.main] p3 requirements (PR #101853)

via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 6 05:47:24 PDT 2024


================
@@ -7353,6 +7353,14 @@ void emitReadOnlyPlacementAttrWarning(Sema &S, const VarDecl *VD) {
   }
 }
 
+static bool isMainVar(DeclarationName Name, VarDecl *VD) {
----------------
Sirraide wrote:

Nit: maybe a comment on this explaining what it does would be nice. E.g. something like ‘Checks whether VD is declared at global scope or with C language linkage’.

https://github.com/llvm/llvm-project/pull/101853


More information about the cfe-commits mailing list