Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clang Pragma Comprehensive List

Tags:

xcode

llvm

clang

Where can I find the documentation of all possible #pragmas available in Xcode's Clang/LLVM?

I found this in the Clang user manual, that at NSHipster, and even tried grepping through the svn repo, but still could not find documentation for things like _Pragma("clang assume_nonnull begin").

Any hints where to look?

like image 200
fabb Avatar asked Jun 18 '15 08:06

fabb


1 Answers

You're doing everything right, the only thing you're missing is: Clang we have in Xcode is different from Clang we can download at http://clang.llvm.org.

You can obtain Apple's version of compiler at http://opensource.apple.com under 'Developer tools', but usually there is pretty old version.

Whenever Apple engineers introduce something new into the compiler it's usually not available publicly yet, but they push these features into the public repo during following months.

Previously it happened with arm64, and now with nullability qualifiers.

Check the public repo again, they started pushing nullability qualifiers couple of days ago, also feel free to subscribe to Clang Developers Mailing List for updates.

like image 149
AlexDenisov Avatar answered Oct 01 '22 21:10

AlexDenisov