Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Make #4

Open
algorys opened this issue Apr 21, 2015 · 1 comment
Open

Problem with Make #4

algorys opened this issue Apr 21, 2015 · 1 comment

Comments

@algorys
Copy link

algorys commented Apr 21, 2015

Hello,
I begin to learn how to use clang and I've download your example by git. I'm trying to "make" but I've some error like this :

[code]
llvm[0]: Compiling Example.cpp for Debug+Asserts build
Example.cpp:107:26: error: conflicting return type specified for ‘virtual clang::ASTConsumer* ExampleFrontendAction::CreateASTConsumer(clang::CompilerInstance&, llvm::StringRef)’
virtual ASTConsumer CreateASTConsumer(CompilerInstance &CI, StringRef file) {
^
In file included from /home/mea/Documents/llvm/llvm/tools/clang/tools/example/../../include/clang/Frontend/FrontendActions.h:13:0,
from Example.cpp:7:
/home/mea/Documents/llvm/llvm/tools/clang/tools/example/../../include/clang/Frontend/FrontendAction.h:64:40: error: overriding ‘virtual std::unique_ptrclang::ASTConsumer clang::FrontendAction::CreateASTConsumer(clang::CompilerInstance&, llvm::StringRef)’
virtual std::unique_ptr CreateASTConsumer(CompilerInstance &CI,
^
Example.cpp: In function ‘int main(int, const char
_)’:
Example.cpp:116:38: error: no matching function for call to ‘clang::tooling::CommonOptionsParser::CommonOptionsParser(int&, const char__&)’
CommonOptionsParser op(argc, argv);
^
Example.cpp:116:38: note: candidates are:
In file included from Example.cpp:9:0:
/home/mea/Documents/llvm/llvm/tools/clang/tools/example/../../include/clang/Tooling/CommonOptionsParser.h:73:3: note: clang::tooling::CommonOptionsParser::CommonOptionsParser(int&, const char__, llvm::cl::OptionCategory&, const char_)
CommonOptionsParser(int &argc, const char *argv,
^
/home/mea/Documents/llvm/llvm/tools/clang/tools/example/../../include/clang/Tooling/CommonOptionsParser.h:73:3: note: candidate expects 4 arguments, 2 provided
/home/mea/Documents/llvm/llvm/tools/clang/tools/example/../../include/clang/Tooling/CommonOptionsParser.h:63:7: note: clang::tooling::CommonOptionsParser::CommonOptionsParser(clang::tooling::CommonOptionsParser&&)
class CommonOptionsParser {
^
/home/mea/Documents/llvm/llvm/tools/clang/tools/example/../../include/clang/Tooling/CommonOptionsParser.h:63:7: note: candidate expects 1 argument, 2 provided
Example.cpp:121:76: error: no matching function for call to ‘clang::tooling::ClangTool::run(std::unique_ptrclang::tooling::FrontendActionFactory)’
int result = Tool.run(newFrontendActionFactory());
^
Example.cpp:121:76: note: candidate is:
In file included from Example.cpp:10:0:
/home/mea/Documents/llvm/llvm/tools/clang/tools/example/../../include/clang/Tooling/Tooling.h:286:7: note: int clang::tooling::ClangTool::run(clang::tooling::ToolAction
)
int run(ToolAction Action);
^
/home/mea/Documents/llvm/llvm/tools/clang/tools/example/../../include/clang/Tooling/Tooling.h:286:7: note: no known conversion for argument 1 from ‘std::unique_ptrclang::tooling::FrontendActionFactory’ to ‘clang::tooling::ToolAction

/bin/rm: cannot remove ‘/home/mea/Documents/llvm/llvm/tools/clang/tools/example/Debug+Asserts/Example.d.tmp’: No such file or directory
make: *** [/home/mea/Documents/llvm/llvm/tools/clang/tools/example/Debug+Asserts/Example.o] Error 1
[/code]

Can you help me to solve this please ?

Thanks in advance.

@crocsandcoffee
Copy link

Were you ever able to solve this? I get this error now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants