| // RUN: %clang_analyze_cc1 %s -o %t |
| // Tests that some specific checkers are enabled by default. |
| title = @"foo"; // expected-warning {{never read}} |
| // <rdar://problem/8808566> Static analyzer is wrong: NSWidth(imgRect) not understood as unconditional assignment |
| // Note: this requires inlining support. This previously issued a false positive use of |
| // uninitialized value when calling NSWidth. |
| typedef struct CGPoint CGPoint; |
| typedef struct CGSize CGSize; |
| typedef struct CGRect CGRect; |
| static __inline__ __attribute__((always_inline)) CGFloat NSWidth(NSRect aRect) { |
| return (aRect.size.width); |
| static __inline__ __attribute__((always_inline)) CGFloat NSHeight(NSRect aRect) { |
| return (aRect.size.height); |
| NSSize rdar880566_size(); |
| myRect.size = rdar880566_size(); |
| double x = NSWidth(myRect) + NSHeight(myRect); // no-warning |