From 1fc060c4f780c95c33a3724c1981bb5d3fbb9737 Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Fri, 3 Aug 2018 05:20:23 +0000 Subject: [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 --- test/Index/implicit-attrs.m | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/Index/implicit-attrs.m (limited to 'test/Index') 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)= -- cgit v1.2.3