summaryrefslogtreecommitdiff
path: root/test/Other/lint.ll
Commit message (Collapse)AuthorAge
* Ignore apparent buffer overruns on external or weak globals. This is a majorDuncan Sands2012-09-30
| | | | | | | | source of false positives due to globals being declared in a header with some kind of incomplete (small) type, but the actual definition being bigger. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164912 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the 'lint' sanity checking pass to detect simple buffer overflows.Duncan Sands2012-09-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164671 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the way the lint sanity checking pass detects misaligned memory accesses.Duncan Sands2012-09-25
| | | | | | | | | | | | | | | | Previously it was only be able to detect problems if the pointer was a numerical value (eg inttoptr i32 1 to i32*), but not if it was an alloca or globa. The reason was the use of ComputeMaskedBits: imagine you have "alloca i8, align 2", and ask ComputeMaskedBits what it knows about the bits of the alloca pointer. It can tell you that the bottom bit is known zero (due to align 2) but it can't tell you that bit 1 is known one. That's because the address could be an even multiple of 2 rather than an odd multiple, eg it might be a multiple of 4. Thus trying to use KnownOne is ineffective in the case of an alloca as it will never have any bits set. Instead look explicitly for constant offsets from allocas and globals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164595 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the uses of '|&' to use '2>&1 |' instead, which works on oldChandler Carruth2012-07-02
| | | | | | | | | | versions of Bash. In addition, I can back out the change to the lit built-in shell test runner to support this. This should fix the majority of fallout on Darwin, but I suspect there will be a few straggling issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159544 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade syntax of tests using volatile instructions to use 'load volatile' ↵Chris Lattner2011-11-27
| | | | | | instead of 'volatile load', which is archaic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145171 91177308-0d34-0410-b5e6-96231b3b80d8
* Make BasicAliasAnalysis a normal AliasAnalysis implementation whichDan Gohman2010-10-18
| | | | | | | | | | | | | does normal initialization and normal chaining. Change the default AliasAnalysis implementation to NoAlias. Update StandardCompileOpts.h and friends to explicitly request BasicAliasAnalysis. Update tests to explicitly request -basicaa. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116720 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r111058, the lint check for indirectbr successors that aren'tDan Gohman2010-08-16
| | | | | | | | address-taken. This can occur normally, if the code which took the address got DCEd. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111121 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a lint check for an indirectbr destination which has notDan Gohman2010-08-13
| | | | | | | had its address taken. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111058 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a lint check for indirectbr with no successors.Dan Gohman2010-08-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110074 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a lint check for mismatched return types, inspired by PR6944.Dan Gohman2010-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108162 91177308-0d34-0410-b5e6-96231b3b80d8
* Add lint checks for function attributes.Dan Gohman2010-05-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105009 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix lint's memcpy and memmove checks, and its basic block traversal.Dan Gohman2010-05-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104970 91177308-0d34-0410-b5e6-96231b3b80d8
* Detect self-referential values.Dan Gohman2010-05-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104957 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove this va_arg test, which is no longer applicable.Dan Gohman2010-05-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104956 91177308-0d34-0410-b5e6-96231b3b80d8
* Eli pointed out that va_arg instruction result values don'tDan Gohman2010-05-28
| | | | | | | reference the stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104951 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach lint how to look through simple store+load pairs and otherDan Gohman2010-05-28
| | | | | | | | effective no-op constructs, to make it more effective on unoptimized IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104950 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a lint check for returning the address of stack memory.Dan Gohman2010-05-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104936 91177308-0d34-0410-b5e6-96231b3b80d8
* Reinstate checking of stackrestore, with checking for both ReadDan Gohman2010-05-26
| | | | | | | and Write, and add a comment explaining this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104756 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement checking of the tail keyword.Dan Gohman2010-05-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104744 91177308-0d34-0410-b5e6-96231b3b80d8
* Add lint checks for invalid uses of memory.Dan Gohman2010-04-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102733 91177308-0d34-0410-b5e6-96231b3b80d8
* Add several more lint checks.Dan Gohman2010-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100841 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a few more lint checks.Dan Gohman2010-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100825 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a -lint pass which checks for common sources of undefined or likelyDan Gohman2010-04-08
unintended behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100798 91177308-0d34-0410-b5e6-96231b3b80d8