Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple LLVM 4.2, list of available __attribute__(()) for Objective-C

Tags:

xcode

llvm

I'm looking for a list of available __attribute__(()) directives and I cannot find them. I only know __attribute__((objc_requires_super)).

I swear I searched and searched and I did not find anything. Maybe I'm missing some term to include in my search.

Thank you so much.

like image 732
emenegro Avatar asked Jul 29 '13 12:07

emenegro


2 Answers

The docs can sometimes fall behind. For a complete list, there is no more up-to-date place to go than the source code!

https://github.com/llvm-mirror/clang/blob/master/include/clang/Basic/Attr.td

Here's an example:

def Visibility : InheritableAttr {
  let Clone = 0;
  let Spellings = [GNU<"visibility">, CXX11<"gnu", "visibility">];
  let Args = [EnumArgument<"Visibility", "VisibilityType",
                           ["default", "hidden", "internal", "protected"],
                           ["Default", "Hidden", "Hidden", "Protected"]>];
}

Here we can see how it is defined in GNU and CXX11 GNU. It also shows the valid arguments in this case (default, hidden, internal, protected).

like image 193
Bo A Avatar answered Nov 17 '22 17:11

Bo A


I found the info you need inside del llvm.org site You can look this link: http://clang.llvm.org/docs/LanguageExtensions.html#objective-c-features

like image 36
Giuseppe Mosca Avatar answered Nov 17 '22 19:11

Giuseppe Mosca