[cfe-dev] libclang clang_getCursorPlatformAvailability fails often

ivan ivasic+clang at gmail.com
Fri May 10 02:57:54 PDT 2013


Hi all,

It seems to me that clang_getCursorPlatformAvailability API in libclang
fails to find availability too often for OSX SDK APIs. Normally, for iOS it
seems to work much better even for the same Foundation APIs.

A few random examples (I have many examples) can be:

  //in NSLayoutConstraint.h
  - (void)layoutIfNeeded NS_AVAILABLE_MAC(10_7);

  //in NSWindow.h
  - (BOOL)preventsApplicationTerminationWhenModal NS_AVAILABLE_MAC(10_6);

I have a simple test Xcode project that reproduces this behaviour here: 
http://cl.ly/2B261r2X0H3y <http://cl.ly/2B261r2X0H3y>  
(Just modify your Xcode path if it's not in standard location and build&run)

It's possible that I'm doing something wrong but the exact same code works
pretty well with iOS headers. Also, I'm really not sure about this but it
seems that it fails finding the availability mostly on methods while
classes, enums etc.. work okay.

I'd appreciate any input on this.

Thanks,
Ivan



--
View this message in context: http://clang-developers.42468.n3.nabble.com/libclang-clang-getCursorPlatformAvailability-fails-often-tp4032039.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list