]> granicus.if.org Git - clang/commit
[Sema] Compute the nullability of a conditional expression based on the
authorAkira Hatanaka <ahatanaka@apple.com>
Wed, 20 Jul 2016 01:48:11 +0000 (01:48 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Wed, 20 Jul 2016 01:48:11 +0000 (01:48 +0000)
commit8c7a86891a7122bc9b5f635be7017095cc679de5
tree2913bc0a90a7448b6b74e292e45bfcd289f77440
parent06a1ffe84a23ff5d11dcf3f42ea024a6aee594bd
[Sema] Compute the nullability of a conditional expression based on the
nullabilities of its operands.

This patch defines a function to compute the nullability of conditional
expressions, which enables Sema to precisely detect implicit conversions
of nullable conditional expressions to nonnull pointers.

rdar://problem/25166556

Differential Revision: https://reviews.llvm.org/D22392

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276076 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExpr.cpp
test/Sema/nullability.c
test/SemaCXX/nullability.cpp