summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/Consumed.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Consumed analysis: non-const methods no longer transfer an object into anDeLesley Hutchins2013-08-291-12/+2
| | | | | | unknown state. Patch by chris.wailes@gmail.com. llvm-svn: 189612
* Silencing the warning from r189605 in a more conformant manner.Aaron Ballman2013-08-291-1/+1
| | | | llvm-svn: 189606
* Silencing a rather spurious warning from MSVC 11 about not all control paths ↵Aaron Ballman2013-08-291-0/+1
| | | | | | returning a value (hint: they do). llvm-svn: 189605
* Fix warning about anonymous structs in anonymous unions.Eric Christopher2013-08-291-6/+8
| | | | llvm-svn: 189596
* Consumed analysis: improve handling of conditionals.DeLesley Hutchins2013-08-291-178/+473
| | | | | | | | | | | | | | 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
* Consumed analyis: Renamed *PStatus to *PInfo.DeLesley Hutchins2013-08-261-48/+48
| | | | | | | | | 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
* Update to consumed analysis.DeLesley Hutchins2013-08-221-76/+93
| | | | | | | | | | | 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
* Silence a warning from MSVC about not returning a valueReid Kleckner2013-08-131-0/+1
| | | | llvm-svn: 188237
* Remove Sema includes from Analysis code to fix layeringReid Kleckner2013-08-121-22/+12
| | | | | | | | | This moves a header-only class from Sema to Analysis and puts the option check in Sema. Patch by Chris Wailes! llvm-svn: 188230
* Speculative build fix for r188206.Hans Wennborg2013-08-121-1/+1
| | | | | | | The cmake-clang-x86_64 was upset: error: 'template<class ImplClass, class RetTy> class clang::ConstStmtVisitor' used without template parameters llvm-svn: 188211
* Patch by Chris Wailes <chris.wailes@gmail.com>.DeLesley Hutchins2013-08-121-0/+802
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
OpenPOWER on IntegriCloud