diff --git a/sandboxed_api/tools/clang_generator/generator.h b/sandboxed_api/tools/clang_generator/generator.h index 218981f..5cd118e 100644 --- a/sandboxed_api/tools/clang_generator/generator.h +++ b/sandboxed_api/tools/clang_generator/generator.h @@ -26,6 +26,7 @@ #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/CompilerInvocation.h" #include "clang/Frontend/FrontendAction.h" +#include "clang/Lex/Preprocessor.h" #include "clang/Tooling/Tooling.h" #include "sandboxed_api/tools/clang_generator/emitter.h" #include "sandboxed_api/tools/clang_generator/types.h" @@ -116,6 +117,11 @@ class GeneratorAction : public clang::ASTFrontendAction { emitter_, options_); } + bool BeginSourceFileAction(clang::CompilerInstance& ci) override { + ci.getPreprocessor().enableIncrementalProcessing(); + return true; + } + bool hasCodeCompletionSupport() const override { return false; } Emitter& emitter_;