]> granicus.if.org Git - clang/commit
Always treat 'main' as an extern "C" function, so that we detect
authorDouglas Gregor <dgregor@apple.com>
Thu, 21 Oct 2010 16:57:46 +0000 (16:57 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 21 Oct 2010 16:57:46 +0000 (16:57 +0000)
commit0bab54cf82cd679152197c7a2eb938f8aa9f07dd
tree4e334ad9bd43920c29d7d58b7c1697d1ac412d89
parent9ee5ee84f0ad8246bff105786a128c7a909fdf12
Always treat 'main' as an extern "C" function, so that we detect
redeclarations of main appropriately rather than allowing it to be
overloaded. Also, disallowing declaring main as a template.

Fixes GCC DejaGNU g++.old-deja/g++.other/main1.C.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117029 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/AST/Decl.cpp
lib/Sema/SemaDecl.cpp
test/CXX/basic/basic.start/basic.start.main/p2h.cpp [new file with mode: 0644]