[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)
commit92375adafbca9ee5dc2840a6252000154a6e71df
treefdf22c6e64d913cf14f809162cabc1b1ab07d2b2
parent28c06b268eb2db0ba5df054279da9dc2f7e018e9
[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.

llvm-svn: 164960
clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp
clang/test/Analysis/ivars.m
clang/test/Analysis/null-deref-path-notes.m