================
@@ -7353,6 +7353,15 @@ void emitReadOnlyPlacementAttrWarning(Sema &S, const
VarDecl *VD) {
}
}
+static bool isMainVar(DeclarationName Name, VarDecl *VD) {
+ if (Name.getAsIdentifierInfo() && Name.getAsIdentifierInfo()->isStr("main")
&&
+ !VD->getDescribedVarTemplate()) {
+ const DeclContext *DC = VD->getDeclContext();
+ return DC->getRedeclContext()->isTranslationUnit() || DC->isLinkageSpec();
----------------
Sirraide wrote:
Just `VD->isExternC()` instead of `VD->getLanguageLinkage() ==
CLanguageLinkage` should be enough.
https://github.com/llvm/llvm-project/pull/101853
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits