summaryrefslogtreecommitdiff
path: root/tools/libclang/CXSourceLocation.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-06-08 08:38:04 +0000
committerCraig Topper <craig.topper@gmail.com>2014-06-08 08:38:04 +0000
commit085452490f953a5bb7b54827d99276029be1b6c6 (patch)
tree53fa750d4bf41c242862a4b909ae968c2a5a87ac /tools/libclang/CXSourceLocation.cpp
parentfe9046f3ef2a3e82ca0d9d2de72cafdafdea9294 (diff)
downloadclang-085452490f953a5bb7b54827d99276029be1b6c6.tar.gz
[C++11] Use 'nullptr'. Tools edition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210422 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/CXSourceLocation.cpp')
-rw-r--r--tools/libclang/CXSourceLocation.cpp12
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)