summaryrefslogtreecommitdiffstats
path: root/test/Index/comment-objc-decls.m
Commit message (Collapse)AuthorAgeFilesLines
* Clean up ObjCPropertyDecl printingDavid Goldman2019-04-081-3/+3
| | | | | | | | | | | | | | | Summary: - `@property(attr, attr2)` instead of `@property ( attr,attr2 )`. - Change priority of attributes (see code/comments inline). - Support for printing weak and unsafe_unretained attributes. Subscribers: arphaman, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57965 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357937 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend type nullability qualifiers for Objective-C.Douglas Gregor2015-06-191-4/+4
| | | | | | | | | | | | | | | Introduce context-sensitive, non-underscored nullability specifiers (nonnull, nullable, null_unspecified) for Objective-C method return types, method parameter types, and properties. Introduce Objective-C-specific semantics, including computation of the nullability of the result of a message send, merging of nullability information from the @interface of a class into its @implementation, etc . This is the Objective-C part of rdar://problem/18868820. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240154 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix single-line optimization for ObjC.Manuel Klimek2013-01-111-3/+3
| | | | | | | Puts blocks always into multiple lines when they start with an ObjC keyword or minus. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172238 91177308-0d34-0410-b5e6-96231b3b80d8
* Implements pulling simple blocks into a single line.Manuel Klimek2013-01-111-3/+3
| | | | | | | | void f() { return 42; } The final change that implements the feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172225 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatting: In @implementation etc lines, put a space before protocol lists.Nico Weber2013-01-101-1/+1
| | | | | | | | | | | | | | Don't do this in Google style though: http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml#Protocols Most other places (function declarations, variable declarations) still get this wrong, and since this looks very similiar to template instantiations to the lexer (`id <MyProtocol> a = ...`), it's going to be hard to fix in some places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172099 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatter: Add space before '(' in @implemenation, @interface, @protocol linesNico Weber2013-01-101-3/+3
| | | | | | | | | | The first token in @implementation, @interface, and @protocol lines is now marked TT_ObjCDecl, and lines starting with a TT_ObjCDecl token are now marked LT_ObjCMethodDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172093 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatter: @optional and @required go on their own line.Nico Weber2013-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | Previously: @protocol myProtocol - (void)mandatoryWithInt:(int)i; @optional - (void) optional; @required - (void) required; @end Now: @protocol myProtocol - (void)mandatoryWithInt:(int)i; @optional - (void)optional; @required - (void)required; @end git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172023 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatter: Add support for @implementation.Nico Weber2013-01-091-2/+2
| | | | | | | | | Just reuse the @interface code for this. It accepts slightly more than necessary (@implementation cannot have protocol lists), but that's ok. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172019 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatting: Add support for @protocol.Nico Weber2013-01-091-1/+1
| | | | | | | | Pull pieces of the @interface code into reusable methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172001 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test after r171995.Nico Weber2013-01-091-1/+1
| | | | | | | | | I wasn't aware libFormat is used elsewhere already. Let me know if rebasing is not the right thing to do here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171996 91177308-0d34-0410-b5e6-96231b3b80d8
* Various fixes to clang-format's macro handling.Manuel Klimek2013-01-041-4/+4
| | | | | | | | | | | | | | | | | | | Some of this is still pretty rough (note the load of FIXMEs), but it is strictly an improvement and fixes various bugs that were related to macro processing but are also imporant in non-macro use cases. Specific fixes: - correctly puts espaced newlines at the end of the line - fixes counting of white space before a token when escaped newlines are present - fixes parsing of "trailing" tokens when eof() is hit - puts macro parsing orthogonal to parsing other structure - general support for parsing of macro definitions Due to the fix to format trailing tokens, this change also includes a bunch of fixes to the c-index tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171556 91177308-0d34-0410-b5e6-96231b3b80d8
* Add objective-C style formatting to clang format andFariborz Jahanian2012-12-201-18/+18
| | | | | | | | use it to format xml declaration tags. // rdar://12378714 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170727 91177308-0d34-0410-b5e6-96231b3b80d8
* This is the libclang patch providing minimal API toFariborz Jahanian2012-12-181-15/+15
| | | | | | | | | | | use clang's formatter. Currently, formatter is used to format declaration tags for xml comments. Since formatter is in flux and its change will break several of the clang comment tests, only a single tests is formatted using this facility. Doug has reviewed and approved it for check-in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170467 91177308-0d34-0410-b5e6-96231b3b80d8
* additional test for declaration tag of a class extension.Fariborz Jahanian2012-12-041-0/+15
| | | | | | | // rdar://12378714 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169289 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/test/Index/comment-objc-decls.m: Try to fix r169193, to add x86_64-darwin.NAKAMURA Takumi2012-12-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169199 91177308-0d34-0410-b5e6-96231b3b80d8
* Testing objective-C declarations embedded inFariborz Jahanian2012-12-041-0/+160
<declaration> tag of Comment XML and fixed a missing declaration of ivars private to @implementation as result of the testing. // rdar://12378714 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169193 91177308-0d34-0410-b5e6-96231b3b80d8