#
fc368259 |
| 03-Sep-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed analysis: add return_typestate attribute. Patch by chris.wailes@gmail.com
Functions can now declare what state the consumable type the are returning will be in. This is then used on the cal
Consumed analysis: add return_typestate attribute. Patch by chris.wailes@gmail.com
Functions can now declare what state the consumable type the are returning will be in. This is then used on the caller side and checked on the callee side. Constructors now use this attribute instead of the 'consumes' attribute.
llvm-svn: 189843
show more ...
|
#
5a715c4f |
| 30-Aug-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed analysis: add 'consumable' class attribute. Patch by chris.wailes@gmail.com
Adds the 'consumable' attribute that can be attached to classes. This replaces the previous method of scanning a
Consumed analysis: add 'consumable' class attribute. Patch by chris.wailes@gmail.com
Adds the 'consumable' attribute that can be attached to classes. This replaces the previous method of scanning a class's methods to see if any of them have consumed analysis attributes attached to them. If consumed analysis attributes are attached to methods of a class that isn't marked 'consumable' a warning is generated.
llvm-svn: 189702
show more ...
|
#
b570c135 |
| 29-Aug-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed analysis: track function parameters. Patch by chris.wailes@gmail.com.
llvm-svn: 189616
|
#
7fa60edb |
| 29-Aug-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed analysis: non-const methods no longer transfer an object into an unknown state. Patch by chris.wailes@gmail.com.
llvm-svn: 189612
|
#
a21f4b8d |
| 29-Aug-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Silencing the warning from r189605 in a more conformant manner.
llvm-svn: 189606
|
#
130db36d |
| 29-Aug-2013 |
Aaron Ballman <aaron@aaronballman.com> |
Silencing a rather spurious warning from MSVC 11 about not all control paths returning a value (hint: they do).
llvm-svn: 189605
|
#
f8a1baab |
| 29-Aug-2013 |
Eric Christopher <echristo@gmail.com> |
Fix warning about anonymous structs in anonymous unions.
llvm-svn: 189596
|
#
5533ec5c |
| 29-Aug-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed analysis: improve handling of conditionals. Patch by chris.wailes@gmail.com.
* The TestedVarsVisitor was folded into the ConsumedStmtVisitor. * The VarTestResult class was updated to allow
Consumed analysis: improve handling of conditionals. Patch by chris.wailes@gmail.com.
* The TestedVarsVisitor was folded into the ConsumedStmtVisitor. * The VarTestResult class was updated to allow these changes. * The PropagationInfo class was updated for the same reasons. * Correctly handle short-circuiting of Boolean operations. * Blocks are now marked as unreachable when we can statically prove we will never branch to them. * Unreachable blocks are skipped by the analysis.
llvm-svn: 189594
show more ...
|
#
2445b121 |
| 26-Aug-2013 |
DeLesley Hutchins <delesley@google.com> |
Consumed analyis: Renamed *PStatus to *PInfo. The change was made for readability, as the PropagationInfo objects don't always contain a status. This is submitted as a separate patch because it touc
Consumed analyis: Renamed *PStatus to *PInfo. The change was made for readability, as the PropagationInfo objects don't always contain a status. This is submitted as a separate patch because it touches a lot of lines and I don't want it cluttering up the next patch. Patch by chris.wailes@gmail.com.
llvm-svn: 189278
show more ...
|
#
c2ecf0d8 |
| 22-Aug-2013 |
DeLesley Hutchins <delesley@google.com> |
Update to consumed analysis.
Patch by chris.wailes@gmail.com. The following functionality was added:
* The same functionality is now supported for both CXXOperatorCallExprs and CXXMemberCallExprs.
Update to consumed analysis.
Patch by chris.wailes@gmail.com. The following functionality was added:
* The same functionality is now supported for both CXXOperatorCallExprs and CXXMemberCallExprs. * Factored out some code in StmtVisitor. * Removed variables from the state map when their destructors are encountered. * Started adding documentation for the consumed analysis attributes.
llvm-svn: 189059
show more ...
|
#
6454d0a0 |
| 13-Aug-2013 |
Reid Kleckner <reid@kleckner.net> |
Silence a warning from MSVC about not returning a value
llvm-svn: 188237
|
#
e846deae |
| 12-Aug-2013 |
Reid Kleckner <reid@kleckner.net> |
Remove Sema includes from Analysis code to fix layering
This moves a header-only class from Sema to Analysis and puts the option check in Sema.
Patch by Chris Wailes!
llvm-svn: 188230
|
#
812a9ec9 |
| 12-Aug-2013 |
Hans Wennborg <hans@hanshq.net> |
Speculative build fix for r188206.
The cmake-clang-x86_64 was upset: error: 'template<class ImplClass, class RetTy> class clang::ConstStmtVisitor' used without template parameters
llvm-svn: 188211
|
#
48a31766 |
| 12-Aug-2013 |
DeLesley Hutchins <delesley@google.com> |
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 ac
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.
llvm-svn: 188206
show more ...
|