[cfe-commits] r67981 - in /cfe/trunk: include/clang/Parse/Action.h lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaExprObjC.cpp

Chris Lattner sabre at nondot.org
Sat Mar 28 22:01:12 PDT 2009


Author: lattner
Date: Sun Mar 29 00:01:10 2009
New Revision: 67981

URL: http://llvm.org/viewvc/llvm-project?rev=67981&view=rev
Log:
various cleanups

Modified:
    cfe/trunk/include/clang/Parse/Action.h
    cfe/trunk/lib/Sema/SemaDeclCXX.cpp
    cfe/trunk/lib/Sema/SemaExprObjC.cpp

Modified: cfe/trunk/include/clang/Parse/Action.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Action.h?rev=67981&r1=67980&r2=67981&view=diff

==============================================================================
--- cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/trunk/include/clang/Parse/Action.h Sun Mar 29 00:01:10 2009
@@ -1025,7 +1025,7 @@
                                         bool Virtual, AccessSpecifier Access,
                                         TypeTy *basetype, 
                                         SourceLocation BaseLoc) {
-    return 0;
+    return BaseResult();
   }
 
   virtual void ActOnBaseSpecifiers(DeclPtrTy ClassDecl, BaseTy **Bases, 
@@ -1440,7 +1440,7 @@
     SourceLocation selectorLoc,
     SourceLocation rbrac, 
     ExprTy **ArgExprs, unsigned NumArgs) {
-    return 0;
+    return ExprResult();
   }
   // ActOnInstanceMessage - used for both unary and keyword messages.
   // ArgExprs is optional - if it is present, the number of expressions
@@ -1449,7 +1449,7 @@
     ExprTy *receiver, Selector Sel,
     SourceLocation lbrac, SourceLocation selectorLoc, SourceLocation rbrac, 
     ExprTy **ArgExprs, unsigned NumArgs) {
-    return 0;
+    return ExprResult();
   }
   virtual DeclPtrTy ActOnForwardClassDeclaration(
     SourceLocation AtClassLoc,
@@ -1479,7 +1479,7 @@
   virtual ExprResult ParseObjCStringLiteral(SourceLocation *AtLocs, 
                                             ExprTy **Strings,
                                             unsigned NumStrings) {
-    return 0;
+    return ExprResult();
   }
 
   virtual ExprResult ParseObjCEncodeExpression(SourceLocation AtLoc,
@@ -1487,7 +1487,7 @@
                                                SourceLocation LParenLoc,
                                                TypeTy *Ty,
                                                SourceLocation RParenLoc) {
-    return 0;
+    return ExprResult();
   }
   
   virtual ExprResult ParseObjCSelectorExpression(Selector Sel,
@@ -1495,7 +1495,7 @@
                                                  SourceLocation SelLoc,
                                                  SourceLocation LParenLoc,
                                                  SourceLocation RParenLoc) {
-    return 0;
+    return ExprResult();
   }
   
   virtual ExprResult ParseObjCProtocolExpression(IdentifierInfo *ProtocolId,
@@ -1503,7 +1503,7 @@
                                                  SourceLocation ProtoLoc,
                                                  SourceLocation LParenLoc,
                                                  SourceLocation RParenLoc) {
-    return 0;
+    return ExprResult();
   } 
 
   //===---------------------------- Pragmas -------------------------------===//

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=67981&r1=67980&r2=67981&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Sun Mar 29 00:01:10 2009
@@ -760,8 +760,7 @@
     for (CXXRecordDecl::base_class_const_iterator Base = RD->bases_begin(),
          BaseEnd = RD->bases_end(); Base != BaseEnd; ++Base) {
       if (const RecordType *RT = Base->getType()->getAsRecordType()) {
-        const CXXRecordDecl *BaseDecl
-          = cast<CXXRecordDecl>(RT->getDecl());
+        const CXXRecordDecl *BaseDecl = cast<CXXRecordDecl>(RT->getDecl());
         if (BaseDecl && BaseDecl->isAbstract())
           Collect(BaseDecl, Methods);
       }

Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=67981&r1=67980&r2=67981&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Sun Mar 29 00:01:10 2009
@@ -410,8 +410,10 @@
     if (TypedefDecl *OCTD = dyn_cast_or_null<TypedefDecl>(IDecl)) {
       const ObjCInterfaceType *OCIT;
       OCIT = OCTD->getUnderlyingType()->getAsObjCInterfaceType();
-      if (!OCIT)
-        return Diag(receiverLoc, diag::err_invalid_receiver_to_message);
+      if (!OCIT) {
+        Diag(receiverLoc, diag::err_invalid_receiver_to_message);
+        return true;
+      }
       ClassDecl = OCIT->getDecl();
     }
   }





More information about the cfe-commits mailing list