Skip to content

Instantly share code, notes, and snippets.

@jgouly
Created May 23, 2014 21:30
Show Gist options
  • Save jgouly/c12a87c945e42a09406c to your computer and use it in GitHub Desktop.
Save jgouly/c12a87c945e42a09406c to your computer and use it in GitHub Desktop.
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index d7b5ba4..43e7214 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -9537,6 +9537,10 @@ static bool ShouldWarnAboutMissingPrototype(const Functio
if (FD->isMain())
return false;
+ if (IdentifierInfo *II = FD->getIdentifier())
+ if (II->isStr("main"))
+ return false;
+
// Don't warn about inline functions.
if (FD->isInlined())
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment