diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-06-08 08:38:12 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-06-08 08:38:12 +0000 |
commit | b23b4992370221b27d64fa5b1da01a52aa271bef (patch) | |
tree | 9e75ef10ad41e4a485a12e26383248f7f6f0e3ed /unittests/Lex | |
parent | 085452490f953a5bb7b54827d99276029be1b6c6 (diff) | |
download | clang-b23b4992370221b27d64fa5b1da01a52aa271bef.tar.gz clang-b23b4992370221b27d64fa5b1da01a52aa271bef.tar.bz2 clang-b23b4992370221b27d64fa5b1da01a52aa271bef.tar.xz |
[C++11] Use 'nullptr'. Unittests edition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210423 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Lex')
-rw-r--r-- | unittests/Lex/LexerTest.cpp | 4 | ||||
-rw-r--r-- | unittests/Lex/PPCallbacksTest.cpp | 6 | ||||
-rw-r--r-- | unittests/Lex/PPConditionalDirectiveRecordTest.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
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<PreprocessorOptions> 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 * |