[analyzer] Commit a test case for r164579.

llvm-svn: 164715
This commit is contained in:
Anna Zaks 2012-09-26 18:55:09 +00:00
parent 9d6063ab55
commit a3683dd69e
1 changed files with 11 additions and 1 deletions

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-ipa=dynamic-bifurcate -verify %s // RUN: %clang_cc1 -analyze -analyzer-checker=core,osx -analyzer-ipa=dynamic-bifurcate -verify %s
#include "InlineObjCInstanceMethod.h" #include "InlineObjCInstanceMethod.h"
@ -179,3 +179,13 @@ int testPropertySynthesized(PublicClass *p) {
[p setValue1:0]; [p setValue1:0];
return 5/[p value1]; return 5/[p value1];
} }
// Test definition not available edge case.
@interface DefNotAvailClass : NSObject
@end
id testDefNotAvailableInlined(DefNotAvailClass *C) {
return [C mem]; // expected-warning {{instance method '-mem' not found}}
}
id testDefNotAvailable(DefNotAvailClass *C) {
return testDefNotAvailableInlined(C);
}