diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-11-08 00:41:20 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-11-08 00:41:20 +0000 |
commit | e81b43bc306d361fcf4d411aeb14b43f8464bf4a (patch) | |
tree | 1ddf1bbd68f83893d4a0bf2467fd6b216ad1caf7 /lib/Sema/SemaChecking.cpp | |
parent | e9385363069388d8e3536052a138f17332e00620 (diff) |
PR14284: crash on ext-valid returning NULL from a void function
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index a434425db8..692a210ef3 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -4799,7 +4799,8 @@ 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->isBlockPointerType() && !Target->isMemberPointerType() + && Target->isScalarType()) { SourceLocation Loc = E->getSourceRange().getBegin(); if (Loc.isMacroID()) Loc = S.SourceMgr.getImmediateExpansionRange(Loc).first; |