summaryrefslogtreecommitdiff
path: root/test/Analysis
diff options
context:
space:
mode:
authorGabor Horvath <xazax.hun@gmail.com>2017-10-30 08:47:13 +0000
committerGabor Horvath <xazax.hun@gmail.com>2017-10-30 08:47:13 +0000
commit2ad457f76010c2f1ffe14f8324410d5ef4c8a8c2 (patch)
treebf5413d9113c44c9753e327df4f7f539ac56461a /test/Analysis
parent68e041468bfb4a364acdfa32abb0c7e38cfb938e (diff)
[analyzer] Handle ObjC messages conservatively in CallDescription
Differential Revision: https://reviews.llvm.org/D37470 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316885 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/block-in-critical-section.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Analysis/block-in-critical-section.m b/test/Analysis/block-in-critical-section.m
new file mode 100644
index 0000000000..c04a0afb2a
--- /dev/null
+++ b/test/Analysis/block-in-critical-section.m
@@ -0,0 +1,9 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.BlockInCriticalSection -verify -Wno-objc-root-class %s
+
+@interface SomeClass
+-(void)someMethod;
+@end
+
+void shouldNotCrash(SomeClass *o) {
+ [o someMethod];
+}