summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorDeLesley Hutchins <delesley@google.com>2013-08-12 21:20:55 +0000
committerDeLesley Hutchins <delesley@google.com>2013-08-12 21:20:55 +0000
commitdf7bef07eebd5c7913e8be09c62a6a470f255fd2 (patch)
tree9684e39ef1fc4c97d90a806438ea2a6b810bde31 /lib/CodeGen/CGExpr.cpp
parent4432bf007abb40cdbe2679dd94ec5b11c5795355 (diff)
downloadclang-df7bef07eebd5c7913e8be09c62a6a470f255fd2.tar.gz
clang-df7bef07eebd5c7913e8be09c62a6a470f255fd2.tar.bz2
clang-df7bef07eebd5c7913e8be09c62a6a470f255fd2.tar.xz
Patch by Chris Wailes <chris.wailes@gmail.com>.
Reviewed by delesley, dblaikie. Add the annotations and code needed to support a basic 'consumed' analysis. Summary: This new analysis is based on academic literature on linear types. It tracks the state of a value, either as unconsumed, consumed, or unknown. Methods are then annotated as CallableWhenUnconsumed, and when an annotated method is called while the value is in the 'consumed' state a warning is issued. A value may be tested in the conditional statement of an if-statement; when this occurs we know the state of the value in the different branches, and this information is added to our analysis. The code is still highly experimental, and the names of annotations or the algorithm may be subject to change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188206 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
0 files changed, 0 insertions, 0 deletions