Hi,
I am interested about using your viewer for visualizing my boost statecharts but from some reason I can not get it succesfully compiled. I'm using Ubuntu 13.10 as OS and I have installed llvm + clang (version 3.2-20).
While compiling visualizer.cpp I get following errors:
make[1]: Entering directory `/home/karjsim/boost-statechart-viewer-8c02883/src'
g++ -g -fno-rtti -shared -Wall -lclangParse -lclangFrontend -lclangSerialization -lclangDriver -lclangCodeGen -lclangSema -lclangAnalysis -lclangAST -lclangLex -lclangBasic -lclangEdit -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 -L/usr/local/lib -lpthread -ldl -lm -lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -o visualizer.so visualizer.cpp
visualizer.cpp: In member function ‘void Visitor::checkAllReactMethods(const clang::CXXRecordDecl*)’:
visualizer.cpp:339:16: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’
ReactRes.first != ReactRes.second; ++ReactRes.first, ++i) {
^
visualizer.cpp:339:34: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘second’
ReactRes.first != ReactRes.second; ++ReactRes.first, ++i) {
^
visualizer.cpp:339:53: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’
ReactRes.first != ReactRes.second; ++ReactRes.first, ++i) {
^
visualizer.cpp:341:60: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’
CXXMethodDecl *React = dyn_cast<CXXMethodDecl>(*ReactRes.first);
^
visualizer.cpp: In member function ‘bool Visitor::HandleCustomReaction(const clang::CXXRecordDecl*, const clang::Type*)’:
visualizer.cpp:354:16: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’
ReactRes.first != ReactRes.second; ++ReactRes.first) {
^
visualizer.cpp:354:34: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘second’
ReactRes.first != ReactRes.second; ++ReactRes.first) {
^
visualizer.cpp:354:53: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’
ReactRes.first != ReactRes.second; ++ReactRes.first) {
^
visualizer.cpp:355:67: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’
if (CXXMethodDecl *React = dyn_cast<CXXMethodDecl>(*ReactRes.first)) {
^
visualizer.cpp:371:19: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’
Diag((*ReactRes.first)->getSourceRange().getBegin(), diag_warning)
^
visualizer.cpp:372:21: error: ‘clang::DeclContext::lookup_const_result’ has no member named ‘first’
<< (*ReactRes.first)->getDeclKindName() << "is not supported as react method";
^
visualizer.cpp: In member function ‘void Visitor::handleSimpleState(clang::CXXRecordDecl*, const clang::CXXBaseSpecifier*)’:
visualizer.cpp:516:17: error: ‘clang::DeclContext::lookup_result’ has no member named ‘first’
Reactions.first != Reactions.second; ++Reactions.first, typedef_num++)
^
visualizer.cpp:516:36: error: ‘clang::DeclContext::lookup_result’ has no member named ‘second’
Reactions.first != Reactions.second; ++Reactions.first, typedef_num++)
^
visualizer.cpp:516:56: error: ‘clang::DeclContext::lookup_result’ has no member named ‘first’
Reactions.first != Reactions.second; ++Reactions.first, typedef_num++)
^
visualizer.cpp:517:32: error: ‘clang::DeclContext::lookup_result’ has no member named ‘first’
HandleReaction(*Reactions.first, RecordDecl);
^
In file included from /usr/local/include/llvm/ADT/IntrusiveRefCntPtr.h:24:0,
from /usr/local/include/llvm/Support/FileSystem.h:30,
from /usr/local/include/llvm/Support/raw_ostream.h:20,
from visualizer.cpp:28:
/usr/local/include/llvm/Support/Casting.h: In instantiation of ‘static bool llvm::isa_impl<To, From, Enabler>::doit(const From&) [with To = clang::ElaboratedTypeLoc; From = clang::TypeLoc; Enabler = void]’:
/usr/local/include/llvm/Support/Casting.h:98:41: required from ‘static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = clang::ElaboratedTypeLoc; From = clang::TypeLoc]’
/usr/local/include/llvm/Support/Casting.h:124:44: required from ‘static bool llvm::isa_impl_wrap<To, FromTy, FromTy>::doit(const FromTy&) [with To = clang::ElaboratedTypeLoc; FromTy = const clang::TypeLoc*]’
/usr/local/include/llvm/Support/Casting.h:116:77: required from ‘static bool llvm::isa_impl_wrap<To, From, SimpleFrom>::doit(const From&) [with To = clang::ElaboratedTypeLoc; From = const clang::TypeLoc* const; SimpleFrom = const clang::TypeLoc*]’
/usr/local/include/llvm/Support/Casting.h:136:78: required from ‘bool llvm::isa(const Y&) [with X = clang::ElaboratedTypeLoc; Y = const clang::TypeLoc*]’
/usr/local/include/llvm/Support/Casting.h:277:20: required from ‘typename llvm::cast_retty<X, Y*>::ret_type llvm::dyn_cast(Y*) [with X = clang::ElaboratedTypeLoc; Y = const clang::TypeLoc; typename llvm::cast_retty<X, Y*>::ret_type = const clang::ElaboratedTypeLoc*]’
visualizer.cpp:438:66: required from here
/usr/local/include/llvm/Support/Casting.h:55:28: error: ‘classof’ is not a member of ‘clang::ElaboratedTypeLoc’
return To::classof(&Val);
^
/usr/local/include/llvm/Support/Casting.h: In instantiation of ‘static bool llvm::isa_impl<To, From, Enabler>::doit(const From&) [with To = clang::TemplateSpecializationTypeLoc; From = clang::TypeLoc; Enabler = void]’:
/usr/local/include/llvm/Support/Casting.h:98:41: required from ‘static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = clang::TemplateSpecializationTypeLoc; From = clang::TypeLoc]’
/usr/local/include/llvm/Support/Casting.h:124:44: required from ‘static bool llvm::isa_impl_wrap<To, FromTy, FromTy>::doit(const FromTy&) [with To = clang::TemplateSpecializationTypeLoc; FromTy = const clang::TypeLoc*]’
/usr/local/include/llvm/Support/Casting.h:116:77: required from ‘static bool llvm::isa_impl_wrap<To, From, SimpleFrom>::doit(const From&) [with To = clang::TemplateSpecializationTypeLoc; From = const clang::TypeLoc* const; SimpleFrom = const clang::TypeLoc*]’
/usr/local/include/llvm/Support/Casting.h:136:78: required from ‘bool llvm::isa(const Y&) [with X = clang::TemplateSpecializationTypeLoc; Y = const clang::TypeLoc*]’
/usr/local/include/llvm/Support/Casting.h:277:20: required from ‘typename llvm::cast_retty<X, Y*>::ret_type llvm::dyn_cast(Y*) [with X = clang::TemplateSpecializationTypeLoc; Y = const clang::TypeLoc; typename llvm::cast_retty<X, Y*>::ret_type = const clang::TemplateSpecializationTypeLoc*]’
visualizer.cpp:440:96: required from here
/usr/local/include/llvm/Support/Casting.h:55:28: error: ‘classof’ is not a member of ‘clang::TemplateSpecializationTypeLoc’
make[1]: *** [visualizer.so] Error 1