// prototype declaration. This warning is issued even if the
// definition itself provides a prototype. The aim is to detect
// global functions that fail to be declared in header files.
- if (!FD->isInvalidDecl() && FD->isGlobal() && !isa<CXXMethodDecl>(FD)) {
+ if (!FD->isInvalidDecl() && FD->isGlobal() && !isa<CXXMethodDecl>(FD) &&
+ !FD->isMain()) {
bool MissingPrototype = true;
for (const FunctionDecl *Prev = FD->getPreviousDeclaration();
Prev; Prev = Prev->getPreviousDeclaration()) {
int f2();
int f2(int x) { return x; }
+
+int main(void) { return 0; }