]> granicus.if.org Git - clang/commit
[analyzer] Allow ObjC ivar lvalues where the base is nil.
authorJordan Rose <jordan_rose@apple.com>
Mon, 1 Oct 2012 19:07:22 +0000 (19:07 +0000)
committerJordan Rose <jordan_rose@apple.com>
Mon, 1 Oct 2012 19:07:22 +0000 (19:07 +0000)
commite606e3d224d3fa8f6d4358ec66858d46754457a0
tree825b63dc7a9543df5cb87c6c8fc31b2e83f9d28e
parent75c5e6df52e055537cf92687cf80fe644233381f
[analyzer] Allow ObjC ivar lvalues where the base is nil.

By analogy with C structs, this seems to be legal, if probably discouraged.
It's only if the ivar is read from or written to that there's a problem.
Running a program that gets the "address" of an instance variable does in
fact return the offset when the base "object" is nil.

This isn't a full revert because r164442 includes some diagnostic tweaks
as well; those have been kept.

This partially reverts r164442 / 08965091770c9b276c238bac2f716eaa4da2dca4.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164960 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/ExprEngineObjC.cpp
test/Analysis/ivars.m
test/Analysis/null-deref-path-notes.m