aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-01-12 01:47:40 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-01-12 01:47:40 +0000
commit7a525acb2ba57ea03cfc8f843bfb2e5f81caf65f (patch)
tree8239e23ed20fef861c434e75c8eefd8f008bee76 /lib/Sema/SemaOverload.cpp
parentca2ab45341c448284cf93770018c717810575f86 (diff)
Fix a regression from 171193: main cannot be overloaded.
Thanks Eli Friedman for noticing it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp5
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;
}