================
@@ -7353,13 +7353,26 @@ void emitReadOnlyPlacementAttrWarning(Sema &S, const 
VarDecl *VD) {
   }
 }
 
-// Checks if VD is declared at global scope or with C language linkage.
-static bool isMainVar(DeclarationName Name, VarDecl *VD) {
-  return Name.getAsIdentifierInfo() &&
-         Name.getAsIdentifierInfo()->isStr("main") &&
-         !VD->getDescribedVarTemplate() &&
-         (VD->getDeclContext()->getRedeclContext()->isTranslationUnit() ||
-          VD->isExternC());
+enum MainVarClassificationKind {
+  IMV_NotMain,
+  IMV_GlobalMain,
+  IMV_CLinkageMain,
+};
----------------
a-tarasyuk wrote:

@Sirraide Oke, reverted.

https://github.com/llvm/llvm-project/pull/101853
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to