xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenObjCXX/debug-info.mm (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -emit-llvm %s -o /dev/null
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc// This test passes if clang doesn't crash.
4*f4a2713aSLionel Sambuc
5*f4a2713aSLionel Sambuctemplate <class C> class scoped_ptr {
6*f4a2713aSLionel Sambucpublic:
7*f4a2713aSLionel Sambuc  C* operator->() const { return 0; }
8*f4a2713aSLionel Sambuc};
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuc@class NSWindow;
11*f4a2713aSLionel Sambuc@class NSImage;
12*f4a2713aSLionel Sambuc@interface NSWindow {
13*f4a2713aSLionel Sambuc  NSImage *_miniIcon;
14*f4a2713aSLionel Sambuc}
15*f4a2713aSLionel Sambuc-(id)windowController;
16*f4a2713aSLionel Sambuc@end
17*f4a2713aSLionel Sambuc
18*f4a2713aSLionel Sambucclass AutomationResourceTracker {
19*f4a2713aSLionel Sambucpublic:
20*f4a2713aSLionel Sambuc  NSWindow* GetResource(int handle) { return 0; }
21*f4a2713aSLionel Sambuc};
22*f4a2713aSLionel Sambuc
23*f4a2713aSLionel Sambuc# 13 "automation/automation_window_tracker.h"
24*f4a2713aSLionel Sambucclass AutomationWindowTracker : public AutomationResourceTracker { };
25*f4a2713aSLionel Sambuc
26*f4a2713aSLionel Sambuctemplate<typename NST> class scoped_nsobject { };
27*f4a2713aSLionel Sambuc
28*f4a2713aSLionel Sambuc@interface TabStripController{
29*f4a2713aSLionel Sambuc  scoped_nsobject<NSImage> defaultFavicon_;
30*f4a2713aSLionel Sambuc}
31*f4a2713aSLionel Sambuc@end
32*f4a2713aSLionel Sambuc
33*f4a2713aSLionel Sambuc@interface BrowserWindowController {
34*f4a2713aSLionel Sambuc  TabStripController* tabStripController_;
35*f4a2713aSLionel Sambuc}
36*f4a2713aSLionel Sambuc@end
37*f4a2713aSLionel Sambuc
38*f4a2713aSLionel Sambucvoid WindowGetViewBounds(scoped_ptr<AutomationWindowTracker> window_tracker_) {
39*f4a2713aSLionel Sambuc  NSWindow* window = window_tracker_->GetResource(42);
40*f4a2713aSLionel Sambuc  BrowserWindowController* controller = [window windowController];
41*f4a2713aSLionel Sambuc}
42