summaryrefslogtreecommitdiffstats
path: root/tools/clang-fuzzer/ClangFuzzer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/clang-fuzzer/ClangFuzzer.cpp')
-rw-r--r--tools/clang-fuzzer/ClangFuzzer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/clang-fuzzer/ClangFuzzer.cpp b/tools/clang-fuzzer/ClangFuzzer.cpp
index 124911c..d07cf50 100644
--- a/tools/clang-fuzzer/ClangFuzzer.cpp
+++ b/tools/clang-fuzzer/ClangFuzzer.cpp
@@ -20,7 +20,7 @@
using namespace clang;
-extern "C" void LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
+extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
std::string s((const char *)data, size);
llvm::opt::ArgStringList CC1Args;
CC1Args.push_back("-cc1");
@@ -40,7 +40,8 @@ extern "C" void LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
std::unique_ptr<tooling::ToolAction> action(
tooling::newFrontendActionFactory<clang::SyntaxOnlyAction>());
std::shared_ptr<PCHContainerOperations> PCHContainerOps =
- std::make_shared<RawPCHContainerOperations>();
+ std::make_shared<PCHContainerOperations>();
action->runInvocation(Invocation.release(), Files.get(), PCHContainerOps,
&Diags);
+ return 0;
}
OpenPOWER on IntegriCloud