[analyzer] Avoid ProgramStateRef copy constructors.
authorJordan Rose <jordan_rose@apple.com>
Thu, 6 Dec 2012 23:55:34 +0000 (23:55 +0000)
committerJordan Rose <jordan_rose@apple.com>
Thu, 6 Dec 2012 23:55:34 +0000 (23:55 +0000)
commit6c4e70817cf3f430d4e2140a1fd3c58f5c305fa2
treea806dda34fdcf20250229f74032e84434a75158d
parent48a353d339262bf683cb7f883bf8c90b37a3f0a3
[analyzer] Avoid ProgramStateRef copy constructors.

Suggested by David Blaikie. ExplodedNode, CallEvent, and CheckerContext all
hang onto their ProgramState, so the accessors can return a reference to the
internal state rather than preemptively copying it. This helps avoid
temporary ProgramStateRefs, though local variables will still (correctly)
do an extra retain and release.

llvm-svn: 169563
clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h