[cfe-dev] Clang 3.4 modules load but still get "declaration not found" errors when visiting AST nodes for Obj C programs
Babita Sharma
babitas at ca.ibm.com
Mon Feb 3 08:10:05 PST 2014
Hi,
Using command line clang (3.4 open source), my objective C file compiles
fine and produces a .o file as expected. But when I parse the AST
programmatically (clang::ParseAST) and visit the AST nodes (using
ASTConsumer), I get declarations not found errors such as:
error: cannot find protocol declaration for 'UIApplicationDelegate'
@interface APLAppDelegate : UIResponder <UIApplicationDelegate>
unknown type name 'UIWindow'
@property (nonatomic) UIWindow *window;
I have matched the command line options to the options I pass to
CompilerInvocation. I have passed -fmodules and -fmodules-cache-path as
args. I dumped the .pcm file from the module-cache-path and ensured that it
has the above declarations in it.
What am I missing here ? Why are the declarations for UIWindow and
UIApplicationDelegate not being found by the parseAST when they are present
in the module-map file and even the .pcm file ? How do I turn on additional
diagnostics to figure why this is failing and where ?
Thanks and awaiting response.
Babita Sharma.
--
View this message in context: http://clang-developers.42468.n3.nabble.com/Clang-3-4-modules-load-but-still-get-declaration-not-found-errors-when-visiting-AST-nodes-for-Obj-C-s-tp4037636.html
Sent from the Clang Developers mailing list archive at Nabble.com.
More information about the cfe-dev
mailing list