summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Frontend/ASTUnit.cpp11
-rw-r--r--lib/Frontend/CompilerInstance.cpp6
-rw-r--r--lib/Lex/Preprocessor.cpp11
-rw-r--r--unittests/Basic/SourceManagerTest.cpp18
-rw-r--r--unittests/Lex/LexerTest.cpp6
-rw-r--r--unittests/Lex/PPCallbacksTest.cpp12
-rw-r--r--unittests/Lex/PPConditionalDirectiveRecordTest.cpp6
7 files changed, 32 insertions, 38 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 6437c3e8b2..8594571342 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -716,12 +716,11 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
HeaderSearch &HeaderInfo = *AST->HeaderInfo.get();
unsigned Counter;
- AST->PP = new Preprocessor(PPOpts,
- AST->getDiagnostics(), AST->ASTFileLangOpts,
- AST->getSourceManager(), HeaderInfo,
- *AST,
- /*IILookup=*/0,
- /*OwnsHeaderSearch=*/false);
+ AST->PP =
+ new Preprocessor(PPOpts, AST->getDiagnostics(), AST->ASTFileLangOpts,
+ AST->getSourceManager(), HeaderInfo, *AST,
+ /*IILookup=*/0,
+ /*OwnsHeaderSearch=*/false);
Preprocessor &PP = *AST->PP;
AST->Ctx = new ASTContext(AST->ASTFileLangOpts,
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index d20c1a417e..e9672c4426 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -239,11 +239,9 @@ void CompilerInstance::createPreprocessor(TranslationUnitKind TUKind) {
getDiagnostics(),
getLangOpts(),
&getTarget());
- PP = new Preprocessor(&getPreprocessorOpts(),
- getDiagnostics(), getLangOpts(),
+ PP = new Preprocessor(&getPreprocessorOpts(), getDiagnostics(), getLangOpts(),
getSourceManager(), *HeaderInfo, *this, PTHMgr,
- /*OwnsHeaderSearch=*/true,
- TUKind);
+ /*OwnsHeaderSearch=*/true, TUKind);
PP->Initialize(getTarget());
// Note that this is different then passing PTHMgr to Preprocessor's ctor.
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index ae28fc01e2..56eabf41ff 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -56,20 +56,19 @@ ExternalPreprocessorSource::~ExternalPreprocessorSource() { }
Preprocessor::Preprocessor(IntrusiveRefCntPtr<PreprocessorOptions> PPOpts,
DiagnosticsEngine &diags, LangOptions &opts,
- SourceManager &SM,
- HeaderSearch &Headers, ModuleLoader &TheModuleLoader,
+ SourceManager &SM, HeaderSearch &Headers,
+ ModuleLoader &TheModuleLoader,
IdentifierInfoLookup *IILookup, bool OwnsHeaders,
TranslationUnitKind TUKind)
: PPOpts(PPOpts), Diags(&diags), LangOpts(opts), Target(0),
FileMgr(Headers.getFileMgr()), SourceMgr(SM), HeaderInfo(Headers),
TheModuleLoader(TheModuleLoader), ExternalSource(0),
- Identifiers(opts, IILookup), IncrementalProcessing(false),
- TUKind(TUKind),
+ Identifiers(opts, IILookup), IncrementalProcessing(false), TUKind(TUKind),
CodeComplete(0), CodeCompletionFile(0), CodeCompletionOffset(0),
LastTokenWasAt(false), ModuleImportExpectsIdentifier(false),
CodeCompletionReached(0), SkipMainFilePreamble(0, true), CurPPLexer(0),
- CurDirLookup(0), CurLexerKind(CLK_Lexer), CurSubmodule(0),
- Callbacks(0), MacroArgCache(0), Record(0), MIChainHead(0), MICache(0),
+ CurDirLookup(0), CurLexerKind(CLK_Lexer), CurSubmodule(0), Callbacks(0),
+ MacroArgCache(0), Record(0), MIChainHead(0), MICache(0),
DeserialMIChainHead(0) {
OwnsHeaderSearch = OwnsHeaders;
diff --git a/unittests/Basic/SourceManagerTest.cpp b/unittests/Basic/SourceManagerTest.cpp
index 5f39bd41f6..36e6a5578b 100644
--- a/unittests/Basic/SourceManagerTest.cpp
+++ b/unittests/Basic/SourceManagerTest.cpp
@@ -80,9 +80,9 @@ TEST_F(SourceManagerTest, isBeforeInTranslationUnit) {
VoidModuleLoader ModLoader;
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
&*Target);
- Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts,
- SourceMgr, HeaderInfo, ModLoader,
- /*IILookup =*/ 0,
+ Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr,
+ HeaderInfo, ModLoader,
+ /*IILookup =*/0,
/*OwnsHeaderSearch =*/false);
PP.Initialize(*Target);
PP.EnterMainSourceFile();
@@ -195,9 +195,9 @@ TEST_F(SourceManagerTest, getMacroArgExpandedLocation) {
VoidModuleLoader ModLoader;
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
&*Target);
- Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts,
- SourceMgr, HeaderInfo, ModLoader,
- /*IILookup =*/ 0,
+ Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr,
+ HeaderInfo, ModLoader,
+ /*IILookup =*/0,
/*OwnsHeaderSearch =*/false);
PP.Initialize(*Target);
PP.EnterMainSourceFile();
@@ -293,9 +293,9 @@ TEST_F(SourceManagerTest, isBeforeInTranslationUnitWithMacroInInclude) {
VoidModuleLoader ModLoader;
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
&*Target);
- Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts,
- SourceMgr, HeaderInfo, ModLoader,
- /*IILookup =*/ 0,
+ Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr,
+ HeaderInfo, ModLoader,
+ /*IILookup =*/0,
/*OwnsHeaderSearch =*/false);
PP.Initialize(*Target);
diff --git a/unittests/Lex/LexerTest.cpp b/unittests/Lex/LexerTest.cpp
index 57b5c909e0..7be9360a59 100644
--- a/unittests/Lex/LexerTest.cpp
+++ b/unittests/Lex/LexerTest.cpp
@@ -69,9 +69,9 @@ protected:
VoidModuleLoader ModLoader;
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
Target.getPtr());
- Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts,
- SourceMgr, HeaderInfo, ModLoader, /*IILookup =*/ 0,
- /*OwnsHeaderSearch =*/ false);
+ Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr,
+ HeaderInfo, ModLoader, /*IILookup =*/0,
+ /*OwnsHeaderSearch =*/false);
PP.Initialize(*Target);
PP.EnterMainSourceFile();
diff --git a/unittests/Lex/PPCallbacksTest.cpp b/unittests/Lex/PPCallbacksTest.cpp
index c5013a7671..043c3003ce 100644
--- a/unittests/Lex/PPCallbacksTest.cpp
+++ b/unittests/Lex/PPCallbacksTest.cpp
@@ -172,10 +172,9 @@ protected:
AddFakeHeader(HeaderInfo, HeaderPath, SystemHeader);
IntrusiveRefCntPtr<PreprocessorOptions> PPOpts = new PreprocessorOptions();
- Preprocessor PP(PPOpts, Diags, LangOpts,
- SourceMgr, HeaderInfo, ModLoader,
- /*IILookup =*/ 0,
- /*OwnsHeaderSearch =*/false);
+ Preprocessor PP(PPOpts, Diags, LangOpts, SourceMgr, HeaderInfo, ModLoader,
+ /*IILookup =*/0,
+ /*OwnsHeaderSearch =*/false);
PP.Initialize(*Target);
InclusionDirectiveCallbacks* Callbacks = new InclusionDirectiveCallbacks;
PP.addPPCallbacks(Callbacks); // Takes ownership.
@@ -206,9 +205,8 @@ protected:
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags,
OpenCLLangOpts, Target.getPtr());
- Preprocessor PP(new PreprocessorOptions(), Diags, OpenCLLangOpts,
- SourceMgr, HeaderInfo, ModLoader,
- /*IILookup =*/ 0,
+ Preprocessor PP(new PreprocessorOptions(), Diags, OpenCLLangOpts, SourceMgr,
+ HeaderInfo, ModLoader, /*IILookup =*/0,
/*OwnsHeaderSearch =*/false);
PP.Initialize(*Target);
diff --git a/unittests/Lex/PPConditionalDirectiveRecordTest.cpp b/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
index 3028f60b57..ff81fa0bb6 100644
--- a/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
+++ b/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
@@ -97,9 +97,9 @@ TEST_F(PPConditionalDirectiveRecordTest, PPRecAPI) {
VoidModuleLoader ModLoader;
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
Target.getPtr());
- Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts,
- SourceMgr, HeaderInfo, ModLoader,
- /*IILookup =*/ 0,
+ Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr,
+ HeaderInfo, ModLoader,
+ /*IILookup =*/0,
/*OwnsHeaderSearch =*/false);
PP.Initialize(*Target);
PPConditionalDirectiveRecord *