blob: ea40460fb8df1f606d860bf95bec892d878924fb [file] [log] [blame]
Chris Lattnerf7830b62009-04-22 05:31:53 +00001// Test this without pch.
Ted Kremenek34653182012-07-25 07:26:32 +00002// RUN: %clang_cc1 -include %S/objc_methods.h -fsyntax-only -Wno-objc-root-class -verify %s
Chris Lattnerf7830b62009-04-22 05:31:53 +00003
4// Test with pch.
Daniel Dunbara5728872009-12-15 20:14:24 +00005// RUN: %clang_cc1 -x objective-c -emit-pch -o %t %S/objc_methods.h
6// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s
Chris Lattnerf7830b62009-04-22 05:31:53 +00007
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00008// expected-no-diagnostics
9
Chris Lattnerf7830b62009-04-22 05:31:53 +000010void func() {
Steve Naroffa7503a72009-04-23 15:15:40 +000011 TestPCH *xx;
Steve Naroff8f06f842009-04-23 16:00:56 +000012 TestForwardClassDecl *yy;
13// FIXME:
14// AliasForTestPCH *zz;
15
Steve Naroffa7503a72009-04-23 15:15:40 +000016 xx = [TestPCH alloc];
Douglas Gregore97179c2011-09-08 01:46:34 +000017 [xx instMethod];
Chris Lattnerf7830b62009-04-22 05:31:53 +000018}