summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2016-07-25 21:58:19 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2016-07-25 21:58:19 +0000
commit1b07496cea6c9ceeee0388ee97466b24a09aa886 (patch)
tree80780de90ac1c63409f60d36aa3f0e72376e783d /clang/lib/Sema
parent0ed42b0ca029a046311227672fc6491f6b5a63d9 (diff)
downloadbcm5719-llvm-1b07496cea6c9ceeee0388ee97466b24a09aa886.tar.gz
bcm5719-llvm-1b07496cea6c9ceeee0388ee97466b24a09aa886.zip
[Sema][ObjC] Compute the nullability of a conditional expression based
on the nullabilities of its operands. This commit is a follow-up to r276076 and enables computeConditionalNullability to compute the merged nullability when the operands are objective-c pointers. rdar://problem/22074116 llvm-svn: 276696
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 6322e15826a..42c44b183e5 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -7016,7 +7016,7 @@ static void DiagnoseConditionalPrecedence(Sema &Self,
static QualType computeConditionalNullability(QualType ResTy, bool IsBin,
QualType LHSTy, QualType RHSTy,
ASTContext &Ctx) {
- if (!ResTy->isPointerType())
+ if (!ResTy->isAnyPointerType())
return ResTy;
auto GetNullability = [&Ctx](QualType Ty) {
OpenPOWER on IntegriCloud