ccons icon indicating copy to clipboard operation
ccons copied to clipboard

Cannot compile against clang 3.4

Open GoogleCodeExporter opened this issue 10 years ago • 1 comments

What steps will reproduce the problem?
1. cmake .
2. make

/home/hal/src/ccons/Parser.cpp: In constructor 
‘ccons::ParseOperation::ParseOperation(const clang::LangOptions&, 
clang::TargetOptions*, clang::DiagnosticsEngine*, clang::PPCallbacks*)’:
/home/hal/src/ccons/Parser.cpp:58:79: error: no matching function for call to 
‘clang::HeaderSearch::HeaderSearch(llvm::IntrusiveRefCntPtr<clang::HeaderSearc
hOptions>&, clang::FileManager&, clang::DiagnosticsEngine&, const 
clang::LangOptions&, clang::TargetInfo*)’
  _hs.reset(new clang::HeaderSearch(_hsOptions, *_fm, *diag, options, &*_target));
                                                                               ^
/home/hal/src/ccons/Parser.cpp:58:79: note: candidate is:
In file included from /home/hal/src/ccons/Parser.h:25:0,
                 from /home/hal/src/ccons/Parser.cpp:11:
/usr/include/clang/Lex/HeaderSearch.h:242:3: note: 
clang::HeaderSearch::HeaderSearch(llvm::IntrusiveRefCntPtr<clang::HeaderSearchOp
tions>, clang::SourceManager&, clang::DiagnosticsEngine&, const 
clang::LangOptions&, const clang::TargetInfo*)
   HeaderSearch(IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts,
   ^
/usr/include/clang/Lex/HeaderSearch.h:242:3: note:   no known conversion for 
argument 2 from ‘clang::FileManager’ to ‘clang::SourceManager&’
/home/hal/src/ccons/Parser.cpp: In member function ‘virtual bool 
ccons::Parser::analyzeInput(const string&, const string&, int&, 
std::vector<clang::FunctionDecl*>*)::<anonymous 
struct>::HandleTopLevelDecl(clang::DeclGroupRef)’:
/home/hal/src/ccons/Parser.cpp:190:15: error: ‘class clang::SourceManager’ 
has no member named ‘isFromMainFile’
       if (sm->isFromMainFile(Loc)) {
               ^
/home/hal/src/ccons/Parser.cpp:196:20: error: ‘class clang::SourceManager’ 
has no member named ‘isFromMainFile’
        while (!sm->isFromMainFile(Loc)) {
                    ^


ccons r253
llvm 3.4
clang 3.4

Original issue reported on code.google.com by [email protected] on 22 Dec 2014 at 11:26

GoogleCodeExporter avatar Jun 29 '15 20:06 GoogleCodeExporter

You probably want to replace isFromMainFile by isWrittenInMainFile.

Original comment by [email protected] on 30 Mar 2015 at 12:58

GoogleCodeExporter avatar Jun 29 '15 21:06 GoogleCodeExporter