]> granicus.if.org Git - clang/commit
Add an assert to further check the invariant that a null pointer
authorChandler Carruth <chandlerc@gmail.com>
Fri, 4 Nov 2016 06:11:54 +0000 (06:11 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 4 Nov 2016 06:11:54 +0000 (06:11 +0000)
commitbff9f7176a483c4f85fe486ad38eddd700deffb2
tree84cee6b37d260bb5b5476ab69ac3558d725fd4df
parent351cf00f4839eb42c9c4a247302a8c625d835d1f
Add an assert to further check the invariant that a null pointer
corresponds to another argument being valid.

This makes it clear that the code is correct despite the PVS-Studio
report that a pointer might be dereferenced prior to being checked for
whether it is null. It likely is also enough for static analyzers to not
flag the code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285982 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExprObjC.cpp