xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjCXX/warn-missing-super.mm (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2*f4a2713aSLionel Sambuc// PR13401
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc__attribute((objc_root_class)) @interface NSObject
5*f4a2713aSLionel Sambuc@end
6*f4a2713aSLionel Sambuc
7*f4a2713aSLionel Sambuc@interface Dummy : NSObject
8*f4a2713aSLionel Sambuc@end
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuctemplate<typename T> struct shared_ptr {
11*f4a2713aSLionel Sambuc  constexpr shared_ptr() {}
12*f4a2713aSLionel Sambuc};
13*f4a2713aSLionel Sambuc
14*f4a2713aSLionel Sambuc@implementation Dummy
15*f4a2713aSLionel Sambuc- (void)dealloc
16*f4a2713aSLionel Sambuc{
17*f4a2713aSLionel Sambuc	constexpr shared_ptr<int> dummy;
18*f4a2713aSLionel Sambuc} // expected-warning {{method possibly missing a [super dealloc] call}}
19*f4a2713aSLionel Sambuc@end
20