aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-02-16 00:56:22 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-02-16 00:56:22 +0000
commit896c7dd62801c0aacf14b05183c3c471c1fe9f7a (patch)
tree26b94fa589d7bef124f6c6e18bbdc0253b4f56d1 /lib/Sema/SemaChecking.cpp
parentb4127a28a6dd81852469d05c611a487beb233784 (diff)
Don't warn on conversion from NULL to nullptr_t
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175331 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r--lib/Sema/SemaChecking.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index 17ce614f7f..d76592438b 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -4939,7 +4939,7 @@ void CheckImplicitConversion(Sema &S, Expr *E, QualType T,
if ((E->isNullPointerConstant(S.Context, Expr::NPC_ValueDependentIsNotNull)
== Expr::NPCK_GNUNull) && !Target->isAnyPointerType()
&& !Target->isBlockPointerType() && !Target->isMemberPointerType()
- && Target->isScalarType()) {
+ && Target->isScalarType() && !Target->isNullPtrType()) {
SourceLocation Loc = E->getSourceRange().getBegin();
if (Loc.isMacroID())
Loc = S.SourceMgr.getImmediateExpansionRange(Loc).first;