Skip to content
  1. Jul 06, 2011
  2. Jul 02, 2011
  3. Jun 29, 2011
  4. Jun 28, 2011
  5. Jun 27, 2011
    • Chandler Carruth's avatar
      Factor out (some of) the checking for invalid forms of pointer · c9332218
      Chandler Carruth authored
      arithmetic into a couple of common routines. Use these to make the
      messages more consistent in the various contexts, especially in terms of
      consistently diagnosing binary operators with invalid types on both the
      left- and right-hand side. Also, improve the grammar and wording of the
      messages some, handling both two pointers and two (different) types.
      
      The wording of function pointer arithmetic diagnostics still strikes me
      as poorly phrased, and I worry this makes them slightly more awkward if
      more consistent. I'm hoping to fix that with a follow-on patch and test
      case that will also make them more helpful when a typedef or template
      type parameter makes the type completely opaque.
      
      Suggestions on better wording are very welcome, thanks to Richard Smith
      for some initial help on that front.
      
      llvm-svn: 133906
      c9332218
  6. Jun 25, 2011
  7. Jun 24, 2011
  8. Jun 22, 2011
  9. Jun 20, 2011
  10. Jun 17, 2011
  11. Jun 16, 2011
  12. Jun 15, 2011
  13. Jun 13, 2011
  14. Jun 11, 2011
    • Douglas Gregor's avatar
      Implement Objective-C Related Result Type semantics. · 33823727
      Douglas Gregor authored
      Related result types apply Cocoa conventions to the type of message
      sends and property accesses to Objective-C methods that are known to
      always return objects whose type is the same as the type of the
      receiving class (or a subclass thereof), such as +alloc and
      -init. This tightens up static type safety for Objective-C, so that we
      now diagnose mistakes like this:
      
      t.m:4:10: warning: incompatible pointer types initializing 'NSSet *'
      with an
            expression of type 'NSArray *' [-Wincompatible-pointer-types]
        NSSet *array = [[NSArray alloc] init];
               ^       ~~~~~~~~~~~~~~~~~~~~~~
      /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:
      note: 
            instance method 'init' is assumed to return an instance of its
            receiver
            type ('NSArray *')
      - (id)init;
      ^
      
      It also means that we get decent type inference when writing code in
      Objective-C++0x:
      
        auto array = [[NSMutableArray alloc] initWithObjects:@"one",  @"two",nil];
        //    ^ now infers NSMutableArray* rather than id
      
      llvm-svn: 132868
      33823727
    • Fariborz Jahanian's avatar
      Restore 'atomic' as an attribute of objc · c3bcde08
      Fariborz Jahanian authored
      properties.
      
      llvm-svn: 132866
      c3bcde08
  15. Jun 08, 2011
  16. Jun 07, 2011
  17. May 14, 2011
  18. May 08, 2011
    • Douglas Gregor's avatar
      Relax the conversion rules for Objective-C GC qualifiers a · f30053d1
      Douglas Gregor authored
      bit by allowing __weak and __strong to be added/dropped as part of
      implicit conversions (qualification conversions in C++). A little
      history: GCC lets one add/remove/change GC qualifiers just about
      anywhere, implicitly. Clang did roughly the same before, but we
      recently normalized the semantics of qualifiers across the board to
      get a semantics that we could reason about (yay). Unfortunately, this
      tightened the screws a bit too much for GC qualifiers, where it's
      common to add/remove these qualifiers at will.
      
      Overall, we're still in better shape than we were before: we don't
      permit directly changing the GC qualifier (e.g., __weak -> __strong),
      so type safety is improved. More importantly, we're internally
      consistent in our handling of qualifiers, and the logic that allows
      adding/removing GC qualifiers (but not adding/removing address
      spaces!) only touches two obvious places.
      
      Fixes <rdar://problem/9402499>.
      
      llvm-svn: 131065
      f30053d1
  19. Apr 29, 2011
  20. Apr 26, 2011
  21. Apr 25, 2011
  22. Apr 23, 2011
    • Fariborz Jahanian's avatar
      "note" location of forward class used as receiver of · dbbdd2fe
      Fariborz Jahanian authored
      a 'deprecated' selector in the diagnostics for the
      selector. // rdar://9309223
      
      llvm-svn: 130062
      dbbdd2fe
    • Chandler Carruth's avatar
      There were some frustrating problems with the implementation of · b009b149
      Chandler Carruth authored
      -Wwrite-strings. First and foremost, once the positive form of the flag
      was passed, it could never be disabled by passing -Wno-write-strings.
      Also, the diagnostic engine couldn't in turn use -Wwrite-strings to
      control diagnostics (as GCC does) because it was essentially hijacked to
      drive the language semantics.
      
      Fix this by giving CC1 a clean '-fconst-strings' flag to enable
      const-qualified strings in C and ObjC compilations. Corresponding
      '-fno-const-strings' is also added. Then the driver is taught to
      introduce '-fconst-strings' in the CC1 command when '-Wwrite-strings'
      dominates.
      
      This entire flag is basically GCC-bug-compatibility driven, so we also
      match GCC's bug where '-w' doesn't actually disable -Wwrite-strings. I'm
      open to changing this though as it seems insane.
      
      llvm-svn: 130051
      b009b149
    • Fariborz Jahanian's avatar
      Fixes an instance method meta-data generation bug in · c057794a
      Fariborz Jahanian authored
      ObjC NeXt runtime where method pointer registered in
      metadata belongs to an unrelated method. Ast part of this fix,
      I turned at @end missing warning (for class
      implementations) into an error as we can never
      be sure that meta-data being generated is correct.
      // rdar://9072317
      
      llvm-svn: 130019
      c057794a
  23. Apr 18, 2011
  24. Apr 16, 2011
Loading