aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorBen Barham <ben_barham@apple.com>2023-09-20 23:35:34 -0700
committerGitHub <noreply@github.com>2023-09-20 23:35:34 -0700
commit265d48a02d2453aaf2d29eefbfedd3595220f4e6 (patch)
tree5ab80e394b27b75f9ad60ce427bc1a957fc7fea5 /clang/lib/Lex/Preprocessor.cpp
parent4bc4d51c18d5c087dfbdad1753c84bba8dbf3be0 (diff)
downloadllvm-265d48a02d2453aaf2d29eefbfedd3595220f4e6.zip
llvm-265d48a02d2453aaf2d29eefbfedd3595220f4e6.tar.gz
llvm-265d48a02d2453aaf2d29eefbfedd3595220f4e6.tar.bz2
Re-apply "[Parse] Split incremental-extensions" (#66446)
Re-applies #65683 with a fix to always run `Actions.ActOnEndOfTranslationUnit` regardless of incremental processing.
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 8de78a1..f0381c1 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -146,6 +146,10 @@ Preprocessor::Preprocessor(std::shared_ptr<PreprocessorOptions> PPOpts,
Ident_AbnormalTermination = nullptr;
}
+ // Default incremental processing to -fincremental-extensions, clients can
+ // override with `enableIncrementalProcessing` if desired.
+ IncrementalProcessing = LangOpts.IncrementalExtensions;
+
// If using a PCH where a #pragma hdrstop is expected, start skipping tokens.
if (usingPCHWithPragmaHdrStop())
SkippingUntilPragmaHdrStop = true;