]> granicus.if.org Git - clang/commit
[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)
commit0a6e09f67c719c318856be19d57e19972101f62c
tree58c515b1d595d43d6daea4d378f2dc0c2fc23a6f
parentc57d158c2900185d7828a92ca8db7b877ef1a621
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169563 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h