summaryrefslogtreecommitdiffstats
path: root/test/Index
diff options
context:
space:
mode:
authorMichael Wu <mwu.code@gmail.com>2018-08-03 05:20:23 +0000
committerMichael Wu <mwu.code@gmail.com>2018-08-03 05:20:23 +0000
commit1fc060c4f780c95c33a3724c1981bb5d3fbb9737 (patch)
treef6c09d176261f6eec506cd2a2aca2a49140bc267 /test/Index
parent4042ae53b138dddb400aa62c3668c29075ca9e92 (diff)
[libclang 6/8] Add support for reading implicit attributes
Summary: Having access to implicit attributes is sometimes useful so users of libclang don't have to duplicate some of the logic in sema. This depends on D49081 since it also adds a CXTranslationUnit flag. Reviewers: yvvan, jbcoe Reviewed By: yvvan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49631 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index')
-rw-r--r--test/Index/implicit-attrs.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Index/implicit-attrs.m b/test/Index/implicit-attrs.m
new file mode 100644
index 0000000000..ca651cdb79
--- /dev/null
+++ b/test/Index/implicit-attrs.m
@@ -0,0 +1,6 @@
+@interface Foo
+-(instancetype)init;
+@end
+
+// RUN: env CINDEXTEST_VISIT_IMPLICIT_ATTRIBUTES=1 c-index-test -test-print-decl-attributes %s -fobjc-arc | FileCheck %s
+// CHECK: ObjCInstanceMethodDecl=init:2:16 attribute(ns_consumes_self)= attribute(ns_returns_retained)=