summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-thread-safety-analysis.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Thread Safety Analysis: fix bug when using TryLock with && and || expressions.DeLesley Hutchins2013-08-151-40/+83
| | | | llvm-svn: 188505
* Thread safety analysis: add two new attributes to the thread safety analysis:DeLesley Hutchins2013-05-171-2/+109
| | | | | | | assert_exclusive_lock and assert_shared_lock. These attributes are used to mark functions that dynamically check (i.e. assert) that a lock is held. llvm-svn: 182170
* Thread safety analysis: turn on checking within lock and unlock functions.DeLesley Hutchins2013-04-081-10/+80
| | | | | | These checks are enabled with the -Wthread-safety-beta flag. llvm-svn: 179046
* Thread safety analysis: make sure that expressions in attributes are parsedDeLesley Hutchins2013-02-071-0/+13
| | | | | | in an unevaluated context. llvm-svn: 174644
* Thread-safety analysis: ignore edges from throw expressions in CFG.DeLesley Hutchins2013-01-181-1/+21
| | | | llvm-svn: 172858
* Thread-safety analysis: check member access on guarded non-primitive types.DeLesley Hutchins2012-12-081-1/+62
| | | | llvm-svn: 169669
* Thread-safety analysis: check locks on method calls, operator=, andDeLesley Hutchins2012-12-051-1/+110
| | | | | | copy constructors. llvm-svn: 169350
* Thread-safety analysis: support multiple thread-safety attributes onDeLesley Hutchins2012-10-121-0/+91
| | | | | | declarations. llvm-svn: 165826
* Thread-safety analysis: allow attributes on constructors to refer to 'this'.DeLesley Hutchins2012-10-051-16/+34
| | | | llvm-svn: 165339
* Fix template instantiation of attributes. More specifically, fix the caseDeLesley Hutchins2012-09-261-0/+79
| | | | | | | | | where an attribute is attached to a forward declaration of a template function, and refers to parameters of that declaration, but is then inherited by the definition of that function. When the definition is instantiated, the parameter references need to be remapped. llvm-svn: 164710
* Thread-safety analysis: better handling of unreachable blocks. Fixes a bugDeLesley Hutchins2012-09-211-6/+15
| | | | | | | where a call to function marked 'noreturn' is followed by unreachable implicit destructor calls. llvm-svn: 164394
* Thread-safety analysis: fix bug where shared trylock was treatedDeLesley Hutchins2012-09-201-0/+30
| | | | | | as exclusive. llvm-svn: 164332
* Thread safety analysis: properly canonicalize calls to virtual methods withinDeLesley Hutchins2012-09-201-0/+32
| | | | | | lock expressions. llvm-svn: 164324
* Thread-safety analysis: Fix warning when EXCLUSIVE_LOCKS_REQUIREDDeLesley Hutchins2012-09-191-0/+34
| | | | | | is placed on a function that has no path to the exit block. llvm-svn: 164244
* Thread-safety analysis: fix ICE when EXCLUSIVE_LOCKS_REQUIRED orDeLesley Hutchins2012-09-191-0/+38
| | | | | | | LOCKS_EXCLUDED is used on a method with a name that is is not a simple identifier. llvm-svn: 164242
* Thread-safety analysis: fix bug in expression matching code.DeLesley Hutchins2012-09-111-0/+40
| | | | llvm-svn: 163656
* Thread safety analysis: fix bug related to lock_returned attributeDeLesley Hutchins2012-09-111-2/+27
| | | | | | on templates. llvm-svn: 163642
* Thread-safety analysis: differentiate between two forms of analysis; a preciseDeLesley Hutchins2012-09-101-18/+41
| | | | | | | | | 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. llvm-svn: 163537
* Whitespace.Chad Rosier2012-09-071-4/+0
| | | | llvm-svn: 163404
* Thread-safety analysis: Add support for selectively turning off warningsDeLesley Hutchins2012-09-071-4/+84
| | | | | | within part of a particular method. llvm-svn: 163397
* Thread-safety analysis: bugfix for case where a trylock occurs in anDeLesley Hutchins2012-09-051-0/+27
| | | | | | expression involving temporaries. llvm-svn: 163237
* Thread-safety analysis: fix handling of LOCK_RETURNED attribute so that theDeLesley Hutchins2012-08-311-0/+45
| | | | | | latest definition of a function is always used when computing lock expressions. llvm-svn: 163028
* Thread-safety analysis: fix handling of string constants in mutexDeLesley Hutchins2012-08-311-0/+26
| | | | | | expressions, which should be ignored right now. llvm-svn: 163026
* Thread-safety-analysis: adds existential quantification over lockDeLesley Hutchins2012-08-101-1/+60
| | | | | | | expressions. The syntax &MyClass::mutex is interpreted as a pattern that matches m->mutex for any object m of type MyClass. llvm-svn: 161691
* Thread safety analysis: refactor to support more sophisticated handlingDeLesley Hutchins2012-08-101-77/+78
| | | | | | of expressions, and better error messages. llvm-svn: 161690
* Fix some minor typosSylvestre Ledru2012-07-311-1/+1
| | | | llvm-svn: 161036
* Thread safety analysis: impove handling of trylock expressions.DeLesley Hutchins2012-07-101-2/+127
| | | | llvm-svn: 160018
* Thread-safety analysis: eliminate false positives in case where the definitionDeLesley Hutchins2012-07-051-3/+197
| | | | | | | duplicates attributes on the declaration. Also eliminates a false negative in ReleasableMutexLock. Fixing this bug required some refactoring. llvm-svn: 159780
* Thread safety analysis: improve handling of smart pointers.DeLesley Hutchins2012-07-031-3/+168
| | | | llvm-svn: 159679
* Thread Safety Analysis: handle expressions involving temporaries,DeLesley Hutchins2012-07-031-0/+40
| | | | | | e.g. ExprWithCleanups. llvm-svn: 159674
* Thread safety analysis: fixed bug that occurs when very silly peopleDeLesley Hutchins2012-07-021-0/+65
| | | | | | | use scoped_lockable without putting unlock_function on the destructor. llvm-svn: 159609
* Thread safety analysis: fixed incorrect error message at the end of a ↵DeLesley Hutchins2012-07-021-0/+16
| | | | | | locks_required function. llvm-svn: 159607
* Thread safety analysis: don't warn in case of duplicate annotation.DeLesley Hutchins2012-07-021-0/+20
| | | | llvm-svn: 159606
* Thread Safety Analysis: turn off checking within trylock functions.DeLesley Hutchins2012-07-021-0/+27
| | | | llvm-svn: 159601
* Thread safety analysis: support release() function on scopedDeLesley Hutchins2012-06-281-1/+47
| | | | | | lockable objects. llvm-svn: 159387
* Thread safety analysis: implement lock_returned attribute.DeLesley Hutchins2012-06-251-0/+103
| | | | llvm-svn: 159152
* Thread safety analysis: fixes a bug in which locksets are not handledDeLesley Hutchins2012-06-221-16/+32
| | | | | | | | 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. llvm-svn: 159008
* Remove -Wc++98-compat warning for an outrageously-rare circumstance of 'this'Richard Smith2012-04-301-0/+1
| | | | | | | | | | being used in an exception specification in a way which isn't otherwise ill-formed in C++98: this warning also incorrectly triggered on uses of 'this' inside thread-safety attributes, and the mechanism required to tell these cases apart is more complex than can be justified by the (minimal) value of this part of -Wc++98-compat. llvm-svn: 155857
* Enable warn_impcast_literal_float_to_integer by default.David Blaikie2012-04-051-3/+3
| | | | | | | | | | | | | | | | | This diagnostic seems to be production ready, it's just an oversight that it wasn't turned on by default. The test changes are a bit of a mixed bag. Some tests that seemed like they clearly didn't need to use this behavior have been modified not to use it. Others that I couldn't be sure about, I added the necessary expected-warnings to. It's possible the diagnostic message could be improved to make it clearer that this warning can be suppressed by using a value that won't lose precision when converted to the target type (but can still be a floating point literal, such as "bool b = 1.0;"). llvm-svn: 154068
* Thread safety analysis: expand set of expressions that can be used to denote ↵DeLesley Hutchins2012-03-021-21/+94
| | | | | | locks. llvm-svn: 151956
* Issue warning when late-parsed attributes have no declaration.DeLesley Hutchins2012-03-021-0/+13
| | | | llvm-svn: 151947
* Make late-parsed attributes follow the conventions of ordinaryDeLesley Hutchins2012-03-021-0/+24
| | | | | | | GNU attributes to a better extent, by allowing them in more places on a declator. llvm-svn: 151945
* Thread safety analysis: handle CFG blocks which call functions marked as ↵DeLesley Hutchins2012-03-021-0/+17
| | | | | | noreturn. llvm-svn: 151944
* Bugfix: bogus warning -- "invalid use of non-static data member",DeLesley Hutchins2012-02-251-0/+14
| | | | | | | when a class is forward declared, and the reference to the data member in question does not occur within a method body. llvm-svn: 151413
* Minor fix to template instantiation, which properly instantiatesDeLesley Hutchins2012-02-161-0/+2
| | | | | | dependent attributes on static members of templatized classes. llvm-svn: 150704
* Thread-safety analysis: Disable checking inside constructors, destructors, ↵DeLesley Hutchins2012-02-161-4/+21
| | | | | | lock, and unlock functions llvm-svn: 150701
* Thread-Safety: added support for 'this' as a lock expression.DeLesley Hutchins2012-02-161-0/+30
| | | | llvm-svn: 150700
* Allow thread safety attributes on function definitions.DeLesley Hutchins2012-02-161-0/+115
| | | | | | | | For compatibility with gcc, clang will now parse gcc attributes on function definitions, but issue a warning if the attribute is not a thread safety attribute. Warning controlled by -Wgcc-compat. llvm-svn: 150698
* Thread safety analysis:Richard Smith2012-02-031-48/+70
| | | | | | | | | | | | * 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. llvm-svn: 149669
* Thread safety analysis: at a CFG join point between a block terminating in aRichard Smith2012-02-031-4/+17
| | | | | | | 'continue' and another block, prefer the lockset from the other block, and diagnose the 'continue' block as being the end of a loop. llvm-svn: 149666
OpenPOWER on IntegriCloud