================
@@ -12210,7 +12215,22 @@ bool Sema::CheckFunctionDeclaration(Scope *S,
FunctionDecl *NewFD,
return Redeclaration;
}
-void Sema::CheckMain(FunctionDecl* FD, const DeclSpec& DS) {
+void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {
+ // [basic.start.main]p3
+ // The main function shall not be declared with a linkage-specification.
+ if ((FD->isExternCContext() || FD->isExternCXXContext())) {
----------------
Sirraide wrote:
```suggestion
if (FD->isExternCContext() || FD->isExternCXXContext()) {
```
https://github.com/llvm/llvm-project/pull/101853
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits