Skip to content
  1. Sep 03, 2008
    • Steve Naroff's avatar
      Add semantic analysis for "blocks". · c540d669
      Steve Naroff authored
      Highlights...
      
      - 4 new AST nodes, BlockExpr, BlockStmtExpr, BlockExprExpr, BlockDeclRefExpr.
      - Sema::ActOnBlockStart(), ActOnBlockError(), ActOnBlockStmtExpr(), ActOnBlockExprExpr(), ActOnBlockReturnStmt().
      
      Next steps...
      
      - hack Sema::ActOnIdentifierExpr() to deal with block decl refs.
      - add attribute handler for byref decls.
      - add test cases.
      
      llvm-svn: 55710
      c540d669
    • Daniel Dunbar's avatar
      Improve type-checking of ?: for Objective-C types. · de1ec9cd
      Daniel Dunbar authored
       - Allow any Objective-C object types to devolve to type id in a ?:
         expression. This matches gcc behavior more closely.
      
      llvm-svn: 55705
      de1ec9cd
    • Daniel Dunbar's avatar
      Restore Objective-C dot-syntax access of methods. · ef89086c
      Daniel Dunbar authored
       - Now also searches for correct setter method.
       - There are still some issues regarding validation of the setter
         method and access of read-only properties.
      
      llvm-svn: 55686
      ef89086c
  2. Sep 02, 2008
  3. Aug 30, 2008
    • Daniel Dunbar's avatar
      Add Objective-C property setter support. · 4b8c6db9
      Daniel Dunbar authored
       - Change Obj-C runtime message API, drop the ObjCMessageExpr arg in
         favor of just result type and selector. Necessary so it can be
         reused in situations where we don't want to cons up an
         ObjCMessageExpr.
       - Update aggregate binary assignment to know about special property
         ref lvalues.
       - Add CodeGenFunction::EmitCallArg overload which takes an already
         emitted rvalue.
      
      Add CodeGenFunction::StoreComplexIntoAddr.
      
      Disabled logic in Sema for parsing Objective-C dot-syntax that
      accesses methods. This code does not search in the correct order and
      the AST node has no way of properly representing its results.
      
      Updated StmtDumper to print a bit more information about
      ObjCPropertyRefExprs.
      
      llvm-svn: 55561
      4b8c6db9
  4. Aug 26, 2008
    • Daniel Dunbar's avatar
      In incompatible pointer-typed ?: expressions, add implicit conversion · 40bf7fe2
      Daniel Dunbar authored
      of RHSs to id type instead of void* if either has Objective-C object
      type.
       - This ensures the result can still be used in normal places an
         object can be used, like a message send.
      
      Add implicit conversions for ?: applied to qualified id types to
      ensure that the RHSs are compatible. 
       - This prevents a codegen crash (creating invalid PHI nodes).
       - Again, this relates to the fact that qualified id types have no
         canonical types.
       - Note that the implicit type casted to is incorrect, however this
         doesn't currently cause problems because of the flexibility of the
         id type.
      
      Test cases for above.
      
      llvm-svn: 55346
      40bf7fe2
  5. Aug 22, 2008
    • Eli Friedman's avatar
      Rewrite type compatibility testing to do type merging rather than just · 47f7711e
      Eli Friedman authored
      testing compatibility.  This is necessary for some constructs, like merging
      redeclarations.
      
      Also, there are some ObjC changes to make sure that 
      typesAreCompatible(a,b) == typesAreCompatible(b,a).  I don't have any 
      ObjC code beyond the testsuite, so please tell me if there are any cases 
      where this doesn't behave as expected.
      
      llvm-svn: 55158
      47f7711e
  6. Aug 21, 2008
  7. Aug 20, 2008
    • Daniel Dunbar's avatar
      Fix subtle bug introduced in r54852. · 94834d88
      Daniel Dunbar authored
       - UsualUnaryConversions takes an Expr *& and may modify its argument,
         this broke when it was refactored into Sema::CheckCastTypes. This
         meant that we were missing implicit casts in some places.
       - Seems pretty sad that this got through our tests.
      
      llvm-svn: 55039
      94834d88
  8. Aug 19, 2008
  9. Aug 16, 2008
  10. Aug 15, 2008
    • Daniel Dunbar's avatar
      Change Parser & Sema to use interned "super" for comparions. · 12c9ddce
      Daniel Dunbar authored
       - Added as private members for each because it is not clear where to
         put the common definition. Perhaps the IdentifierInfos all of these
         "pseudo-keywords" should be collected into one place (this would
         KnownFunctionIDs and Objective-C property IDs, for example).
      
      Remove Token::isNamedIdentifier.
       - There isn't a good reason to use strcmp when we have interned
         strings, and there isn't a good reason to encourage clients to do
         so.
      
      llvm-svn: 54794
      12c9ddce
  11. Aug 14, 2008
  12. Aug 11, 2008
    • Daniel Dunbar's avatar
      More #include cleaning · 56fdb6ae
      Daniel Dunbar authored
       - Kill unnecessary #includes in .cpp files. This is an automatic
         sweep so some things removed are actually used, but happen to be
         included by a previous header. I tried to get rid of the obvious
         examples and this was the easiest way to trim the #includes in one
         fell swoop.
       - We now return to regularly scheduled development.
      
      llvm-svn: 54632
      56fdb6ae
    • Daniel Dunbar's avatar
      More #include cleaning · 6e8aa537
      Daniel Dunbar authored
       - Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h
       - Moved Sema::getCurMethodDecl() out of line (dependent on
         ObjCMethodDecl via dyn_cast).
      
      llvm-svn: 54629
      6e8aa537
    • Daniel Dunbar's avatar
      More #include cleaning · c74b5cc2
      Daniel Dunbar authored
       - Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into
         implementation .cpp
      
      llvm-svn: 54626
      c74b5cc2
  13. Aug 10, 2008
  14. Aug 09, 2008
  15. Aug 04, 2008
    • Daniel Dunbar's avatar
      Fix several issues in checking of address-of expressions. · b692ef40
      Daniel Dunbar authored
       - clang was erroneously accepting address-of applied to lvalue
         expressions involving pointer arithmetic.
       - clang was erroneously rejecting address-of applied to deref
         expressions of pointer-typed variables.
       - Improved existing test case.
       - Fixes: <rdar://problem/6113867>, <rdar://problem/6080158>
      
      llvm-svn: 54326
      b692ef40
    • Daniel Dunbar's avatar
      Add CodeGen support for indirect goto. · 88402ce8
      Daniel Dunbar authored
       - Follows emission scheme used by llvm-gcc, i.e. invent an id for
         each label whose address is taken and replace each indirect goto by
         a switch to each possible target.
       - Currently we emit a switch for each indirect goto instead of
         merging them as llvm-gcc does.
      
      llvm-svn: 54318
      88402ce8
    • Chris Lattner's avatar
      · 7adf0760
      Chris Lattner authored
      Finally fix PR2189.  This makes a fairly invasive but important change to
      move getAsArrayType into ASTContext instead of being a method on type.
      This is required because getAsArrayType(const AT), where AT is a typedef
      for "int[10]" needs to return ArrayType(const int, 10).
      
      Fixing this greatly simplifies getArrayDecayedType, which is a good sign.
      
      llvm-svn: 54317
      7adf0760
  16. Jul 27, 2008
  17. Jul 26, 2008
  18. Jul 25, 2008
  19. Jul 21, 2008
Loading