[cfe-commits] r76934 - in /cfe/trunk/lib/Sema: Sema.h SemaDecl.cpp
John McCall
rjmccall at apple.com
Thu Jul 23 20:03:29 PDT 2009
Author: rjmccall
Date: Thu Jul 23 22:03:21 2009
New Revision: 76934
URL: http://llvm.org/viewvc/llvm-project?rev=76934&view=rev
Log:
Test commit: make a little stub routine for semantic checking of main().
Modified:
cfe/trunk/lib/Sema/Sema.h
cfe/trunk/lib/Sema/SemaDecl.cpp
Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=76934&r1=76933&r2=76934&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Thu Jul 23 22:03:21 2009
@@ -455,6 +455,7 @@
void CheckFunctionDeclaration(FunctionDecl *NewFD, NamedDecl *&PrevDecl,
bool &Redeclaration,
bool &OverloadableAttrRequired);
+ void CheckMain(FunctionDecl *FD);
virtual DeclPtrTy ActOnParamDeclarator(Scope *S, Declarator &D);
virtual void ActOnParamDefaultArgument(DeclPtrTy param,
SourceLocation EqualLoc,
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=76934&r1=76933&r2=76934&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Thu Jul 23 22:03:21 2009
@@ -2635,6 +2635,8 @@
return NewFD->setInvalidDecl();
}
+ if (NewFD->isMain()) CheckMain(NewFD);
+
// Semantic checking for this function declaration (in isolation).
if (getLangOptions().CPlusPlus) {
// C++-specific checks.
@@ -2764,6 +2766,10 @@
CheckCXXDefaultArguments(NewFD);
}
+void Sema::CheckMain(FunctionDecl* FD) {
+ // FIXME: implement.
+}
+
bool Sema::CheckForConstantInitializer(Expr *Init, QualType DclT) {
// FIXME: Need strict checking. In C89, we need to check for
// any assignment, increment, decrement, function-calls, or
More information about the cfe-commits
mailing list