forked from qt-creator/qt-creator
ClangPchManager: Allow errors in pch-s
There are cases when we can't avoid errors when we put all system includes together. This might lead to not having any pch-s which makes the indexing useless (too slow). Change-Id: Icdbfdf916bbd0ed9b6cd18f9c976d3d4efb0e18f Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <clang/Frontend/CompilerInstance.h>
|
||||
#include <clang/Frontend/FrontendActions.h>
|
||||
#include <clang/Lex/PreprocessorOptions.h>
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
@@ -100,6 +101,7 @@ newFrontendActionFactory(Factory *consumerFactory,
|
||||
bool BeginInvocation(clang::CompilerInstance &compilerInstance) override
|
||||
{
|
||||
compilerInstance.getLangOpts().DelayedTemplateParsing = false;
|
||||
compilerInstance.getPreprocessorOpts().AllowPCHWithCompilerErrors = true;
|
||||
|
||||
return clang::ASTFrontendAction::BeginInvocation(compilerInstance);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user