summaryrefslogtreecommitdiff
path: root/lib/Analysis/ThreadSafety.cpp
Commit message (Collapse)AuthorAge
...
* Thread safety analysis: properly canonicalize calls to virtual methods withinDeLesley Hutchins2012-09-20
| | | | | | lock expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164324 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread-safety analysis: Fix warning when EXCLUSIVE_LOCKS_REQUIREDDeLesley Hutchins2012-09-19
| | | | | | is placed on a function that has no path to the exit block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164244 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread-safety analysis: fix ICE when EXCLUSIVE_LOCKS_REQUIRED orDeLesley Hutchins2012-09-19
| | | | | | | LOCKS_EXCLUDED is used on a method with a name that is is not a simple identifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164242 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread-safety analysis: fix bug in expression matching code.DeLesley Hutchins2012-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163656 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread-safety analysis: differentiate between two forms of analysis; a preciseDeLesley Hutchins2012-09-10
| | | | | | | | | analysis that may give false positives because it is confused by aliasing, and a less precise analysis that has fewer false positives, but may have false negatives. The more precise warnings are enabled by -Wthread-safety-precise. An additional note clarify the warnings in the precise case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163537 91177308-0d34-0410-b5e6-96231b3b80d8
* Ampersand goes with identifier.Chad Rosier2012-09-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163410 91177308-0d34-0410-b5e6-96231b3b80d8
* Bring buildbots back. Fix scoping issue and coding style from r163397.Chad Rosier2012-09-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163403 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread-safety analysis: Add support for selectively turning off warningsDeLesley Hutchins2012-09-07
| | | | | | within part of a particular method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163397 91177308-0d34-0410-b5e6-96231b3b80d8
* Dont cast away const needlessly. Found by gcc48 -Wcast-qual.Roman Divacky2012-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163325 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread-safety analysis: bugfix for case where a trylock occurs in anDeLesley Hutchins2012-09-05
| | | | | | expression involving temporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163237 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread-safety analysis: fix handling of LOCK_RETURNED attribute so that theDeLesley Hutchins2012-08-31
| | | | | | latest definition of a function is always used when computing lock expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163028 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread-safety analysis: fix handling of string constants in mutexDeLesley Hutchins2012-08-31
| | | | | | expressions, which should be ignored right now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163026 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an assortment of doxygen comment issues found by -Wdocumentation.Ted Kremenek2012-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162412 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread-safety-analysis: adds existential quantification over lockDeLesley Hutchins2012-08-10
| | | | | | | expressions. The syntax &MyClass::mutex is interpreted as a pattern that matches m->mutex for any object m of type MyClass. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161691 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: refactor to support more sophisticated handlingDeLesley Hutchins2012-08-10
| | | | | | of expressions, and better error messages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161690 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor thread safety analysis to use a different data structureDeLesley Hutchins2012-08-10
| | | | | | to track locksets. This is in preparation for further changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161680 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo (the the => the)Sylvestre Ledru2012-07-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160622 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: impove handling of trylock expressions.DeLesley Hutchins2012-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160018 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread-safety analysis: eliminate false positives in case where the definitionDeLesley Hutchins2012-07-05
| | | | | | | duplicates attributes on the declaration. Also eliminates a false negative in ReleasableMutexLock. Fixing this bug required some refactoring. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159780 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: improve handling of smart pointers.DeLesley Hutchins2012-07-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159679 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread Safety Analysis: handle expressions involving temporaries,DeLesley Hutchins2012-07-03
| | | | | | e.g. ExprWithCleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159674 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: fixed bug that occurs when very silly peopleDeLesley Hutchins2012-07-02
| | | | | | | use scoped_lockable without putting unlock_function on the destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159609 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: fixed incorrect error message at the end of a ↵DeLesley Hutchins2012-07-02
| | | | | | locks_required function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159607 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: don't warn in case of duplicate annotation.DeLesley Hutchins2012-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159606 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread Safety Analysis: turn off checking within trylock functions.DeLesley Hutchins2012-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159601 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: support release() function on scopedDeLesley Hutchins2012-06-28
| | | | | | lockable objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159387 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: implement lock_returned attribute.DeLesley Hutchins2012-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159152 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: fixes a bug in which locksets are not handledDeLesley Hutchins2012-06-22
| | | | | | | | properly if there is a join point in the control flow graph that involves a trylock. Also changes the source locations of some warnings to be more consistent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159008 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the thread safety analysis so that it is easier to doDeLesley Hutchins2012-04-19
| | | | | | path-sensitive analysis like handling of trylock expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155137 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr toJohn McCall2012-03-10
| | | | | | | | track whether the referenced declaration comes from an enclosing local context. I'm amenable to suggestions about the exact meaning of this bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152491 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: expand set of expressions that can be used to denote ↵DeLesley Hutchins2012-03-02
| | | | | | locks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151956 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: handle CFG blocks which call functions marked as ↵DeLesley Hutchins2012-03-02
| | | | | | noreturn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151944 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread-safety analysis: Disable checking inside constructors, destructors, ↵DeLesley Hutchins2012-02-16
| | | | | | lock, and unlock functions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150701 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread-Safety: added support for 'this' as a lock expression.DeLesley Hutchins2012-02-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150700 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis:Richard Smith2012-02-03
| | | | | | | | | | | | | * When we detect that a CFG block has inconsistent lock sets, point the diagnostic at the location where we found the inconsistency, and point a note at somewhere the inconsistently-locked mutex was locked. * Fix the wording of the normal (non-loop, non-end-of-function) case of this diagnostic to not suggest that the mutex is going out of scope. * Fix the diagnostic emission code to keep a warning and its note together when sorting the diagnostics into source location order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149669 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: at a CFG join point between a block terminating in aRichard Smith2012-02-03
| | | | | | | | 'continue' and another block, prefer the lockset from the other block, and diagnose the 'continue' block as being the end of a loop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149666 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle thread safety attributes on functions with separate definitions and ↵DeLesley Hutchins2012-01-20
| | | | | | declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148599 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: added support for trylock attribute.DeLesley Hutchins2012-01-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147672 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LocalVariableMapDeLesley Hutchins2012-01-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147670 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for thread safety attributes on functionsDeLesley Hutchins2011-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147331 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch extends thread safety analysis with support for the ↵DeLesley Hutchins2011-12-08
| | | | | | scoped_lockable attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146174 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename AnalysisContext to AnalysisDeclContext. Not only is this name more ↵Ted Kremenek2011-10-24
| | | | | | accurate, but it frees up the name AnalysisContext for other uses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142782 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor ThreadSafety to use PostOrderCFGView instead of its own copy (of ↵Ted Kremenek2011-10-22
| | | | | | TopologicallySortedCFG). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142714 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for thread safety attributes on destructors.DeLesley Hutchins2011-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142685 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis refactoring: invalid lock expressions.DeLesley Hutchins2011-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142666 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread safety analysis: add support for attributes on constructors.DeLesley Hutchins2011-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142665 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactoring and code cleanup.DeLesley Hutchins2011-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142654 91177308-0d34-0410-b5e6-96231b3b80d8
* Substitute for arguments in method calls -- functionalityDeLesley Hutchins2011-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142267 91177308-0d34-0410-b5e6-96231b3b80d8
* Substitute for arguments in method calls -- refactoringDeLesley Hutchins2011-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142260 91177308-0d34-0410-b5e6-96231b3b80d8
* Test commitDeLesley Hutchins2011-09-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140149 91177308-0d34-0410-b5e6-96231b3b80d8