In the following C++ code: ===== t.cpp === class A { #ifdef SOME_MACRO // whatever #endif }; =============== tokens from preprocessor directives are annotated as 'ClassDecl=A' by clang_annotateTokens. Similarly, clang_getCursor returns cursor of kind ClassDecl. The same with other blocks like structures, namespaces, enums, functions, etc.
cloned to <rdar://problem/11548788>
FIxed in r169949