[cfe-dev] How to dump ast of a objective-c file correctly?

Karl Peng via cfe-dev cfe-dev at lists.llvm.org
Fri Nov 10 20:50:22 PST 2017


I try to dump ast for a .m in a test folder(just a single source file, no project file). I use the command “clang -x objective-c -Xclang -ast-dump -fobjc-arc main.m”. when I write some number literals(@(2)) or  array literals (@[@“1”]), the command will report a error “error: definition of class NSArray must be available to use Objective-C array literals”, anyone know how to fix this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20171111/588d0327/attachment.html>


More information about the cfe-dev mailing list