: SymbolCounter(0), BPAlloc(bpalloc), Ctx(ctx) {}
~SymbolManager();
+
+ static bool canSymbolicate(QualType T);
/// Make a unique symbol for MemRegion R according to its kind.
SymbolRef getRegionRValueSymbol(const MemRegion* R);
// Punt on static variables for now.
if (VD->getStorageClass() == VarDecl::Static)
continue;
+
+ // Only handle simple types that we can symbolicate.
+ if (!SymbolManager::canSymbolicate(VD->getType()))
+ continue;
// Initialize globals and parameters to symbolic values.
// Initialize local variables to undefined.
SymbolManager::~SymbolManager() {}
+bool SymbolManager::canSymbolicate(QualType T) {
+ return Loc::IsLocType(T) || T->isIntegerType();
+}
+
void SymbolReaper::markLive(SymbolRef sym) {
TheLiving = F.Add(TheLiving, sym);
TheDead = F.Remove(TheDead, sym);
- (void)handleFailureInMethod:(SEL)selector object:(id)object file:(NSString *)fileName lineNumber:(NSInteger)line description:(NSString *)format,...;
@end
extern NSString * const NSConnectionReplyMode;
+typedef float CGFloat;
+typedef struct _NSPoint {
+ CGFloat x;
+ CGFloat y;
+} NSPoint;
+typedef struct _NSSize {
+ CGFloat width;
+ CGFloat height;
+} NSSize;
+typedef struct _NSRect {
+ NSPoint origin;
+ NSSize size;
+} NSRect;
// Reduced test case from crash in <rdar://problem/6253157>
@interface A @end
if (!x) { return 0; }
return 1;
}
+
+// <rdar://problem/6708148> - Test that we properly invalidate structs
+// passed-by-reference to a function.
+void pr6708148_invalidate(NSRect *x);
+void pr6708148_use(NSRect x);
+void pr6708148_test(void) {
+ NSRect x;
+ pr6708148_invalidate(&x);
+ pr6708148_use(x); // no-warning
+}
+