Test commit: make a little stub routine for semantic checking of main().
authorJohn McCall <rjmccall@apple.com>
Fri, 24 Jul 2009 03:03:21 +0000 (03:03 +0000)
committerJohn McCall <rjmccall@apple.com>
Fri, 24 Jul 2009 03:03:21 +0000 (03:03 +0000)
llvm-svn: 76934

clang/lib/Sema/Sema.h
clang/lib/Sema/SemaDecl.cpp

index 5f50438445433efec9c0accc124445133a5f8282..3f14c49ed4bbb18be02e541c057a2fede568c512 100644 (file)
@@ -455,6 +455,7 @@ public:
   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,
index 617943fd9fdfba44cba6acbee50c0aa4c4f37906..454896584f291a0d3f180bf33161971b9d016ba3 100644 (file)
@@ -2635,6 +2635,8 @@ void Sema::CheckFunctionDeclaration(FunctionDecl *NewFD, NamedDecl *&PrevDecl,
     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 @@ void Sema::CheckFunctionDeclaration(FunctionDecl *NewFD, NamedDecl *&PrevDecl,
     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