summaryrefslogtreecommitdiffstats
path: root/clang/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests')
-rw-r--r--clang/unittests/Basic/SourceManagerTest.cpp18
-rw-r--r--clang/unittests/Lex/LexerTest.cpp6
-rw-r--r--clang/unittests/Lex/PPCallbacksTest.cpp10
-rw-r--r--clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp6
4 files changed, 19 insertions, 21 deletions
diff --git a/clang/unittests/Basic/SourceManagerTest.cpp b/clang/unittests/Basic/SourceManagerTest.cpp
index 88c3fb76ca0..5f39bd41f68 100644
--- a/clang/unittests/Basic/SourceManagerTest.cpp
+++ b/clang/unittests/Basic/SourceManagerTest.cpp
@@ -80,11 +80,11 @@ TEST_F(SourceManagerTest, isBeforeInTranslationUnit) {
VoidModuleLoader ModLoader;
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
&*Target);
- Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, Target.getPtr(),
+ Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts,
SourceMgr, HeaderInfo, ModLoader,
/*IILookup =*/ 0,
- /*OwnsHeaderSearch =*/false,
- /*DelayInitialization =*/ false);
+ /*OwnsHeaderSearch =*/false);
+ PP.Initialize(*Target);
PP.EnterMainSourceFile();
std::vector<Token> toks;
@@ -195,11 +195,11 @@ TEST_F(SourceManagerTest, getMacroArgExpandedLocation) {
VoidModuleLoader ModLoader;
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
&*Target);
- Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, Target.getPtr(),
+ Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts,
SourceMgr, HeaderInfo, ModLoader,
/*IILookup =*/ 0,
- /*OwnsHeaderSearch =*/false,
- /*DelayInitialization =*/ false);
+ /*OwnsHeaderSearch =*/false);
+ PP.Initialize(*Target);
PP.EnterMainSourceFile();
std::vector<Token> toks;
@@ -293,11 +293,11 @@ TEST_F(SourceManagerTest, isBeforeInTranslationUnitWithMacroInInclude) {
VoidModuleLoader ModLoader;
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
&*Target);
- Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, Target.getPtr(),
+ Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts,
SourceMgr, HeaderInfo, ModLoader,
/*IILookup =*/ 0,
- /*OwnsHeaderSearch =*/false,
- /*DelayInitialization =*/ false);
+ /*OwnsHeaderSearch =*/false);
+ PP.Initialize(*Target);
std::vector<MacroAction> Macros;
PP.addPPCallbacks(new MacroTracker(Macros));
diff --git a/clang/unittests/Lex/LexerTest.cpp b/clang/unittests/Lex/LexerTest.cpp
index 0faad459837..57b5c909e0a 100644
--- a/clang/unittests/Lex/LexerTest.cpp
+++ b/clang/unittests/Lex/LexerTest.cpp
@@ -69,10 +69,10 @@ protected:
VoidModuleLoader ModLoader;
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
Target.getPtr());
- Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, Target.getPtr(),
+ Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts,
SourceMgr, HeaderInfo, ModLoader, /*IILookup =*/ 0,
- /*OwnsHeaderSearch =*/ false,
- /*DelayInitialization =*/ false);
+ /*OwnsHeaderSearch =*/ false);
+ PP.Initialize(*Target);
PP.EnterMainSourceFile();
std::vector<Token> toks;
diff --git a/clang/unittests/Lex/PPCallbacksTest.cpp b/clang/unittests/Lex/PPCallbacksTest.cpp
index bdc026a223c..c5013a7671c 100644
--- a/clang/unittests/Lex/PPCallbacksTest.cpp
+++ b/clang/unittests/Lex/PPCallbacksTest.cpp
@@ -173,11 +173,10 @@ protected:
IntrusiveRefCntPtr<PreprocessorOptions> PPOpts = new PreprocessorOptions();
Preprocessor PP(PPOpts, Diags, LangOpts,
- Target.getPtr(),
SourceMgr, HeaderInfo, ModLoader,
/*IILookup =*/ 0,
- /*OwnsHeaderSearch =*/false,
- /*DelayInitialization =*/ false);
+ /*OwnsHeaderSearch =*/false);
+ PP.Initialize(*Target);
InclusionDirectiveCallbacks* Callbacks = new InclusionDirectiveCallbacks;
PP.addPPCallbacks(Callbacks); // Takes ownership.
@@ -208,11 +207,10 @@ protected:
OpenCLLangOpts, Target.getPtr());
Preprocessor PP(new PreprocessorOptions(), Diags, OpenCLLangOpts,
- Target.getPtr(),
SourceMgr, HeaderInfo, ModLoader,
/*IILookup =*/ 0,
- /*OwnsHeaderSearch =*/false,
- /*DelayInitialization =*/ false);
+ /*OwnsHeaderSearch =*/false);
+ PP.Initialize(*Target);
// parser actually sets correct pragma handlers for preprocessor
// according to LangOptions, so we init Parser to register opencl
diff --git a/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp b/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
index bacc899becc..3028f60b57f 100644
--- a/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
+++ b/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
@@ -97,11 +97,11 @@ TEST_F(PPConditionalDirectiveRecordTest, PPRecAPI) {
VoidModuleLoader ModLoader;
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts,
Target.getPtr());
- Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts,Target.getPtr(),
+ Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts,
SourceMgr, HeaderInfo, ModLoader,
/*IILookup =*/ 0,
- /*OwnsHeaderSearch =*/false,
- /*DelayInitialization =*/ false);
+ /*OwnsHeaderSearch =*/false);
+ PP.Initialize(*Target);
PPConditionalDirectiveRecord *
PPRec = new PPConditionalDirectiveRecord(SourceMgr);
PP.addPPCallbacks(PPRec);
OpenPOWER on IntegriCloud