From b23b4992370221b27d64fa5b1da01a52aa271bef Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 8 Jun 2014 08:38:12 +0000 Subject: [C++11] Use 'nullptr'. Unittests edition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210423 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Lex/LexerTest.cpp | 4 ++-- unittests/Lex/PPCallbacksTest.cpp | 6 +++--- unittests/Lex/PPConditionalDirectiveRecordTest.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'unittests/Lex') diff --git a/unittests/Lex/LexerTest.cpp b/unittests/Lex/LexerTest.cpp index 2b42f9cb0e..2981de7e25 100644 --- a/unittests/Lex/LexerTest.cpp +++ b/unittests/Lex/LexerTest.cpp @@ -41,7 +41,7 @@ class VoidModuleLoader : public ModuleLoader { bool Complain) override { } GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc) override - { return 0; } + { return nullptr; } bool lookupMissingImports(StringRef Name, SourceLocation TriggerLoc) override { return 0; }; }; @@ -69,7 +69,7 @@ protected: HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, Target.getPtr()); Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, - HeaderInfo, ModLoader, /*IILookup =*/0, + HeaderInfo, ModLoader, /*IILookup =*/nullptr, /*OwnsHeaderSearch =*/false); PP.Initialize(*Target); PP.EnterMainSourceFile(); diff --git a/unittests/Lex/PPCallbacksTest.cpp b/unittests/Lex/PPCallbacksTest.cpp index cceebea6c1..5ca2013cd6 100644 --- a/unittests/Lex/PPCallbacksTest.cpp +++ b/unittests/Lex/PPCallbacksTest.cpp @@ -48,7 +48,7 @@ class VoidModuleLoader : public ModuleLoader { bool Complain) override { } GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc) override - { return 0; } + { return nullptr; } bool lookupMissingImports(StringRef Name, SourceLocation TriggerLoc) override { return 0; }; }; @@ -174,7 +174,7 @@ protected: IntrusiveRefCntPtr PPOpts = new PreprocessorOptions(); Preprocessor PP(PPOpts, Diags, LangOpts, SourceMgr, HeaderInfo, ModLoader, - /*IILookup =*/0, + /*IILookup =*/nullptr, /*OwnsHeaderSearch =*/false); PP.Initialize(*Target); InclusionDirectiveCallbacks* Callbacks = new InclusionDirectiveCallbacks; @@ -207,7 +207,7 @@ protected: OpenCLLangOpts, Target.getPtr()); Preprocessor PP(new PreprocessorOptions(), Diags, OpenCLLangOpts, SourceMgr, - HeaderInfo, ModLoader, /*IILookup =*/0, + HeaderInfo, ModLoader, /*IILookup =*/nullptr, /*OwnsHeaderSearch =*/false); PP.Initialize(*Target); diff --git a/unittests/Lex/PPConditionalDirectiveRecordTest.cpp b/unittests/Lex/PPConditionalDirectiveRecordTest.cpp index 1be5ececa7..49f9d1c132 100644 --- a/unittests/Lex/PPConditionalDirectiveRecordTest.cpp +++ b/unittests/Lex/PPConditionalDirectiveRecordTest.cpp @@ -65,7 +65,7 @@ class VoidModuleLoader : public ModuleLoader { bool Complain) override { } GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc) override - { return 0; } + { return nullptr; } bool lookupMissingImports(StringRef Name, SourceLocation TriggerLoc) override { return 0; }; }; @@ -98,7 +98,7 @@ TEST_F(PPConditionalDirectiveRecordTest, PPRecAPI) { Target.getPtr()); Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, HeaderInfo, ModLoader, - /*IILookup =*/0, + /*IILookup =*/nullptr, /*OwnsHeaderSearch =*/false); PP.Initialize(*Target); PPConditionalDirectiveRecord * -- cgit v1.2.3