diff options
Diffstat (limited to 'tools/libclang/CXSourceLocation.cpp')
-rw-r--r-- | tools/libclang/CXSourceLocation.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/libclang/CXSourceLocation.cpp b/tools/libclang/CXSourceLocation.cpp index f78b687a69..64a441e128 100644 --- a/tools/libclang/CXSourceLocation.cpp +++ b/tools/libclang/CXSourceLocation.cpp @@ -41,7 +41,7 @@ static bool isASTUnitSourceLocation(const CXSourceLocation &L) { extern "C" { CXSourceLocation clang_getNullLocation() { - CXSourceLocation Result = { { 0, 0 }, 0 }; + CXSourceLocation Result = { { nullptr, nullptr }, 0 }; return Result; } @@ -52,7 +52,7 @@ unsigned clang_equalLocations(CXSourceLocation loc1, CXSourceLocation loc2) { } CXSourceRange clang_getNullRange() { - CXSourceRange Result = { { 0, 0 }, 0, 0 }; + CXSourceRange Result = { { nullptr, nullptr }, 0, 0 }; return Result; } @@ -89,7 +89,7 @@ int clang_Range_isNull(CXSourceRange range) { CXSourceLocation clang_getRangeStart(CXSourceRange range) { // Special decoding for CXSourceLocations for CXLoadedDiagnostics. if ((uintptr_t)range.ptr_data[0] & 0x1) { - CXSourceLocation Result = { { range.ptr_data[0], 0 }, 0 }; + CXSourceLocation Result = { { range.ptr_data[0], nullptr }, 0 }; return Result; } @@ -101,7 +101,7 @@ CXSourceLocation clang_getRangeStart(CXSourceRange range) { CXSourceLocation clang_getRangeEnd(CXSourceRange range) { // Special decoding for CXSourceLocations for CXLoadedDiagnostics. if ((uintptr_t)range.ptr_data[0] & 0x1) { - CXSourceLocation Result = { { range.ptr_data[1], 0 }, 0 }; + CXSourceLocation Result = { { range.ptr_data[1], nullptr }, 0 }; return Result; } @@ -183,7 +183,7 @@ CXSourceLocation clang_getLocationForOffset(CXTranslationUnit TU, static void createNullLocation(CXFile *file, unsigned *line, unsigned *column, unsigned *offset) { if (file) - *file = 0; + *file = nullptr; if (line) *line = 0; if (column) @@ -194,7 +194,7 @@ static void createNullLocation(CXFile *file, unsigned *line, } static void createNullLocation(CXString *filename, unsigned *line, - unsigned *column, unsigned *offset = 0) { + unsigned *column, unsigned *offset = nullptr) { if (filename) *filename = cxstring::createEmpty(); if (line) |