aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis
AgeCommit message (Collapse)Author
2009-11-09update CMakeList.txtZhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86535 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09Update CMakeDaniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09Add comments.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09Add checker for CWE-588: Attempt to Access Child of a Non-structure Pointer.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86529 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09Update CMakeDaniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09Put all long strings in 80-col.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09Add checker for CWE-587: Assignment of a Fixed Address to a Pointer.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09Add checker for CWE-469: Use of Pointer Subtraction to Determine Size. ThisZhongxing Xu
checker does not build sink nodes. Because svaluator computes an unknown value for the subtraction now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86517 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09Add a test case for CWE-467, and simplify the wording of the warning.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86504 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08Update CMake file.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86479 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08Add a checker for CWE-467: Use of sizeof() on a Pointer Type.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86464 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07Use SaveAndRestore to simplify logic in LiveVariables::runOnAllBlocks(). ↵Ted Kremenek
Patch by Kovarththanan Rajaratnam! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86343 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07Remove Checker::CheckType() (and instead using ↵Ted Kremenek
CheckerVisitor::PreVisitDeclStmt()), and refactor VLASizeChecker to have only one Checker subclass (not two) and to not use the node builders directly (and instead use the newer CheckerContext). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86329 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06Make the VLASizeChecker implementation private, and its creation only known ↵Ted Kremenek
to GRExprEngineInternalChecks.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86292 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06Make the implementation of DivZeroChecker private.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86288 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06Sentence-case bug type, and pull tests from region-only-test.c into ↵Ted Kremenek
misc-ps-region.store.m (removing an extra unneeded test file). Also add a bunch of FIXME comments for future enhancements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86282 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06add some const qualifiers, patch by Kovarththanan Rajaratnam!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86260 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06Add a checker for CWE-466: Return of Pointer Value Outside of Expected Range.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86252 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06static analyzer: refactor checking logic for returning the address of a ↵Ted Kremenek
stack variable or a garbage value into their own respective subclasses of Checker (and put them in .cpp files where their implementation details are hidden from GRExprEngine). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86215 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06Minor cleanup: use BuiltinBug (which will soon be renamed) for ↵Ted Kremenek
DeferenceChecker and friends so that they always report the same bug type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86208 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05Tweak wording and classifications of analyzer diagnostics.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05Modify GRExprEngine::EvalBind() to take both a "store expression" andTed Kremenek
an "assign expression", representing the expressions where the value binding occurs and the assignment takes place respectively. These are largely syntactic clues for better error reporting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86084 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04Update CMake.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86015 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04Add FIXME.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86004 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04Catch uses of undefined values when they are used in assignment, thus ↵Ted Kremenek
catching such bugs closer to the source. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86003 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04Merge ZeroSizedVLAChecker and UndefSizedVLAChecker.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85996 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04Refactor StoreManager::BindDecl() to take a VarRegion* instead of a ↵Ted Kremenek
VarDecl*, and modify GRExprEngine::EvalBind() to handle decl initialization as well. This paves the way for adding "checker" visitation in EvalBind(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85983 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Change GRTransferFuncs::RegisterChecks() to take a GRExprEngine& instead of ↵Ted Kremenek
a BugReporter&. This paves the way for pulling some of the retain/release checker into a "Checker" class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85971 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Merge NullDerefChecker.[h,cpp] and UndefDerefChecker.[h,cpp]. They are ↵Ted Kremenek
essentially two parts of the same check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85911 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Update CMakeLists.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85898 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Pull VLA size checker into its own files. Zhongxing Xu
Split it to two checkers, one for undefined size, the other for zero size, so that we don't need to query the size when emitting the bug report. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Implement: <rdar://problem/6250216> Warn against using -[NSAutoreleasePool ↵Ted Kremenek
release] in GC mode git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85887 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Move 'static inline' functions GetNullarySelector() and GetUnarySelector() ↵Ted Kremenek
from CFRefCount.cpp to ASTContext.h. These functions are likely to be generally useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85886 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Pull AttrNonNullChecker into its own files.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85883 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Update CMake file.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85879 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Rename NSErrorCheck to NSErrorChecker.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85877 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Update CMake file.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85876 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Pull UndefinedArgChecker into its own files.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85875 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Pull BadCallChecker into its own files.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85868 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03retain/release checker: CGBitmapContextCreateWithData() returns an owned object.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85867 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03retain/release checker: Add special handling of CGBitmapContextCreateWithData().Ted Kremenek
Fixes: <rdar://problem/7358899> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85864 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-02Remove GRExprEngine::CheckerVisitLocation(). It was only called in one ↵Ted Kremenek
place, so we inlined it in to GRExprEngine::EvalLocation(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85838 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31Update CMake file.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85652 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31Move CheckDivZero into its own files.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85651 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31Move UndefDerefChecker into its own file.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85645 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-31fix 80-col.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85642 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30Tighten computation of ExprVal using ?: expression. No functionality change.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85618 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30Make checkers run in deterministic order.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85597 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30Move NullDerefChecker.h instead a 'Checkers' subdirectory.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85596 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30Move all logic for the null dereference checker from ↵Ted Kremenek
GRExprEngineInternalChecks.cpp to a separate .cpp file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85595 91177308-0d34-0410-b5e6-96231b3b80d8