Thanks Eli Friedman for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172292
91177308-0d34-0410-b5e6-
96231b3b80d8
return true;
if (D.hasCLanguageLinkage())
return false;
+
+ // Main cannot be overloaded (basic.start.main).
+ if (D.isMain())
+ return false;
+
return true;
}
static void g(float);
static void g(int); // expected-error {{static and non-static member functions with the same parameter types cannot be overloaded}}
};
+
+int main() {} // expected-note {{previous definition is here}}
+int main(int,char**) {} // expected-error {{conflicting types for 'main'}}