diff options
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index bb38222a65..44ff3a505e 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -935,6 +935,11 @@ static bool canBeOverloaded(const FunctionDecl &D) { return true; if (D.hasCLanguageLinkage()) return false; + + // Main cannot be overloaded (basic.start.main). + if (D.isMain()) + return false; + return true; } |