]> granicus.if.org Git - clang/commitdiff
various cleanups
authorChris Lattner <sabre@nondot.org>
Sun, 29 Mar 2009 05:01:10 +0000 (05:01 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 29 Mar 2009 05:01:10 +0000 (05:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67981 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Parse/Action.h
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExprObjC.cpp

index f2f81e18d55159e4b4cdc0d5e1e7188308a183b9..b7bb8d0afd3925c6d5b0cfe883fdc8d77b0e5581 100644 (file)
@@ -1025,7 +1025,7 @@ public:
                                         bool Virtual, AccessSpecifier Access,
                                         TypeTy *basetype, 
                                         SourceLocation BaseLoc) {
-    return 0;
+    return BaseResult();
   }
 
   virtual void ActOnBaseSpecifiers(DeclPtrTy ClassDecl, BaseTy **Bases, 
@@ -1440,7 +1440,7 @@ public:
     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 @@ public:
     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 @@ public:
   virtual ExprResult ParseObjCStringLiteral(SourceLocation *AtLocs, 
                                             ExprTy **Strings,
                                             unsigned NumStrings) {
-    return 0;
+    return ExprResult();
   }
 
   virtual ExprResult ParseObjCEncodeExpression(SourceLocation AtLoc,
@@ -1487,7 +1487,7 @@ public:
                                                SourceLocation LParenLoc,
                                                TypeTy *Ty,
                                                SourceLocation RParenLoc) {
-    return 0;
+    return ExprResult();
   }
   
   virtual ExprResult ParseObjCSelectorExpression(Selector Sel,
@@ -1495,7 +1495,7 @@ public:
                                                  SourceLocation SelLoc,
                                                  SourceLocation LParenLoc,
                                                  SourceLocation RParenLoc) {
-    return 0;
+    return ExprResult();
   }
   
   virtual ExprResult ParseObjCProtocolExpression(IdentifierInfo *ProtocolId,
@@ -1503,7 +1503,7 @@ public:
                                                  SourceLocation ProtoLoc,
                                                  SourceLocation LParenLoc,
                                                  SourceLocation RParenLoc) {
-    return 0;
+    return ExprResult();
   } 
 
   //===---------------------------- Pragmas -------------------------------===//
index 22e773a7c1d74b35072ce76ed8110e3064a2725a..2042cd3c87809e735e1b05862f96929fc3de1d0e 100644 (file)
@@ -760,8 +760,7 @@ namespace {
     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);
       }
index ce9fe8971932daff3dffc201efa74f7a67c6b87c..bd94f007bad4d8706be69f8aa43c8dd0b235f64f 100644 (file)
@@ -410,8 +410,10 @@ Sema::ExprResult Sema::ActOnClassMessage(
     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();
     }
   }