<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Le 11 nov. 2017 à 05:50, Karl Peng via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span style="font-size: 14px;" class="">I try to dump ast for a .m in a test folder(just a single source file, no project file). I use the command “<b class="">clang -x objective-c -Xclang -ast-dump -fobjc-arc main.m</b>”. when I write some number literals(@(2)) or  array literals (@[@“1”]), the command will report a error <i class="">“error: definition of class NSArray must be available to use Objective-C array literals</i>”, anyone know how to fix this?</span></div></div></div></blockquote><br class=""></div><div>Yes, you must import NSArray.h, NSNumber.h etc. in your main.m file. This is usually done by using #import <Foundation/Foundation.h></div><div><br class=""></div><br class=""><div class=""><br class=""></div></body></html>