[cfe-dev] Getting past error: member access into incomplete type
Eric Schulte
eric.schulte at gmx.com
Sat Sep 1 18:14:07 PDT 2012
Hi,
I'm working on a small AST-manipulation tool built upon clang [1]. I
had an implementation which worked but didn't deal well with included
headings. I've since re-written this using the Tooling interface,
however using the example code from [2] I run into the following "member
access into incomplete type" error on an ASTContext [3].
It looks like I could solve this error by stepping back to previous
versions of clang and llvm [4], but I'd prefer to fix this so that it
works with the current code and moving forward. The broken file is at,
https://github.com/eschulte/clang-mutate/blob/master/mutate-tool.cpp
Any suggestions would be greatly appreciated.
Thanks,
Footnotes:
[1] https://github.com/eschulte/clang-mutate
[2] http://clang.llvm.org/docs/RAVFrontendAction.html
[3] $ make mutate-tool
clang++ -I/usr/local/include -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -g -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fPIC -Woverloaded-virtual -Wcast-qual -fno-rtti -c -o mutate-tool.o mutate-tool.cpp
mutate-tool.cpp:176:33: error: member access into incomplete type
'clang::ASTContext'
Visitor.TraverseDecl(Context.getTranslationUnitDecl());
^
/usr/local/include/clang/Basic/Builtins.h:29:9: note: forward
declaration of 'clang::ASTContext'
class ASTContext;
^
1 error generated.
make: *** [mutate-tool.o] Error 1
[4] http://permalink.gmane.org/gmane.comp.debugging.lldb.devel/982
--
Eric Schulte
http://cs.unm.edu/~eschulte
More information about the cfe-dev
mailing list