1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
6 @interface NSChild : NSObj
9 static_assert(__is_base_of(NSObj, NSChild), "");
10 static_assert(!__is_base_of(NSChild, NSObj), "");
12 static_assert(__is_base_of(NSObj, NSObj), "");
14 static_assert(!__is_base_of(NSObj *, NSChild *), "");
15 static_assert(!__is_base_of(NSChild *, NSObj *), "");
17 static_assert(__is_base_of(const volatile NSObj, NSChild), "");
18 static_assert(__is_base_of(NSObj, const volatile NSChild), "");
20 @class NSForward; // expected-note{{forward declaration of class}}
22 static_assert(!__is_base_of(NSForward, NSObj), "");
23 static_assert(!__is_base_of(NSObj, NSForward), ""); // expected-error{{incomplete type 'NSForward'}}
25 static_assert(!__is_base_of(id, NSObj), "");