Skip to content
  1. Sep 26, 2008
  2. Sep 25, 2008
  3. Sep 23, 2008
    • Daniel Dunbar's avatar
      Implement type checking of Objective-C property attributes. · e8a06e61
      Daniel Dunbar authored
       - readonly and readwrite are mutually exclusive.
       - assign, copy, and retain are mutually exclusive.
       - copy and retain are invalid on non-object types.
       - Warn about using default 'assign' property on object types
         (attempting to follow gcc behavior).
      
      llvm-svn: 56507
      e8a06e61
  4. Sep 22, 2008
  5. Sep 18, 2008
  6. Sep 17, 2008
  7. Sep 12, 2008
    • Daniel Dunbar's avatar
      Add --suppress-system-warnings (on by default, use =0 to disable) · 84b70f7f
      Daniel Dunbar authored
       - For investigating warnings in system headers / builtins.
       - Currently also enables the behavior that allows silent redefinition
         of types in system headers. Conceptually these are separate but I
         didn't feel it was worth two options (or changing LangOptions).
      
      llvm-svn: 56163
      84b70f7f
    • Douglas Gregor's avatar
      Give string literals const element typesin C++, and cope with the deprecated... · aa1e21dc
      Douglas Gregor authored
      Give string literals const element typesin C++, and cope with the deprecated C++ conversion from a string literal to a pointer-to-non-const-character
      
      llvm-svn: 56137
      aa1e21dc
    • Daniel Dunbar's avatar
      Iterate on sema for :? in Objective-C: · 484603be
      Daniel Dunbar authored
       - Follow C99 behavior of using other operand type when one of
         operands is a null pointer constant.
       - Fix overenthusiastic devolving of any Objective-C types to id:
         o If either operand has an Objective-C object type then:
           - If both operands are interfaces and either operand can be
             assigned to the other, use that type as the composite type.
           - Otherwise, if either type is id, use id as the composite type.
           - Otherwise, warn about incompatible types and use id as the
             composite type.
       - Return handling of qualified idea to separate test following
         general pointer type checking.
         o Upgraded from old code to allow devolving to id (without warning,
           which matches GCC).
       - <rdar://problem/6212771>
      
      Add test case for issues fixed above, XFAIL though because it exposed
      a new issue in property handling.
      
      llvm-svn: 56135
      484603be
  8. Sep 11, 2008
  9. Sep 10, 2008
  10. Sep 09, 2008
  11. Sep 08, 2008
  12. Sep 07, 2008
  13. Sep 06, 2008
  14. Sep 05, 2008
    • Ted Kremenek's avatar
      Add comment back that Argiris pointed out that I mistakenly removed (the... · 6ddf53e4
      Ted Kremenek authored
      Add comment back that Argiris pointed out that I mistakenly removed (the comments below it were stale, so I accidently removed the whole thing).
      
      llvm-svn: 55841
      6ddf53e4
    • Ted Kremenek's avatar
      Change struct forward declarations and definitions to use unique RecordDecls,... · 21475702
      Ted Kremenek authored
      Change struct forward declarations and definitions to use unique RecordDecls, as opposed to creating a single RecordDecl and reusing it.
      
      This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet).
      
      The motivation of this patch is as follows:
      - Capture more source information, necessary for refactoring/rewriting clients.
      
      - Pave the way to resolve ownership issues with RecordDecls with the forthcoming
        addition of DeclGroups.
      
      Current caveats:
      - Until DeclGroups are in place, we will leak RecordDecls not explicitly
        referenced by the AST.  For example:
      
          typedef struct { ... } x;  
      
        The RecordDecl for the struct will be leaked because the TypedefDecl doesn't
        refer to it.  This will be solved with DeclGroups.
        
      - This patch also (temporarily) breaks CodeGen.  More below.
      
      High-level changes:
      - As before, TagType still refers to a TagDecl, but it doesn't own it.  When
        a struct/union/class is first referenced, a RecordType and RecordDecl are
        created for it, and the RecordType refers to that RecordDecl.  Later, if
        a new RecordDecl is created, the pointer to a RecordDecl in RecordType is
        updated to point to the RecordDecl that defines the struct/union/class.
      
      - TagDecl and RecordDecl now how a method 'getDefinition()' to return the
        TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular
        enum/struct/class/union. This is useful from going from a RecordDecl* that
        defines a forward declaration to the RecordDecl* that provides the actual
        definition. Note that this also works for EnumDecls, except that in this case
        there is no distinction between forward declarations and definitions (yet).
      
      - Clients should no longer assume that 'isDefinition()' returns true from a
        RecordDecl if the corresponding struct/union/class has been defined.
        isDefinition() only returns true if a particular RecordDecl is the defining
        Decl. Use 'getDefinition()' instead to determine if a struct has been defined.
      
      - The main changes to Sema happen in ActOnTag. To make the changes more
        incremental, I split off the processing of enums and structs et al into two
        code paths. Enums use the original code path (which is in ActOnTag) and
        structs use the ActOnTagStruct. Eventually the two code paths will be merged,
        but the idea was to preserve the original logic both for comparison and not to
        change the logic for both enums and structs all at once.
      
      - There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls
        that correspond to the same type simply have a pointer to that type. If we
        need to figure out what are all the RecordDecls for a given type we can build
        a backmap.
      
      - The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the
        changes to RecordDecl. For some reason 'svn' marks the entire file as changed.
      
      Why is CodeGen broken:
      - Codegen assumes that there is an equivalence between RecordDecl* and
        RecordType*. This was true before because we only created one RecordDecl* for
        a given RecordType*, but it is no longer true. I believe this shouldn't be too
        hard to change, but the patch was big enough as it is.
        
      I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C).  
      
      llvm-svn: 55839
      21475702
    • Ted Kremenek's avatar
      Remove stale comments. · cb363253
      Ted Kremenek authored
      llvm-svn: 55822
      cb363253
    • Ted Kremenek's avatar
      Remove "NextDecl" from RecordDecl. This change touches many files that where... · 47923c7e
      Ted Kremenek authored
      Remove "NextDecl" from RecordDecl.  This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration.
      
      The motivation behind this change is that chaining the RecordDecls is simply unnecessary.  Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType.
      
      llvm-svn: 55821
      47923c7e
  15. Sep 04, 2008
Loading