diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-05-26 06:22:03 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-05-26 06:22:03 +0000 |
commit | 6b8c5857eb9d309f9adb9149d9f383a29a9b68e7 (patch) | |
tree | 56e8b6db6892b13eea6e33509cb7751501b94409 /lib/Sema/SemaCast.cpp | |
parent | b0449def46f3e7efc8dd134ac68ce71399ba6573 (diff) |
[C++11] Use 'nullptr'. Sema edition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCast.cpp')
-rw-r--r-- | lib/Sema/SemaCast.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Sema/SemaCast.cpp b/lib/Sema/SemaCast.cpp index b842ce8889..df4e8232c6 100644 --- a/lib/Sema/SemaCast.cpp +++ b/lib/Sema/SemaCast.cpp @@ -90,7 +90,7 @@ namespace { if (IsARCUnbridgedCast) { castExpr = ImplicitCastExpr::Create(Self.Context, Self.Context.ARCUnbridgedCastTy, - CK_Dependent, castExpr, 0, + CK_Dependent, castExpr, nullptr, castExpr->getValueKind()); } return Self.Owned(castExpr); @@ -286,7 +286,7 @@ Sema::BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, } return Op.complete(CXXReinterpretCastExpr::Create(Context, Op.ResultType, Op.ValueKind, Op.Kind, Op.SrcExpr.take(), - 0, DestTInfo, OpLoc, + nullptr, DestTInfo, OpLoc, Parens.getEnd(), AngleBrackets)); } @@ -549,7 +549,7 @@ void CastOperation::CheckDynamicCast() { QualType DestPointee; const PointerType *DestPointer = DestType->getAs<PointerType>(); - const ReferenceType *DestReference = 0; + const ReferenceType *DestReference = nullptr; if (DestPointer) { DestPointee = DestPointer->getPointeeType(); } else if ((DestReference = DestType->getAs<ReferenceType>())) { @@ -1277,7 +1277,7 @@ TryStaticDowncast(Sema &Self, CanQualType SrcType, CanQualType DestType, return TC_Failed; } - if (Paths.getDetectedVirtual() != 0) { + if (Paths.getDetectedVirtual() != nullptr) { QualType VirtualBase(Paths.getDetectedVirtual(), 0); Self.Diag(OpRange.getBegin(), diag::err_static_downcast_via_virtual) << OrigSrcType << OrigDestType << VirtualBase << OpRange; @@ -1739,7 +1739,7 @@ static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, // same effect as the conversion *reinterpret_cast<T*>(&x) with the // built-in & and * operators. - const char *inappropriate = 0; + const char *inappropriate = nullptr; switch (SrcExpr.get()->getObjectKind()) { case OK_Ordinary: break; |