// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -emit-obj %s

// This test passes if clang doesn't crash.

template <class C> class scoped_ptr {
public:
  C* operator->() const { return 0; }
};

@class NSWindow;
@class NSImage;
@interface NSWindow {
  NSImage *_miniIcon;
}
-(id)windowController;
@end

class AutomationResourceTracker {
public:
  NSWindow* GetResource(int handle) { return 0; }
};

# 13 "automation/automation_window_tracker.h"
class AutomationWindowTracker : public AutomationResourceTracker { };

template<typename NST> class scoped_nsobject { };

@interface TabStripController{
  scoped_nsobject<NSImage> defaultFavicon_;
}
@end

@interface BrowserWindowController {
  TabStripController* tabStripController_;
}
@end

void WindowGetViewBounds(scoped_ptr<AutomationWindowTracker> window_tracker_) {
  NSWindow* window = window_tracker_->GetResource(42);
  BrowserWindowController* controller = [window windowController];
}

Add a test case for r150976.
Add a test case for r150976.



git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@151027 91177308-0d34-0410-b5e6-96231b3b80d8
